[packages/nagios-notify] Update to 0.15.0; Project moved to GitHub

glen glen at pld-linux.org
Sat Aug 14 01:21:56 CEST 2021


commit 39713a26525a5611d2e752118a5ce9a29abc3023
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Sat Aug 14 02:18:04 2021 +0300

    Update to 0.15.0; Project moved to GitHub

 duration.patch     | 91 ------------------------------------------------------
 headers.patch      | 33 --------------------
 nagios-notify.spec | 20 +++++-------
 off-by.patch       | 57 ----------------------------------
 4 files changed, 7 insertions(+), 194 deletions(-)
---
diff --git a/nagios-notify.spec b/nagios-notify.spec
index eaa6f61..a5ffabc 100644
--- a/nagios-notify.spec
+++ b/nagios-notify.spec
@@ -1,16 +1,14 @@
 Summary:	Nagios Notify Script
 Summary(pl.UTF-8):	Skrypt powiadamiający dla Nagiosa
 Name:		nagios-notify
-Version:	0.14
-Release:	4
+Version:	0.15.0
+Release:	1
 License:	GPL v2
 Group:		Applications
-Source0:	%{name}-%{version}.tar.bz2
-# Source0-md5:	47c06d14e2944f222fe08298a62ef607
-Patch0:		headers.patch
-Patch1:		duration.patch
-Patch2:		off-by.patch
-URL:		http://glen.alkohol.ee/nagios-notify/
+#Source0:	%{name}-%{version}.tar.xz
+Source0:	https://github.com/glensc/nagios-notify/releases/download/%{version}/%{name}-%{version}.tar.xz
+# Source0-md5:	f42d34feb8355cfdd0c629bdb6ef98f4
+URL:		https://github.com/glensc/nagios-notify
 Requires:	awk
 Requires:	nagios-common
 # notify via emails
