File nagios.spec of Package nagios

#
# spec file for package nagios (Version 3.0.6)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           nagios
Summary:        The Nagios Network Monitor
Version:        3.0.6
Release:        3
Url:            http://www.nagios.org/
License:        GPL v2 or later
Group:          System/Monitoring
PreReq:         %insserv_prereq
PreReq:         %fillup_prereq
PreReq:         /bin/logger
PreReq:         sed
PreReq:         grep
PreReq:         coreutils
PreReq:         pwdutils
Requires:       mailx
BuildRequires:  apache2-devel
BuildRequires:  freetype2-devel
BuildRequires:  gd-devel
BuildRequires:  iputils
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  mailx
BuildRequires:  openssl-devel
BuildRequires:  pcre-devel
BuildRequires:  zlib-devel
%if 0%{?suse_version} < 1010
BuildRequires:  XFree86-devel
BuildRequires:  XFree86-libs
BuildRequires:  libapr0
Requires:       cron
%else
BuildRequires:  libapr-util1-devel
BuildRequires:  xorg-x11-devel
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
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%define         realname nagios
%define         nsusr nagios
%define         nsgrp nagios
%define         cmdusr wwwrun
%define         cmdgrp nagcmd
%define         nslockfile_dir /var/run/%{realname}
%define         nslockfile %nslockfile_dir/%{realname}.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 %{realname}/rpm
Source0:        %{realname}-%{version}.tar.bz2
Source1:        rc%{name}
Source2:        %{name}-rpmlintrc
Source3:        %{name}.sysconfig
Source4:        suse.de-nagios
Source10:       %{name}-README.SuSE
Patch1:         nagios.run_async_service_check.return.patch
Patch10:        nagios-p1.pl-location.patch

%description
Nagios is a program that will monitor hosts and services on your
network. It has the ability to email or page you when a problem arises
and when a problem is resolved. Nagios is written in C and is designed
to run under Linux (and some other *NIX variants) as a background
process, intermittently running checks on various services that you
specify.

The actual service checks are performed by separate "plugin" programs
which return the status of the checks to Nagios. The plugins are
available at http://sourceforge.net/projects/nagiosplug

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:        GPL v2 or later
Group:          System/Monitoring
Summary:        Provides the HTML and CGI files for the Nagios web interface
Requires:       %{name} = %{version}
Requires:       gd
PreReq:         apache2 
PreReq:         coreutils 
PreReq:         pwdutils 
PreReq:         /bin/logger 
PreReq:         sed 
PreReq:         grep 
PreReq:         gawk

%description www
Nagios is a program that will monitor hosts and services on your
network. It has the ability to email or page you when a problem arises
and when a problem is resolved. Nagios is written in C and is designed
to run under Linux (and some other *NIX variants) as a background
process, intermittently running checks on various services that you
specify.

Several CGI programs are included with Nagios in order to allow you to
view the current service status, problem history, notification history,
and log file via the web. This package provides the HTML and CGI files
for the Nagios web interface. In addition, HTML documentation is
included in this package.



Authors:
--------
    Ethan Galstad <nagios@nagios.org>

%package devel
License:        GPL v2 or later
Group:          Development/Libraries/C and C++
Summary:        Development files for nagios
Requires:       %{name} = %{version}
Requires:       gcc

%description devel
Nagios is a program that will monitor hosts and services on your
network. It has the ability to email or page you when a problem arises
and when a problem is resolved. Nagios is written in C and is designed
to run under Linux (and some other *NIX variants) as a background
process, intermittently running checks on various services that you
specify.

This package provides include files that Nagios-related applications
may compile against.



Authors:
--------
    Ethan Galstad <nagios@nagios.org>

%prep
%setup -q -n %{realname}-%{version}
%patch1 -p1
%patch10
find -name ".cvsignore" | xargs rm
find -name ".gitignore" | xargs rm

