Hello community,

here is the log from the commit of package monit for openSUSE:Factory checked 
in at 2018-01-13 21:44:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/monit (Old)
 and      /work/SRC/openSUSE:Factory/.monit.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "monit"

Sat Jan 13 21:44:10 2018 rev:40 rq:556905 version:5.25.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/monit/monit.changes      2017-12-01 
15:54:27.298273435 +0100
+++ /work/SRC/openSUSE:Factory/.monit.new/monit.changes 2018-01-13 
21:44:21.507274002 +0100
@@ -1,0 +2,20 @@
+Thu Dec 14 10:01:46 UTC 2017 - [email protected]
+
+- remove double Req of %insserv_prereq
+
+-------------------------------------------------------------------
+Wed Dec 13 17:29:44 UTC 2017 - [email protected]
+
+- fix for boo#1072692
+  * monit: unable to start
+  * add systemd monit.service file
+  * still support SysVinit (SLE_11)
+- update to 5.25.1
+  * https://mmonit.com/monit/changes/
+- rebase patches
+  * monit-better_default_monitrc.patch
+  * monit-rundir.patch
+- format specfile
+- more use of macros
+
+-------------------------------------------------------------------

Old:
----
  monit-5.22.0.tar.gz
  monit-5.22.0.tar.gz.sha256

New:
----
  monit-5.25.1.tar.gz
  monit-5.25.1.tar.gz.sha256
  monit.service

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ monit.spec ++++++
--- /var/tmp/diff_new_pack.VFJppV/_old  2018-01-13 21:44:22.503227579 +0100
+++ /var/tmp/diff_new_pack.VFJppV/_new  2018-01-13 21:44:22.507227393 +0100
@@ -23,19 +23,21 @@
 %endif
 
 Name:           monit
-Version:        5.22.0
+Version:        5.25.1
 Release:        0
 Summary:        Service Manager and Monitor System
 License:        AGPL-3.0
 Group:          System/Monitoring
-Source:         https://mmonit.com/monit/dist/monit-%{version}.tar.gz
-Source2:        https://mmonit.com/monit/dist/monit-%{version}.tar.gz.sha256
-Source1:        monit-vendor-files.tar.gz
-Patch1:         monit-better_default_monitrc.patch
-Patch2:         monit-rundir.patch
-Source99:       monit-rpmlintrc
-Url:            https://mmonit.com/monit/#download
+Url:            https://m%{name}.com/%{name}/#download
+Source0:        https://m%{name}.com/%{name}/dist/%{name}-%{version}.tar.gz
+Source1:        
https://m%{name}.com/%{name}/dist/%{name}-%{version}.tar.gz.sha256
+Source2:        %{name}-rpmlintrc
+Source3:        %{name}.service
+Source100:      %{name}-vendor-files.tar.gz
+Patch1:         %{name}-better_default_monitrc.patch
+Patch2:         %{name}-rundir.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+#
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  bison
@@ -46,9 +48,20 @@
 BuildRequires:  make
 BuildRequires:  openssl-devel
 BuildRequires:  pam-devel
-PreReq:         %insserv_prereq
-Obsoletes:      monit-beta < %{version}
-Provides:       monit-beta = %{version}
+
+%if 0%{?suse_version} >= 1210
+BuildRequires:  systemd
+%{?systemd_requires}
+%define has_systemd 1
+%define _monit_run_dir  /run/%{name}
+%else
+Requires(pre):  %insserv_prereq
+%define _monit_run_dir  %{_localstatedir}/run/%{name}
+%endif
+
+Obsoletes:      %{name}-beta < %{version}
+Provides:       %{name}-beta = %{version}
+
 %if "%{_vendor}" == "suse"
 %define VENDOR SUSE
 %else
@@ -88,9 +101,9 @@
 You must also install the package %{name} to actually use monit.
 
 %prep
