[Pkg-nagios-devel] nagios compat,NONE,1.1 NEWS,1.1.1.1,1.2 changelog,1.1.1.1,1.2 control,1.1.1.1,1.2 copyright,1.1.1.1,1.2 init.d,1.1.1.1,1.2 rules,1.1.1.1,1.2

joerg@haydn.debian.org joerg@haydn.debian.org


Update of /cvsroot/pkg-nagios/nagios
In directory haydn:/tmp/cvs-serv31177

Modified Files:
	NEWS changelog control copyright init.d rules 
Added Files:
	compat 
Log Message:
Changed Maintainers and Uploaders, modified copyright for new team.
- Moved nagios to dpatch for its patches, converted them all.
- Updated to Standards 3.6.1
- Moved /var/log/nagios/rw/nagios.cmd to /var/run/nagios/nagios.cmd to
  follow the FHS. Updated 04_command_pipe_move.dpatch for this.
  Added NEWS entry - if you use some other tools which access the file
  in the old location - add a symlink until they are fixed.
(Yes, actually Piotr fixed the init-script for this with his NMU, but
he forgot all the other things where it is mentioned. And var/run fits
better IMO).

Not finished, but as i need to stop the work for at least 2 hours I commit
it, will do the rest after 18:00 today.
Left over for then: Some things for Standards 3.6.1, a cleaner build, some
debhelper compat level 4 improvements.



--- NEW FILE: compat ---
4

Index: NEWS
===================================================================
RCS file: /cvsroot/pkg-nagios/nagios/NEWS,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- NEWS	31 Oct 2004 09:59:28 -0000	1.1.1.1
+++ NEWS	31 Oct 2004 14:52:44 -0000	1.2
@@ -1,3 +1,14 @@
+nagios (2:1.2-4) unstable; urgency=medium
+
+  The command fifo moved to a FHS compliant location. It is now in 
+  /var/run/nagios/nagios.cmd and you need to update your scripts/tools
+  if you use the fifo. For a quick solution you may simply add a symlink
+  to the new location.
+  If you dont allow dpkg to overwrite the init file you need to change
+  the location there too!
+
+ -- Joerg Jaspert <joerg@debian.org>  Sun, 31 Oct 2004 14:19:01 +0100
+
 nagios (2:1.2-3.6) unstable; urgency=medium
 
   Some of the files was changed from /var/log/nagios to /var/cache/nagios

Index: changelog
===================================================================
RCS file: /cvsroot/pkg-nagios/nagios/changelog,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- changelog	31 Oct 2004 09:59:28 -0000	1.1.1.1
+++ changelog	31 Oct 2004 14:52:44 -0000	1.2
@@ -1,3 +1,20 @@
+nagios (2:1.2-4) unstable; urgency=low
+
+  * Joerg Jaspert:
+    - New Maintainer, nagios is now maintained by a team, via alioth.
+    - Updated debian/control and debian/copyright for it.
+    - Moved nagios to dpatch for its patches, converted them all.
+    - Updated to Standards 3.6.1
+    - Moved /var/log/nagios/rw/nagios.cmd to /var/run/nagios/nagios.cmd to
+      follow the FHS. Updated 04_command_pipe_move.dpatch for this.
+      Added NEWS entry - if you use some other tools which access the file
+      in the old location - add a symlink until they are fixed.
+  	  (Yes, actually Piotr fixed the init-script for this with his NMU, but
+  	  he forgot all the other things where it is mentioned. And var/run fits
+      better IMO).
+
+ -- Joerg Jaspert <joerg@debian.org>  Sun, 31 Oct 2004 14:19:01 +0100
+
 nagios (2:1.2-3.6) unstable; urgency=high
 
   * NMU to fix RC bugs.

Index: control
===================================================================
RCS file: /cvsroot/pkg-nagios/nagios/control,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- control	31 Oct 2004 09:59:28 -0000	1.1.1.1
+++ control	31 Oct 2004 14:52:44 -0000	1.2
@@ -1,9 +1,10 @@
 Source: nagios
 Section: net
 Priority: optional
