Hello community,

here is the log from the commit of package nagios for openSUSE:Factory checked 
in at 2011-11-07 14:22:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nagios (Old)
 and      /work/SRC/openSUSE:Factory/.nagios.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nagios", Maintainer is "lr...@suse.com"

Changes:
--------
--- /work/SRC/openSUSE:Factory/nagios/nagios.changes    2011-10-28 
19:59:05.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.nagios.new/nagios.changes       2011-11-07 
14:22:57.000000000 +0100
@@ -1,0 +2,8 @@
+Tue Nov  1 13:02:02 UTC 2011 - l...@linux-schulserver.de
+
+- skip fdupes call and ignore that we might save 4k on the disk
+  => fixes bnc #721346 
+- fix file permissions in docudir
+- use nagios-rpm-macros
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ nagios.spec ++++++
--- /var/tmp/diff_new_pack.hRDQw0/_old  2011-11-07 14:22:59.000000000 +0100
+++ /var/tmp/diff_new_pack.hRDQw0/_new  2011-11-07 14:22:59.000000000 +0100
@@ -18,15 +18,6 @@
 
 
 Name:           nagios
-%define         nsusr nagios
-%define         nsgrp nagios
-%define         cmdusr wwwrun
-%define         cmdgrp nagcmd
-%define         nslockfile_dir /var/run/%{name}
-%define         nslockfile %nslockfile_dir/%{name}.pid
-%define         apache2_sysconfdir %(/usr/sbin/apxs2 -q SYSCONFDIR)/conf.d
-# Macro that print mesages to syslog at package (un)install time
-%define         nnmmsg logger -t %{name}/rpm
 Summary:        The Nagios Network Monitor
 Version:        3.3.1
 Release:        1
@@ -70,6 +61,7 @@
 BuildRequires:  mailx
 BuildRequires:  openssl-devel
 BuildRequires:  pcre-devel
+BuildRequires:  nagios-rpm-macros
 BuildRequires:  net-tools
 BuildRequires:  zlib-devel
 %if 0%{?suse_version} < 1010
@@ -86,12 +78,16 @@
 Recommends:     perl = %{perl_version}
 %endif
 %if 0%{?suse_version} > 1020
-BuildRequires:  fdupes
 Recommends:     %{name}-plugins
 %else
 Requires:       %{name}-plugins
 %endif
 Requires:       mailx
+%define         nslockfile_dir /var/run/%{name}
+%define         nslockfile %nslockfile_dir/%{name}.pid
+%define         apache2_sysconfdir %(/usr/sbin/apxs2 -q SYSCONFDIR)/conf.d
+# Macro that print mesages to syslog at package (un)install time
+%define         nnmmsg logger -t %{name}/rpm
 
 %description
 Nagios is a program that will monitor hosts and services on your
@@ -109,11 +105,6 @@
 documentation, and development files are built as separate packages
 
 
-
-Authors:
---------
-    Ethan Galstad <nag...@nagios.org>
-
 %package www
 License:        GPLv2+
 Summary:        Provides the HTML and CGI files for the Nagios web interface
@@ -143,11 +134,6 @@
 included in this package.
 
 
-
-Authors:
---------
-    Ethan Galstad <nag...@nagios.org>
-
 %package devel
 License:        GPLv2+
 Summary:        Development files for Nagios
@@ -167,12 +153,6 @@
 may compile against.
 
 
-
-Authors:
---------
-    Ethan Galstad <nag...@nagios.org>
-
-
 %prep
 %setup -q -n %{name}
 %patch2 -p0
@@ -182,8 +162,10 @@
 %patch13 -p0
 find -name ".gitignore" | xargs rm
 # fix p1.pl pathname of mini_epn
-sed -i 's|p1.pl|%{_prefix}/lib/%{name}/p1.pl|g' contrib/mini_epn.c
-sed -i 's|p1.pl|%{_prefix}/lib/%{name}/p1.pl|g' contrib/new_mini_epn.c
+sed -i 's|p1.pl|%{nagios_libdir}/p1.pl|g' contrib/mini_epn.c
+sed -i 's|p1.pl|%{nagios_libdir}/p1.pl|g' contrib/new_mini_epn.c
+# fix file permissions
+chmod -x Changelog LEGAL LICENSE README 
 
 %build
 # if the following command fails, then apache dependencies are not met