@@ -56,13 +54,9 @@ Powody, dla których dobrze jest używać tego skryptu:
 
 %prep
 %setup -q
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
@@ -73,6 +67,6 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc ChangeLog
 %dir %{_sysconfdir}/templates
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/templates/*
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/templates/*.tmpl
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/plugins/%{name}.cfg
 %attr(755,root,root) %{_sbindir}/nagios-notify
diff --git a/duration.patch b/duration.patch
deleted file mode 100644
index 891ed54..0000000
--- a/duration.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-diff -urN nagios-notify-0.14.org/nagios-notify nagios-notify-0.14/nagios-notify
---- nagios-notify-0.14.org/nagios-notify	2012-12-14 12:52:19.000000000 +0100
-+++ nagios-notify-0.14/nagios-notify	2021-05-04 09:12:22.586849116 +0200
-@@ -53,6 +53,10 @@
- 		return "=?" charset "?b?" base64_string(data) "?="
- 	}
- 
-+	function timestamp_date(tstamp) {
-+		return strftime("%Y-%m-%d %H:%M:%S", tstamp);
-+	}
-+
- 	# urlencode
- 	function urlencode(data,   hextab, i, n, res, c, lo, hi) {
- 		split("1 2 3 4 5 6 7 8 9 a b c d e f", hextab, " ")
-@@ -276,6 +280,16 @@
- 			data = substr(params, index(params, ",") + 1)
- 			$0 = left encode_mime_header(charset, data) right;
- 		}
-+
-+		# $(timestamp_date:data)
-+		while (match($0, /\$\(timestamp_date:([^)]+)\)/)) {
-+			pos = length("$(timestamp_date:")
-+			data = substr($0, RSTART + pos, RLENGTH - pos - 1);
-+			left = substr($0, 0, RSTART);
-+			right = substr($0, RSTART + RLENGTH);
-+			$0 = left timestamp_date(data) right;
-+		}
-+
- 		# $(urlencode:data)
- 		while (match($0, /\$\(urlencode:([^)]+)\)/)) {
- 			pos = length("$(urlencode:")
-diff -urN nagios-notify-0.14.org/templates/notify-host-by-email.tmpl nagios-notify-0.14/templates/notify-host-by-email.tmpl
---- nagios-notify-0.14.org/templates/notify-host-by-email.tmpl	2018-02-21 20:49:01.969994349 +0100
-+++ nagios-notify-0.14/templates/notify-host-by-email.tmpl	2021-05-04 09:14:10.686925437 +0200
-@@ -14,4 +14,6 @@
- Address: $HOSTADDRESS$
- Info: $HOSTOUTPUT$
- 
-+Current state since: $SERVICEDURATION$
-+Last service OK: $(timestamp_date:$LASTSERVICEOK$)
- Date/Time: $LONGDATETIME$
-diff -urN nagios-notify-0.14.org/templates/notify-host-by-jabber.tmpl nagios-notify-0.14/templates/notify-host-by-jabber.tmpl
---- nagios-notify-0.14.org/templates/notify-host-by-jabber.tmpl	2012-12-14 11:48:27.000000000 +0100
-+++ nagios-notify-0.14/templates/notify-host-by-jabber.tmpl	2021-05-04 09:14:37.994452535 +0200
-@@ -1,2 +1,2 @@
--$HOSTNAME$ $NOTIFICATIONTYPE$: $HOSTSTATE$
-+$HOSTNAME$ $NOTIFICATIONTYPE$: $HOSTSTATE$ (Current state since: $HOSTDURATION$; Last host UP: $(timestamp_date:$LASTHOSTUP$))
- $HOSTOUTPUT$
-diff -urN nagios-notify-0.14.org/templates/notify-host-by-sms.tmpl nagios-notify-0.14/templates/notify-host-by-sms.tmpl
---- nagios-notify-0.14.org/templates/notify-host-by-sms.tmpl	2012-12-14 11:48:27.000000000 +0100
-+++ nagios-notify-0.14/templates/notify-host-by-sms.tmpl	2021-05-04 09:14:57.541734913 +0200
-@@ -4,4 +4,7 @@
- From: $HOSTNAME$@nagios.0
- Subject: $HOSTSTATE$
- 
-+Current state since: $HOSTDURATION$
-+Last Host UP: $(timestamp_date:$LASTHOSTUP$)
-+
- $HOSTOUTPUT$
-diff -urN nagios-notify-0.14.org/templates/notify-service-by-email.tmpl nagios-notify-0.14/templates/notify-service-by-email.tmpl
---- nagios-notify-0.14.org/templates/notify-service-by-email.tmpl	2018-02-21 20:49:19.157176605 +0100
-+++ nagios-notify-0.14/templates/notify-service-by-email.tmpl	2021-05-04 09:15:31.462803004 +0200
-@@ -15,6 +15,8 @@
- Address: $HOSTADDRESS$
- State: $SERVICESTATE$
- 
-+Current state since: $SERVICEDURATION$
-+Last service OK: $(timestamp_date:$LASTSERVICEOK$)
- Date/Time: $LONGDATETIME$
- 
- Additional Info:
-diff -urN nagios-notify-0.14.org/templates/notify-service-by-jabber.tmpl nagios-notify-0.14/templates/notify-service-by-jabber.tmpl
---- nagios-notify-0.14.org/templates/notify-service-by-jabber.tmpl	2012-12-14 11:48:27.000000000 +0100
-+++ nagios-notify-0.14/templates/notify-service-by-jabber.tmpl	2021-05-04 09:15:48.273332157 +0200
-@@ -1,2 +1,2 @@
--$SERVICEDESC$/$HOSTNAME$ $NOTIFICATIONTYPE$: $SERVICESTATE$
-+$SERVICEDESC$/$HOSTNAME$ $NOTIFICATIONTYPE$: $SERVICESTATE$ (Current state since: $SERVICEDURATION$; Last service OK: $(timestamp_date:$LASTSERVICEOK$))
- $SERVICEOUTPUT$
-diff -urN nagios-notify-0.14.org/templates/notify-service-by-sms.tmpl nagios-notify-0.14/templates/notify-service-by-sms.tmpl
---- nagios-notify-0.14.org/templates/notify-service-by-sms.tmpl	2012-12-14 11:48:27.000000000 +0100
-+++ nagios-notify-0.14/templates/notify-service-by-sms.tmpl	2021-05-04 09:16:17.924265238 +0200
-@@ -4,6 +4,9 @@
- From: $SERVICEDESC$@$HOSTNAME$.0
- Subject: $SERVICESTATE$
- 
-+Current state since: $SERVICEDURATION$
-+Last service OK: $(timestamp_date:$LASTSERVICEOK$)
-+
- #if "$NOTIFICATIONTYPE$" == "ACKNOWLEDGEMENT"
- Acknowledged by $SERVICEACKAUTHOR$: $SERVICEACKCOMMENT$
- #else
diff --git a/headers.patch b/headers.patch
deleted file mode 100644
index 1c2c0c2..0000000
--- a/headers.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -urN nagios-notify-0.14.org/templates/notify-host-by-email.tmpl nagios-notify-0.14/templates/notify-host-by-email.tmpl
---- nagios-notify-0.14.org/templates/notify-host-by-email.tmpl	2012-12-14 11:48:27.000000000 +0100
-+++ nagios-notify-0.14/templates/notify-host-by-email.tmpl	2018-02-21 20:49:01.969994349 +0100
-@@ -4,6 +4,7 @@
- In-Reply-To: $DATE$@$HOSTNAME$.nagios
- To: "$(encode_mime_header:iso8859-1,$CONTACTALIAS$)" <$CONTACTEMAIL$>
- Subject: Host $HOSTSTATE$ alert for $HOSTNAME$!
-+Auto-Submitted: auto-generated
- 
- ***** Nagios/$VERSION$ *****
- 
-diff -urN nagios-notify-0.14.org/templates/notify-service-by-email-conditions.tmpl nagios-notify-0.14/templates/notify-service-by-email-conditions.tmpl
---- nagios-notify-0.14.org/templates/notify-service-by-email-conditions.tmpl	2012-12-14 11:48:27.000000000 +0100
-+++ nagios-notify-0.14/templates/notify-service-by-email-conditions.tmpl	2018-02-21 20:49:12.600313242 +0100
-@@ -4,6 +4,7 @@
- In-Reply-To: $SERVICEDESC$.$DATE$@$HOSTALIAS$.nagios
- To: "$(encode_mime_header:utf-8,$CONTACTALIAS$)" <$CONTACTEMAIL$>
- Subject: ** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **
-+Auto-Submitted: auto-generated
- 
- ***** Nagios/$VERSION$ *****
- 
-diff -urN nagios-notify-0.14.org/templates/notify-service-by-email.tmpl nagios-notify-0.14/templates/notify-service-by-email.tmpl
---- nagios-notify-0.14.org/templates/notify-service-by-email.tmpl	2012-12-14 11:48:27.000000000 +0100
-+++ nagios-notify-0.14/templates/notify-service-by-email.tmpl	2018-02-21 20:49:19.157176605 +0100
-@@ -4,6 +4,7 @@
- In-Reply-To: $SERVICEDESC$.$DATE$@$HOSTALIAS$.nagios
- To: "$(encode_mime_header:iso8859-1,$CONTACTALIAS$)" <$CONTACTEMAIL$>
- Subject: ** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **
-+Auto-Submitted: auto-generated
- 
- ***** Nagios/$VERSION$ *****
- 
diff --git a/off-by.patch b/off-by.patch
deleted file mode 100644
index 2357cf2..0000000
--- a/off-by.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-diff -urN nagios-notify-0.14.org/nagios-notify nagios-notify-0.14/nagios-notify
---- nagios-notify-0.14.org/nagios-notify	2021-05-04 09:12:22.586849116 +0200
-+++ nagios-notify-0.14/nagios-notify	2021-05-04 09:29:15.795337592 +0200
-@@ -265,7 +265,7 @@
- 		while (match($0, /\$\(base64:([^)]+)\)/)) {
- 			pos = length("$(base64:")
- 			file = substr($0, RSTART + pos, RLENGTH - pos - 1);
--			left = substr($0, 0, RSTART);
-+			left = substr($0, 0, RSTART - 1);
- 			right = substr($0, RSTART + RLENGTH);
- 			$0 = left base64(file) right;
- 		}
-@@ -274,7 +274,7 @@
- 		while (match($0, /\$\(encode_mime_header:([^,]*,[^)]+)\)/)) {
- 			pos = length("$(encode_mime_header:")
- 			params = substr($0, RSTART + pos, RLENGTH - pos - 1);
--			left = substr($0, 0, RSTART);
-+			left = substr($0, 0, RSTART - 1);
- 			right = substr($0, RSTART + RLENGTH);
- 			charset = substr(params, 1, index(params, ",") - 1)
- 			data = substr(params, index(params, ",") + 1)
-@@ -285,7 +285,7 @@
- 		while (match($0, /\$\(timestamp_date:([^)]+)\)/)) {
- 			pos = length("$(timestamp_date:")
- 			data = substr($0, RSTART + pos, RLENGTH - pos - 1);
--			left = substr($0, 0, RSTART);
-+			left = substr($0, 0, RSTART - 1);
- 			right = substr($0, RSTART + RLENGTH);
- 			$0 = left timestamp_date(data) right;
- 		}
-@@ -294,7 +294,7 @@
- 		while (match($0, /\$\(urlencode:([^)]+)\)/)) {
- 			pos = length("$(urlencode:")
- 			data = substr($0, RSTART + pos, RLENGTH - pos - 1);
--			left = substr($0, 0, RSTART);
-+			left = substr($0, 0, RSTART - 1);
- 			right = substr($0, RSTART + RLENGTH);
- 			$0 = left urlencode(data) right;
- 		}
-@@ -302,7 +302,7 @@
- 		while (match($0, /\$\(unescape:([^)]*)\)/)) {
- 			pos = length("$(unescape:")
- 			data = substr($0, RSTART + pos, RLENGTH - pos - 1);
--			left = substr($0, 0, RSTART);
-+			left = substr($0, 0, RSTART - 1);
- 			right = substr($0, RSTART + RLENGTH);
- 			$0 = left unescape(data) right;
- 		}
-@@ -311,7 +311,7 @@
- 		while (match($0, "\$\(math:("MATH_EXPR") *("MATH_OPS") *("MATH_EXPR")\)")) {
- 			pos = length("$(math:")
- 			expr = substr($0, RSTART + pos, RLENGTH - pos - 1);
--			left = substr($0, 0, RSTART);
-+			left = substr($0, 0, RSTART - 1);
- 			right = substr($0, RSTART + RLENGTH);
- 			$0 = left math(expr) right;
- 		}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nagios-notify.git/commitdiff/39713a26525a5611d2e752118a5ce9a29abc3023



More information about the pld-cvs-commit mailing list