-Maintainer: Turbo Fredriksson <turbo@debian.org>
-Standards-Version: 3.5.2
-Build-Depends: debhelper, po-debconf, libpng12-dev, libgd2-noxpm-dev (>= 2.0.1) | libgd2-xpm-dev (>= 2.0.1), iputils-ping, postgresql-dev (>= 7.2), libmysqlclient10-dev
+Maintainer: Debian Nagios Maintainer Group <pkg-nagios-devel@lists.alioth.debian.org>
+Uploaders: Joerg Jaspert <joerg@debian.org>, Jeremy T. Bouse" <jbouse@debian.org>, Tony Mancill <tony@mancill.com>, Sean Finney <seanius@seanius.net>
+Standards-Version: 3.6.1
+Build-Depends: debhelper, dpatch (>= 2.0.10), po-debconf, libpng12-dev, libgd2-noxpm-dev (>= 2.0.1) | libgd2-xpm-dev (>= 2.0.1), iputils-ping, postgresql-dev (>= 7.2), libmysqlclient10-dev
 
 Package: nagios-text
 Architecture: any

Index: copyright
===================================================================
RCS file: /cvsroot/pkg-nagios/nagios/copyright,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- copyright	31 Oct 2004 09:59:28 -0000	1.1.1.1
+++ copyright	31 Oct 2004 14:52:44 -0000	1.2
@@ -5,6 +5,12 @@
 
 Upstream Author: Ethan Galstad <nagios@nagios.org>
 
+Current Debian Maintainers: Joerg Jaspert <joerg@debian.org>
+			   				Jeremy T. Bouse <jbouse@debian.org>
+							Tony Mancill <tony@mancill.com>
+							Sean Finney <seanius@seanius.net>
+Mailing-List: 				pkg-nagios-devel@lists.alioth.debian.org
+
 Copyright:
 
 Nagios is released under the terms of the GPL license.

Index: init.d
===================================================================
RCS file: /cvsroot/pkg-nagios/nagios/init.d,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- init.d	31 Oct 2004 09:59:28 -0000	1.1.1.1
+++ init.d	31 Oct 2004 14:52:44 -0000	1.2
@@ -17,7 +17,7 @@
 NAME=nagios
 DESC=nagios
 NICENESS=5
-NAMEDPIPE=/var/cache/nagios/rw/nagios.cmd
+NAMEDPIPE=/var/run/nagios/nagios.cmd
 
 test -f $DAEMON || exit 0
 
@@ -91,8 +91,7 @@
 	    fi
 
 	    if check_config; then
-		rm -f /var/cache/nagios/rw/nagios.cmd
-		nice -$NICENESS \
+		rm -f /var/run/nagios/nagios.cmd		nice -$NICENESS \
 		    start-stop-daemon --start --quiet \
 		    --pidfile /var/run/nagios/$NAME.pid \
 		    --make-pidfile --background --exec $DAEMON -- /etc/nagios/nagios.cfg
@@ -110,7 +109,7 @@
 		--oknodo --exec $DAEMON
 	echo "$NAME."
 	rm -f /var/run/nagios/$NAME.pid
-	rm -f /var/cache/nagios/rw/nagios.cmd
+	rm -f /var/run/nagios/nagios.cmd
 	;;
   reload|force-reload)
 	echo "Reloading $DESC configuration files."

Index: rules
===================================================================
RCS file: /cvsroot/pkg-nagios/nagios/rules,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- rules	31 Oct 2004 09:59:29 -0000	1.1.1.1
+++ rules	31 Oct 2004 14:52:44 -0000	1.2
@@ -3,18 +3,25 @@
 # GNU copyright 1997 to 1999 by Joey Hess.
 
 # Uncomment this to turn on verbose mode.
-export DH_VERBOSE=1
-
-# This is the debhelper compatability version to use.
-export DH_COMPAT=1
+# export DH_VERBOSE=1
 
 maindir		= $(shell pwd)
-srcdir		= $(shell find build-tree/nagios-[0-9]* -type d -maxdepth 0)
+srcdir		= $(shell pwd) # FIXME: drop this
 
 CGIBINS		= avail cmd config extinfo histogram history notifications outages showlog status statusmap statuswml statuswrl summary tac trends
 
