[Pkg-nagios-changes] [pkg-nagios] r1921 - in nagios-plugins/trunk/debian: . bin

Jan Wagner waja at alioth.debian.org
Sun Feb 13 22:20:14 UTC 2011


tags 569028 pending
thanks

Author: waja
Date: 2011-02-13 22:20:06 +0000 (Sun, 13 Feb 2011)
New Revision: 1921

Added:
   nagios-plugins/trunk/debian/README.Debian.plugins.in
   nagios-plugins/trunk/debian/bin/
   nagios-plugins/trunk/debian/bin/gen_plugin_deps.pl
Removed:
   nagios-plugins/trunk/debian/README.Debian.plugins
Modified:
   nagios-plugins/trunk/debian/NEWS.Debian
   nagios-plugins/trunk/debian/changelog
   nagios-plugins/trunk/debian/control
   nagios-plugins/trunk/debian/rules
Log:
move dependend libraries to recommanded once

Modified: nagios-plugins/trunk/debian/NEWS.Debian
===================================================================
--- nagios-plugins/trunk/debian/NEWS.Debian	2011-02-09 17:55:12 UTC (rev 1920)
+++ nagios-plugins/trunk/debian/NEWS.Debian	2011-02-13 22:20:06 UTC (rev 1921)
@@ -1,3 +1,11 @@
+nagios-plugins (1.4.15-4) unstable; urgency=low
+
+  Moved linked libraries against nagios-plugins-standard from Depends to
+  Recommends and mention them in
+  /usr/share/doc/nagios-plugins-standard/README.Debian.plugins.
+
+ -- Jan Wagner <waja at cyconet.org>  Sun, 13 Feb 2011 22:51:54 +0100
+
 nagios-plugins (1.4.14-2) unstable; urgency=low
 
   Moved check_mailq to nagios-plugins-standard, because it requires the mailq

