move dependend libraries to recommanded once

This commit is contained in:
Jan Wagner 2011-02-13 22:20:06 +00:00
parent 5c0f63e2fa
commit 526aade228
6 changed files with 139 additions and 4 deletions

8
debian/NEWS.Debian vendored
View file

@ -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@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

View file

@ -53,3 +53,5 @@ check_oracle:
check_wave:
* snmp
@PLUGIN_DEPS@

106
debian/bin/gen_plugin_deps.pl vendored Normal file
View file

@ -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 :

10
debian/changelog vendored
View file

@ -5,6 +5,16 @@ nagios-plugins (1.4.15-4) UNRELEASED; urgency=low
- 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@cyconet.org> Mon, 27 Dec 2010 22:13:48 +0100

4
debian/control vendored
View file

@ -3,7 +3,7 @@ Section: net
Priority: extra
Maintainer: Debian Nagios Maintainer Group <pkg-nagios-devel@lists.alioth.debian.org>
Uploaders: Jan Wagner <waja@cyconet.org>, Alexander Wirt <formorer@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 @@ Architecture: any
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

13
debian/rules vendored
View file

@ -121,7 +121,7 @@ clean: really-clean unpatch
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 @@ install: build
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 @@ binary-arch: build install
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