+CFLAGS = -Wall -g
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+CFLAGS += -O0
+else
+CFLAGS += -O2
+endif
+export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+
 SHELL		= /bin/sh -e
-CONFIGURE	=./configure	--prefix=/usr \
+CONFIGURE	= CFLAGS='$(CFLAGS)' ./configure	--prefix=/usr \
 				--mandir=/usr/share/man \
 				--bindir=/usr/sbin \
 			        --sbindir=/usr/lib/cgi-bin/nagios \
@@ -28,7 +35,11 @@
 				--with-mail=/usr/bin/mail \
 				--with-perlcache \
 				--with-nagios-user=nagios \
-				--with-nagios-grp=nagios
+				--with-nagios-grp=nagios \
+				--with-template-extinfo \
+				--with-template-objects \
+				--with-default-extinfo \
+				--build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_HNU_TYPE)
 
 
 DEPENDS		= XSDC=xsddb.c XSDH=xsddb.h XCDC=xcddb.c XCDH=xcddb.h XEDC=xeddb.c \
@@ -39,105 +50,91 @@
 FLAGS_pgsql	= LDFLAGS=-lpq EXTRAFLAGS="-DUSE_XSDDB -DUSE_XSDPGSQL -DUSE_XCDDB -DUSE_XCDPGSQL -DUSE_XEDDB -DUSE_XEDPGSQL -DUSE_XRDDB -DUSE_XRDPGSQL -DUSE_XDDDB -DUSE_XDDPGSQL -DUSE_XODTEMPLATE"
 FLAGS_mysql	= LDFLAGS=-lmysqlclient EXTRAFLAGS="-DUSE_XSDDB -DUSE_XSDMYSQL -DUSE_XCDDB -DUSE_XCDMYSQL -DUSE_XEDDB -DUSE_XEDMYSQL -DUSE_XRDDB -DUSE_XRDMYSQL -DUSE_XDDDB -DUSE_XDDMYSQL -DUSE_XODTEMPLATE"
 
-# the dbs rules
-include debian/scripts/dbs-build.mk
-
 # --------- CLEAN TARGETS
 
-clean:
+clean: clean1 unpatch
+clean1:
 	dh_testdir -a
 	dh_testroot -a
 
-	rm -Rf $(srcdir) $(STAMP_DIR) $(patched)
-	rm -Rf docs examples debian/files debian/nagios-text
-	rm -Rf debian/nagios-{text,pgsql,mysql}.*
-	rm -Rf build-tree* nagios-1.1 debian/templates.merged
+#	rm -Rf docs examples debian/files debian/nagios-text
+#	rm -Rf debian/nagios-{text,pgsql,mysql}.*
+#	rm -Rf build-tree* nagios-1.1 debian/templates.merged
+	-make distclean
+	-rm {patch,configure,build}-stamp
 
 	dh_clean
 
 # --------- BINARY TARGETS
 
-configure: $(STAMP_DIR)/patch $(STAMP_DIR)/configure-stamp
-$(STAMP_DIR)/configure-stamp:
+configure: configure-stamp
+configure-stamp:
 	dh_testdir -a
 
 	@echo "Doing $@"
-	@( cd $(srcdir)/; \
-	   $(CONFIGURE) --with-template-extinfo \
-		--with-template-objects \
-		--with-default-extinfo; \
-	)
-	touch $(STAMP_DIR)/configure-stamp
+	$(CONFIGURE)
+	touch configure-stamp
 
-patch-no-defaults: $(STAMP_DIR)/patch-no-defaults-stamp
-$(STAMP_DIR)/patch-no-defaults-stamp:
+patch-no-defaults: patch-no-defaults-stamp
+patch-no-defaults-stamp:
 	@echo "Doing $@"
-	@( cd $(srcdir); \
-	   cat $(maindir)/debian/patches/chk-001_config.h-no_defaults | \
-	     patch -p2; \
-	)
-	touch $(STAMP_DIR)/patch-no-defaults-stamp
+	cat $(maindir)/debian/patches/chk-001_config.h-no_defaults | patch -p2
+	touch patch-no-defaults-stamp
 
