Search
j0ke.net Open Build Service
>
Projects
>
home:jg
:
projects
:
monitoring
>
monit
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 7
[-]
[+]
Changed
monit.spec
@@ -1,203 +1,94 @@ Name: monit -Version: 5.3.1 -Release: 6%{?dist} +Version: 5.6 +Release: 99ix Summary: Manages and monitors processes, files, directories and devices Group: Applications/Internet -License: AGPLv3 +License: GPLv3+ URL: http://www.tildeslash.com/monit Source0: http://www.tildeslash.com/monit/dist/monit-%{version}.tar.gz +Source1: monit-sysv-initscript Source2: monit.logrotate -Source3: monit.service -Source4: monit-logging-conf -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: flex -BuildRequires: openssl-devel -BuildRequires: pam-devel -BuildRequires: byacc -BuildRequires: systemd-units - -Requires(post): systemd-units -Requires(post): systemd-sysv -Requires(preun): systemd-units -Requires(postun): systemd-units - +Patch0: monit-default-config-name.patch +Patch1: monit-no-startup-msg.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +BuildRequires: flex +BuildRequires: openssl-devel +BuildRequires: pam-devel +BuildRequires: byacc +BuildRequires: gcc, make +BuildRequires: pam-devel %description monit is a utility for managing and monitoring, processes, files, directories and devices on a UNIX system. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations. - %prep %setup -q +%patch0 -b .confname +%patch1 -b .nomsg %build -%configure --disable-static +%configure --disable-static --enable-optimized make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT -install -p -D -m0600 monitrc $RPM_BUILD_ROOT%{_sysconfdir}/monitrc +install -p -D -m0755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/monit +install -p -D -m0600 monitrc $RPM_BUILD_ROOT%{_sysconfdir}/monit.conf install -p -D -m0755 monit $RPM_BUILD_ROOT%{_bindir}/monit # Log file & logrotate config install -p -D -m0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/monit mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log -install -m0600 /dev/null $RPM_BUILD_ROOT%{_localstatedir}/log/monit.log - -# systemd service file -mkdir -p ${RPM_BUILD_ROOT}%{_unitdir} -install -m0644 %{SOURCE3} ${RPM_BUILD_ROOT}%{_unitdir}/monit.service +install -m0600 /dev/null $RPM_BUILD_ROOT%{_localstatedir}/log/monit # Let's include some good defaults mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/monit.d -install -p -D -m0644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/monit.d/logging - -%{__sed} -i 's/# set daemon 120.*/set daemon 60 # check services at 1-minute intervals/' \ - $RPM_BUILD_ROOT%{_sysconfdir}/monitrc +echo " +# set daemon mode timeout to 1 minute +set daemon 60 +# Include all files from %{_sysconfdir}/monit.d/ +include %{_sysconfdir}/monit.d/*" >> $RPM_BUILD_ROOT%{_sysconfdir}/monit.conf + +echo "# log to monit.log +set logfile /var/log/monit +" > $RPM_BUILD_ROOT%{_sysconfdir}/monit.d/logging -%{__sed} -i 's/# include \/etc\/monit.d\/\*/include \/etc\/monit.d\/\*/' \ - $RPM_BUILD_ROOT%{_sysconfdir}/monitrc %clean rm -rf $RPM_BUILD_ROOT %post -if [ $1 -eq 1 ]; then - /bin/systemctl enable monit.service > /dev/null 2>&1 || : -fi - -# Moving old style configuration file to upstream's default location -[ -f %{_sysconfdir}/monit.conf ] && - touch -r %{_sysconfdir}/monitrc %{_sysconfdir}/monit.conf && - mv -f %{_sysconfdir}/monit.conf %{_sysconfdir}/monitrc 2> /dev/null || : +# This adds the proper /etc/rc*.d links for the script +/sbin/chkconfig --add monit %preun -if [ $1 -eq 0 ]; then - /bin/systemctl --no-reload disable monit.service > /dev/null 2>&1 || : - /bin/systemctl stop monit.service > /dev/null 2>&1 || : +if [ $1 = 0 ]; then + /sbin/service monit stop >/dev/null 2>&1 + /sbin/chkconfig --del monit fi %postun -/bin/systemctl daemon-reload > /dev/null 2>&1 || : -if [ $1 -ge 1 ]; then - /bin/systemctl try-restart monit.service > /dev/null 2>&1 || : +if [ "$1" -ge "1" ]; then + /sbin/service monit condrestart >/dev/null 2>&1 || : fi -%triggerun -- monit < 5.3.1-1 -/usr/bin/systemd-sysv-convert --save monit > /dev/null 2>&1 || : -/bin/systemctl --no-reload enable monit.service > /dev/null 2>&1 || : -/sbin/chkconfig --del monit > /dev/null 2>&1 || : -/bin/systemctl try-restart monit.server > /dev/null 2>&1 || : %files %defattr(-,root,root,-) -%doc CHANGES COPYING doc/PLATFORMS README -%config(noreplace) %{_sysconfdir}/monitrc +%doc CHANGES.txt COPYING LICENSE PLATFORMS README README.DEVELOPER README.SSL +%config(noreplace) %{_sysconfdir}/monit.conf %config(noreplace) %{_sysconfdir}/monit.d/logging %config(noreplace) %{_sysconfdir}/logrotate.d/monit -%config %ghost %{_localstatedir}/log/monit.log -%{_unitdir}/monit.service +%ghost %{_localstatedir}/log/monit %{_sysconfdir}/monit.d/ +%{_initrddir}/monit %{_bindir}/%{name} %{_mandir}/man1/monit.1* - %changelog -* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.3.1-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.3.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Fri Jul 27 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.3.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Mon Jan 9 2012 Maxim Burgerhout <wzzrd@fedoraproject.org> - 5.3.1-3 -- Fix systemd unit file - -* Sun Jan 8 2012 Maxim Burgerhout <wzzrd@fedoraproject.org> - 5.3.1-2 -- Rebuild for gcc 4.7 - -* Sun Nov 13 2011 Maxim Burgerhout <wzzrd@fedoraproject.org> - 5.3.1-1 -- New upstream release 5.3.1 -- Added systemd unit file and dropped sysv init support -- Dropped the patch that changed the default name of the configuration file -- Dropped the patch that silenced daemon startup - -* Wed Oct 26 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.2.5-2 -- Rebuilt for glibc bug#747377 - -* Sat May 07 2011 Maxim Burgerhout <wzzrd@fedoraproject.org> - 5.2.5-1 -- Sync to upstream bugfix release; most important new features: -- Memory footprint decreased by 10% -- Logfile default umask changed to 0640 -- New CLI command to test regexps for process names -- And various bugfixes - -* Thu Aug 05 2010 Maxim Burgerhout <wzzrd@fedoraproject.org> - 5.2.3-1 -- Update to new upstream version 5.2.3; new features in 5.2.3 include: -- MySQL protocol now support version 5.5 -- Support for monitoring swap usage -- Allow process monitoring based on output of ps and regexps -- Various bugfixes - -* Thu Aug 05 2010 Maxim Burgerhout <wzzrd@fedoraproject.org> - 5.1.1-2 -- Enabled PAM authentication (bz #621599) - -* Mon Jul 05 2010 Maxim Burgerhout <wzzrd@fedoraproject.org> - 5.1.1-1 -- Version bump to 5.1.1 (needed new version of monit-no-startup-msg.patch) -- Ghosted the logfile - -* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 5.0.3-2 -- rebuilt with new openssl - -* Fri Aug 14 2009 Stewart Adam <s.adam at diffingo.com> - 5.0.3-1