Hello community, here is the log from the commit of package nagios for openSUSE:Factory checked in at Sat Oct 2 00:43:23 CEST 2010. -------- --- nagios/nagios.changes 2010-05-11 23:45:17.000000000 +0200 +++ /mounts/work_src_done/STABLE/nagios/nagios.changes 2010-09-30 01:08:54.000000000 +0200 @@ -1,0 +2,112 @@ +Mon Sep 20 09:50:56 UTC 2010 - schneemann@b1-systems.de + +- removed unneeded filter "permissions-directory-setuid-bit" from + nagios-rpmlintrc + +------------------------------------------------------------------- +Tue Sep 7 06:43:37 UTC 2010 - schneemann@b1-systems.de + +- cleaned spec and sources, removed unused patches from source + +------------------------------------------------------------------- +Wed Sep 1 22:37:22 UTC 2010 - schneemann@b1-systems.de + +- reworked phone-home patch + +------------------------------------------------------------------- +Wed Sep 1 22:14:55 UTC 2010 - schneemann@b1-systems.de + +- Update to nagios 3.2.2, excerpt from changelog: +FIXES +* Fix for choosing next valid time on day of DST change when clocks go +one hour backwards +* Fix for nagios now erroring when "Error: Could not find any +contactgroup matching..." displayed +* Fix tap tests for Solaris 10 and newer versions of Test::Harness +* Fix for notifications not being sent out when scheduled downtime is +cancelled (Daniel Pouzzner) +* Fix for first notification delay being calculated incorrectly, and +notifications potentially going out early (Pawel Malachowski) +* Fix for text of scheduling downtime of all services on a host (Holger +Weiss) +* Fix for services inheriting notification period from hosts if not +defined (Gordon Messmer) +* Fix for incorrect service states on host failures (bug #130 Petya Kohts) +* Fix for incorrect service state attributes being set on host failures +(bug #128 Petya Kohts) +* Fix for non-scheduled hosts and services not being updated in NDOUtils +* Fix for incorrect host state counts in status CGI when viewing +servicegroups (bug #72) +* Fix for new Splunk integration query parameters (bug #136) +* Fix for extra field header in availability CSV export (bug #113) +* Fix for macro processing code modifying input string (Jochen Bern) +* Fix for event execution loop re-scheduling host checks instead of +executing them if service checks are disabled (bug #152) +* Fix for segfaults on Solaris (Torsten Huebler) +* Fix for incorrect comment expiration times being passed to event +broker (Mattieu Kermagot) + +------------------------------------------------------------------- +Thu Jul 15 20:56:09 UTC 2010 - lars@linux-schulserver.de + +- back to the old file permissions (once again for clean + nagios support) +- readded nonsense stuff again +- create/fix check_result_path if needed + +------------------------------------------------------------------- +Fri Jul 9 14:06:55 UTC 2010 - chris@computersalat.de + +- fix file/dir perms + o once again for centreon support +- spec mods + o sort TAGS + o added lost Authors (description) + o macros + o remove nonsense stuff + +------------------------------------------------------------------- +Thu Jun 24 10:16:35 UTC 2010 - lars@linux-schulserver.de + +- rebase phone-home patch + +------------------------------------------------------------------- +Tue Jun 22 09:00:37 UTC 2010 - lars@linux-schulserver.de + +- recommend nagios-plugins only to avoid buildcycles + +------------------------------------------------------------------- +Fri Jun 18 01:16:09 UTC 2010 - lars@linux-schulserver.de + +- fix init script: touch files if they do not exist- + +------------------------------------------------------------------- +Fri May 28 05:03:43 UTC 2010 - lars@linux-schulserver.de + +- disable patch8 - needs rebasing +- install PIDDIR if it's not /var/run to avoid owner problems + during start +- always change ownership of standard files to the right values + +------------------------------------------------------------------- +Mon May 24 16:30:36 UTC 2010 - lars@linux-schulserver.de + +- fix 'Schedule downtime for this host and all services' behavior + (http://tracker.nagios.org/view.php?id=133) +- fix typos resulting in non used style declarations + (http://tracker.nagios.org/view.php?id=150) +- fix deleting comments from the hashlist + (http://tracker.nagios.org/view.php?id=80) +- rebase nagios-p1.pl-location.patch +- fix a handful compiler warnings +- do not allow nagios to phone home: disable online_update_checks +- fix command-group +- BuildRequire net-tools for enabling WAP + +------------------------------------------------------------------- +Fri May 14 12:51:20 UTC 2010 - lars@linux-schulserver.de + +- check_verbose now always prints the resulting logfile - this + allows to see the warnings + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- nagios-3.2.1.tar.bz2 New: ---- nagios-3.2.1-delete_correct_comment.patch nagios-3.2.2.tar.bz2 nagios-disable_phone_home.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nagios.spec ++++++ --- /var/tmp/diff_new_pack.738XYj/_old 2010-10-02 00:32:33.000000000 +0200 +++ /var/tmp/diff_new_pack.738XYj/_new 2010-10-02 00:32:33.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package nagios (Version 3.2.1) +# spec file for package nagios (Version 3.2.2) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -18,12 +18,6 @@ Name: nagios -Version: 3.2.1 -Release: 3 -Summary: The Nagios Network Monitor -Url: http://www.nagios.org/ -Group: System/Monitoring -License: GPLv2+ %define nsusr nagios %define nsgrp nagios %define cmdusr wwwrun @@ -33,6 +27,12 @@ %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.2.2 +Release: 1 +License: GPLv2+ +Group: System/Monitoring +Url: http://www.nagios.org/ Source0: %{name}-%{version}.tar.bz2 Source1: rc%{name} Source2: %{name}-rpmlintrc @@ -40,6 +40,7 @@ Source4: suse.de-nagios Source5: nagios.8 Source6: nagiosstats.8 +# Source10: %{name}-README.SuSE # PATCH-FIX-UPSTREAM fix for missing expression in return statement bnc#395203 Patch1: nagios.run_async_service_check.return.patch @@ -49,8 +50,21 @@ Patch3: nagios-fix_encoding_trends.cgi.patch # PATCH-FIX-UPSTREAM Fixes handling of forced checks Patch4: nagios-fix_forced_servicechecks.patch +# PATCH-FIX-UPSTREAM deleting comments removed more elements from the hashlist than it should (http://tracker.nagios.org/view.php?id=80) +Patch7: nagios-3.2.1-delete_correct_comment.patch # PATCH-FIX-OPENSUSE openSUSE uses a special location for p1.pl Patch10: nagios-p1.pl-location.patch +# PATCH-FIX-OPENSUSE disable Nagios online update checks for distributed packages +Patch11: nagios-disable_phone_home.patch +# +BuildRoot: %{_tmppath}/%{name}-%{version}-build +PreReq: %fillup_prereq +PreReq: %insserv_prereq +PreReq: /bin/logger +PreReq: coreutils +PreReq: grep +PreReq: pwdutils +PreReq: sed BuildRequires: apache2-devel BuildRequires: freetype2-devel BuildRequires: gd-devel @@ -60,16 +74,8 @@ BuildRequires: mailx BuildRequires: openssl-devel BuildRequires: pcre-devel +BuildRequires: net-tools BuildRequires: zlib-devel -PreReq: %fillup_prereq -PreReq: %insserv_prereq -PreReq: /bin/logger -PreReq: coreutils -PreReq: grep -PreReq: pwdutils -PreReq: sed -# -BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} < 1010 BuildRequires: XFree86-devel BuildRequires: XFree86-libs @@ -78,15 +84,17 @@ %else BuildRequires: libapr-util1-devel BuildRequires: xorg-x11-devel -Recommends: %{name}-www Recommends: cron +Recommends: %{name}-www # we enable nagios embedded perl, but if people disable it... Recommends: perl = %{perl_version} %endif %if 0%{?suse_version} > 1020 BuildRequires: fdupes -%endif +Recommends: %{name}-plugins +%else Requires: %{name}-plugins +%endif Requires: mailx %description @@ -104,6 +112,12 @@ This package provide core programs for nagios. The web interface, documentation, and development files are built as separate packages + + +Authors: +-------- + Ethan Galstad <nagios@nagios.org> + %package www License: GPLv2+ Summary: Provides the HTML and CGI files for the Nagios web interface @@ -116,9 +130,7 @@ PreReq: pwdutils PreReq: sed Requires: %{name} = %{version} -Requires: gd -Requires: mod_php_any -Requires: php5 +Requires: gd php5 mod_php_any %description www Nagios is a program that will monitor hosts and services on your @@ -134,6 +146,12 @@ for the Nagios web interface. In addition, HTML documentation is included in this package. + + +Authors: +-------- + Ethan Galstad <nagios@nagios.org> + %package devel License: GPLv2+ Summary: Development files for nagios @@ -152,13 +170,22 @@ This package provides include files that Nagios-related applications may compile against. + + +Authors: +-------- + Ethan Galstad <nagios@nagios.org> + + %prep -%setup -q +%setup -q -n %{name}-%{version} %patch1 -p1 %patch2 -p0 %patch3 -p0 %patch4 -p0 -%patch10 +%patch7 -p1 +%patch10 -p0 +%patch11 -p0 find -name ".cvsignore" | xargs rm find -name ".gitignore" | xargs rm # fix p1.pl pathname of mini_epn @@ -186,7 +213,7 @@ --with-nagios-user=%{nsusr} \ --with-nagios-group=%{nsgrp} \ --with-command-user=%{cmdusr} \ - --with-command-grp=%{cmdgrp} \ + --with-command-group=%{cmdgrp} \ --with-gd-lib=%{_libdir} \ --with-gd-inc=%{_includedir} \ --with-template-objects \ @@ -226,7 +253,7 @@ popd 1>/dev/null %install -mkdir -p %{buildroot}%{_localstatedir}/log/%name/archives +mkdir -p %{buildroot}%{_localstatedir}/log/%{name}/archives mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%apache2_sysconfdir/ mkdir -p %{buildroot}%nslockfile_dir @@ -234,22 +261,22 @@ DESTDIR=%{buildroot} \ INSTALL_OPTS="" \ COMMAND_OPTS="" \ - CGICFGDIR="%{_sysconfdir}/%name" \ + CGICFGDIR="%{_sysconfdir}/%{name}" \ 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/ +%{__install} -d -m0755 %{buildroot}%{_prefix}/lib/%{name}/plugins/eventhandlers/ +%{__cp} -afpv contrib/eventhandlers/* %{buildroot}%{_prefix}/lib/%{name}/plugins/eventhandlers/ # install directory for event brokers like ndoutils -%{__install} -d -m0755 %{buildroot}%{_prefix}/lib/%name/brokers +%{__install} -d -m0755 %{buildroot}%{_prefix}/lib/%{name}/brokers # install headers for development package -%{__install} -d -m0755 %{buildroot}%{_includedir}/%name/ +%{__install} -d -m0755 %{buildroot}%{_includedir}/%{name}/ pushd include for file in *.h; do if test "x${file}" != "xconfig.h" -a "x${file}" != "xsnprintf.h" -a "x${file}" != "xcgiutils.h" ; then - install -m 644 $file %{buildroot}%{_includedir}/%name/ + install -m 644 $file %{buildroot}%{_includedir}/%{name}/ fi; done popd @@ -258,35 +285,33 @@ # 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' \ +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' \ -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}%{_sysconfdir}/%{name}/nagios.cfg > %{buildroot}%{_sysconfdir}/%{name}/nagios.cfg.tmp +mv %{buildroot}%{_sysconfdir}/%{name}/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' %{SOURCE10} > %_builddir/%name-%version/README.SuSE +sed -e 's@DATADIR@%{_datadir}/%{name}@g' -e 's@SYSCONFDIR@%{_sysconfdir}/%{name}@g' %{S:10} > %_builddir/%{name}-%version/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 +%{__install} -D -m 0755 %{S:1} %{buildroot}%{_sysconfdir}/init.d/%{name} +ln -sf ../../etc/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name} # sysconfig script -%{__install} -D -m 0644 %{S:3} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%name +%{__install} -D -m 0644 %{S:3} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name} # install cronjob (gzip' the logfiles) -%{__install} -D -m 0640 %{S:4} %{buildroot}%{_sysconfdir}/cron.weekly/%name +%{__install} -D -m 0640 %{S:4} %{buildroot}%{_sysconfdir}/cron.weekly/%{name} # important ghost files -touch %{buildroot}%{_sysconfdir}/%name/htpasswd.users -touch %{buildroot}%{_localstatedir}/lib/%name/retention.dat -touch %{buildroot}%{_localstatedir}/lib/%name/status.dat -touch %{buildroot}%{_localstatedir}/log/%name/config.err +touch %{buildroot}%{_sysconfdir}/%{name}/htpasswd.users +touch %{buildroot}%{_localstatedir}/lib/%{name}/retention.dat +touch %{buildroot}%{_localstatedir}/lib/%{name}/status.dat +touch %{buildroot}%{_localstatedir}/log/%{name}/config.err touch %{buildroot}%nslockfile # install manpages -install -Dm644 %{SOURCE5} %{buildroot}%{_mandir}/man8/%{name}.8 -install -Dm644 %{SOURCE6} %{buildroot}%{_mandir}/man8/nagiosstats.8 -# resource.cfg can contain passwords -chmod 0640 %{buildroot}%{_sysconfdir}/%name/resource.cfg +install -Dm644 %{S:5} %{buildroot}%{_mandir}/man8/%{name}.8 +install -Dm644 %{S:6} %{buildroot}%{_mandir}/man8/nagiosstats.8 # some rpmlint stuff %if 0%{?suse_version} > 1020 %fdupes -s %{buildroot} @@ -328,9 +353,9 @@ 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 + : # %{nsusr} is already in %cmdgrp group else - # Add %nsusr to %cmdgrp. + # Add %{nsusr} to %cmdgrp. groupmod -A %{nsusr} %{cmdgrp} 2>/dev/null %{nnmmsg} "Added %{nsusr} to %{cmdgrp}" fi @@ -453,8 +478,6 @@ %exclude %{_prefix}/lib/%name/cgi/* %{_sbindir}/convertcfg %{_sbindir}/mini_epn -%attr(0750,root,%{cmdgrp}) %{_sbindir}/%{name} -%attr(0750,root,%{cmdgrp}) %{_sbindir}/nagiostats %{_sbindir}/new_mini_epn %{_sbindir}/rc%name # defattr change @@ -471,18 +494,20 @@ %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 %files www %defattr(755,root,root) -%{_prefix}/lib/%name/cgi/* +%{_prefix}/lib/%{name}/cgi/* # defattr change %defattr(-,root,root) -%{_datadir}/%name/ -%config(noreplace) %{apache2_sysconfdir}/%name.conf -%attr(0640,root,%cmdgrp) %ghost %config(missingok,noreplace) %{_sysconfdir}/%name/htpasswd.users +%{_datadir}/%{name}/ +%config(noreplace) %{apache2_sysconfdir}/%{name}.conf +%attr(0640,root,%cmdgrp) %ghost %config(missingok,noreplace) %{_sysconfdir}/%{name}/htpasswd.users %files devel %defattr(-,root,root) -%{_includedir}/%name/ +%{_includedir}/%{name}/ %changelog ++++++ nagios-3.2.1-delete_correct_comment.patch ++++++ Index: nagios-3.2.1/common/comments.c =================================================================== --- nagios-3.2.1.orig/common/comments.c +++ nagios-3.2.1/common/comments.c @@ -201,7 +201,10 @@ int delete_comment(int type, unsigned lo if(last_hash) last_hash->nexthash=this_hash->nexthash; else - comment_hashlist[hashslot]=NULL; + if(this_hash->nexthash) + comment_hashlist[hashslot]=this_hash->nexthash; + else + comment_hashlist[hashslot]=NULL; break; } last_hash=this_hash; ++++++ nagios-3.2.1.tar.bz2 -> nagios-3.2.2.tar.bz2 ++++++ ++++ 5063 lines of diff (skipped) ++++++ nagios-disable_phone_home.patch ++++++ --- base/utils.c.orig 2010-09-02 00:33:38.000000000 +0200 +++ base/utils.c 2010-09-02 00:35:14.000000000 +0200 @@ -4450,131 +4450,14 @@ /* checks for updates at api.nagios.org */ int query_update_api(void){ - char *api_server="api.nagios.org"; - char *api_path="/versioncheck/"; - char *api_query=NULL; - char *api_query_opts=NULL; - char *buf=NULL; - char recv_buf[1024]; - int report_install=FALSE; - int result=OK; - char *ptr=NULL; - int current_line=0; - int buf_index=0; - int in_header=TRUE; - char *var=NULL; - char *val=NULL; - int sd=0; - int send_len=0; - int recv_len=0; int update_check_succeeded=FALSE; - /* report a new install, upgrade, or rollback */ - /* Nagios monitors the world and we monitor Nagios taking over the world. :-) */ - if(last_update_check==(time_t)0L) - report_install=TRUE; - if(last_program_version==NULL || strcmp(PROGRAM_VERSION,last_program_version)) - report_install=TRUE; - if(report_install==TRUE){ - asprintf(&api_query_opts,"&firstcheck=1"); - if(last_program_version!=NULL) - asprintf(&api_query_opts,"%s&last_version=%s",api_query_opts,last_program_version); - } - - /* generate the query */ - asprintf(&api_query,"v=1&product=nagios&tinycheck=1&stableonly=1&uid=%lu",update_uid); - if(bare_update_check==FALSE) - asprintf(&api_query,"%s&version=%s%s",api_query,PROGRAM_VERSION,(api_query_opts==NULL)?"":api_query_opts); - - /* generate the HTTP request */ - asprintf(&buf,"POST %s HTTP/1.0\r\n",api_path); - asprintf(&buf,"%sUser-Agent: Nagios/%s\r\n",buf,PROGRAM_VERSION); - asprintf(&buf,"%sConnection: close\r\n",buf); - asprintf(&buf,"%sHost: %s\r\n",buf,api_server); - asprintf(&buf,"%sContent-Type: application/x-www-form-urlencoded\r\n",buf); - asprintf(&buf,"%sContent-Length: %d\r\n",buf,strlen(api_query)); - asprintf(&buf,"%s\r\n",buf); - asprintf(&buf,"%s%s\r\n",buf,api_query); - - /* - printf("SENDING...\n"); - printf("==========\n"); - printf("%s",buf); - printf("\n"); - */ - - - result=my_tcp_connect(api_server,80,&sd,2); - /*printf("CONN RESULT: %d, SD: %d\n",result,sd);*/ - if(sd>0){ - - /* send request */ - send_len=strlen(buf); - result=my_sendall(sd,buf,&send_len,2); - /*printf("SEND RESULT: %d, SENT: %d\n",result,send_len);*/ - - /* get response */ - recv_len=sizeof(recv_buf); - result=my_recvall(sd,recv_buf,&recv_len,2); - recv_buf[sizeof(recv_buf)-1]='\x0'; - /*printf("RECV RESULT: %d, RECEIVED: %d\n",result,recv_len);*/ - - /* - printf("\n"); - printf("RECEIVED...\n"); - printf("===========\n"); - printf("%s",recv_buf); - printf("\n"); - */ - - /* close connection */ - close(sd); - - /* parse the result */ - in_header=TRUE; - while((ptr=get_next_string_from_buf(recv_buf,&buf_index,sizeof(recv_buf)))){ - - strip(ptr); - current_line++; - - if(!strcmp(ptr,"")){ - in_header=FALSE; - continue; - } - if(in_header==TRUE) - continue; - - var=strtok(ptr,"="); - val=strtok(NULL,"\n"); - /*printf("VAR: %s, VAL: %s\n",var,val);*/ - - if(!strcmp(var,"UPDATE_AVAILABLE")){ - update_available=atoi(val); - /* we were successful */ - update_check_succeeded=TRUE; - } - else if(!strcmp(var,"UPDATE_VERSION")){ - if(new_program_version) - my_free(new_program_version); - new_program_version=strdup(val); - } - else if(!strcmp(var,"UPDATE_RELEASEDATE")){ - } - } - } - - /* cleanup */ - my_free(buf); - my_free(api_query); - my_free(api_query_opts); + update_check_succeeded=TRUE; /* we were successful! */ if(update_check_succeeded==TRUE){ time(&last_update_check); - if(last_program_version) - free(last_program_version); - last_program_version=(char *)strdup(PROGRAM_VERSION); } return OK; ++++++ nagios-p1.pl-location.patch ++++++ --- /var/tmp/diff_new_pack.738XYj/_old 2010-10-02 00:32:34.000000000 +0200 +++ /var/tmp/diff_new_pack.738XYj/_new 2010-10-02 00:32:34.000000000 +0200 @@ -2,7 +2,7 @@ =================================================================== --- Makefile.in.orig +++ Makefile.in -@@ -24,6 +24,7 @@ +@@ -25,6 +25,7 @@ exec_prefix=@exec_prefix@ LOGDIR=@localstatedir@ CHECKRESULTDIR=@CHECKRESULTDIR@ CFGDIR=@sysconfdir@ @@ -10,7 +10,7 @@ BINDIR=@bindir@ CGIDIR=@sbindir@ LIBEXECDIR=@libexecdir@ -@@ -190,7 +191,7 @@ +@@ -219,7 +220,7 @@ install-basic: $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR)/archives $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CHECKRESULTDIR) if [ $(INSTALLPERLSTUFF) = yes ]; then \ @@ -23,7 +23,7 @@ =================================================================== --- configure.in.orig +++ configure.in -@@ -16,6 +16,7 @@ +@@ -16,6 +16,7 @@ PKG_REL_DATE="03-09-2010" dnl Figure out how to invoke "install" and what install options to use. AC_PROG_INSTALL AC_SUBST(INSTALL) @@ -46,7 +46,7 @@ =================================================================== --- sample-config/nagios.cfg.in.orig +++ sample-config/nagios.cfg.in -@@ -1047,7 +1047,7 @@ +@@ -1114,7 +1114,7 @@ date_format=us # embedded Perl interpreter) is located. If you didn't compile # Nagios with embedded Perl support, this option has no effect. ++++++ nagios-rpmlintrc ++++++ --- /var/tmp/diff_new_pack.738XYj/_old 2010-10-02 00:32:34.000000000 +0200 +++ /var/tmp/diff_new_pack.738XYj/_new 2010-10-02 00:32:34.000000000 +0200 @@ -1,8 +1,10 @@ # common.css is used in cgi - and can be expanded by user addFilter("zero-length.*/usr/share/nagios/stylesheets/common.css"); # we need xntp for SLES9 -addFilter("init-script-non-var-dependency /etc/init.d/nagios xntpd"); +addFilter("init-script-non-var-dependency.*/etc/init.d/nagios xntpd"); # nagios comes with embedded perl -addFilter("W: no-dependency-on perl") +addFilter("no-dependency-on.*perl") # this is the directory, where users of the group nagcmd can trigger commands for nagios -addFilter("permissions-directory-setuid-bit.*/var/spool/nagios"); +#addFilter("permissions-directory-setuid-bit.*/var/spool/nagios"); +# The name of that package is used since years - no need to change it for this new 'policy' +addFilter("name-repeated-in-summary.*Nagios") ++++++ rcnagios ++++++ --- /var/tmp/diff_new_pack.738XYj/_old 2010-10-02 00:32:34.000000000 +0200 +++ /var/tmp/diff_new_pack.738XYj/_new 2010-10-02 00:32:34.000000000 +0200 @@ -39,13 +39,25 @@ # Read config and log errors in logfile function config_check () { - $NAGIOS_BIN -v "$NAGIOS_CFG" >/dev/null 2>&1 - if [ $? -eq 0 ]; then - return 0 - else - $NAGIOS_BIN -v "$NAGIOS_CFG" >"$NAGIOS_CFG_ERR_LOG" 2>&1 - return 1 - fi + case "$1" in + verbose) + $NAGIOS_BIN -v "$NAGIOS_CFG" >"$NAGIOS_CFG_ERR_LOG" 2>&1 + if [ $? -eq 0 ]; then + return 0 + else + return 1 + fi + ;; + *) + $NAGIOS_BIN -v "$NAGIOS_CFG" >/dev/null 2>&1 + if [ $? -eq 0 ]; then + return 0 + else + $NAGIOS_BIN -v "$NAGIOS_CFG" >"$NAGIOS_CFG_ERR_LOG" 2>&1 + return 1 + fi + ;; + esac } # grab a config option @@ -66,11 +78,17 @@ test -f "$file" && rm -f "$file" done # set default access rights for files and directories - for file in "$check_result_path" "$log_file" "$state_retention_file" "$status_file"; do - if [ -e "$file" ]; then + for file in "$log_file" "$state_retention_file" "$status_file"; do + if [ ! -e "$file" ]; then touch "$file" - chown $nagios_user:$nagios_cmdgrp "$file" fi + chown $nagios_user:$nagios_cmdgrp "$file" + done + for dir in "$check_result_path" ; do + if [ ! -d "$dir" ]; then + mkdir -p "$dir" + fi + chown $nagios_user:$nagios_cmdgrp "$dir" done chmod 660 "$resource_file" chown $nagios_user:$nagios_cmdgrp "$resource_file" @@ -92,7 +110,7 @@ fi ;; *) - test -d $(dirname "$NAGIOS_PIDFILE") || install -d -m755 -o$nagios_user -g$nagios_cmdgrp $(dirname "$NAGIOS_PIDFILE") + install -d -m755 -o$nagios_user -g$nagios_cmdgrp $(dirname "$NAGIOS_PIDFILE") esac } @@ -172,7 +190,7 @@ sleep 2 fi check_files - check_lock_file + check_lock_file startproc $NICELEVEL -p "$lock_file" "$NAGIOS_BIN" -d "$NAGIOS_CFG" else echo "Error in configuration - please read $NAGIOS_CFG_ERR_LOG" @@ -245,27 +263,29 @@ checkproc -p "$lock_file" "$NAGIOS_BIN" rc_status -v ;; - check|check_verbose) - echo -n "Running configuration check... " + check) + echo -n "Starting configuration check " config_check if [ $? -eq 0 ]; then - echo -n "- Passed configuration check" - test -f "$NAGIOS_CFG_ERR_LOG" && rm "$NAGIOS_CFG_ERR_LOG" + echo "- passed configuration check" + test -f $NAGIOS_CFG_ERR_LOG && rm $NAGIOS_CFG_ERR_LOG rc_reset else - echo "- Error in configuration files" - case "$1" in - check_verbose) - cat "$NAGIOS_CFG_ERR_LOG" - ;; - *) - echo "Please read $NAGIOS_CFG_ERR_LOG" - ;; - esac + echo "- detected Error in configuration files" + echo "Please read $NAGIOS_CFG_ERR_LOG" rc_failed fi rc_status -v ;; + check_verbose) + echo "Running verbose configuration check..." + config_check verbose + exitcode=$? + cat "$NAGIOS_CFG_ERR_LOG" + rc_failed $exitcode + rc_status -v + rc_exit + ;; *) echo "Usage: $0 {start|stop|status|try-restart|restart|reload|check|check_verbose}" exit 1 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org