@@ -192,21 +174,21 @@
        --prefix=%{_prefix} \
        --exec-prefix=%{_sbindir} \
        --bindir=%{_sbindir} \
-       --sbindir=%{_prefix}/lib/%{name}/cgi \
-       --libexecdir=%{_prefix}/lib/%{name}/plugins \
-       --datadir=%{_datadir}/%{name} \
-       --sysconfdir=%{_sysconfdir}/%{name} \
+       --sbindir=%{nagios_cgidir} \
+       --libexecdir=%{nagios_plugindir} \
+       --datadir=%{nagios_datadir} \
+       --sysconfdir=%{nagios_sysconfdir} \
        --with-init-dir=%{_sysconfdir}/init.d \
-       --localstatedir=/var/lib/%{name} \
+       --localstatedir=%{nagios_localstatedir} \
        --with-cgiurl=/%{name}/cgi-bin \
        --with-htmurl=/%{name} \
        --with-httpd-conf=%{apache2_sysconfdir} \
-       --with-checkresult-dir=/var/spool/%{name} \
+       --with-checkresult-dir=%{nagios_spooldir} \
        --with-lockfile=%{nslockfile} \
-       --with-nagios-user=%{nsusr} \
-       --with-nagios-group=%{nsgrp} \
-       --with-command-user=%{cmdusr} \
-       --with-command-group=%{cmdgrp} \
+       --with-nagios-user=%{nagios_user} \
+       --with-nagios-group=%{nagios_group} \
+       --with-command-user=%{nagios_command_user} \
+       --with-command-group=%{nagios_command_group} \
        --with-gd-lib=%{_libdir} \
        --with-gd-inc=%{_includedir} \
        --with-template-objects \
@@ -217,7 +199,7 @@
 #
 # /usr/bin/p1.pl is not a good place for a perl-_module_!
 #
-sed -i 's#@p1pldir@#%{_prefix}/lib/nagios#g' Makefile include/locations.h 
sample-config/nagios.cfg
+sed -i 's#@p1pldir@#%{nagios_libdir}#g' Makefile include/locations.h 
sample-config/nagios.cfg
 #
 # fix p1.pl debug-path
 #
@@ -234,19 +216,19 @@
 pushd contrib/eventhandlers 1>/dev/null
 for f in `find . -type f` ; do
     F=`mktemp temp.XXXXXX`
-    sed "s=/usr/local/nagios/var/rw/=/var/spool/%{name}/=; \
+    sed "s=/usr/local/nagios/var/rw/=%{nagios_spooldir}/=; \
          
s=NscaBin\=\"/usr/local/nagios/libexec/send_nsca\"=NscaBin\=/usr/bin/send_nsca=;
 \
-         
s=/usr/local/nagios/libexec/eventhandlers/=%{_prefix}/lib/%{name}/plugins/eventhandlers/=;
 \
-         s=/usr/local/nagios/libexec/=%{_prefix}/lib/%{name}/plugins/=; \
-         s=/usr/local/nagios/etc/=%{_sysconfdir}/%{name}/=; \
-         s=/usr/local/nagios/test/var=/var/log/%{name}=" ${f} > ${F}
+         
s=/usr/local/nagios/libexec/eventhandlers/=%{nagios_eventhandlerdir}/=; \
+         s=/usr/local/nagios/libexec/=%{nagios_plugindir}/=; \
+         s=/usr/local/nagios/etc/=%{nagios_sysconfdir}/=; \
+         s=/usr/local/nagios/test/var=%{nagios_logdir}/=" ${f} > ${F}
 
     mv ${F} ${f}
 done
 popd 1>/dev/null
 
 %install
