Hello community,
here is the log from the commit of package nagios-nrpe for openSUSE:Factory
checked in at Wed Apr 7 02:24:39 CEST 2010.
--------
--- nagios-nrpe/nagios-nrpe.changes 2009-12-23 09:29:50.000000000 +0100
+++ /mounts/work_src_done/STABLE/nagios-nrpe/nagios-nrpe.changes 2010-03-06 22:06:27.000000000 +0100
@@ -1,0 +2,31 @@
+Sat Mar 6 20:59:09 UTC 2010 - chris@computersalat.de
+
+- cleanup subpackages
+ o nagios-nrpe is default package and provides NRPE daemon
+ obsoletes: client
+ o nagios-plugins-nrpe provides the check plugin to be installed
+ with the nagios host
+ obsoletes: server
+- cleanup spec
+ o sort TAGS
+ o removed/added define
+ - nsusr == nrpeusr
+ - nsgrp == nrpegrp
+ - added cmdgrp
+ - redefine _libexecdir
+ o added PreReq
+ o fix pre{,un}/post{,un} sections
+ - no restart_on_update x{,inetd}, cause xinet file is
+ installed 'disabled' by default
+ - service port is needed with server, not with plugin
+ - no restart_on_update nagios when nrpe plugin is update
+ there is also no restart_on_update when nagios_plugins
+ are updated
+ o fix nrpe.cfg
+ o PID_File => /var/run/nagios/nrpe.pid
+- SOURCE mods
+ o reworked patches (Makefile,xinetd)
+ o replaced rcnrpe with nrpe.init
+ o added README.SuSE
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
nagios-nrpe-Makefile.patch
nagios-nrpe-xinetd.patch
rcnrpe
New:
----
README.SuSE
nrpe-2.12-Makefile.patch
nrpe-2.12-xinetd.patch
nrpe.init
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ nagios-nrpe.spec ++++++
--- /var/tmp/diff_new_pack.FHAtGK/_old 2010-04-07 02:21:53.000000000 +0200
+++ /var/tmp/diff_new_pack.FHAtGK/_new 2010-04-07 02:21:53.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package nagios-nrpe (Version 2.12)
#
-# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2010 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
@@ -17,53 +17,70 @@
# norootforbuild
-
-Name: nagios-nrpe
%define realname nrpe
# to enable support for really long plugin-output (available since nagios v3)
# set the macro below to 1.
# Note: this change is incompatible to old versions, therefore disabled per
# default
%define nagios3only 0
+# Macro that print mesages to syslog at package (un)install time
+%define nnmmsg logger -t %{name}/rpm
+%define nsusr nagios
+%define nsgrp nagios
+%define cmdgrp nagcmd
+%define nrpeport 5666
+%define _libexecdir %{_prefix}/lib/nagios/plugins
+
+Name: nagios-nrpe
Summary: Nagios Remote Plug-In Executor
-Group: System/Monitoring
+Version: 2.12
+Release: 5
License: GPLv2+
+Group: System/Monitoring
Url: http://www.nagios.org/
-Version: 2.12
-Release: 4
Source0: %realname-%version.tar.bz2
-Source1: rcnrpe
+Source1: nrpe.init
Source2: nagios-nrpe-rpmlintrc
Source3: nagios-nrpe-SuSEfirewall2
-Patch: nagios-nrpe-Makefile.patch
-Patch1: nagios-nrpe-xinetd.patch
+Source10: README.SuSE
+Patch0: nrpe-2.12-Makefile.patch
+Patch1: nrpe-2.12-xinetd.patch
Patch2: nagios-nrpe-buffersize.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+PreReq: %insserv_prereq %fillup_prereq
+PreReq: coreutils grep pwdutils sed
+PreReq: /bin/logger
+#
BuildRequires: nagios-plugins tcpd-devel
+#
%if 0%{?suse_version} > 1000
BuildRequires: krb5-devel
%else
BuildRequires: heimdal-devel
%endif
+#
%if 0%{?suse_version} > 1020
BuildRequires: libopenssl-devel openssl
%else
BuildRequires: openssl-devel
%endif
-Requires: %name-client = %version
-Requires: %name-server = %version
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-# Macro that print mesages to syslog at package (un)install time
-%define nnmmsg logger -t %name/rpm
-%define nsusr nagios
-%define nsgrp nagios
-%define nrpegrp nagios
-%define nrpeusr nagios
-%define nrpeport 5666
+#
+%if 0%{?suse_version} > 1020
+Recommends: inet-daemon
+Recommends: nagios-plugins
+%else
+Requires: inet-daemon
+Requires: nagios-plugins
+%endif
+#
+Provides: %{name}-client = %{version}
+Obsoletes: %{name}-client <= %{version}
%description
-This daemon can be used to run nagios plug-ins on a remote machine for
-executing local checks. This package contains the software for both
-client and server.
+NRPE can be used to run nagios plug-ins on a remote machine for
+executing local checks.
+This package contains the software for NRPE server.
+It could be run by inet-daemon or as stand-alone daemon
@@ -86,48 +103,17 @@
--------
Ethan Galstad
-%package client
+%package -n nagios-plugins-nrpe
License: GPLv2+
-Summary: Client part of Nagios Remote Plug-ins Executor (NRPE)
+Summary: Nagios NRPE plugin
Group: System/Monitoring
-PreReq: %insserv_prereq /bin/logger sed grep coreutils pwdutils
-Requires: bash grep
-%if 0%{?suse_version} > 1020
-Recommends: inet-daemon
-Recommends: nagios-plugins
-%else
-Requires: inet-daemon
-Requires: nagios-plugins
-%endif
-
-%description client
-This package contains the Nagios Remote Plug-ins Executor (NRPE) which
-can execute predefined commands on the remote host.
-
-Upon receiving a plugin request from an authorized host, it will
-execute the command line associated with the command name it received
-and send the program output and return code back to the check_nrpe
-plugin.
-
-Allowed monitoring commands are described in the daemon configuration
-file.
-
-
-
-Authors:
---------
- Ethan Galstad
-
-%package server
-License: GPLv2+
-Summary: Server part for Nagios Remote Plug-In Executor
-Group: System/Monitoring
-PreReq: %insserv_prereq /bin/logger sed grep
%if 0%{?suse_version} > 1020
Recommends: nagios
%endif
+Provides: %{name}-server = %{version}
+Obsoletes: %{name}-server <= %{version}
-%description server
+%description -n nagios-plugins-nrpe
This package contains the plug-in for the host runing the Nagios
daemon.
@@ -146,16 +132,17 @@
%prep
%setup -n %realname-%version
-%patch
-%patch1
+%patch0 -p1
+%patch1 -p1
%if %{nagios3only}
%patch2
%endif
+%{__cp} -a %{S:10} .
%build
%configure CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -D_GNU_SOURCE" \
--sbindir=%_prefix/lib/nagios/cgi \
- --libexecdir=%_prefix/lib/nagios/plugins \
+ --libexecdir=%_libexecdir \
--datadir=%_datadir/nagios \
--sysconfdir=%_sysconfdir/nagios \
--localstatedir=/var/log/nagios \
@@ -166,19 +153,15 @@
--with-init-dir=%_sysconfdir/init.d \
--with-nagios-user=%nsusr \
--with-nagios-group=%nsgrp \
- --with-nrpe-user=%nrpeusr \
- --with-nrpe-group=%nrpegrp \
+ --with-nrpe-user=%nsusr \
+ --with-nrpe-group=%nsgrp \
--with-nrpe-port=%nrpeport \
--enable-command-args \
--enable-ssl
make %{?jobs:-j%jobs} all
%install
-# create missing directories
-mkdir -p %buildroot/%_sysconfdir/{xinetd.d,init.d}
-#
-# install
-%{__make} install-daemon install-daemon-config install-xinetd install-plugin \
+%{__make} install-all \
DESTDIR="%buildroot" \
INSTALL_OPTS="" \
COMMAND_OPTS="" \
@@ -186,36 +169,20 @@
NAGIOS_INSTALL_OPTS="" \
NRPE_INSTALL_OPTS="" \
INIT_OPTS=""
-mv %buildroot/%_sysconfdir/xinetd.d/nrpe %buildroot/%_sysconfdir/xinetd.d/nagios-nrpe
-install -m 755 %{SOURCE1} %buildroot%_sysconfdir/init.d/nrpe
-ln -sf ../../etc/init.d/nrpe %buildroot%_sbindir/rcnrpe
-#
-# inform the user about the obsolete main package
-#
-mkdir -p %buildroot/%_defaultdocdir/%name
-cat > %buildroot/%_defaultdocdir/%name/README.SuSE << EOF
-Hi
-The %name package is marked as obsolete and available only
-for upgrading older systems.
-The new packages %name-client and %name-server are packaged
-for their special targets:
-* %name-server should be installed on the server hosting nagios
-* %name-client should be installed on the client which should be monitored
-* %name-doc contains documentation and can be installed where ever you want
-Have a lot of fun!
-EOF
-#
-# install documentation
-cp docs/NRPE.* %buildroot%_defaultdocdir/%name/
-%if 0%{?suse_version} > 1020
-#
+
+%{__install} -d %buildroot/var/run/nagios
+%{__install} -Dm 755 %{S:1} %buildroot%_sysconfdir/init.d/nrpe
+%{__ln_s} -f ../../etc/init.d/nrpe %buildroot%_sbindir/rcnrpe
+
# install SuSEfirewall2 script
-install -Dm644 %{SOURCE3} %buildroot/%_sysconfdir/sysconfig/SuSEfirewall2.d/services/nrpe-service
+%if 0%{?suse_version} > 1020
+install -Dm644 %{S:3} %buildroot/%_sysconfdir/sysconfig/SuSEfirewall2.d/services/nrpe-service
%endif
-%post client
-# enable the service
-%{fillup_and_insserv -fy nrpe}
+# fix pid_file in nrpe.cfg
+%{__sed} -i -e "s,^\(pid_file=\).*,\1/var/run/nagios/nrpe.pid," %buildroot/%_sysconfdir/nagios/nrpe.cfg
+
+%pre
# Create user and group on the system if necessary
# default group: nagios
if
@@ -243,57 +210,38 @@
echo "nrpe %nrpeport/tcp # nagios nrpe" >> etc/services
fi
-%post server
-if grep -q %nrpeport /etc/services ; then
- : OK - port already defined
-else
- %nnmmsg "Adding port %nrpeport to /etc/services"
- echo "nrpe %nrpeport/tcp # nagios nrpe" >> etc/services
-fi
-
-%postun server
-%restart_on_update nagios
-
-%preun client
+%preun
%stop_on_removal nrpe
-%postun client
+%post
+%{fillup_and_insserv -fy nrpe}
+
+%postun
%restart_on_update nrpe
-if [ -f etc/init.d/xinetd ]; then
- %restart_on_update xinetd
-fi
-if [ -f etc/init.d/inetd ]; then
- %restart_on_update inetd
-fi
%insserv_cleanup
%clean
-rm -rf %buildroot
+%{__rm} -rf %buildroot
%files
%defattr(-,root,root)
-%dir %_defaultdocdir/%name
-%doc %_defaultdocdir/%name/README.SuSE
+%doc README.SuSE
+%dir %attr(775,%{nsusr},%{cmdgrp}) %_sysconfdir/nagios/
+%dir %attr(755,%{nsusr},%{nsgrp}) /var/run/nagios
+%config(noreplace) %attr(664,%{nsusr},%{cmdgrp}) %_sysconfdir/nagios/nrpe.cfg
+%config(noreplace) %_sysconfdir/xinetd.d/nrpe
+%if 0%{?suse_version} > 1020
+%config %_sysconfdir/sysconfig/SuSEfirewall2.d/services/nrpe-service
+%endif
+%_sysconfdir/init.d/nrpe
+%_sbindir/*nrpe
%files doc
%defattr(644,root,root,755)
-%dir %_defaultdocdir/%name
-%doc %_defaultdocdir/%name/*
-
-%files server
-%defattr(-,root,root)
-%_prefix/lib/nagios/plugins/check_nrpe
+%doc Changelog LEGAL README README.SSL README.SuSE SECURITY docs/*
-%files client
+%files -n nagios-plugins-nrpe
%defattr(-,root,root)
-%dir /%_sysconfdir/nagios/
-%config(noreplace) /%_sysconfdir/nagios/nrpe.cfg
-%config(noreplace) /%_sysconfdir/xinetd.d/nagios-nrpe
-%if 0%{?suse_version} > 1020
-%config %_sysconfdir/sysconfig/SuSEfirewall2.d/services/nrpe-service
-%endif
-%_sysconfdir/init.d/nrpe
-%_sbindir/rcnrpe
-%_sbindir/nrpe
+%_libexecdir/check_nrpe
%changelog
++++++ README.SuSE ++++++
README.SuSE for nagios-nrpe
===========================
The packages
- nagios-nrpe-client
- nagios-nrpe-server
are marked as obsolete:
While seeing the client/server pkg normal user would be misled to
install which package where.
When seeing "server" package you're thinking about a server-daemon
and when seeing "client" you're thinking client which is talking
with the server (NRPE).
But it was just the other way round. :(
Now:
- nagios-nrpe (obsoletes nagios-nrpe-client) and provides the NRPE
daemon which should be installed on the remote box which should
be monitored.
- nagios-plugins-nrpe (obsoletes nagios-nrpe-server) and provides
"check_nrpe" which should be installed on the server hosting nagios.
- nagios-nrpe-doc contains documentation and can be installed where
ever you want
Have a lot of fun!
++++++ nrpe-2.12-Makefile.patch ++++++
diff -ruN nrpe-2.12-orig/Makefile.in nrpe-2.12/Makefile.in
--- nrpe-2.12-orig/Makefile.in 2007-03-14 15:30:05.000000000 +0000
+++ nrpe-2.12/Makefile.in 2009-06-05 08:32:59.536100004 +0000
@@ -46,22 +46,30 @@
cd $(SRC_BASE); $(MAKE) ; cd ..
-install-plugin:
+install:
cd $(SRC_BASE) && $(MAKE) $@
-install-daemon:
+install-plugin:
cd $(SRC_BASE) && $(MAKE) $@
-install:
+install-daemon:
cd $(SRC_BASE) && $(MAKE) $@
install-xinetd:
- $(INSTALL) -m 644 sample-config/nrpe.xinetd /etc/xinetd.d/nrpe
+ $(INSTALL) -d $(DESTDIR)/etc/xinetd.d
+ $(INSTALL) -m 644 sample-config/nrpe.xinetd $(DESTDIR)/etc/xinetd.d/nrpe
install-daemon-config:
- $(INSTALL) -m 775 $(NAGIOS_INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
+ $(INSTALL) $(NAGIOS_INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
$(INSTALL) -m 644 $(NRPE_INSTALL_OPTS) sample-config/nrpe.cfg $(DESTDIR)$(CFGDIR)
+install-all:
+ $(MAKE) install
+ $(MAKE) install-daemon
+ $(MAKE) install-daemon-config
+ $(MAKE) install-plugin
+ $(MAKE) install-xinetd
+
clean:
cd $(SRC_BASE); $(MAKE) $@ ; cd ..
rm -f core
diff -ruN nrpe-2.12-orig/src/Makefile.in nrpe-2.12/src/Makefile.in
--- nrpe-2.12-orig/src/Makefile.in 2007-08-13 17:10:07.000000000 +0000
+++ nrpe-2.12/src/Makefile.in 2009-06-05 08:25:35.876231297 +0000
@@ -44,12 +44,12 @@
$(MAKE) install-daemon
install-plugin:
- $(INSTALL) -m 775 $(NAGIOS_INSTALL_OPTS) -d $(DESTDIR)$(LIBEXECDIR)
- $(INSTALL) -m 775 $(NAGIOS_INSTALL_OPTS) check_nrpe $(DESTDIR)$(LIBEXECDIR)
+ $(INSTALL) $(NAGIOS_INSTALL_OPTS) -d $(DESTDIR)$(LIBEXECDIR)
+ $(INSTALL) $(NAGIOS_INSTALL_OPTS) check_nrpe $(DESTDIR)$(LIBEXECDIR)
install-daemon:
- $(INSTALL) -m 775 $(NAGIOS_INSTALL_OPTS) -d $(DESTDIR)$(BINDIR)
- $(INSTALL) -m 775 $(NRPE_INSTALL_OPTS) nrpe $(DESTDIR)$(BINDIR)
+ $(INSTALL) $(NAGIOS_INSTALL_OPTS) -d $(DESTDIR)$(BINDIR)
+ $(INSTALL) $(NRPE_INSTALL_OPTS) nrpe $(DESTDIR)$(BINDIR)
clean:
rm -f core nrpe check_nrpe $(SNPRINTF_O)
++++++ nrpe-2.12-xinetd.patch ++++++
diff -ruN nrpe-2.12-orig/sample-config/nrpe.xinetd.in nrpe-2.12/sample-config/nrpe.xinetd.in
--- nrpe-2.12-orig/sample-config/nrpe.xinetd.in 2007-03-09 19:19:17.000000000 +0000
+++ nrpe-2.12/sample-config/nrpe.xinetd.in 2009-06-05 08:37:23.143908512 +0000
@@ -1,16 +1,17 @@
-# default: on
+# default: off
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
- port = @nrpe_port@
+ type = UNLISTED
+ port = @nrpe_port@
wait = no
user = @nrpe_user@
- group = @nrpe_group@
+ group = @nrpe_group@
server = @bindir@/nrpe
server_args = -c @sysconfdir@/nrpe.cfg --inetd
log_on_failure += USERID
- disable = no
- only_from = 127.0.0.1
+ disable = yes
+ #only_from = 127.0.0.1
}
++++++ nrpe.init ++++++
#! /bin/sh
#
# Copyright (c) 2010 SUSE Linux Products GmbH
#
# /etc/init.d/nrpe
# and its symbolic link
# /usr/sbin/rcnrpe
#
### BEGIN INIT INFO
# Provides: nagios-nrpe
# Required-Start: $remote_fs $syslog $network
# Should-Start: cron
# Required-Stop: $remote_fs $syslog
# Should-Stop: cron
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: NRPE Nagios Remote Plugin Executor
# Description: Start NRPE to allow remote execution of
# Nagios plugins.
### END INIT INFO
NRPE_BIN=/usr/sbin/nrpe
test -x $NRPE_BIN || { echo "$NRPE_BIN not installed";
if [ "$1" = "stop" ]; then exit 0;
else exit 5; fi; }
# Check for existence of needed config file and read it
NRPE_CONFIG=/etc/nagios/nrpe.cfg
test -r $NRPE_CONFIG || { echo "$NRPE_CONFIG not existing";
if [ "$1" = "stop" ]; then exit 0;
else exit 6; fi; }
# Source LSB init functions
# providing start_daemon, killproc, pidofproc,
# log_success_msg, log_failure_msg and log_warning_msg.
# This is currently not used by UnitedLinux based distributions and
# not needed for init scripts for UnitedLinux only. If it is used,
# the functions from rc.status should not be sourced or used.
#. /lib/lsb/init-functions
# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
# rc_status check and set local and overall rc status
# rc_status -v ditto but be verbose in local rc status
# rc_status -v -r ditto and clear the local rc status
# rc_status -s display "skipped" and exit with status 3
# rc_status -u display "unused" and exit with status 3
# rc_failed set local and overall rc status to failed
# rc_failed <num> set local and overall rc status to <num>
# rc_reset clear local rc status (overall remains)
# rc_exit exit appropriate to overall rc status
# rc_active checks whether a service is activated by symlinks
# rc_splash arg sets the boot splash screen to arg (if active)
. /etc/rc.status
# Reset status of this service
rc_reset
# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - user had insufficient privileges
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
#
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signaling is not supported) are
# considered a success.
case "$1" in
start)
# Start daemons.
echo -n "Starting Nagios NRPE "
/sbin/startproc $NRPE_BIN -c $NRPE_CONFIG -d
# Remember status and be verbose
rc_status -v
;;
stop)
# Stop daemons.
echo -n "Shutting down Nagios NRPE "
/sbin/killproc -TERM $NRPE_BIN
# Remember status and be verbose
rc_status -v
;;
try-restart|condrestart)
if test "$1" = "condrestart"; then
echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
fi
$0 status
if test $? = 0; then
$0 restart
else
rc_reset # Not running is not a failure.
fi
# Remember status and be quiet
rc_status
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
$0 start
# Remember status and be quiet
rc_status
;;
reload|force-reload)
echo -n "Reload service Nagios NRPE "
/sbin/killproc -HUP $NRPE_BIN
# Remember status and be verbose
rc_status -v
;;
status)
echo -n "Checking for service Nagios NRPE "
## Check status with checkproc(8), if process is running
## checkproc will return with exit status 0.
# Status has a slightly different for the status command:
# 0 - service running
# 1 - service dead, but /var/run/ pid file exists
# 2 - service dead, but /var/lock/ lock file exists
# 3 - service not running
/sbin/checkproc $NRPE_BIN
# Remember status and be verbose
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
exit 1
esac
rc_exit
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org