[packages/monit] up to 5.9; update license; remove duplicate config

glen glen at pld-linux.org
Mon Oct 27 16:38:53 CET 2014


commit 4b7f41ce276cbc816b71aa0cd59ccba8919a5f2e
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Oct 27 17:38:30 2014 +0200

    up to 5.9; update license; remove duplicate config

 config.patch | 31 +++++++++++++++++++++++++++++++
 monit.spec   | 36 +++++++++++++++++++-----------------
 monitrc      | 28 ----------------------------
 3 files changed, 50 insertions(+), 45 deletions(-)
---
diff --git a/monit.spec b/monit.spec
index 18ef7e9..d8d46dc 100644
--- a/monit.spec
+++ b/monit.spec
@@ -1,16 +1,16 @@
-#
 Summary:	Process monitor and restart utility
 Summary(pl.UTF-8):	Narzędzie do monitorowania procesów i ich restartowania
 Name:		monit
-Version:	5.3.2
+Version:	5.9
 Release:	1
-License:	GPL v3+
+License:	AGPL v3
 Group:		Daemons
 Source0:	http://mmonit.com/monit/dist/%{name}-%{version}.tar.gz
-# Source0-md5:	8bc077e3c289b2ad54360cc63914c4e5
+# Source0-md5:	808473ebbacda0c5085d7399e507bfda
 Source1:	%{name}.init
 Source2:	%{name}rc
 Source3:	%{name}.config
+Patch0:		config.patch
 URL:		http://mmonit.com/monit/
 BuildRequires:	bison
 BuildRequires:	flex
@@ -33,25 +33,27 @@ program przestaje odpowiadać.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %configure \
+	--bindir=%{_sbindir} \
 	--with-ssl-lib-dir=%{_libdir}
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,monit,sysconfig},%{_sbindir}}
-
+install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,monit,sysconfig}
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/monit
+
+cp -p monitrc $RPM_BUILD_ROOT%{_sysconfdir}/monitrc
 # NOTE: 'include *.monitrc' will fail if nothing matches the glob.
-install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/monitrc
-install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/monit
-install monitrc $RPM_BUILD_ROOT%{_sysconfdir}/monit/default.monitrc
-mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/monit
+# so install dummy config not to remove it with upgrades (avoid .rpmsave)
+cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/monit/default.monitrc
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -68,11 +70,11 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc CHANGES README*
-%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}rc
-%dir %attr(751,root,root) %{_sysconfdir}/monit
-%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/monit
+%doc CONTRIBUTORS README*
+%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/monitrc
+%dir %attr(751,root,root) %{_sysconfdir}/%{name}
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/default.monitrc
-%attr(755,root,root) %{_sbindir}/monit
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/monit
 %attr(754,root,root) /etc/rc.d/init.d/%{name}
-%{_mandir}/man?/*
+%attr(755,root,root) %{_sbindir}/monit
+%{_mandir}/man1/monit.1*
diff --git a/config.patch b/config.patch
new file mode 100644
index 0000000..ef114db
--- /dev/null
+++ b/config.patch
@@ -0,0 +1,31 @@
+--- monit-5.9/monitrc	2014-10-27 17:33:09.741090635 +0200
++++ monit-5.9/monitrc	2014-10-27 17:35:35.171362348 +0200
+@@ -51,7 +51,8 @@
+ ## specified using a comma separator. If the first mail server fails, Monit 
+ # will use the second mail server in the list and so on. By default Monit uses 
+ # port 25 - it is possible to override this with the PORT option.
+-#
++
++set mailserver localhost
+ # set mailserver mail.bar.baz,               # primary mailserver
+ #                backup.bar.baz port 10025,  # backup mailserver on port 10025
+ #                localhost                   # fallback relay
+@@ -108,9 +109,9 @@
+ ## You can set alert recipients whom will receive alerts if/when a 
+ ## service defined in this file has errors. Alerts may be restricted on 
+ ## events by using a filter as in the second example below.
+-#
+-# set alert sysadm at foo.bar                       # receive all alerts
+-#
++
++set alert root at localhost                        # receive all alerts
++
+ ## Do not alert when Monit starts, stops or performs a user initiated action.
+ ## This filter is recommended to avoid getting alerts for trivial cases.
+ #
+@@ -256,3 +257,2 @@
+-#
+-#  include /etc/monit.d/*
+-#
++
++include /etc/monit/*.monitrc
diff --git a/monitrc b/monitrc
index c2c76f9..092123e 100644
--- a/monitrc
+++ b/monitrc
@@ -4,31 +4,3 @@
 ##
 ## Comments begin with a '#' and extend through the end of the line. Keywords
 ## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'.
-##
-
-include /etc/monit/*.monitrc
-
-###############################################################################
-## Global section
-###############################################################################
-##
-
-## Set list of mailservers for alert delivery. Multiple servers may be 
-## specified using comma separator. By default monit uses port 25 - it is 
-## possible to override it with the PORT option.
-#
-set mailserver localhost               # primary mailserver
-
-## You can set the alert recipients here, which will receive the alert for
-## each service. The event alerts may be restricted using the list.
-#
-set alert root at localhost                        # receive all alerts
-
-## Monit has an embedded webserver, which can be used to view the 
-## configuration, actual services parameters or manage the services using the 
-## web interface.
-#
-set httpd port 2812 and
-     use address localhost  # only accept connection from localhost
-     allow localhost        # allow localhost to connect to the server and
-     allow admin:monit      # require user 'admin' with password 'monit'
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/monit.git/commitdiff/4b7f41ce276cbc816b71aa0cd59ccba8919a5f2e



More information about the pld-cvs-commit mailing list