Hello community, here is the log from the commit of package icinga for openSUSE:Factory checked in at 2014-02-24 15:50:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/icinga (Old) and /work/SRC/openSUSE:Factory/.icinga.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "icinga" Changes: -------- --- /work/SRC/openSUSE:Factory/icinga/icinga.changes 2014-02-11 11:58:04.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.icinga.new/icinga.changes 2014-02-24 15:50:25.000000000 +0100 @@ -1,0 +2,29 @@ +Wed Feb 19 08:24:58 UTC 2014 - [email protected] + +- optimized order of icinga-exec-start-pre script + +------------------------------------------------------------------- +Tue Feb 18 17:36:16 UTC 2014 - [email protected] + +- update to upstream version 1.10.3 + * initscript: implement IcingaPrecacheFallback option for the init script (thx Immobilienscout24) #4968 - GB + * core: fix passive host check commands check service's passive check acceptance (thx Naemon) #5568 - MF + * core: fix host state translation for passive host check results #5575 - MF + * classic ui: aggressively check for possible buffer overflows in cmd.cgi (thx GitHub) #5434 - MF + * classic ui: add missing jquery and jquery-ui-timepicker-addon sources #5564 - MF + * idoutils: wait for child processes on exit preventing zombies (thx Laurent Bigonville) #4427 - MF + * initscript: fix ido2db returning invalid lsb codes (Marco Hoyer) #4825 - MF + * spec: only add apache user to the icingacmd group if existing #5263 - MF + * spec: fix usermod error on SUSE #5430 - GB + * spec: backport fedora spec file fixes (thx Fedora & Shawn Starr) #5545 - MF +- add systemd service files on systemd systems (the init scripts will be removed in the future on these systems) +- added icinga-exec-start-pre and ido2db-exec-start-pre scripts to set up the environment before the icinga processes are started by systemd +- added icinga-fix-systemd-services.patch - make sure that the ExecStartPre script are called and there is no need for a separate sysconfig file for the icinga systemd service +- added icinga-fix-apache-issues-by-using-old-conf.patch - Apache 2.4 has issues with the new Icinga apache conf.d file so staying with the old for now +- removed 0001-classic-ui-fix-CVE-2013-7107.patch - because of upstream fix +- removed icinga-fix-create-mysql-script.patch - because of upstream fix +- removed icinga-add-ifdefine-to-apache.patch - superseeded by icinga-fix-apache-issues-by-using-old-conf.patch +- icinga-www now requires icinga-doc to provide the language flag images and documentation +- consistently use spaces instead of tabs in icinga.spec + +------------------------------------------------------------------- Old: ---- 0001-classic-ui-fix-CVE-2013-7107.patch icinga-1.10.2.tar.gz icinga-add-ifdefine-to-apache.patch icinga-fix-create-mysql-script.patch New: ---- icinga-1.10.3.tar.gz icinga-exec-start-pre icinga-fix-apache-issues-by-using-old-conf.patch icinga-fix-systemd-services.patch ido2db-exec-start-pre ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ icinga.spec ++++++ --- /var/tmp/diff_new_pack.mewwBy/_old 2014-02-24 15:50:26.000000000 +0100 +++ /var/tmp/diff_new_pack.mewwBy/_new 2014-02-24 15:50:26.000000000 +0100 @@ -16,8 +16,14 @@ # +%if 0%{?suse_version} >= 1210 +%define using_systemd 1 +%else +%define using_sysvinit 1 +%endif + Name: icinga -Version: 1.10.2 +Version: 1.10.3 Release: 0 Summary: Host/service/network monitoring program @@ -42,12 +48,12 @@ Source15: mini_epn.8 Source16: log2ido.8 Source17: icinga-favicon.ico -# PATCH-FIX-OPENSUSE icinga-add-ifdefine-to-apache.patch -Patch0: icinga-add-ifdefine-to-apache.patch -# PATCH-FIX-OPENSUSE icinga-fix-create-mysql-script.patch -Patch1: icinga-fix-create-mysql-script.patch -# PATCH-FIX-UPSTREAM 0001-classic-ui-fix-CVE-2013-7107.patch bnc#859424 -Patch2: 0001-classic-ui-fix-CVE-2013-7107.patch +Source18: icinga-exec-start-pre +Source19: ido2db-exec-start-pre +# PATCH-FIX-OPENSUSE icinga-fix-apache-issues-by-using-old-conf.patch +Patch0: icinga-fix-apache-issues-by-using-old-conf.patch +# PATCH-FIX-OPENSUSE icinga-fix-systemd-services.patch +Patch1: icinga-fix-systemd-services.patch Provides: monitoring_daemon BuildRequires: apache2-devel BuildRequires: nagios-rpm-macros >= 0.08 @@ -68,6 +74,9 @@ BuildRequires: openssl BuildRequires: pcre-devel BuildRequires: zlib-devel +%if 0%{?using_systemd} +BuildRequires: systemd +%endif Requires: net-tools Requires(pre): %fillup_prereq Requires(pre): %insserv_prereq @@ -83,6 +92,9 @@ %{perl_requires} %endif %{?libperl_requires} +%if 0%{?using_systemd} +%{?systemd_requires} +%endif Requires: mailx Recommends: monitoring-tools Recommends: %{name}-plugins-eventhandlers @@ -118,7 +130,7 @@ Group: System/Monitoring Provides: monitoring_webfrontend Requires: %{name} = %{version} -Recommends: %{name}-doc = %{version} +Requires: %{name}-doc = %{version} Requires(pre): apache2 %description www @@ -256,7 +268,6 @@ %setup -q %patch0 -p1 %patch1 -p1 -%patch2 -p1 # remove GPLv3+ source files which are not needed for this package rm "t-tap/"*.c @@ -327,7 +338,11 @@ %install make \ install-unstripped \ +%if 0%{?using_systemd} + install-systemd \ +%else install-init \ +%endif install-commandmode \ install-idoutils \ install-config \ @@ -403,10 +418,19 @@ # REST of special SUSE stuff here, if needed.... # init-scripts # remove the default init script as SUSE uses an adapted one -install -D -m0755 %{SOURCE1} "%{buildroot}%{_initrddir}/%{name}" +%if 0%{?using_systemd} +ln -sf /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name} +ln -sf /usr/sbin/service %{buildroot}%{_sbindir}/rcido2db +install -D -m0755 %{SOURCE18} "%{buildroot}%{icinga_libdir}/icinga-exec-start-pre" +install -D -m0755 %{SOURCE19} "%{buildroot}%{icinga_libdir}/ido2db-exec-start-pre" +# remove systemd sysconfig file because we use our own +rm "%{buildroot}%{_sysconfdir}/sysconfig/%{name}" +%else ln -sf ../../%{_initrddir}/%{name} "%{buildroot}%{_sbindir}/rc%{name}" -install -D -m0755 %{SOURCE2} "%{buildroot}%{_initrddir}/ido2db" ln -sf ../../%{_initrddir}/ido2db "%{buildroot}%{_sbindir}/rcido2db" +%endif +install -D -m0755 %{SOURCE1} "%{buildroot}%{_initrddir}/%{name}" +install -D -m0755 %{SOURCE2} "%{buildroot}%{_initrddir}/ido2db" # sysconfig script install -D -m 0644 %{SOURCE3} "%{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}" # install cronjob (gzip' the logfiles) @@ -435,6 +459,9 @@ install -m644 %{SOURCE17} "%{buildroot}/%{icinga_datadir}/favicon.ico" %pre +%if 0%{?using_systemd} +%service_add_pre %{name}.service +%endif # add icinga user and groups groupadd -r %{icinga_group} 2>/dev/null || : groupadd -r %{icinga_command_group} 2>/dev/null || : @@ -461,14 +488,27 @@ fi fi +%if 0%{?using_systemd} +%service_add_post %{name}.service +%fillup_only +%else %{fillup_and_insserv %{name}} +%endif %preun +%if 0%{?using_systemd} +%service_del_preun %{name}.service +%else %stop_on_removal %{name} +%endif %postun +%if 0%{?using_systemd} +%service_del_postun %{name}.service +%else %restart_on_update %{name} %{insserv_cleanup} +%endif %post www # If apache is installed, and we can find the apache user, set a shell var @@ -510,6 +550,12 @@ fi %post idoutils +%if 0%{?using_systemd} +%service_add_post ido2db.service +%else +%{fillup_and_insserv ido2db} +%endif + if [ ${1:-0} -gt 1 ] then # On Update @@ -518,23 +564,39 @@ %{logmsg} "icinga-idoutils installed: Don't forget to install/upgrade your db schema, check /usr/share/doc/packages/icinga-idoutils/README.SUSE.idoutils" -%{fillup_and_insserv ido2db} +%pre idoutils +%if 0%{?using_systemd} +%service_add_pre ido2db.service +%endif %preun idoutils +%if 0%{?using_systemd} +%service_del_preun ido2db.service +%else %stop_on_removal ido2db +%endif %postun idoutils +%if 0%{?using_systemd} +%service_del_postun ido2db.service +%else %restart_on_update ido2db %insserv_cleanup +%endif %files %defattr(-,root,root) %doc README LICENSE Changelog UPGRADING LEGAL sample-config/ README.SUSE examples %{_mandir}/man8/icinga*.8* -%{_initrddir}/%{name} %{_sbindir}/%{name} %attr(0755,root,%{icinga_group}) %{_sbindir}/icingastats %{_sbindir}/rc%{name} +%if 0%{?using_systemd} +%{icinga_libdir}/icinga-exec-start-pre +%exclude %{icinga_libdir}/ido2db-exec-start-pre +%{_unitdir}/icinga.service +%endif +%{_initrddir}/%{name} %{icinga_datadir}/p1.pl %{_localstatedir}/adm/fillup-templates/sysconfig.%{name} %attr(0755,root,root) %config %{_sysconfdir}/cron.weekly/%{name} @@ -616,12 +678,16 @@ %doc module/idoutils/db/queries UPGRADING module/idoutils/db/README module/idoutils/config README.SUSE.idoutils %{_mandir}/man8/ido2db.8* %{_mandir}/man8/log2ido.8* -%{_initrddir}/ido2db %config(noreplace) %{icinga_sysconfdir}/ido2db.cfg %config(noreplace) %{icinga_sysconfdir}/idomod.cfg %config(noreplace) %{icinga_sysconfdir}/modules/idoutils.cfg %config(noreplace) %{icinga_sysconfdir}/objects/ido2db_check_proc.cfg %{_sbindir}/rcido2db +%if 0%{?using_systemd} +%{_unitdir}/ido2db.service +%{icinga_libdir}/ido2db-exec-start-pre +%endif +%{_initrddir}/ido2db %{_sbindir}/ido2db %{_sbindir}/log2ido %{icinga_libdir}/idomod.so ++++++ icinga-1.10.2.tar.gz -> icinga-1.10.3.tar.gz ++++++ /work/SRC/openSUSE:Factory/icinga/icinga-1.10.2.tar.gz /work/SRC/openSUSE:Factory/.icinga.new/icinga-1.10.3.tar.gz differ: char 5, line 1 ++++++ icinga-exec-start-pre ++++++ #! /bin/sh # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany # # Author: Tim Hardeck # bases on the SUSE Icinga init script from Wolfgang Rosenauer, Lars Vogdt # # grab a config option function get_var() { if [ -n "$2" ]; then set -- `grep ^$1 $2 | sed 's@=@ @' | tr -d '[:cntrl:]'` else set -- `grep ^$1 "/etc/icinga/icinga.cfg" | sed 's@=@ @' | tr -d '[:cntrl:]'` fi shift # remove first ARG => search-string echo $* } # get variables from config file icinga_user="$(get_var icinga_user)" icinga_group="$(get_var icinga_group)" temp_path="$(get_var temp_path)" command_file="$(get_var command_file)" lock_file="$(get_var lock_file)" status_file="$(get_var status_file)" temp_file="$(get_var temp_file)" # use default values if above check doesn't work : ${icinga_user:=icinga} : ${icinga_group:=icinga} : ${icinga_cmdgrp:=icingacmd} : ${temp_path:=/var/run/icinga/tmp} : ${command_file:=/var/run/icinga/icinga.cmd} : ${lock_file:=/var/run/icinga/icinga.pid} : ${status_file:=/var/spool/icinga/status.dat} : ${temp_file:=/var/run/icinga/icinga.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 # make sure that all necessary directories are there install -d -m755 -o$icinga_user -g$icinga_group $(dirname "$lock_file") install -d -m775 -o$icinga_user -g$icinga_group "$temp_path" install -d -m775 -o$icinga_user -g$icinga_group $(dirname "$temp_file") # create command file with correct permissions mkfifo -m 660 "$command_file" chown $icinga_user:$icinga_cmdgrp "$command_file" ++++++ icinga-fix-apache-issues-by-using-old-conf.patch ++++++ --- icinga-1.10.3.old/sample-config/httpd.conf.in 2014-02-11 12:05:36.000000000 +0100 +++ icinga-1.10.3/sample-config/httpd.conf.in 2014-02-18 17:19:04.804017535 +0100 @@ -5,62 +5,38 @@ # configuration file. Customize the paths, etc. as # needed to fit your system. +<IfDefine ICINGA> ScriptAlias @cgiurl@ "@sbindir@" <Directory "@sbindir@"> # SSLRequireSSL Options ExecCGI AllowOverride None - + Order allow,deny + Allow from all +# Order deny,allow +# Deny from all +# Allow from 127.0.0.1 AuthName "Icinga Access" AuthType Basic AuthUserFile @HTTPAUTHFILE@ + Require valid-user +</Directory> - <IfModule mod_authz_core.c> - # Apache 2.4 - <RequireAll> - Require all granted - # Require local - Require valid-user - </RequireAll> - </IfModule> - <IfModule !mod_authz_core.c> - # Apache 2.2 - Order allow,deny - Allow from all - # Order deny,allow - # Deny from all - # Allow from 127.0.0.1 - Require valid-user - </IfModule> - </Directory> - -Alias @htmurl@ "@datadir@/" +Alias @htmurl@ "@datadir@" -<Directory "@datadir@/"> +<Directory "@datadir@"> # SSLRequireSSL Options None AllowOverride All - + Order allow,deny + Allow from all +# Order deny,allow +# Deny from all +# Allow from 127.0.0.1 AuthName "Icinga Access" AuthType Basic AuthUserFile @HTTPAUTHFILE@ - - <IfModule mod_authz_core.c> - # Apache 2.4 - <RequireAll> - Require all granted - # Require local - Require valid-user - </RequireAll> - </IfModule> - <IfModule !mod_authz_core.c> - # Apache 2.2 - Order allow,deny - Allow from all - # Order deny,allow - # Deny from all - # Allow from 127.0.0.1 - Require valid-user - </IfModule> + Require valid-user </Directory> +</IfDefine> ++++++ icinga-fix-systemd-services.patch ++++++ diff -rup icinga-1.10.3.old/icinga-systemd.in icinga-1.10.3/icinga-systemd.in --- icinga-1.10.3.old/icinga-systemd.in 2014-02-11 12:05:36.000000000 +0100 +++ icinga-1.10.3/icinga-systemd.in 2014-02-18 17:53:07.100946824 +0100 @@ -4,8 +4,9 @@ After=syslog.target network.target ido2d [Service] EnvironmentFile=@systemd_sysconfig_dir@/icinga -ExecStartPre=@bindir@/icinga $ICINGA_VERIFY_OPTS -ExecStart=@bindir@/icinga $ICINGA_OPTS +ExecStartPre=/usr/lib/icinga/icinga-exec-start-pre +ExecStartPre=@bindir@/icinga -v @sysconfdir@/icinga.cfg +ExecStart=@bindir@/icinga @sysconfdir@/icinga.cfg ExecReload=/bin/kill -HUP $MAINPID [Install] diff -rup icinga-1.10.3.old/ido2db-systemd.in icinga-1.10.3/ido2db-systemd.in --- icinga-1.10.3.old/ido2db-systemd.in 2014-02-11 12:05:36.000000000 +0100 +++ icinga-1.10.3/ido2db-systemd.in 2014-02-18 17:53:56.292945120 +0100 @@ -4,7 +4,8 @@ After=syslog.target network.target [Service] EnvironmentFile=@systemd_sysconfig_dir@/icinga -ExecStart=@bindir@/ido2db -f $IDO2DB_OPTS +ExecStartPre=/usr/lib/icinga/ido2db-exec-start-pre +ExecStart=@bindir@/ido2db -f -c @sysconfdir@/ido2db.cfg ExecReload=/bin/kill -HUP $MAINPID [Install] Only in icinga-1.10.3.old/: .sysconfig-env.in.swp ++++++ ido2db-exec-start-pre ++++++ #! /bin/sh # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany # # Author: Tim Hardeck # bases on the SUSE Icinga init script from Wolfgang Rosenauer, Lars Vogdt # # grab a config option function get_var() { if [ -n "$2" ]; then set -- `grep ^$1 $2 | sed 's@=@ @' | tr -d '[:cntrl:]'` else set -- `grep ^$1 "/etc/icinga/ido2db.cfg" | sed 's@=@ @' | tr -d '[:cntrl:]'` fi shift # remove first ARG => search-string echo $* } # get variables from config file ido2db_user="$(get_var ido2db_user)" ido2db_group="$(get_var ido2db_group)" lock_file="$(get_var lock_file)" socket_name="$(get_var socket_name)" # use default values if above check doesn't work : ${ido2db_user:=icinga} : ${ido2db_group:=icinga} : ${lock_file:=/var/run/icinga/ido2db.pid} : ${socket_name:=/var/run/icinga/ido2db.sock} # remove some perhaps left over files for file in "$lock_file" "$socket_name"; do test -e "$file" && rm -f "$file" done # make sure that all necessary directories are there install -d -m755 -o$ido2db_user -g$ido2db_group $(dirname "$lock_file") -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