Deleted: nagios-plugins/trunk/debian/README.Debian.plugins
===================================================================
--- nagios-plugins/trunk/debian/README.Debian.plugins	2011-02-09 17:55:12 UTC (rev 1920)
+++ nagios-plugins/trunk/debian/README.Debian.plugins	2011-02-13 22:20:06 UTC (rev 1921)
@@ -1,55 +0,0 @@
-nagios-plugins on Debian
-==========================
-
-Some plugins require additional libraries and programs. To prevent you from
-having to install dozens of further packages that you don't actually need,
-there is no strict dependency on some of them. Rather, they are listed as
-recommendations and suggests.
-
-apt-get(8) and aptitude(8) will install recommended packages automatically by
-default. If you did not disable this feature you will have everything in place
-to operate all plugins when installing the "nagios-plugins-standard" package,
-beside the packages listed as suggests.
-Else you have to install missing dependencies manually (see the section "Plugin
-dependencies" below).
-
-Plugin dependencies:
---------------------
-
-check_bgpstate:
-  * libnet-snmp-perl
-  * whois
-
-check_breeze:
-  * snmp
-
-check_disk_smb:
-  * smbclient
-
-check_dns:
-  * dnsutils
-
-check_fping:
-  * fping
-
-check_game:
-  * qstat
-
-check_ifoperstatus:
-  * libnet-snmp-perl
-
-check_ifstatus:
-  * libnet-snmp-perl
-
-check_mailq:
-  * sendmail binary of qmail or one of the following packages
-    - postfix
-    - sendmail-bin
-    - exim4-daemon-heavy
-    - exim4-daemon-light
-
-check_oracle:
-  * procps
-
-check_wave:
-  * snmp

Added: nagios-plugins/trunk/debian/README.Debian.plugins.in
===================================================================
--- nagios-plugins/trunk/debian/README.Debian.plugins.in	                        (rev 0)
+++ nagios-plugins/trunk/debian/README.Debian.plugins.in	2011-02-13 22:20:06 UTC (rev 1921)
@@ -0,0 +1,57 @@
+nagios-plugins on Debian
+==========================
+
+Some plugins require additional libraries and programs. To prevent you from
+having to install dozens of further packages that you don't actually need,
+there is no strict dependency on some of them. Rather, they are listed as
+recommendations and suggests.
+
+apt-get(8) and aptitude(8) will install recommended packages automatically by
+default. If you did not disable this feature you will have everything in place
+to operate all plugins when installing the "nagios-plugins-standard" package,
+beside the packages listed as suggests.
+Else you have to install missing dependencies manually (see the section "Plugin
+dependencies" below).
+
+Plugin dependencies:
+--------------------
+
+check_bgpstate:
+  * libnet-snmp-perl
+  * whois
+
+check_breeze:
+  * snmp
+
+check_disk_smb:
+  * smbclient
+
+check_dns:
+  * dnsutils
+
+check_fping:
+  * fping
+
+check_game:
+  * qstat
+
+check_ifoperstatus:
+  * libnet-snmp-perl
+
+check_ifstatus:
+  * libnet-snmp-perl
+
+check_mailq:
+  * sendmail binary of qmail or one of the following packages
+    - postfix
+    - sendmail-bin
+    - exim4-daemon-heavy
+    - exim4-daemon-light
+
+check_oracle:
+  * procps
+
+check_wave:
+  * snmp
+
+ at PLUGIN_DEPS@

Added: nagios-plugins/trunk/debian/bin/gen_plugin_deps.pl
===================================================================
--- nagios-plugins/trunk/debian/bin/gen_plugin_deps.pl	                        (rev 0)
+++ nagios-plugins/trunk/debian/bin/gen_plugin_deps.pl	2011-02-13 22:20:06 UTC (rev 1921)
@@ -0,0 +1,106 @@
+#! /usr/bin/perl
+#
+# collectd - gen_plugin_deps.pl
+# Copyright (C) 2007 Sebastian Harl
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; only version 2 of the License is applicable.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+#
+# Author:
+#   Sebastian Harl <sh at tokkee.org>
+
+use strict;
+use warnings;
+
+# actual not needed
+#my $extra_deps = {
+#	sensors => [ 'lm-sensors' ],
+#};
+
+my $infile  = "debian/README.Debian.plugins.in";
+my $outfile = "debian/README.Debian.plugins";
+
+my ($ifile, $ofile);
+
+if (! open($ifile, "<", $infile)) {
+	print STDERR "Could not open file '$infile': $!\n";
+	exit 1;
+}
+
+if (! open($ofile, ">", $outfile)) {
+	print STDERR "Could not open file '$outfile': $!\n";
+	exit 1;
+}
+
+while (my $line = <$ifile>) {
+	if ($line !~ m/^\@PLUGIN_DEPS\@\n$/) {
+		print $ofile $line;
+	}
+	else {
+		print_plugin_deps($ofile);
+	}
+}
+
+close($ofile);
+close($ifile);
+
+sub print_plugin_deps
+{
+	my $fh   = shift;
+	my $pdir = undef;
+	my $i    = 0;
+
+	my $plugindir = "debian/nagios-plugins-standard/usr/lib/nagios/plugins/";
+
+	if (! opendir($pdir, $plugindir)) {
+		print STDERR "Could not open directory '$plugindir': $!\n";
+		exit 1;
+	}
+
+	foreach my $dirent (sort readdir($pdir)) {
+#		if ($dirent !~ m/^(\w+).so$/) {
+		if ($dirent !~ m/^check_(\w+)$/) {
+			next;
+		}
+
+		my $name = $1;
+		my $deps = `dpkg-shlibdeps -O $plugindir/$dirent`;
+
+		chomp $deps;
+
+		$deps =~ s/^shlibs:Depends=//;
+
+		my @deps = grep !m/^libc6\b/, split m/, /, $deps;
+
+		if (scalar @deps) {
+			if (0 < $i) {
+				print $fh "\n";
+			}
+
+			++$i;
+
+			print $fh "check_$name:\n";
+
+			if (defined $extra_deps->{$name}) {
+				unshift @deps, @{$extra_deps->{$name}};
+			}
+
+			foreach my $dep (@deps) {
+				print $fh "  * $dep\n";
+			}
+		}
+	}
+}
+
+# vim: set tw=78 sw=4 ts=4 noexpandtab :
+

Modified: nagios-plugins/trunk/debian/changelog
===================================================================
--- nagios-plugins/trunk/debian/changelog	2011-02-09 17:55:12 UTC (rev 1920)
+++ nagios-plugins/trunk/debian/changelog	2011-02-13 22:20:06 UTC (rev 1921)
@@ -5,6 +5,16 @@
     - Abort immediately if we don't receive a server greeting or if the
       greeting doesn't contain the "--expect"ed string (by default: "220")
       instead of blindly sending the EHLO/HELO line.
+  * Move libraries linked at compile time against checks of
+    nagios-plugins-standard from Depends to Recommends (Closes: #569028)
+    - Add slightly modified bin/gen_plugin_deps.pl from collectd source package
+    - Add linked libraries via bin/gen_plugin_deps.pl into
+      /usr/share/doc/nagios-plugins-standard/README.Debian.plugins
+    - Build-Depend on perl
+    - Create customized substvars for nagios-plugins-standard via
+      dpkg-shlibdeps in debian/rules
+    - Remove temporary files via clean target in debian/rules
+    - Add hint to NEWS.DebianAdd hint to NEWS.Debia
 
  -- Jan Wagner <waja at cyconet.org>  Mon, 27 Dec 2010 22:13:48 +0100
 

Modified: nagios-plugins/trunk/debian/control
===================================================================
--- nagios-plugins/trunk/debian/control	2011-02-09 17:55:12 UTC (rev 1920)
+++ nagios-plugins/trunk/debian/control	2011-02-13 22:20:06 UTC (rev 1921)
@@ -3,7 +3,7 @@
 Priority: extra
 Maintainer: Debian Nagios Maintainer Group <pkg-nagios-devel at lists.alioth.debian.org>
 Uploaders: Jan Wagner <waja at cyconet.org>, Alexander Wirt <formorer at debian.org>
-Build-Depends: debhelper (>= 5), dpatch (>= 2.0.9), autotools-dev, libldap2-dev, libpq-dev, libmysqlclient-dev | libmysqlclient16-dev | libmysqlclient15-dev, libradiusclient-ng-dev, libkrb5-dev, libnet-snmp-perl, procps, mawk | awk
+Build-Depends: debhelper (>= 5), dpatch (>= 2.0.9), perl, autotools-dev, libldap2-dev, libpq-dev, libmysqlclient-dev | libmysqlclient16-dev | libmysqlclient15-dev, libradiusclient-ng-dev, libkrb5-dev, libnet-snmp-perl, procps, mawk | awk
 Homepage: http://nagiosplug.sourceforge.net
 Vcs-Browser: http://svn.debian.org/wsvn/pkg-nagios/nagios-plugins/
 Vcs-Svn: svn://svn.debian.org/pkg-nagios/nagios-plugins/trunk/
@@ -60,7 +60,7 @@
 Conflicts: nagios-plugins (<= 1.4.2-3)
 Replaces: nagios-plugins
 Depends: ${shlibs:Depends}, ${misc:Depends}, ucf, nagios-plugins-basic (>= 1.4.5-2)
-Recommends: fping, snmp, libnet-snmp-perl, dnsutils, bind9-host | host, smbclient, whois, qstat
+Recommends: ${shlibs:Recommends}, fping, snmp, libnet-snmp-perl, dnsutils, bind9-host | host, smbclient, whois, qstat
 Suggests: nagios3, postfix | sendmail-bin | exim4-daemon-heavy | exim4-daemon-light
 Description: Plugins for the nagios network monitoring and management system
  Nagios is a host/service/network monitoring and management system. It has

Modified: nagios-plugins/trunk/debian/rules
===================================================================
--- nagios-plugins/trunk/debian/rules	2011-02-09 17:55:12 UTC (rev 1920)
+++ nagios-plugins/trunk/debian/rules	2011-02-13 22:20:06 UTC (rev 1921)
@@ -121,7 +121,7 @@
 really-clean:
 	dh_testdir
 	dh_testroot
-	rm -f build-stamp
+	rm -f build-stamp debian/README.Debian.plugins debian/nagios-plugins-standard.substvars.in
 
 	# Add here commands to clean up after the build process.
 	[ ! -f Makefile ] || $(MAKE) distclean
@@ -169,6 +169,8 @@
 	mkdir -p ${NP_BASIC_DIR}/usr/share/nagios-plugins/dpkg
 	install -t ${NP_BASIC_DIR}/usr/share/nagios-plugins/dpkg \
 		$(DEBIANDIR)/functions
+	# generate debian/README.Debian.plugins
+	perl ./debian/bin/gen_plugin_deps.pl
 
 # Build architecture-independent files here.
 binary-indep: build install
@@ -200,7 +202,14 @@
 	dh_compress -s
 	dh_fixperms -s -X utils.pm
 	dh_installdeb -s
-	dh_shlibdeps -s
+	dh_shlibdeps -s -Nnagios-plugins-standard
+	dpkg-shlibdeps -Tdebian/nagios-plugins-standard.substvars \
+		${NP_STD_DIR}/${NP_LIBEXEC}/check_dns
+	dpkg-shlibdeps -Tdebian/nagios-plugins-standard.substvars.in \
+		-dSuggests ${NP_STD_DIR}/${NP_LIBEXEC}/check_*
+	grep shlibs:Suggests debian/nagios-plugins-standard.substvars.in \
+		| sed -e 's/shlibs:Suggests/shlibs:Recommends/' \
+		>> debian/nagios-plugins-standard.substvars
 	dh_gencontrol -s
 	dh_md5sums -s
 	dh_builddeb -s




More information about the Pkg-nagios-changes mailing list