-%setup -q -a1
-%patch1 -p1
-%patch2 -p1
+%setup -q -a100
+%patch1
+%patch2
 
 find doc/ -type f -size 0 -exec %__rm {} \;
 
@@ -106,27 +119,27 @@
 
 %__install -d \
        "%{buildroot}/etc/init.d" \
-       "%{buildroot}%{_sysconfdir}/monit.d" \
+       "%{buildroot}%{_sysconfdir}/%{name}.d" \
        "%{buildroot}%{_sbindir}" \
-       "%{buildroot}%{_datadir}/monit" \
+       "%{buildroot}%{_datadir}/%{name}" \
        "%{buildroot}%{_fillupdir}" \
-       "%{buildroot}/run/monit" \
-       "%{buildroot}/run/monit/events" \
-       "%{buildroot}%{_var}/lib/monit"
-
-. vendor-files/sysconfig/monit.tmpl
-MONIT_BIN="%{_bindir}/monit"
-MONIT_MODIFY_INITTAB="%{_datadir}/monit/monit-modifyinittab"
-MONIT_PID_FILE="/run/monit/monit.pid"
-MONIT_SYSCONFIG_FILE="/etc/sysconfig/monit"
-MONIT_INITTAB_STATE_FILE="%{_var}/lib/monit/monit-inittab.state"
-MONIT_ARGS="-p ${MONIT_PID_FILE} -s /run/monit/monit.state"
-MONIT_EVENTQUE_DIR="%{_var}/lib/monit"
-%__sed -e "s|%{_var}/monit|${MONIT_EVENTQUE_DIR}|g" \
-       < monitrc > "%{buildroot}%{_sysconfdir}/monitrc"
+       "%{buildroot}%{_monit_run_dir}" \
+       "%{buildroot}%{_monit_run_dir}/events" \
+       "%{buildroot}%{_localstatedir}/lib/%{name}"
+
+. vendor-files/sysconfig/%{name}.tmpl
+MONIT_BIN="%{_bindir}/%{name}"
+MONIT_MODIFY_INITTAB="%{_datadir}/%{name}/%{name}-modifyinittab"
+MONIT_PID_FILE="%{_monit_run_dir}/%{name}.pid"
+MONIT_SYSCONFIG_FILE="/etc/sysconfig/%{name}"
+MONIT_INITTAB_STATE_FILE="%{_localstatedir}/lib/%{name}/%{name}-inittab.state"
+MONIT_ARGS="-p ${MONIT_PID_FILE} -s %{_monit_run_dir}/%{name}.state"
+MONIT_EVENTQUE_DIR="%{_localstatedir}/lib/%{name}"
+%__sed -e "s|%{_monit_run_dir}|${MONIT_EVENTQUE_DIR}|g" \
+       < %{name}rc > "%{buildroot}%{_sysconfdir}/%{name}rc"
 
 pushd vendor-files
-for templatefile in docu/README tools/monit-modifyinittab init/monit 
sysconfig/monit; do
+for templatefile in docu/README tools/%{name}-modifyinittab init/%{name} 
sysconfig/%{name}; do
        %__sed \
                -e "s|__MONIT_RC_FILE__|${MONIT_RC_FILE}|g" \
                -e "s|__MONIT_INITTAB_BASE__|${MONIT_INITTAB_BASE}|g" \
@@ -142,14 +155,23 @@
 done
 popd # vendor-files
 
