[Pkg-nagios-changes] [pkg-nagios] r855 - in nagios-nrpe/trunk/debian: . patches

Sean Finney seanius at costa.debian.org
Sun Mar 12 23:23:14 UTC 2006


Author: seanius
Date: 2006-03-12 23:23:13 +0000 (Sun, 12 Mar 2006)
New Revision: 855

Added:
   nagios-nrpe/trunk/debian/nagios-nrpe-server.init
Removed:
   nagios-nrpe/trunk/debian/nagios-nrpe-server.init.d
   nagios-nrpe/trunk/debian/patches/02_global-cmd-prefix.dpatch
   nagios-nrpe/trunk/debian/patches/03_nrpe-trailing-whitespace.dpatch
Modified:
   nagios-nrpe/trunk/debian/changelog
   nagios-nrpe/trunk/debian/check_nrpe.cfg
   nagios-nrpe/trunk/debian/control
   nagios-nrpe/trunk/debian/patches/00list
   nagios-nrpe/trunk/debian/rules
Log:
new upstream release, and move to cdbs.

the latter could use some more testing...



Modified: nagios-nrpe/trunk/debian/changelog
===================================================================
--- nagios-nrpe/trunk/debian/changelog	2006-03-12 11:09:10 UTC (rev 854)
+++ nagios-nrpe/trunk/debian/changelog	2006-03-12 23:23:13 UTC (rev 855)
@@ -1,9 +1,18 @@
-nagios-nrpe (2.2-2) UNRELEASED; urgency=low
+nagios-nrpe (2.4-1) UNRELEASED; urgency=low
 
-  * NOT RELEASED YET
+  * new upstream release.
 
- -- seanius <seanius at debian.org>  Tue, 24 Jan 2006 18:16:54 +0100
+  [sean finney]
+  * (NEEDS TESTING) move away from cdbs for my own sanity.
+  * upstream has incorporated the following patches:
+    - 02_global-cmd-prefix.dpatch
+    - 03_nrpe-trailing-whitespace.dpatch
+  * check_nrpe -h provides what "-a" does, but i've gone ahead and
+    added a comment in check_nrpe.cfg too, because it can't hurt
+    to do so :) (closes: #351714).
 
+ -- sean finney <seanius at debian.org>  Tue, 24 Jan 2006 18:16:54 +0100
+
 nagios-nrpe (2.2-1) unstable; urgency=low
 
   * new upstream release.

Modified: nagios-nrpe/trunk/debian/check_nrpe.cfg
===================================================================
--- nagios-nrpe/trunk/debian/check_nrpe.cfg	2006-03-12 11:09:10 UTC (rev 854)
+++ nagios-nrpe/trunk/debian/check_nrpe.cfg	2006-03-12 23:23:13 UTC (rev 855)
@@ -1,3 +1,4 @@
+# this command runs a program $ARG1$ with arguments $ARG2$
 define command {
 	command_name	check_nrpe
 	command_line	/usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$
@@ -3,4 +4,5 @@
 }
 
+# this command runs a program $ARG1$ with no arguments
 define command {
 	command_name	check_nrpe_1arg

Modified: nagios-nrpe/trunk/debian/control
===================================================================
--- nagios-nrpe/trunk/debian/control	2006-03-12 11:09:10 UTC (rev 854)
+++ nagios-nrpe/trunk/debian/control	2006-03-12 23:23:13 UTC (rev 855)
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian Nagios Maintainer Group <pkg-nagios-devel at lists.alioth.debian.org>
 Uploaders: sean finney <seanius at debian.org>, Jason Thomas <jason at debian.org>
-Build-Depends: debhelper (>= 4.0.0), cdbs, openssl, libssl-dev
+Build-Depends: debhelper (>= 4.0.0), openssl, libssl-dev
 Standards-Version: 3.6.2
 
 Package: nagios-nrpe-server

Copied: nagios-nrpe/trunk/debian/nagios-nrpe-server.init (from rev 854, nagios-nrpe/trunk/debian/nagios-nrpe-server.init.d)

Deleted: nagios-nrpe/trunk/debian/nagios-nrpe-server.init.d
===================================================================
--- nagios-nrpe/trunk/debian/nagios-nrpe-server.init.d	2006-03-12 11:09:10 UTC (rev 854)
+++ nagios-nrpe/trunk/debian/nagios-nrpe-server.init.d	2006-03-12 23:23:13 UTC (rev 855)
@@ -1,75 +0,0 @@
-#! /bin/sh
-#
-# skeleton	example file to build /etc/init.d/ scripts.
-#		This file should be used to construct scripts for /etc/init.d.
-#
-#		Written by Miquel van Smoorenburg <miquels at cistron.nl>.
-#		Modified for Debian 
-#		by Ian Murdock <imurdock at gnu.ai.mit.edu>.
-#
-# Version:	@(#)skeleton  1.9  26-Feb-2001  miquels at cistron.nl
-#
-
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-DAEMON=/usr/sbin/nrpe
-NAME=nagios-nrpe
-DESC=nagios-nrpe
-CONFIG=/etc/nagios/nrpe.cfg
-
-test -x $DAEMON || exit 0
-
-# Include nagios-nrpe defaults if available
-if [ -f /etc/default/nagios-nrpe ] ; then
-	. /etc/default/nagios-nrpe
-fi
-
-set -e
-
-case "$1" in
-  start)
-	echo -n "Starting $DESC: "
-	start-stop-daemon --start --quiet \
-		--exec $DAEMON -- -c $CONFIG -d $DAEMON_OPTS
-	echo "$NAME."
-	;;
-  stop)
-	echo -n "Stopping $DESC: "
-	start-stop-daemon --stop --quiet --oknodo \
-		--exec $DAEMON
-	echo "$NAME."
-	;;
-  #reload)
-	#
-	#	If the daemon can reload its config files on the fly
-	#	for example by sending it SIGHUP, do it here.
-	#
-	#	If the daemon responds to changes in its config file
-	#	directly anyway, make this a do-nothing entry.
-	#
-	# echo "Reloading $DESC configuration files."
-	# start-stop-daemon --stop --signal 1 --quiet --pidfile \
-	#	/var/run/$NAME.pid --exec $DAEMON
-  #;;
-  restart|force-reload)
-	#
-	#	If the "reload" option is implemented, move the "force-reload"
-	#	option to the "reload" entry above. If not, "force-reload" is
-	#	just the same as "restart".
-	#
-	echo -n "Restarting $DESC: "
-	start-stop-daemon --stop --quiet --oknodo \
-		--exec $DAEMON
-	sleep 1
-	start-stop-daemon --start --quiet \
-		--exec $DAEMON -- -c $CONFIG -d $DAEMON_OPTS
-	echo "$NAME."
-	;;
-  *)
-	N=/etc/init.d/$NAME
-	# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
-	echo "Usage: $N {start|stop|restart|force-reload}" >&2
-	exit 1
-	;;
-esac
-
-exit 0