-binary-nagios-text: configure $(STAMP_DIR)/binary-nagios-text-stamp
-$(STAMP_DIR)/binary-nagios-text-stamp:
+binary-nagios-text: configure binary-nagios-text-stamp
+binary-nagios-text-stamp:
 	dh_testdir -a
 
 	@echo "Doing $@"
-	@( cd $(srcdir)/; \
-	   $(MAKE) all $(FLAGS_text) && \
-	   (cd base && mv nagios nagios.text); \
-	   (cd cgi && \
-	    for bin in $(CGIBINS); do \
-	      mv $$bin.cgi $$bin.cgi.text; \
-	    done); \
-	)
-	touch $(STAMP_DIR)/binary-nagios-text-stamp
+	$(MAKE) all $(FLAGS_text) && \
+	  (cd base && mv nagios nagios.text); \
+	  (cd cgi && \
+	   for bin in $(CGIBINS); do \
+	     mv $$bin.cgi $$bin.cgi.text; \
+	   done);
+	touch binary-nagios-text-stamp
 
-binary-nagios-pgsql: binary-nagios-text patch-no-defaults $(STAMP_DIR)/binary-nagios-pgsql-stamp
-$(STAMP_DIR)/binary-nagios-pgsql-stamp:
+binary-nagios-pgsql: binary-nagios-text patch-no-defaults binary-nagios-pgsql-stamp
+binary-nagios-pgsql-stamp:
 	dh_testdir -a
 
 	@echo "Doing $@"
-	@( cd $(srcdir); \
-	   rm -f base/sretention.o; \
-	   $(MAKE) -C base sretention.o CC="gcc -DUSE_XRDDB -DUSE_XRDPGSQL"; \
-	   $(MAKE) -C base nagios $(FLAGS_pgsql) $(DEPENDS); \
-	   rm -f cgi/edata.o; \
-	   $(MAKE) -C cgi edata.o CC="gcc -DUSE_XEDDB -DUSE_XEDPGSQL"; \
-	   $(MAKE) -C cgi cgis $(FLAGS_pgsql) $(DEPENDS); \
-	   (cd base && mv nagios nagios.pgsql); \
-	   (cd cgi && \
-	    for bin in $(CGIBINS); do \
-	      mv $$bin.cgi $$bin.cgi.pgsql; \
-	    done); \
-	)
-	touch $(STAMP_DIR)/binary-nagios-pgsql-stamp
+	rm -f base/sretention.o; \
+	$(MAKE) -C base sretention.o CC="gcc -DUSE_XRDDB -DUSE_XRDPGSQL"; \
+	$(MAKE) -C base nagios $(FLAGS_pgsql) $(DEPENDS); \
+	rm -f cgi/edata.o; \
+	$(MAKE) -C cgi edata.o CC="gcc -DUSE_XEDDB -DUSE_XEDPGSQL"; \
+	$(MAKE) -C cgi cgis $(FLAGS_pgsql) $(DEPENDS); \
+	 (cd base && mv nagios nagios.pgsql); \
+	 (cd cgi && \
+	  for bin in $(CGIBINS); do \
+	    mv $$bin.cgi $$bin.cgi.pgsql; \
+	  done);
+	touch binary-nagios-pgsql-stamp
 
-binary-nagios-mysql: binary-nagios-text patch-no-defaults $(STAMP_DIR)/binary-nagios-mysql-stamp
-$(STAMP_DIR)/binary-nagios-mysql-stamp:
+binary-nagios-mysql: binary-nagios-text patch-no-defaults binary-nagios-mysql-stamp
+binary-nagios-mysql-stamp:
 	dh_testdir -a
 
 	@echo "Doing $@"
