![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package nagios for openSUSE:Factory checked in at 2014-06-19 13:20:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nagios (Old) and /work/SRC/openSUSE:Factory/.nagios.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "nagios" Changes: -------- --- /work/SRC/openSUSE:Factory/nagios/nagios.changes 2014-05-06 14:02:16.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.nagios.new/nagios.changes 2014-06-19 13:20:13.000000000 +0200 @@ -1,0 +2,25 @@ +Thu Jun 5 16:00:00 UTC 2014 - lars@linux-schulserver.de + +- use systemctl on newer distributions (bnc #881289) + +------------------------------------------------------------------- +Tue Jun 3 17:56:51 UTC 2014 - lars@linux-schulserver.de + +- update to 4.0.7: + ENHANCEMENTS + * Added value of custom variables to Object JSON output for hosts, + services and contacts (Eric Stanley) + FIXES + * Fixed bug #616: Unescape plugin output read from checkresult files, + fix multiline perf data concatenation, and avoid extra memory + allocation and copies. (Eric Mislivec) + * Fixed bug #609: Image on home page doesn't have correct image + path prefix. (Derek Brewer) + * Fixed bug #608: Extra newline in service check timeout + output string. (Mauno Pihelgas) + * Fixed bug #596: Crashes checking contact authorization for host + escalations. (Alexey Dvoryanchikov - duplicates #590, #586) + * Fixed bug #496: Syntax error in exfoliation's common.css. + (Karsten Weiss) + +------------------------------------------------------------------- Old: ---- nagios-4.0.6.tar.bz2 New: ---- nagios-4.0.7.tar.bz2 nagios-exec-start-pre nagios.service nagios.tmpfiles ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nagios.spec ++++++ --- /var/tmp/diff_new_pack.msWoEB/_old 2014-06-19 13:20:14.000000000 +0200 +++ /var/tmp/diff_new_pack.msWoEB/_new 2014-06-19 13:20:14.000000000 +0200 @@ -16,8 +16,14 @@ # +%if 0%{?suse_version} >= 1230 +%bcond_without systemd +%else +%bcond_with systemd +%endif + Name: nagios -Version: 4.0.6 +Version: 4.0.7 Release: 0 Summary: The Nagios Network Monitor License: GPL-2.0+ @@ -25,6 +31,7 @@ Url: http://www.nagios.org/ Source0: %{name}-%{version}.tar.bz2 Source1: rc%{name} +Source2: %{name}-exec-start-pre Source3: %{name}.sysconfig Source4: suse.de-nagios Source5: nagios.8 @@ -34,6 +41,8 @@ Source9: upgrade_nagios.8 Source10: %{name}-README.SuSE Source11: %{name}-html-pages.tar.bz2 +Source12: %{name}.service +Source13: %{name}.tmpfiles Source20: %{name}-rpmlintrc # PATCH-FIX-UPSTREAM Fixes the output of spurious $ signs in commandoutput (deb#480001) Patch2: nagios-fix_spurious_dollar_signs_added_to_command_lines.patch @@ -65,6 +74,10 @@ BuildRequires: openssl-devel BuildRequires: pcre-devel BuildRequires: zlib-devel +%if %{with systemd} +BuildRequires: systemd +%{?systemd_requires} +%endif Provides: monitoring_daemon BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires(pre): %fillup_prereq @@ -310,8 +323,16 @@ # install SuSE specials # # init-script +%if %{with systemd} +ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name} +install -D -m0755 %{SOURCE2} %{buildroot}/%{nagios_libdir}/%{name}-exec-start-pre +install -D -m0644 %{SOURCE12} %{buildroot}/%{_unitdir}/%{name}.service +install -D -m0644 %{SOURCE13} %{buildroot}/%{_prefix}/lib/tmpfiles.d/%{name}.conf +%else install -D -m 0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/%{name} ln -sf ../../etc/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name} +touch %{buildroot}%{nslockfile} +%endif # sysconfig script install -D -m 0644 %{SOURCE3} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name} # install cronjob (gzip' the logfiles) @@ -322,7 +343,6 @@ touch %{buildroot}%{nagios_state_retention_file} touch %{buildroot}%{nagios_status_file} touch %{buildroot}%{nagios_logdir}/config.err -touch %{buildroot}%{nslockfile} # install manpages install -Dm644 %{SOURCE5} %{buildroot}%{_mandir}/man8/%{name}.8 install -Dm644 %{SOURCE6} %{buildroot}%{_mandir}/man8/nagiostats.8 @@ -384,6 +404,9 @@ %{nnmmsg} "Added %{nagios_user} to %{nagios_command_group}" fi fi +%if %{with systemd} +%service_add_pre %{name}.service +%endif %post # Update ? @@ -403,13 +426,27 @@ fi fi fi -%{fillup_and_insserv nagios} +%if %{with systemd} +%service_add_post %{name}.service +systemd-tmpfiles --create %{_prefix}/lib/tmpfiles.d/%{name}.conf +%fillup_only +%else +%{fillup_and_insserv %{name}} +%endif %preun +%if %{with systemd} +%service_del_preun %{name}.service +%else %stop_on_removal %{name} +%endif %postun +%if %{with systemd} +%service_del_postun %{name}.service +%else %restart_on_update %{name} +%endif %{insserv_cleanup} %post www @@ -440,8 +477,12 @@ # enable php5 in apache config %{_sbindir}/a2enmod php5 fi -fi +%if %{with systemd} +%{_bindir}/systemctl try-restart apache2 +%else %restart_on_update apache2 +%endif +fi %post www-dch # Update ? @@ -450,11 +491,12 @@ # enable NAGIOSDCH flag in apache configuration %{_sbindir}/a2enflag NAGIOSDCH >/dev/null fi -fi -%restart_on_update apache2 - -%preun www +%if %{with systemd} +%{_bindir}/systemctl try-restart apache2 +%else %restart_on_update apache2 +%endif +fi %post theme-exfoliation if [ ${1:-0} -eq 1 ]; then @@ -483,7 +525,15 @@ %attr(0755,root,root) %{_sbindir}/upgrade_nagios %{_mandir}/man8/upgrade_nagios.8* %{_localstatedir}/adm/fillup-templates/sysconfig.%{name} +%if %{with systemd} +%attr(0755,root,root) %{nagios_libdir}/%{name}-exec-start-pre +%{_unitdir}/%{name}.service +%{_prefix}/lib/tmpfiles.d/%{name}.conf +%else %attr(0755,root,root) %{_sysconfdir}/init.d/%{name} +%ghost %dir %{nslockfile_dir} +%attr(0644,%{nagios_user},%{nagios_group}) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{nslockfile} +%endif %attr(0755,root,root) %{_sysconfdir}/cron.weekly/* %config(noreplace) %{nagios_sysconfdir}/*.cfg %config(noreplace) %{nagios_sysconfdir}/objects/*.cfg @@ -495,10 +545,8 @@ %attr(0775,%{nagios_user},%{nagios_command_group}) %dir %{nagios_localstatedir} %attr(0755,%{nagios_user},%{nagios_group}) %dir %{nagios_logdir} %attr(0755,%{nagios_user},%{nagios_group}) %dir %{nagios_logdir}/archives -%ghost %dir %{nslockfile_dir} # files with special handling %config(noreplace) %attr(0640,root,%{nagios_group}) %{nagios_sysconfdir}/resource.cfg -%attr(0644,%{nagios_user},%{nagios_group}) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{nslockfile} %attr(0600,%{nagios_user},%{nagios_group}) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{nagios_state_retention_file} %attr(0664,%{nagios_user},%{nagios_group}) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{nagios_status_file} %attr(0750,root,%{nagios_command_group}) %{_sbindir}/%{name} ++++++ nagios-4.0.6.tar.bz2 -> nagios-4.0.7.tar.bz2 ++++++ ++++ 4250 lines of diff (skipped) ++++++ nagios-exec-start-pre ++++++ #! /bin/sh # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany # # Original Author: Tim Hardeck # bases on the SUSE Icinga init script from Wolfgang Rosenauer, Lars Vogdt # CONFIG='/etc/nagios/nagios.cfg' # grab a config option get_var() { if [ -n "$2" ]; then set -- `grep ^$1 $2 | sed 's@=@ @' | tr -d '[:cntrl:]'` else set -- `grep ^$1 "$CONFIG" | sed 's@=@ @' | tr -d '[:cntrl:]'` fi shift # remove first ARG => search-string echo $* } # get variables from config file check_result_path="$(get_var check_result_path)" command_file="$(get_var command_file)" lock_file="$(get_var lock_file)" log_file="$(get_var log_file)" nagios_user="$(get_var nagios_user)" nagios_group="$(get_var nagios_group)" nagios_cmdgrp="$(get_var nagios_cmdgrp)" resource_file="$(get_var resource_file)" state_retention_file="$(get_var state_retention_file)" status_file="$(get_var status_file)" temp_file="$(get_var temp_file)" temp_path="$(get_var temp_path)" # use default values if above check doesn't work : ${check_result_path:-/var/spool/nagios} : ${command_file:-/var/spool/nagios/nagios.cmd} : ${lock_file:-/var/run/nagios/nagios.pid} : ${log_file:-/var/log/nagios/nagios.log} : ${nagios_user:-nagios} : ${nagios_group:-nagios} : ${nagios_cmdgrp:-nagcmd} : ${resource_file:-/etc/nagios/resource.cfg} : ${state_retention_file:-/var/log/nagios/retention.dat} : ${status_file:-/var/log/nagios/status.dat} : ${temp_file:-/var/log/nagios/nagios.tmp} : ${temp_path:-/var/run/nagios/tmp} # remove some perhaps left over files for file in "$command_file" "$lock_file" "$status_file" "$temp_file"; do test -f "$file" && rm -f "$file" done # set default access rights for files and directories for file in "$log_file" "$state_retention_file" "$status_file"; do if [ ! -e "$file" ]; then touch "$file" fi chown ${nagios_user}:${nagios_cmdgrp} "$file" done for dir in "$check_result_path" $(dirname "$status_file"); do install -d -m755 -o${nagios_user} -g${nagios_cmdgrp} "$dir" done for dir in $(dirname "$lock_file") $(dirname "$temp_path") "$temp_path" ; do install -d -m755 -o${nagios_user} -g${nagios_group} "$dir" done chmod 660 "$resource_file" chown ${nagios_user}:${nagios_cmdgrp} "$resource_file" ++++++ nagios.service ++++++ [Unit] Description=Network Monitor Nagios After=syslog.target network.target [Service] EnvironmentFile=/etc/sysconfig/nagios ExecStartPre=/usr/lib/nagios/nagios-exec-start-pre ExecStartPre=/usr/sbin/nagios -v /etc/nagios/nagios.cfg ExecStart=/usr/sbin/nagios /etc/nagios/nagios.cfg ExecReload=/bin/kill -HUP $MAINPID [Install] WantedBy=multi-user.target ++++++ nagios.tmpfiles ++++++ # tmp directory for package nagios d /var/run/nagios 0770 nagios nagcmd -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de