Modified: nagios-nrpe/trunk/debian/patches/00list
===================================================================
--- nagios-nrpe/trunk/debian/patches/00list	2006-03-12 11:09:10 UTC (rev 854)
+++ nagios-nrpe/trunk/debian/patches/00list	2006-03-12 23:23:13 UTC (rev 855)
@@ -1,3 +1 @@
 01_nodevrandom-and-docoptions.dpatch
-02_global-cmd-prefix.dpatch
-03_nrpe-trailing-whitespace.dpatch

Deleted: nagios-nrpe/trunk/debian/patches/02_global-cmd-prefix.dpatch
===================================================================
--- nagios-nrpe/trunk/debian/patches/02_global-cmd-prefix.dpatch	2006-03-12 11:09:10 UTC (rev 854)
+++ nagios-nrpe/trunk/debian/patches/02_global-cmd-prefix.dpatch	2006-03-12 23:23:13 UTC (rev 855)
@@ -1,81 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 
-## debian/patches/02_global-cmd-prefix.dpatch
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-diff -ru ../../ee/nagios-nrpe-2.0/sample-config/nrpe.cfg.in ./sample-config/nrpe.cfg.in
---- ../../ee/nagios-nrpe-2.0/sample-config/nrpe.cfg.in	2003-03-06 05:10:33.000000000 +0100
-+++ ./sample-config/nrpe.cfg.in	2005-10-05 15:15:44.000000000 +0200
-@@ -72,6 +72,25 @@
- dont_blame_nrpe=0
- 
- 
-+# COMMAND PREFIX
-+# This option gives the possibility to prefix commands to be run with a prefix.
-+# There is no default, so no prefix, a good example could be /usr/bin/sudo.
-+# It is important to have at least one space after the command, or it wont work.
-+#
-+# Usage scenario: Have your whole nagios (and nrpe) configuration autogenerated
-+# on a central place. Now you dont need to redefine it, just because on one
-+# host you need extra rights to do the checks.
-+# Or alternatively: You want to watch restricted things. Give nagios user read
-+# access via sudo and be done.
-+# Note: You need nagios in your /etc/sudoers. An example for the plugins from
-+# the nagios-plugins package is:
-+# nagios          ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/
-+# This lets the nagios user run all commands in that directory (and only them)
-+# without asking for a password. Of course you shouldnt give random users write
-+# access there!
-+
-+# command_prefix=/usr/bin/sudo 
-+
- 
- # DEBUGGING OPTION
- # This option determines whether or not debugging messages are logged to the
-diff -ru ../../ee/nagios-nrpe-2.0/src/nrpe.c ./src/nrpe.c
---- ../../ee/nagios-nrpe-2.0/src/nrpe.c	2003-09-09 04:52:37.000000000 +0200
-+++ ./src/nrpe.c	2005-10-05 15:09:25.000000000 +0200
-@@ -52,6 +52,7 @@
- char    server_address[16]="0.0.0.0";
- int     socket_timeout=DEFAULT_SOCKET_TIMEOUT;
- int     command_timeout=DEFAULT_COMMAND_TIMEOUT;
-+char    command_prefix[1024]="";
- 
- command *command_list=NULL;
- 
-@@ -366,6 +367,8 @@
- 				return ERROR;
- 			        }
- 		        }
-+		else if(!strcmp(varname,"command_prefix"))
-+		  strncpy(command_prefix,varvalue,sizeof(command_prefix) -1);
- 
- 		else if(!strcmp(varname,"server_address")){
-                         strncpy(server_address,varvalue,sizeof(server_address) - 1);
-@@ -494,6 +494,7 @@
- /* adds a new command definition from the config file to the list in memory */
- int add_command(char *command_name, char *command_line){
- 	command *new_command;
-+	int cmdline_size=0;
- 
- 	if(command_name==NULL || command_line==NULL)
- 		return ERROR;
-@@ -508,12 +509,14 @@
- 		free(new_command);
- 		return ERROR;
- 	        }
--	new_command->command_line=strdup(command_line);
-+	cmdline_size=strlen(command_line)+strlen(command_prefix)+1;
-+	new_command->command_line=(char*)malloc(sizeof(char)*cmdline_size);
- 	if(new_command->command_line==NULL){
- 		free(new_command->command_name);
- 		free(new_command);
- 		return ERROR;
- 	        }
-+	snprintf(new_command->command_line, cmdline_size, "%s%s", command_prefix, command_line);
- 
- 	/* add new command to head of list in memory */
- 	new_command->next=command_list;

Deleted: nagios-nrpe/trunk/debian/patches/03_nrpe-trailing-whitespace.dpatch
===================================================================
--- nagios-nrpe/trunk/debian/patches/03_nrpe-trailing-whitespace.dpatch	2006-03-12 11:09:10 UTC (rev 854)
+++ nagios-nrpe/trunk/debian/patches/03_nrpe-trailing-whitespace.dpatch	2006-03-12 23:23:13 UTC (rev 855)
@@ -1,22 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 03_nrpe-trailing-whitespace.dpatch by  <seanius at debian.org>
-##
-## DP: fix for overzealous whitespace trimming in nrpe config reading code :)
-
- at DPATCH@
-diff -urNad nagios-nrpe-2.2~/src/nrpe.c nagios-nrpe-2.2/src/nrpe.c
---- nagios-nrpe-2.2~/src/nrpe.c	2006-01-21 20:23:36.000000000 +0100
-+++ nagios-nrpe-2.2/src/nrpe.c	2006-01-24 17:50:43.000000000 +0100
-@@ -307,10 +307,9 @@
- 
- 		/* trim trailing whitespace */
- 		len=strlen(input_line);
--		for(x=len-1;x>=0;x--){
--			if(isspace(input_line[x]))
-+		for(x=len-1;x>=0 && isspace(input_line[x]);x--){
- 				input_line[x]='\x0';
--		        }
-+		}
- 
- 		/* skip comments and blank lines */
- 		if(input_line[0]=='#')

Modified: nagios-nrpe/trunk/debian/rules
===================================================================
--- nagios-nrpe/trunk/debian/rules	2006-03-12 11:09:10 UTC (rev 854)
+++ nagios-nrpe/trunk/debian/rules	2006-03-12 23:23:13 UTC (rev 855)
@@ -1,14 +1,66 @@
 #!/usr/bin/make -f
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/autotools.mk
-DEB_PATCH_SUFFIX = .dpatch
-include /usr/share/cdbs/1/rules/simple-patchsys.mk
 
-DEB_CONFIGURE_LIBEXECDIR = /usr/lib/nagios/plugins
-DEB_CONFIGURE_EXTRA_FLAGS := --enable-command-args
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0 -Wall
+else
+	CFLAGS += -O2 -Wall
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+	INSTALL_PROGRAM += -s
+endif
 
-# disable the install target
-DEB_MAKE_INSTALL_TARGET :=
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
-binary-post-install/nagios-nrpe-server::
-	echo -e "\ninclude=/etc/nagios/nrpe_local.cfg" >> debian/nagios-nrpe-server/etc/nagios/nrpe.cfg
+include /usr/share/dpatch/dpatch.make
+
+build: build-stamp
+build-stamp: patch-stamp
+	dh_testdir
+	./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib/nagios/plugins --libdir=/usr/lib/nagios --enable-command-args
+	$(MAKE) all
+	touch build-stamp
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+	if test -f Makefile; then $(MAKE) distclean; fi
+	dh_clean
+	rm -f {build,install}-stamp
+
+install: install-stamp
+install-stamp: build-stamp
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdebconf
+	dh_installdirs
+	dh_installchangelogs Changelog
+	dh_installdocs README
+	dh_installexamples
+	dh_installinit -u defaults 30
+	dh_installman
+	dh_install
+	touch install-stamp
+
+binary: binary-indep binary-arch
+binary-indep: 
+binary-arch: install-stamp
+	dh_testdir
+	dh_testroot
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# this was in the old cdbs rules but i don't think we really need it...
+#binary-post-install/nagios-nrpe-server::
+#	echo -e "\ninclude=/etc/nagios/nrpe_local.cfg" >> debian/nagios-nrpe-server/etc/nagios/nrpe.cfg
+
+.PHONY: binary binary-arch binary-indep clean install




More information about the Pkg-nagios-changes mailing list