-	@( cd $(srcdir); \
-	   rm -f base/sretention.o; \
-	   $(MAKE) -C base sretention.o CC="gcc -DUSE_XRDDB -DUSE_XRDMYSQL"; \
-	   $(MAKE) -C base nagios $(FLAGS_mysql) $(DEPENDS); \
-	   rm -f cgi/edata.o; \
-	   $(MAKE) -C cgi edata.o CC="gcc -DUSE_XEDDB -DUSE_XEDMYSQL"; \
-	   $(MAKE) -C cgi cgis $(FLAGS_mysql) $(DEPENDS); \
-	   (cd base && mv nagios nagios.mysql); \
-	   (cd cgi && \
-	    for bin in $(CGIBINS); do \
-	      mv $$bin.cgi $$bin.cgi.mysql; \
-	    done); \
-	)
-	touch $(STAMP_DIR)/binary-nagios-mysql-stamp
+	rm -f base/sretention.o; \
+	$(MAKE) -C base sretention.o CC="gcc -DUSE_XRDDB -DUSE_XRDMYSQL"; \
+	$(MAKE) -C base nagios $(FLAGS_mysql) $(DEPENDS); \
+	rm -f cgi/edata.o; \
+	$(MAKE) -C cgi edata.o CC="gcc -DUSE_XEDDB -DUSE_XEDMYSQL"; \
+	$(MAKE) -C cgi cgis $(FLAGS_mysql) $(DEPENDS); \
+	(cd base && mv nagios nagios.mysql); \
+	(cd cgi && \
+	  for bin in $(CGIBINS); do \
+	    mv $$bin.cgi $$bin.cgi.mysql; \
+	  done);
+	touch binary-nagios-mysql-stamp
 
 binary-indep: 
 	# We have nothing to do by default.
 
-duplicate: $(STAMP_DIR)/duplicate-stamp
-$(STAMP_DIR)/duplicate-stamp:
+duplicate: duplicate-stamp
+duplicate-stamp:
 	# Duplicate the init script etc
 	for pkg in text pgsql mysql; do \
 		cp debian/init.d debian/nagios-$$pkg.init; \
@@ -146,11 +143,12 @@
 		done \
 	done
 	-mkdir $(maindir)/docs $(maindir)/examples
-	touch $(maindir)/$(STAMP_DIR)/duplicate-stamp
+	touch $(maindir)/duplicate-stamp
 
-build: binary-nagios-text binary-nagios-pgsql binary-nagios-mysql duplicate $(STAMP_DIR)/build-stamp
-$(STAMP_DIR)/build-stamp: 
-	touch $(STAMP_DIR)/build-stamp
+build: build-stamp
+build-stamp: patch binary-nagios-text binary-nagios-pgsql binary-nagios-mysql duplicate
+	@echo "--- Compiling"
+	dh_testdir
 
 binary-arch: build install
 	dh_testdir -a
@@ -171,12 +169,12 @@
 	dh_installmenu -a
 	dh_installinit -a 
 	# The init script should just be named 'nagios' (not nagios-PKG).
-	for pkg in tmp nagios-pgsql nagios-mysql; do \
-		mv debian/$$pkg/etc/init.d/nagios-* \
-			debian/$$pkg/etc/init.d/nagios; \
-	done
-#	(cd debian/tmp/usr/share ; find doc-base | cpio -p ../../../nagios-pgsql/usr/share)
-#	(cd debian/tmp/usr/share ; find doc-base | cpio -p ../../../nagios-mysql/usr/share)
+#	for pkg in tmp nagios-pgsql nagios-mysql; do \
+#		mv debian/$$pkg/etc/init.d/nagios-* \
+#			debian/$$pkg/etc/init.d/nagios; \
+#	done
+##	(cd debian/tmp/usr/share ; find doc-base | cpio -p ../../../nagios-pgsql/usr/share)
+##	(cd debian/tmp/usr/share ; find doc-base | cpio -p ../../../nagios-mysql/usr/share)
 
 	# install package specific stuff
 	install -m 644 $(srcdir)/contrib/database/create_mysql \
@@ -209,8 +207,8 @@
 	dh_md5sums -a
 	dh_builddeb -a
 
-install: build $(STAMP_DIR)/install-stamp
-$(STAMP_DIR)/install-stamp:
+install: build install-stamp
+install-stamp:
 	dh_testdir -a
 	dh_testroot -a
 