-%__install -m0754 vendor-files/init/monit "%{buildroot}/etc/init.d/monit"
-%__ln_s ../../etc/init.d/monit "%{buildroot}/usr/sbin/rcmonit"
-%__install -m0754 vendor-files/tools/monit-modifyinittab 
"%{buildroot}%{_datadir}/monit"
-%__install -m0644 vendor-files/sysconfig/monit 
"%{buildroot}%{_fillupdir}/sysconfig.monit"
-touch "%{buildroot}%{_var}/lib/monit/monit-inittab.state"
+# systemd vs SysVinit
+%if 0%{?has_systemd}
+install -D -m 0644 %{S:3} %{buildroot}%{_unitdir}/%{name}.service
+ln -sf %{_sbindir}/service %{buildroot}/%{_sbindir}/rc%{name}
+%else #SysVinit
+%__install -m0754 vendor-files/init/%{name} 
"%{buildroot}%{_sysconfdir}/init.d/%{name}"
+%__ln_s %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
+%endif
+%__install -m0644 vendor-files/sysconfig/%{name} 
"%{buildroot}%{_fillupdir}/sysconfig.%{name}"
+
+%__install -m0754 vendor-files/tools/%{name}-modifyinittab 
"%{buildroot}%{_datadir}/%{name}"
+
+touch "%{buildroot}%{_localstatedir}/lib/%{name}/%{name}-inittab.state"
 %if 0%{?suse_version} == 0 || 0%{?suse_version} > 1110
-touch "%{buildroot}/run/monit/.monit.id"
-touch "%{buildroot}/run/monit"/monit.{pid,state}
+touch "%{buildroot}%{_monit_run_dir}/.%{name}.id"
+touch "%{buildroot}%{_monit_run_dir}"/%{name}.pid
+touch "%{buildroot}%{_monit_run_dir}"/%{name}.state
 %endif
 %__install -m0644 vendor-files/docu/README README.SUSE
 
@@ -165,43 +187,61 @@
     echo "%doc %{_docdir}/%{name}/$(basename $f)" >>doc.doc.lst
 done
 
-%post
-%{fillup_and_insserv}
-%__install -d -m0700 -o root -g root /run/monit
-%__install -d -m0700 -o root -g root /run/monit/events
+%pre
+%if 0%{?has_systemd}
+%service_add_pre %{name}.service
+%endif
 
 %preun
-%{stop_on_removal monit}
+%if 0%{?has_systemd}
+%service_del_preun %{name}.service
+%else
+%stop_on_removal %{name}
+%endif
+
+%post
+%if 0%{?has_systemd}
+%service_add_post %{name}.service
+%{fillup_and_insserv -i}
+%else
+%{fillup_and_insserv}
+%__install -d -m0700 -o root -g root %{_localstatedir}/run/%{name}
+%__install -d -m0700 -o root -g root %{_localstatedir}/run/%{name}/events
+%endif
 
 %postun
-%{restart_on_update monit}
+%if 0%{?has_systemd}
+%service_del_postun %{name}.service
+%else
+%restart_on_update %{name}
 %{insserv_cleanup}
-
-%clean
-%{?buildroot:%__rm -rf "%{buildroot}"}
+%endif
 
 %files -f doc.main.lst
 %defattr(-,root,root)
+%doc %{_mandir}/man1/%{name}.1%{ext_man}
 %doc %dir %{_docdir}/%{name}
-%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/monitrc
-%dir %{_sysconfdir}/monit.d
-%attr(0754,root,root) %config /etc/init.d/monit
-/usr/sbin/rcmonit
-%{_bindir}/monit
-%dir %{_datadir}/monit
-%{_datadir}/monit/monit-modifyinittab
-%{_fillupdir}/sysconfig.monit
-%dir %{_var}/lib/monit
-%ghost %{_var}/lib/monit/monit-inittab.state
+%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/%{name}rc
+%dir %{_sysconfdir}/%{name}.d
+%if 0%{?has_systemd}
+%{_unitdir}/%{name}.service
+%else
+%attr(0754,root,root) %config %{_sysconfdir}/init.d/%{name}
+%endif
+%{_sbindir}/rc%{name}
+%{_bindir}/%{name}
+%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/%{name}-modifyinittab
+%{_fillupdir}/sysconfig.%{name}
+%dir %{_localstatedir}/lib/%{name}
+%ghost %{_localstatedir}/lib/%{name}/%{name}-inittab.state
 %if 0%{?suse_version} == 0 || 0%{?suse_version} > 1110