%build
# if the following command fails, then apache dependencies are not met
/usr/sbin/apxs2 -q DATADIR >/dev/null
%configure \
	--prefix=%{_prefix} \
	--exec-prefix=%{_sbindir} \
	--bindir=%{_sbindir} \
	--sbindir=%{_prefix}/lib/%{realname}/cgi \
	--libexecdir=%{_prefix}/lib/%{realname}/plugins \
	--datadir=%{_datadir}/%{realname} \
	--sysconfdir=%{_sysconfdir}/%{realname} \
	--with-init-dir=%{_sysconfdir}/init.d \
	--localstatedir=/var/lib/%{realname} \
	--with-cgiurl=/%{realname}/cgi-bin \
	--with-htmurl=/%{realname} \
	--with-httpd-conf=%{apache2_sysconfdir} \
	--with-checkresult-dir=/var/spool/%{realname} \
	--with-lockfile=%{nslockfile} \
	--with-nagios-user=%{nsusr} \
	--with-nagios-group=%{nsgrp} \
	--with-command-user=%{cmdusr} \
	--with-command-grp=%{cmdgrp} \
	--with-gd-lib=%{_libdir} \
	--with-gd-inc=%{_includedir} \
	--with-template-objects \
	--with-template-extinfo \
	--with-perlcache \
	--enable-event-broker \
	--enable-embedded-perl 
#
# %bindir/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
#
# fix p1.pl debug-path
#
sed -i 's#/usr/local/nagios/var/#/var/log/%{realname}/#g' p1.pl 
# make rpmlint happy: add shebang to p1.pl
echo "#!/usr/bin/perl" > p1.pl.new
cat p1.pl >> p1.pl.new
mv p1.pl.new p1.pl
#
# make daemonchk.cgi and event handlers
#
make %{?_smp_mflags} all
make %{?_smp_mflags} -C contrib
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/%{realname}/=; \
         s=/usr/local/nagios/libexec/eventhandlers/=%{_prefix}/lib/%{realname}/plugins/eventhandlers/=; \
         s=/usr/local/nagios/libexec/=%{_prefix}/lib/%{realname}/plugins/=; \
         s=/usr/local/nagios/etc/=%{_sysconfdir}/%{realname}/=; \
         s=/usr/local/nagios/test/var=/var/log/%{realname}=" ${f} > ${F}
    mv ${F} ${f}
done
popd 1>/dev/null

%install
mkdir -p %buildroot/var/log/%realname/archives
mkdir -p %buildroot/%_sbindir
mkdir -p %buildroot/%_sysconfdir/init.d
mkdir -p %buildroot/%apache2_sysconfdir/
mkdir -p %buildroot/%nslockfile_dir
mkdir -p %buildroot/%_sysconfdir/cron.weekly
%{__make} install install-commandmode install-config install-webconf \
    DESTDIR="%buildroot" \
    INSTALL_OPTS="" \
    COMMAND_OPTS="" \
	CGICFGDIR="%_sysconfdir/%realname" \
    INIT_OPTS="" 
%{__make} install -C contrib \
    DESTDIR="%buildroot" \
    INSTALL_OPTS=""