-mkdir -p %{buildroot}%{_localstatedir}/log/%{name}/archives
+mkdir -p %{buildroot}/%{nagios_logdir}/archives
 mkdir -p %{buildroot}%{_sbindir}
 mkdir -p %{buildroot}%apache2_sysconfdir/
 mkdir -p %{buildroot}%nslockfile_dir
@@ -254,17 +236,17 @@
     DESTDIR=%{buildroot} \
     INSTALL_OPTS="" \
     COMMAND_OPTS="" \
-       CGICFGDIR="%{_sysconfdir}/%{name}" \
+       CGICFGDIR="%{nagios_sysconfdir}" \
     INIT_OPTS=""
 %{__make} install -C contrib \
     DESTDIR=%{buildroot} \
     INSTALL_OPTS=""
 # install event handlers
-%{__install} -d -m0755 
%{buildroot}%{_prefix}/lib/%{name}/plugins/eventhandlers/
-%{__cp} -afpv contrib/eventhandlers/* 
%{buildroot}%{_prefix}/lib/%{name}/plugins/eventhandlers/
-find %{buildroot}%{_prefix}/lib/%{name}/plugins/eventhandlers/ -type f -exec 
chmod +x {} \;
+%{__install} -d -m0755 %{buildroot}/%{nagios_eventhandlerdir}
+%{__cp} -afpv contrib/eventhandlers/* %{buildroot}%{nagios_eventhandlerdir}/
+find %{buildroot}%{nagios_eventhandlerdir}/ -type f -exec chmod +x {} \;
 # install directory for event brokers like ndoutils
-%{__install} -d -m0755 %{buildroot}%{_prefix}/lib/%{name}/brokers
+%{__install} -d -m0755 %{buildroot}%{nagios_localstatedir}/brokers
 # install headers for development package
 %{__install} -d -m0755 %{buildroot}%{_includedir}/%{name}/
 pushd include
@@ -279,17 +261,17 @@
 #
 find sample-config/ -name "*.in" -exec rm {} \;
 find sample-config/ -name "*.in.orig" -exec rm {} \;
-sed -e 's|command_file=.*|command_file=/var/spool/%{name}/nagios.cmd|g' \
-    -e 
's|log_file=/var/lib/nagios/nagios.log|log_file=/var/log/nagios/nagios.log|g' \
-    -e 
's|log_archive_path=/var/lib/nagios/archives|log_archive_path=/var/log/nagios/archives|g'
 \
+sed -e 's|command_file=.*|command_file=%{nagios_command_file}|g' \
+    -e 
's|log_file=/var/lib/nagios/nagios.log|log_file=%{nagios_logdir}/nagios.log|g' \
+    -e 
's|log_archive_path=/var/lib/nagios/archives|log_archive_path=%{nagios_logdir}/archives|g'
 \
     -e 's|^lock_file=.*|lock_file=%nslockfile|g' \
-    %{buildroot}%{_sysconfdir}/%{name}/nagios.cfg > 
%{buildroot}%{_sysconfdir}/%{name}/nagios.cfg.tmp
-mv %{buildroot}%{_sysconfdir}/%{name}/nagios.cfg.tmp 
%{buildroot}%{_sysconfdir}/%{name}/nagios.cfg
+    %{buildroot}/%{nagios_sysconfdir}/nagios.cfg > 
%{buildroot}%{_sysconfdir}/%{name}/nagios.cfg.tmp
+mv %{buildroot}/%{nagios_sysconfdir}/nagios.cfg.tmp 
%{buildroot}%{_sysconfdir}/%{name}/nagios.cfg
 #
 # install SuSE specials
 #
 # README.SuSE file
-sed -e 's@DATADIR@%{_datadir}/%{name}@g' -e 
's@SYSCONFDIR@%{_sysconfdir}/%{name}@g' %{S:10} > %_builddir/%{name}/README.SuSE
+sed -e 's@DATADIR@%{_datadir}/%{name}@g' -e 
's@SYSCONFDIR@%{nagios_sysconfdir}@g' %{S:10} > %_builddir/%{name}/README.SuSE
 # init-script
 %{__install} -D -m 0755 %{S:1} %{buildroot}%{_sysconfdir}/init.d/%{name}
 ln -sf ../../etc/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
@@ -300,23 +282,19 @@
 # install htpasswd file
 %{__install} -m 0640 %{S:7} %{buildroot}%{_sysconfdir}/%{name}/htpasswd.users
 # important ghost files
-touch %{buildroot}%{_localstatedir}/lib/%{name}/retention.dat
-touch %{buildroot}%{_localstatedir}/lib/%{name}/status.dat
-touch %{buildroot}%{_localstatedir}/log/%{name}/config.err
-touch %{buildroot}%nslockfile
+touch %{buildroot}%{nagios_state_retention_file}
+touch %{buildroot}%{nagios_status_file}
+touch %{buildroot}%{nagios_logdir}/config.err
+touch %{buildroot}%{nslockfile}
 # install manpages
 install -Dm644 %{S:5} %{buildroot}%{_mandir}/man8/%{name}.8
-install -Dm644 %{S:6} %{buildroot}%{_mandir}/man8/nagiosstats.8
-
+install -Dm644 %{S:6} %{buildroot}%{_mandir}/man8/nagiostats.8
 # fixing permissions the dirty way....
 for file in "README sample-config/README 
sample-config/template-object/README"; do
        chmod 644 $RPM_BUILD_DIR/%{name}/$file
 done
-
-# some rpmlint stuff
-%if 0%{?suse_version} > 1020
-%fdupes -s %{buildroot}%{_datadir}
-%endif
+# we use nagios_spooldir for this
+test -d %{buildroot}%{nagios_localstatedir}/rw && rmdir 
%{buildroot}%{nagios_localstatedir}/rw
 
 %clean
 %{__rm} -rf %{buildroot}
@@ -325,40 +303,40 @@
 # Create user and group on the system if necessary
 # default group: nagios
 if
-    getent group %{nsgrp} >/dev/null
+    getent group %{nagios_group} >/dev/null
 then
-    : OK group %{nsgrp} already present
+    : OK group %{nagios_group} already present
 else
-    groupadd -r %{nsgrp} 2>/dev/null || :
-    %{nnmmsg} "Added group %{nsgrp} for package %{name}"
+    groupadd -r %{nagios_group} 2>/dev/null || :
+    %{nnmmsg} "Added group %{nagios_group} for package %{name}"
 fi
 # default group: nagcmd
 if
-    getent group %{cmdgrp} >/dev/null
+    getent group %{nagios_command_group} >/dev/null
 then
-    : OK group %{cmdgrp} already present
+    : OK group %{nagios_command_group} already present
 else
-    groupadd -r %{cmdgrp} 2>/dev/null || :
-    %{nnmmsg} "Added group %{cmdgrp} for package %{name}"
+    groupadd -r %{nagios_command_group} 2>/dev/null || :
+    %{nnmmsg} "Added group %{nagios_command_group} for package %{name}"
 fi
 # default user: nagios
 if
-    id %{nsusr} > /dev/null 2>&1
+    id %{nagios_user} > /dev/null 2>&1
 then
-    : OK user %{nsusr} already present
+    : OK user %{nagios_user} already present
 else
-    useradd  -r -o -g %{nsgrp} -s /bin/false -c "User for Nagios" -d 
/var/lib/%{name} %{nsusr} 2> /dev/null || :
-    %{nnmmsg} "Added user %{nsusr} for package %{name}"
+    useradd  -r -o -g %{nagios_group} -s /bin/false -c "User for Nagios" -d 
%{nagios_localstatedir} %{nagios_user} 2> /dev/null || :
+    %{nnmmsg} "Added user %{nagios_user} for package %{name}"
 fi
 # update?
 if [ ${1:-0} -gt 1 ]; then
-  # in the past, group www was used as cmdgrp - now we use the default: nagcmd
-  if id -Gn %{nsusr} 2>/dev/null | grep -q %{cmdgrp} >/dev/null 2>&1 ; then
-    : # %%{nsusr} is already in %%cmdgrp group
+  # in the past, group www was used as nagios_command_group - now we use the 
default: nagcmd
+  if id -Gn %{nagios_user} 2>/dev/null | grep -q %{nagios_command_group} 
>/dev/null 2>&1 ; then
+    : # %%{nagios_user} is already in %%nagios_command_group group
   else
-    # Add %%{nsusr} to %%cmdgrp.
-    groupmod -A %{nsusr} %{cmdgrp} 2>/dev/null
-    %{nnmmsg} "Added %{nsusr} to %{cmdgrp}"
+    # Add %%{nagios_user} to %%nagios_command_group.
+    groupmod -A %{nagios_user} %{nagios_command_group} 2>/dev/null
+    %{nnmmsg} "Added %{nagios_user} to %{nagios_command_group}"
   fi
 fi
 
@@ -366,10 +344,10 @@
 %{fillup_and_insserv nagios}
 # Update ?
 if [ ${1:-0} -gt 1 ]; then
- if [ -f %{_sysconfdir}/%{name}/nagios.cfg ]; then
+ if [ -f %{nagios_sysconfdir}/nagios.cfg ]; then
   DATE=$(date "+%Y-%m-%d-%H:%M")
   TMPFILE=$(mktemp /tmp/%{name}-XXXXXX)
-  NAGIOS_CFG=%{_sysconfdir}/%{name}/nagios.cfg
+  NAGIOS_CFG=%{nagios_sysconfdir}/nagios.cfg
   cp -f $NAGIOS_CFG ${NAGIOS_CFG}_${DATE}
   if ! grep -q ^lock_file=%{nslockfile} $NAGIOS_CFG ; then
         echo "- updating pid lock_file= to %{nslockfile} in $NAGIOS_CFG" >> 
$TMPFILE
@@ -435,7 +413,7 @@
 
 %postun
 if [ -f %nslockfile ]; then
-    chown -v %{nsusr} %{nslockfile}
+    chown -v %{nagios_user} %{nslockfile}
 fi
 %restart_on_update %{name}
 %{insserv_cleanup}
@@ -447,15 +425,15 @@
     wwwusr=$(awk '/^[ \t]*User[ \t]+[a-zA-Z0-9]+/ {print $2}' 
etc/apache2/uid.conf)
 fi
 if [ "z" = "z$wwwusr" ]; then # otherwise, use the default
-    wwwusr=%{cmdusr}
+    wwwusr=%{nagios_command_user}
 fi
-# if apache user is not in cmdgrp, add it
-if id -Gn $wwwusr 2>/dev/null | grep -q %{cmdgrp} >/dev/null 2>&1 ; then
-    : # $wwwusr (default: %cmdusr) is already in Nagios cmd group
+# if apache user is not in nagios_command_group, add it
+if id -Gn $wwwusr 2>/dev/null | grep -q %{nagios_command_group} >/dev/null 
2>&1 ; then
+    : # $wwwusr (default: %%nagios_command_user) is already in Nagios cmd group
 else
-    # modify apache user, adding it to cmdgrp
-    groupmod -A $wwwusr %{cmdgrp} 2>/dev/null
-    %nnmmsg "User $wwwusr added to group %{cmdgrp} so sending commands to 
Nagios from the CGI is possible."
+    # modify apache user, adding it to nagios_command_group
+    groupmod -A $wwwusr %{nagios_command_group} 2>/dev/null
+    %nnmmsg "User $wwwusr added to group %{nagios_command_group} so sending 
commands to Nagios from the CGI is possible."
 fi
 # Update ?
 if [ ${1:-0} -eq 1 ]; then
@@ -478,43 +456,48 @@
 %doc Changelog LEGAL LICENSE README README.SuSE sample-config/
 %{_mandir}/man8/%{name}*
 %_sysconfdir/init.d/%name
-%ghost %config(missingok,noreplace) /var/log/%name/config.err
-%config(noreplace) %_sysconfdir/%name/*.cfg
-%config(noreplace) %_sysconfdir/%name/objects/*.cfg
+%ghost %config(missingok,noreplace) %{nagios_logdir}/config.err
+%config(noreplace) %{nagios_sysconfdir}/*.cfg
+%config(noreplace) %{nagios_sysconfdir}/objects/*.cfg
 %{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
 %{_sysconfdir}/cron.weekly/*
-%{_prefix}/lib/%name/
-%attr(0755,root,root) %{_prefix}/lib/%name/p1.pl
-%exclude %{_prefix}/lib/%name/cgi/*
+%{nagios_localstatedir}
+%attr(0755,root,root) %{nagios_libdir}/p1.pl
+%exclude %{nagios_cgidir}/*
 %{_sbindir}/convertcfg
 %{_sbindir}/mini_epn
 %{_sbindir}/new_mini_epn
 %{_sbindir}/rc%name
+%dir %{nagios_libdir}
+%dir %{nagios_plugindir}
+%dir %{nagios_eventhandlerdir}
+%{nagios_eventhandlerdir}/*
 # defattr change
-%defattr(-,%{nsusr},%{cmdgrp})
-%dir %_sysconfdir/%name
-%dir %_sysconfdir/%name/objects
-%dir /var/spool/%{name}
+%defattr(-,%{nagios_user},%{nagios_command_group})
+%dir %{nagios_sysconfdir}
+%dir %{nagios_sysconfdir}/objects
+%dir %{nagios_spooldir}
 # defattr change
-%defattr(-,%{nsusr},%nsgrp)
-%dir /var/lib/%name
-%dir /var/log/%name
-%dir /var/log/%name/archives
+%defattr(-,%{nagios_user},%nagios_group)
+%dir %{nagios_localstatedir}
+%dir %{nagios_logdir}
+%dir %{nagios_logdir}/archives
 %ghost %dir %nslockfile_dir
-%attr(0644,%nsusr,%nsgrp) %verify(not md5 size mtime) %ghost 
%config(missingok,noreplace) %nslockfile
-%attr(0600,%nsusr,%nsgrp) %verify(not md5 size mtime) %ghost 
%config(missingok,noreplace) /var/lib/%name/retention.dat
-%attr(0664,%nsusr,%nsgrp) %verify(not md5 size mtime) %ghost 
%config(missingok,noreplace) /var/lib/%name/status.dat
-%attr(0750,root,%{cmdgrp}) %{_sbindir}/%{name}
-%attr(0750,root,%{cmdgrp}) %{_sbindir}/nagiostats
+%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}
+%attr(0750,root,%{nagios_command_group}) %{_sbindir}/nagiostats
 
 %files www
 %defattr(755,root,root)
-%{_prefix}/lib/%{name}/cgi/*
+%dir %{nagios_cgidir}
+%{nagios_cgidir}/*
 # defattr change
 %defattr(-,root,root)
-%{_datadir}/%{name}/
+%{nagios_datadir}
 %config(noreplace) %{apache2_sysconfdir}/%{name}.conf
-%attr(0640,root,%cmdgrp) %config(missingok,noreplace) 
%{_sysconfdir}/%{name}/htpasswd.users
+%attr(0640,root,%nagios_command_group) %config(missingok,noreplace) 
%{_sysconfdir}/%{name}/htpasswd.users
 
 %files devel
 %defattr(-,root,root)

++++++ nagios-rpmlintrc ++++++
--- /var/tmp/diff_new_pack.hRDQw0/_old  2011-11-07 14:22:59.000000000 +0100
+++ /var/tmp/diff_new_pack.hRDQw0/_new  2011-11-07 14:22:59.000000000 +0100
@@ -6,3 +6,6 @@
 addFilter("no-dependency-on.*perl")
 # The name of that package is used since years - no need to change it for this 
new 'policy'
 addFilter("name-repeated-in-summary.*Nagios")
+# avoid FollowSymlinks in apache configuration
+addFilter("files-duplicate.*/usr/share/nagios/images/.*");
+addFilter("files-duplicate.*/usr/share/nagios/contexthelp/.*");

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to