-%dir /run
-%ghost %dir /run/monit
-%ghost /run/monit/monit.pid
-%ghost /run/monit/monit.state
-%ghost /run/monit/.monit.id
-%ghost %dir /run/monit/events
+%ghost %dir %{_monit_run_dir}
+%ghost %{_monit_run_dir}/%{name}.pid
+%ghost %{_monit_run_dir}/%{name}.state
+%ghost %{_monit_run_dir}/.%{name}.id
+%ghost %dir %{_monit_run_dir}/events
 %endif
-%doc %{_mandir}/man1/monit.1%{ext_man}
 
 %files doc -f doc.doc.lst
 %defattr(-,root,root)

++++++ monit-5.22.0.tar.gz -> monit-5.25.1.tar.gz ++++++
++++ 81653 lines of diff (skipped)

++++++ monit-5.22.0.tar.gz.sha256 -> monit-5.25.1.tar.gz.sha256 ++++++
--- /work/SRC/openSUSE:Factory/monit/monit-5.22.0.tar.gz.sha256 2017-04-24 
09:49:22.254974828 +0200
+++ /work/SRC/openSUSE:Factory/.monit.new/monit-5.25.1.tar.gz.sha256    
2018-01-13 21:44:21.271285001 +0100
@@ -1 +1 @@
-9fc58b5e3caafd64f0b6fff3e65ae757239fab37d04fb33efce177da15176183  
monit-5.22.0.tar.gz
+4b5c25ceb10825f1e5404f1d8a7b21507716b82bc20c3586f86603691c3b81bc  
monit-5.25.1.tar.gz

++++++ monit-better_default_monitrc.patch ++++++
--- /var/tmp/diff_new_pack.VFJppV/_old  2018-01-13 21:44:22.927207817 +0100
+++ /var/tmp/diff_new_pack.VFJppV/_new  2018-01-13 21:44:22.927207817 +0100
@@ -1,6 +1,8 @@
---- monit-5.22.0/monitrc       2017-04-19 15:19:49.000000000 +0200
-+++ monit-5.22.0/monitrc       2017-04-21 10:56:02.422079492 +0200
-@@ -24,20 +24,20 @@
+Index: monitrc
+===================================================================
+--- monitrc.orig
++++ monitrc
+@@ -24,20 +24,20 @@ set daemon  30              # check serv
  ## Set syslog logging. If you want to log to a standalone log file instead,
  ## specify the full path to the log file
  #
@@ -13,27 +15,27 @@
  ## running Monit instance. By default this file is stored in $HOME/.monit.pid
  #
 -# set pidfile /var/run/monit.pid
-+ set pidfile /run/monit/monit.pid
++set pidfile /run/monit/monit.pid
  #
  ## Set the location of the Monit id file which stores the unique id for the
  ## Monit instance. The id is generated and stored on first Monit start. By
  ## default the file is placed in $HOME/.monit.id.
  #
 -# set idfile /var/.monit.id
-+ set idfile /run/monit/.monit.id
++set idfile /run/monit/.monit.id
  #
  ## Set the location of the Monit state file which saves monitoring states
  ## on each cycle. By default the file is placed in $HOME/.monit.state. If
-@@ -45,7 +45,7 @@
+@@ -45,7 +45,7 @@ set log syslog
  ## the monitoring state across reboots. If it is on temporary filesystem, the
  ## state will be lost on reboot which may be convenient in some situations.
  #
 -# set statefile /var/.monit.state
-+ set statefile /run/monit/.monit.state
++set statefile /run/monit/.monit.state
  #
  #
  
-@@ -66,10 +66,10 @@
+@@ -66,10 +66,10 @@ set log syslog
  ## Set global SSL options (just most common options showed, see manual for
  ## full list).
  #
@@ -41,14 +43,14 @@
 -#     verify     : enable, # verify SSL certificates (disabled by default but 