@@ -225,14 +223,14 @@
 	@( if [ -d "$(maindir)/debian/tmp" -a ! -d "$(maindir)/debian/nagios-text" ]; then \
 	     mv $(maindir)/debian/tmp $(maindir)/debian/nagios-text; \
 	   fi; \
-	   cd $(maindir)/$(srcdir)/base && cp nagios.text nagios; \
-	   cd $(maindir)/$(srcdir)/cgi && \
+	   cd $(maindir)/base && cp nagios.text nagios; \
+	   cd $(maindir)/cgi && \
 	   for bin in $(CGIBINS); do \
 	     echo "cp $$bin.cgi.text $$bin.cgi"; \
 	     cp $$bin.cgi.text $$bin.cgi; \
 	   done; \
 	   for dir in text pgsql mysql; do \
-	     cd $(maindir)/$(srcdir)/; \
+	     cd $(maindir)/; \
 	       set -e; $(MAKE) install install-config DESTDIR=$(maindir)/debian/nagios-$$dir \
 		 INSTALL_OPTS= COMMAND_OPTS= && echo $?; \
 	       install -m 755 base/nagios.$$dir $(maindir)/debian/nagios-$$dir/usr/lib/cgi-bin/nagios/nagios; \
@@ -289,27 +287,37 @@
 			      > $$file.new && mv $$file.new $$file; \
 		 echo; \
 	       done; \
-	     echo install -m 755 $(maindir)/$(srcdir)/base/nagios.$$dir $(maindir)/debian/nagios-$$dir/usr/sbin/nagios; \
-	     install -m 755 $(maindir)/$(srcdir)/base/nagios.$$dir $(maindir)/debian/nagios-$$dir/usr/sbin/nagios; \
+	     echo install -m 755 $(maindir)/base/nagios.$$dir $(maindir)/debian/nagios-$$dir/usr/sbin/nagios; \
+	     install -m 755 $(maindir)/base/nagios.$$dir $(maindir)/debian/nagios-$$dir/usr/sbin/nagios; \
 	     for bin in $(CGIBINS); do \
-	       echo install -m 755 $(maindir)/$(srcdir)/cgi/$$bin.cgi.$$dir \
+	       echo install -m 755 $(maindir)/cgi/$$bin.cgi.$$dir \
 		 $(maindir)/debian/nagios-$$dir/usr/lib/cgi-bin/nagios/$$bin.cgi; \
-	       install -m 755 $(maindir)/$(srcdir)/cgi/$$bin.cgi.$$dir \
+	       install -m 755 $(maindir)/cgi/$$bin.cgi.$$dir \
 		 $(maindir)/debian/nagios-$$dir/usr/lib/cgi-bin/nagios/$$bin.cgi; \
 	     done; \
 	   done; \
 	)
-	# Remove checkcommands.cfg which is not to be shipped
+# Remove checkcommands.cfg which is not to be shipped
 	rm -f $(maindir)/debian/nagios-text/etc/nagios/checkcommands.cfg
 	rm -f $(maindir)/debian/nagios-mysql/etc/nagios/checkcommands.cfg
 	rm -f $(maindir)/debian/nagios-pgsql/etc/nagios/checkcommands.cfg
-	
+
 	mv $(maindir)/debian/nagios-text $(maindir)/debian/tmp
 
-	touch $(maindir)/$(STAMP_DIR)/install-stamp
+	touch $(maindir)/install-stamp
 
 debian/po/templates.pot: debian/templates
 	@debconf-updatepo
 
+# Add stuff for dpatch (2.x way)
+patch: patch-stamp
+patch-stamp:
+	dpatch --with-cpp apply-all
+	dpatch --with-cpp cat-all >patch-stamp
+
+unpatch:
+	dpatch --with-cpp deapply-all
+	rm -rf patch-stamp debian/patched
+
 binary: binary-indep binary-arch
-.PHONY: binary-indep binary-arch binary-nagios-text binary-nagios-pgsql binary-nagios-mysql binary install
+.PHONY: binary-indep binary-arch binary-nagios-text binary-nagios-pgsql binary-nagios-mysql binary install patch unpatch