# install event handlers
%{__install} -d -m0755 %buildroot%_prefix/lib/%realname/plugins/eventhandlers/
%{__cp} -afpv contrib/eventhandlers/* %buildroot%_prefix/lib/%realname/plugins/eventhandlers/
# install directory for event brokers like ndoutils
%{__install} -d -m0755 %buildroot%_prefix/lib/%realname/brokers
# install headers for development package
%{__install} -d -m0755 %buildroot%_includedir/%realname/
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/%realname/
    fi; 
done
popd
#
# cleanup sample-conf dir for including in docdir
#
find sample-config/ -name "*.in" -exec rm {} \;
find sample-config/ -name "*.in.orig" -exec rm {} \;
sed -e 's|command_file=.*|command_file=/var/spool/%realname/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' \
    %buildroot/%_sysconfdir/%realname/nagios.cfg > %buildroot/%_sysconfdir/%realname/nagios.cfg.tmp
mv %buildroot/%_sysconfdir/%realname/nagios.cfg.tmp %buildroot/%_sysconfdir/%realname/nagios.cfg
#
# install SuSE specials
#
# README.SuSE file
sed -e 's@DATADIR@%_datadir/%realname@g' -e 's@SYSCONFDIR@%_sysconfdir/%realname@g' %{SOURCE10} > %_builddir/%realname-%version/README.SuSE
# init-script
install -m755 %{SOURCE1} %buildroot/%_sysconfdir/init.d/%realname
ln -sf ../../etc/init.d/%realname %buildroot/%_sbindir/rc%realname
# sysconfig script
mkdir -p %buildroot/var/adm/fillup-templates/
install -m 644 %{SOURCE3} %buildroot/var/adm/fillup-templates/sysconfig.nagios
%if 0%{?suse_version} > 1020
%fdupes -s %buildroot
%endif
# install cronjob (gzip' the logfiles)
install -m640 %{SOURCE4} %buildroot/%_sysconfdir/cron.weekly/
# important ghost files
touch %buildroot%_sysconfdir/%realname/htpasswd.users
touch %buildroot/var/lib/%realname/retention.dat
touch %buildroot/var/lib/%realname/status.dat
touch %buildroot/var/log/%realname/config.err
touch %buildroot%nslockfile

%clean
rm -rf %buildroot

%pre
# Create user and group on the system if necessary
# default group: nagios
if
    getent group %{nsgrp} >/dev/null
then
    : OK group %{nsgrp} already present
else
    groupadd -r %{nsgrp} 2>/dev/null || :
    %{nnmmsg} "Added group %{nsgrp} for package %{name}"
fi
# default group: nagcmd
if 
    getent group %{cmdgrp} >/dev/null
then
    : OK group %{cmdgrp} already present
else
    groupadd -r %{cmdgrp} 2>/dev/null || :
    %{nnmmsg} "Added group %{cmdgrp} for package %{name}"
fi
# default user: nagios
if 
    id %{nsusr} > /dev/null 2>&1 
then
    : OK user %{nsusr} already present
else
    useradd  -r -o -g %{nsgrp} -s /bin/false -c "User for Nagios" -d /var/lib/%{realname} %{nsusr} 2> /dev/null || :
    %{nnmmsg} "Added user %{nsusr} 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
  else
    # Add %nsusr to %cmdgrp.
    groupmod -A %{nsusr} %{cmdgrp} 2>/dev/null
    %{nnmmsg} "Added %{nsusr} to %{cmdgrp}"
  fi
fi

%post
%{fillup_and_insserv nagios}
# Update ?
if [ ${1:-0} -gt 1 ]; then
 if [ -f %{_sysconfdir}/%{realname}/nagios.cfg ]; then
  DATE=$(date "+%Y-%m-%d-%H:%M")
  TMPFILE=$(mktemp /tmp/%{realname}-XXXXXX)
  NAGIOS_CFG=%{_sysconfdir}/%{realname}/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
        sed -i "s@^lock_file=.*@lock_file=%{nslockfile}@" $NAGIOS_CFG
  fi
  if grep -q ^service_reaper_frequency $NAGIOS_CFG ; then
        echo "- renaming service_reaper_frequency to check_result_reaper_frequency in $NAGIOS_CFG" >> $TMPFILE
        sed -i "s@service_reaper_frequency@check_result_reaper_frequency@" $NAGIOS_CFG
  fi
  if grep -q ^aggregate_status_updates $NAGIOS_CFG ; then
        echo "- aggregate_status_updates option has been removed from $NAGIOS_CFG" >> $TMPFILE
        sed -i "s@^aggregate_status_updates@# aggregate_status_updates@" $NAGIOS_CFG
  fi
  if grep -q ^downtime_file $NAGIOS_CFG ; then
        set -- $(grep ^downtime_file $NAGIOS_CFG | sed 's@=@ @')
        shift
        file=$(echo $*)
        if [ -n "$file" ]; then
            if [ -f "$file" ]; then
                set -- $(grep ^state_retention_file $NAGIOS_CFG | sed 's@=@ @')
                shift
                state_retention_file=$(echo $*)
                echo "- adding the content of of $file to $state_retention_file" >> $TMPFILE
                cat "$file" >> "$state_retention_file"
            fi
        fi
        echo "- removing downtime_file variable (no longer supported) in $NAGIOS_CFG" >> $TMPFILE
        sed -i "s@^downtime_file@# downtime_file@" $NAGIOS_CFG
  fi
  if grep -q ^comment_file $NAGIOS_CFG ; then
        set -- $(grep ^comment_file $NAGIOS_CFG | sed 's@=@ @')
        shift
        file=$(echo $*)
        if [ -n "$file" ]; then 
            if [ -f "$file" ]; then
                echo "- adding the content of $file to $state_retention_file" >> $TMPFILE
                cat "$file" >> "$state_retention_file"
            fi
        fi
        echo "- removing comment_file variable (no longer supported) in $NAGIOS_CFG" >> $TMPFILE
        sed -i "s@^comment_file@# comment_file@" $NAGIOS_CFG
  fi
  %{nnmmsg} $(cat $TMPFILE)
  rm $TMPFILE
 fi
else
  # First installation: create an alias for the default nagiosadmin user
  if [ -r etc/aliases ]; then
    if ! grep -q "^nagiosadmin:" etc/aliases; then
        echo -e "nagiosadmin:\troot" >> etc/aliases
	    %{nnmmsg} "Added alias for user nagiosadmin to /etc/aliases" 
        if [ -x usr/bin/newaliases ]; then
            usr/bin/newaliases &>/dev/null || true
        else
            %{nnmmsg} "Cannot execute newaliases. Please run it manually."
        fi
    fi
  fi
fi

%preun
%stop_on_removal %{realname}

%postun
if [ -f %nslockfile ]; then
    chown -v %{nsusr} %{nslockfile}
fi
%restart_on_update %{realname}
%{insserv_cleanup}

%post www
wwwusr=""
if [ -f etc/apache2/uid.conf ]; then
    # If apache is installed, and we can find the apache user, set a shell var
    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}
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 nagiocmd 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."
fi
%restart_on_update apache2

%preun www
%restart_on_update apache2

%files
%defattr(-,root,root)
%doc Changelog LICENSE README README.SuSE sample-config/
%dir %_sysconfdir/%realname
%dir %_sysconfdir/%realname/objects
%dir %attr(755,%nsusr,%nsgrp) /var/lib/%realname
%dir %attr(755,%nsusr,%nsgrp) /var/log/%realname
%dir %attr(755,%nsusr,%nsgrp) /var/log/%realname/archives
%dir %attr(755,%nsusr,%nsgrp) %nslockfile_dir
%dir %attr(2775,%nsusr,%cmdgrp) /var/spool/%realname
%attr(0755,root,root) %_sysconfdir/init.d/%realname
%attr(0644,%nsusr,%nsgrp) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/%realname/%realname.pid
%attr(0600,%nsusr,%nsgrp) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/lib/%realname/retention.dat
%attr(0664,%nsusr,%nsgrp) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/lib/%realname/status.dat
%ghost %config(missingok,noreplace) /var/log/%realname/config.err
%config(noreplace) %_sysconfdir/%realname/*.cfg
%config(noreplace) %_sysconfdir/%realname/objects/*.cfg
/var/adm/fillup-templates/sysconfig.nagios
%defattr(755,root,root)
%_sbindir/nagios
%_sbindir/nagiostats
%_sbindir/mini_epn
%_sbindir/new_mini_epn
%_sbindir/convertcfg
%_sbindir/rc%realname
%_sysconfdir/cron.weekly/*
%_prefix/lib/%realname/
%exclude %_prefix/lib/%realname/cgi/*

%files www
%defattr(755,root,root)
%_prefix/lib/%realname/cgi/*
%defattr(-,root,root)
%_datadir/%realname/
%config(noreplace) %{apache2_sysconfdir}/%realname.conf
%attr(0640,root,%cmdgrp) %ghost %config(missingok,noreplace) %_sysconfdir/%realname/htpasswd.users

%files devel
%defattr(-,root,root)
%dir %_includedir/%realname
%_includedir/%realname/*

%changelog
* Fri Mar 27 2009 cschneemann@suse.de
- added check_verbose to rcnagios to print the error messages
  directly instead of pointing to the error_log BNC #486912
* Tue Mar 03 2009 cschneemann@suse.de
- changed rcnagios to delete control characters from values
  BNC #480747
* Tue Dec 09 2008 cschneemann@suse.de
- update to 3.0.6:
  + Fix for CGI submission of external commands (writing newlines
  and submitting service comments)
  + Fix for Apache group membership in RPM spec file
  + Fix for improper notification propagation command processing
  + Better out-of-disk-space error handling when writing retention
  and status files
  + Disabled adaptive check and eventhandler commands for security
  reasons
  + Fix for reading output from system commands (event handlers,
  etc) that have timed out
  + Added wildcard host matching in CGIs
  + Fixes for playing audio alerts in CGIs
  + Fix for incorrect host status links in status CGI when viewing
  hostgroup summary
  + Added support for x509 cert authentication in the CGIs
- fixes bnc#442275 : nagios: CSRF bug
* Mon Dec 01 2008 lrupp@suse.de
- don't fail if the host has problems to execute newaliases
* Mon Nov 10 2008 lrupp@suse.de
- update to 3.0.5:
  + Security fix for Cross Site Request Forgery (CSRF) bug reported
  by Tim Starling.
  + Sample audio files for CGIs removed from distribution
  + Fix for mutliline config file continuation bug
  + Minor sample config file fix
  + Added documentation on CGI security issues
- added permissions-directory-setuid-bit for /var/spool/nagios
* Tue Oct 28 2008 lrupp@suse.de
- use relative pathnames in %%post
* Fri Oct 17 2008 lrupp@suse.de
- update to 3.0.4:
  + Fix for properly terminating plugins when parent processes get
  killed (e.g. using 'killall nagios' with check_timeout plugins
  running)
  + Fix for event broker callback when service notifications are
  disabled
  + Fix for scheduling scheduling servicegroup downtime with
  'hosts too' option in CGIs
  + Fixes for bugs in sample event handlers - stop/start active
  service checks and enable notifications
  + Cosmetic fix for logging of notifications
  + Fix for host/service name encoding in CGIs (trends and
  availability reports, etc.)
* Mon Sep 15 2008 lrupp@suse.de
- be a bit more secure in %%post scripts
- fix ownership of resource file in init script
- enhance the README.SuSE a bit
- Recommend cron
* Mon Jul 21 2008 lrupp@suse.de
- fix fillup call
- update to 3.0.3:
  + Minor bug fixes in CGIs
  + Minor bug fix in navigation frame
  + Better error logging during fork() errors
  + Fixed bug in parsing host dependencies
  + Updated p1.pl to allow for 4KB lines in Perl plugin output
  + Fixed bug in command for disabling contact notifications
  + Fix for bugs in host and service orphan check logic
  + Fix for properly escaping macros containing URLs
  + Patches for possible XSS vulnerability in CGIs (CVE-2007-5803)
  + Changes to service check event broker logic (DNX patches)
  + Fixes for url encoding
  + Fix for debug logging of notifications
  + Segfault fix in history CGI
  + Typo fix in object config routines
* Thu May 29 2008 olh@suse.de
- fix missing return value in run_async_service_check (bnc#395203)
* Thu Apr 24 2008 olh@suse.de
- require mailx (bnc#383209)
* Tue Apr 22 2008 olh@suse.de
- fix cron logfile-check in /var/log/nagios/archives/ (bnc#381857)
* Thu Apr 03 2008 lrupp@suse.de
- update to 3.0.1:
  + Fixed bug in trends CGI with user not being authorized
  for hosts/services
  + Fixed bug in status CGI with page layout messing up when
  sounds enabled
* Thu Mar 13 2008 lrupp@suse.de
- update to 3.0 (final):
  + Faster program startup times (especially in large installs)
  with new object lookup code
  + Fix for special contact inheritance rules in
  host and service escalations
  + Fix for bug in processing $CONTACTADDRESSx$ macros
  + Documentation fixes
- Recommend perl
* Wed Mar 05 2008 lrupp@suse.de
- update to 3.0rc3:
  + New macros have been added
  + The old $NOTIFICATIONNUMBER$ macro has been deprecated in favor
  of new $HOSTNOTIFICATIONNUMBER$ and $SERVICENOTIFICATIONNUMBER$
  macros.
  + The $HOSTNOTES$ and $SERVICENOTES$ macros may now contain
  macros themselves
  + new 'enable_environment_macros' option, which allow to disable
  global macros for use in check, event handler, notification,
  and other commands on large installations
  + scheduled downtime entries are now stored in the status file
  and retention file, respectively
  + Current and retained comments are now stored in the status file
  and retention file, respectively
  + Acknowledgement comments that are marked as non-persistent are
  now only deleted when the acknowledgement is removed.
  + Comment and downtime IDs are now retained across program
  restarts and should be unique unless the retention data is
  deleted or ignored.
  + Added flap_detection_options directive to host and service
  definitions to allow you to specify what host/service states
  should be used by the flap detection logic
  + Added a new PROCESS_FILE external command to allow processing
  of external commands found in an eternal (regular) file.
  + Contact status information (last notification times,
  notifications enabled/disabled, etc.) is now saved in the
  status and retention files, although it is not processed
  by the CGIs.
  + check timeperiod for hosts and services can now be modified
  on-the-fly
  + Multiline plugin output is now supported for host and
  service checks
  + Nagios now checks for orphaned service checks by default.
  + Host checks are now run in parallel
  + Timeperiods were overdue for a major overhaul
  + Added event broker callbacks for adaptive programm and contact
  status data
  + ... (See ChangeLog for more details)
- Logfiles are stored in /var/log/nagios now
- Nagios uses own logrotation - but we bzip the old logfiles via
  weekly cronjob (Requires: bzip2)
- added sysconfig file for timeout and nice level
- overhaul the init script
- added a README.SuSE
- added rpmlintrc
- added config.err file as %%ghost
- use upstream macros for all steps during rpmbuild where possible
- adapt to work on all (open)SUSE distributions
- overhaul the patches
- cmdusr is now wwwrun and not nobody
- cmdgrp is now new group nagcmd and not www
- split out devel package
- enable event-broker
- use upstream apache config
- adapt the generated sample configurations so the work out of the
  box
- enable template-objects
- prepare and own the directory for event brokers
- include all sample configuration in docdir
- use fdupes
- create/update new groups/users in %%pre of the (sub-)package
- add the apache2 user to the nagcmd group in %%post of nagios-www
- restart apache2 if nagios-www changes
- own some %%ghost files with the correct permissions
* Fri Oct 26 2007 tsieden@suse.de
- update to nagios version 2.10
  * Added 'make install-webconf' command to install Apache web config file
  * Sample config files are now installed without a -sample extension
  * Fix for SIGTERMs being seen as SIGEXITs, non-logging of SIGTERMs/shutdowns
  * Minor fix for notification timeout log messages
  * Fix for not logging passive host check results
  * Minor bug fixes in CGIs
  * Fix for a segfault when processing passive host check results with empty output/perfdata
  * Fix for incorrect latency calculation for passive service checks
  * Bug fix with attempting to access an uninitalized mutex if external commands are disabled
  * Fix for keeping service checks in the event queue when active service checks are disabled globally
  * Fix for a potential cross site scripting vulnerability in the CGIs
  * Program version is now displayed in CGIs
- removed obsolete FAQ patch in html/docs dir
* Sun Sep 16 2007 cschneemann@suse.de
- added openssl-devel to BuildRequires to support SSL in check_http
* Sun Aug 12 2007 olh@suse.de
- move p1.pl to /usr/lib/nagios/p1.pl
  set 0755 permissions for executable files (157814)
* Wed May 16 2007 lrupp@suse.de
- build on older distributions:
  BuildRequires: libapr0 XFree86-devel XFree86-libs
* Fri May 04 2007 tsieden@suse.de
- update to nagios version 2.9
  * Fix for incorrect performance data file write/append mode options
  * Fix for current status of hosts with no host check command defined
  * SIGSEGV signals should now be logged again (broken in 2.8)
  * Configure script fix for no mail program found/installed on system
  * Configure script option bug fixes for cygwin and embedded perl
  * Command definitions and host/service plugin perfdata with HTML should now be escaped in CGIs
  * Patch for incorrect time down percentage in availability CGI
  * Updated init script to fix a race condition during restarts
* Mon Mar 12 2007 tsieden@suse.de
- update to nagios version 2.8
  * Bug fix for calculating notification interval with service escalations
  * Bug fix for using servicegroups in service dependency definitions
  * Bug fix for bad date format submission in command CGI
  * Possible segfault fix during restarts when daemon was performing host checks
  * Fix for missing check timeout in event broker calls
  * Fix for handling signals under NPTL
  * Added error messages for passive service checks that don't correspond to a defined service
* Fri Feb 09 2007 tsieden@suse.de
- update to nagios version 2.7
  * p1.pl now sets environment var (NAGIOS_PLUGIN) to indicate patch of plugin that is executing
  * Updated nagiostats with new MRTG vars for tracking buffer usage
  * Added sample MRTG config file
  * Minor patches to availability and status CGIs
  * Minor documentation updates
  * Fix for segfault during expiration or deletion of scheduled downtime
  * Fix for scheduling immediate service check through WAP interface
  * Fix for leading whitespace before comments in object config files
* Thu Feb 01 2007 olh@suse.de
- add quick-start.txt (#237372)
* Thu Feb 01 2007 olh@suse.de
- remove unneeded trailing slashes from Alias and Directory entries
  in nagios-http.conf
* Wed Jan 17 2007 olh@suse.de
- fix more comparison with string literal in avail.c
* Thu Jan 11 2007 olh@suse.de
- FATE #301512
* Thu Jan 11 2007 olh@suse.de
- fix typo in html docu, perdata.html -> perfdata.html
* Thu Jan 11 2007 olh@suse.de
- correct link to external FAQ website
* Thu Jan 11 2007 olh@suse.de
- correct Alias in nagios-httpd.conf
* Wed Jan 10 2007 olh@suse.de
- update the default example config to mail to nagios%%localhost
  instead to non-existant nagios-admin%%localhost
* Wed Jan 10 2007 olh@suse.de
- fix comparison with string literal (#232415)
* Mon Jan 08 2007 olh@suse.de
- move pid file to /var/run/nagios/ (#231169)
* Fri Dec 01 2006 tsieden@suse.de
- update to version 2.6
  * fix for unscheduled triggered downtime entries
  * fix for embedded audio in tac and status CGIs
  * fixed bug in nagiostats utility when reporting host/service check latency
  * misc code cleanups for compiler warnings
  * fixed error when reading empty (zero byte) config files
  * default is now to check for orphaned service checks (Francois Caen)
  * fixed bug with non-standard CGI config file location in status data (Carson Gaspar)
  * fixed bugs and simplified examples in sample config files (Mark Young)
  * removed obsolete patches which are included in upstream now
- fixed "empty PID file error" in init script
* Thu Nov 16 2006 tsieden@suse.de
- changed home dir to /var/lib/nagios (#221791)
* Tue Oct 17 2006 olh@suse.de
- fix uninitialized variable in run_global_service_event_handler (212892)
* Mon Sep 18 2006 olh@suse.de
- add a user/group nagios (#61908)
* Fri Sep 08 2006 olh@suse.de
- update to version 2.5
  disable sapmon patch for the time being
* Wed May 24 2006 schwab@suse.de
- Don't build as root.
- Don't strip binaries.
- Fix format string bug.
* Wed May 03 2006 stark@suse.de
- fixed possible buffer overflow in CGI scripts (#140494)
  (CVE-2006-2162)
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Jan 09 2006 stark@suse.de
- fixed off-by-one overflow (#141124)
* Fri Nov 18 2005 stark@suse.de
- update to stable version 1.3
* Thu Oct 06 2005 stark@suse.de
- fixed autobuild warnings about printf format
* Sat May 14 2005 stark@suse.de
- fixed compiler errors about usage of uninitialized vars
* Sun Apr 24 2005 aj@suse.de
- Compile with GCC4.
* Mon Aug 30 2004 ro@suse.de
- removed apache1 traces
* Mon May 03 2004 stark@suse.de
- fix compiler-warnings
* Tue Feb 03 2004 stark@suse.de
- update to nagios 1.2
* Thu Sep 18 2003 stark@suse.de
- /usr/lib/nagios and /usr/lib/nagios/plugins are owned
  by root (#31100)
* Mon Sep 08 2003 stark@suse.de
- add apache2 config-files, require http_daemon
  and need apache2-devel-packages for build (#30157)
* Wed Aug 27 2003 ro@suse.de
- remove traceroute-lbl from neededforbuild
  traceroute from net-tools is used anyway
* Mon Aug 18 2003 stark@suse.de
- added activation meta-data to sysconfig (#28830)
* Fri Aug 15 2003 poeml@suse.de
- change cmdgrp from nogroup to www (the group apache now runs
  under) [#21782]
- implement try-restart correctly
* Thu Jul 31 2003 stark@suse.de
- use stop/restart macros
* Tue Jul 29 2003 aj@suse.de
- Fix chown invocation.
* Fri Jul 25 2003 stark@suse.de
- added bugfixes
* Thu Jun 12 2003 kukuk@suse.de
- Make sure plugin directory exist
* Thu Jun 12 2003 kukuk@suse.de
- Add nagios libdir to filelist
* Wed Jun 04 2003 stark@suse.de
- update to bugfix release 1.1
  * File descriptor leak in file-based performance routines
  * Timestamp fix for PostgreSQL 7.3
  * Minor bug fixes to cmd and history CGIs
  * Minor documentation fixes
* Mon Jan 13 2003 stark@suse.de
- added sysconfig-metadata (#22607)
* Mon Dec 02 2002 stark@suse.de
- adopted sapmoni.dif for gcc 3.3
* Mon Nov 25 2002 stark@suse.de
- update to 1.0 final
  * Minor bug fixes in CGIs
  * Minor doc updates
  * Bug fix for flex host downtime
  * Embedded perl bug fixe for arguments with spaces
  * Host escalation logic fix
* Tue Oct 15 2002 stark@suse.de
- running pre-flight configuration check always when
  starting nagios (#20916)
- added logrotate definitions for logfiles
- fixed embedded perl (#20916) (thanks to mls)
* Mon Sep 23 2002 stark@suse.de
- update to 1.0b6
  * Added wildcards and multiple hosts/hostgroups to host dependency
  and service dependency definitions
  * Added wildcard support for members directive in hostgroup
  definitions
  * Minor bug fixes and cleanups in CGIs
  * Minor cleanups in the core
  * New version of snprintf() included that supports %%f
  * Notification interval for escalations now defaults to
  non-escalated value
* Fri Aug 23 2002 stark@suse.de
- update to 1.0b5
  * Fixed memory leak related to processing of passive checks
  * Memory leak fixes in the CGIs
  * Minor interface changes to the status and TAC CGIs
  * Bug fix in the notification CGI
  * Added minimalistic sample object config file (minimal.cfg)
* Fri Aug 16 2002 stark@suse.de
- added PreReq (Bug #17938 #17939)
* Mon Aug 12 2002 stark@suse.de
- updated sapmoni patch to provide documentation
* Mon Aug 12 2002 mls@suse.de
- made it work with threaded perl-5.8
* Thu Aug 08 2002 stark@suse.de
- added patch to be able to use nagios-plugins-sap
* Sat Jul 27 2002 adrian@suse.de
- fix neededforbuild
* Fri Jul 05 2002 stark@suse.de
- update to 1.0b4
  * Address field in host definitions is now optional in
  template-based config format. Defaults to host name if not
  specified.
  * Fixed memory leak when processing passive checks
  * Added illegal_macro_output_chars variable to main config file
  to allow for stripping dangerous shell characters from plugin
  output
* Wed Jun 12 2002 stark@suse.de
- removed -devel subpackage and moved the file to main-package
* Mon Jun 10 2002 stark@suse.de
- update to 1.0b3
  * Bug fixes in template-based object code
  * Bug fix in tac CGI for counting host and service states
  properly
  * Default is now to check for external commands as often as
  possible
  * Ping syntax for WAP interface moved to CGI config file
  * Command file user/group defaults to Nagios user/group unless
  overridden with configure script options
  * Sample template-based object config file fixes
* Tue May 28 2002 stark@suse.de
- update to 1.0b2
  * Fixed bug with escaping strings for DB support
  (MySQL & PostgreSQL)
  * Several bug fixes in template-based object code
  * Multiple hostgroups supported in host and service escalations
  * Wildcard support in service, service escalation, and host
  escalation definitions
* Thu May 23 2002 stark@suse.de
- install config-file templates
* Wed May 22 2002 stark@suse.de
- initial version of Nagios (the successor of NetSaint)
openSUSE Build Service is sponsored by