STRONGLY RECOMMENDED)
 -#     selfsigned : allow   # allow self signed SSL certificates (reject by 
default)
 -# }
-+ set ssl {
-+     verify     : enable, # verify SSL certificates (disabled by default but 
STRONGLY RECOMMENDED)
-+     selfsigned : allow   # allow self signed SSL certificates (reject by 
default)
-+ }
++set ssl {
++    verify     : enable, # verify SSL certificates (disabled by default but 
STRONGLY RECOMMENDED)
++    selfsigned : allow   # allow self signed SSL certificates (reject by 
default)
++}
  #
  #
  ## Set the list of mail servers for alert delivery. Multiple servers may be
-@@ -80,7 +80,7 @@
+@@ -80,7 +80,7 @@ set log syslog
  # set mailserver mail.bar.baz,               # primary mailserver
  #                backup.bar.baz port 10025,  # backup mailserver on port 10025
  #                localhost                   # fallback relay
@@ -57,25 +59,25 @@
  #
  ## By default Monit will drop alert events if no mail servers are available.
  ## If you want to keep the alerts for later delivery retry, you can use the
-@@ -89,9 +89,9 @@
+@@ -89,9 +89,9 @@ set log syslog
  ## by using the SLOTS option (if omitted, the queue is limited by space
  ## available in the back end filesystem).
  #
 -# set eventqueue
 -#     basedir /var/monit  # set the base directory where events will be stored
 -#     slots 100           # optionally limit the queue size
-+ set eventqueue
-+     basedir /run/monit/events  # set the base directory where events will be 
stored
-+     slots 100           # optionally limit the queue size
++set eventqueue
++    basedir /run/monit/events  # set the base directory where events will be 
stored
++    slots 100           # optionally limit the queue size
  #
  #
  ## Send status and events to M/Monit (for more informations about M/Monit
-@@ -131,14 +131,14 @@
+@@ -131,14 +131,14 @@ set log syslog
  ## or sender using the MAIL-FORMAT statement. Macros such as $DATE, etc.
  ## are expanded at runtime. For example, to override the sender, use:
  #
 -# set mail-format { from: [email protected] }
-+ set mail-format { from: monit@localhost }
++set mail-format { from: monit@localhost }
  #
  #
  ## You can set alert recipients whom will receive alerts if/when a
@@ -83,7 +85,7 @@
  ## events by using a filter as in the second example below.
  #
 -# set alert [email protected]                       # receive all alerts
-+ set alert sysadm@localhost                       # receive all alerts
++set alert root@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.

++++++ monit-rundir.patch ++++++
--- /var/tmp/diff_new_pack.VFJppV/_old  2018-01-13 21:44:22.947206885 +0100
+++ /var/tmp/diff_new_pack.VFJppV/_new  2018-01-13 21:44:22.947206885 +0100
@@ -1,8 +1,8 @@
-Index: monit-5.16/src/monit.h
+Index: src/monit.h
 ===================================================================
---- monit-5.16.orig/src/monit.h        2016-02-04 09:11:03.000000000 +0100
-+++ monit-5.16/src/monit.h     2016-03-18 11:56:44.328774407 +0100
-@@ -137,11 +137,11 @@
+--- src/monit.h.orig
++++ src/monit.h
+@@ -143,11 +143,11 @@ typedef enum {
  #define USEC_PER_MSEC      1000L
  
  #define ARGMAX             64

++++++ monit.service ++++++
[Unit]
Description=Monit is a utility for managing and monitoring processes, files, 
directories, and devices on a Unix system.
After=network.target
Documentation=man:monit(1) https://mmonit.com/wiki/Monit/HowTo 

[Service]
Type=simple
KillMode=process
ExecStart=/usr/bin/monit -I
ExecStop=/usr/bin/monit quit
ExecReload=/usr/bin/monit reload
Restart = on-abnormal
StandardOutput=null

[Install]
WantedBy=multi-user.target

Reply via email to