From 0e3cb8598e0f94f38265c563996fda3e7cd35f27 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 22 Jun 2009 15:15:15 +0000 Subject: [PATCH] adjust packaging for latest git upstream tree --- debian/changelog | 29 ++++++++++-- debian/patches/00list | 6 --- debian/patches/13_subst.in_again.dpatch | 46 ++----------------- .../37_check_radius_nas-ip-address.dpatch | 24 +++++----- debian/rules | 1 + 5 files changed, 43 insertions(+), 63 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4464e9b..9c97193 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,12 +1,35 @@ -nagios-plugins (1.4.12-6) UNRELEASED; urgency=low +nagios-plugins (1.4.13+git200906171200-1) UNRELEASED; urgency=low + * new upstream + - check_http doesn't enforce port (Closes: #494835) + - check_http --onredirect=sticky follows using the same IP address + (Closes: #502529) + - Fixed buffer overflow in check_ntp/check_ntp_peer (Closes: #528686) + - Fixed check_mrtg returning UNKNOWN instead of OK (Closes: #335871) + - Fixed check_by_ssh interpretation of quotes in -C parameter + (Closes: #425312) + - Fixed coredump from check_nt when drive not found (Closes: #521097) + - Removed -n option in check_smtp's help and usage output (Closes: #525307) + - Fixed check_icmp --help output for warn and critical thresholds + (Closes: #530553) + - Fix potential buffer overflow in check_snmp - enforce MAX_OIDS limit + (Closes: #460405) + * adjusted the following patches for new upstream + - 13_subst.in_again.dpatch + - 37_check_radius_nas-ip-address.dpatch + * removed the following patches from 00list cause they where integrated + - 39_check_dig_options.dpatch + - 40_check_http_status_line.dpatch + - 41_check_http_fix_http_header.dpatch + - 42_check_ups_logoutfix.dpatch + - 43_check_ntp_segfaults.dpatch + - 50_misc_typos.dpatch * add trailing $ to check_httpname, thanks Daniel Pocock (Closes: #524629) * add informations into README.Debian how to use plugins (Closes: #525168) * add check_nscp which uses the default port of NSClient++ (Closes: #528262) * providing some explanation about predefined check commands in README.Debian * pointing to README.Debian in nt.cfg - * add 43_check_ntp_segfaults.dpatch to fix buffer overflow in check_ntp and - check_ntp_peer, thanks to Andreas Olsson (Closes: #528686) + * add 'make install-root' to debian/rules to get suid plugins installed again -- Jan Wagner Sun, 01 Feb 2009 03:19:57 +0100 diff --git a/debian/patches/00list b/debian/patches/00list index 495887a..29ac65a 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -13,9 +13,3 @@ 36_check_ldap_empty_base.dpatch 37_check_radius_nas-ip-address.dpatch 38_fix_libexec.dpatch -39_check_dig_options.dpatch -40_check_http_status_line.dpatch -41_check_http_fix_http_header.dpatch -42_check_ups_logoutfix.dpatch -43_check_ntp_segfaults.dpatch -50_misc_typos.dpatch diff --git a/debian/patches/13_subst.in_again.dpatch b/debian/patches/13_subst.in_again.dpatch index 1d5e27b..2ef8e2e 100755 --- a/debian/patches/13_subst.in_again.dpatch +++ b/debian/patches/13_subst.in_again.dpatch @@ -4,31 +4,10 @@ ## DP: Use /usr/lib/nagios/plugins as path. @DPATCH@ -diff -urNad sid2~/plugins-scripts/subst.in sid2/plugins-scripts/subst.in ---- sid2~/plugins-scripts/subst.in 2005-08-31 00:11:42.000000000 +0200 -+++ sid2/plugins-scripts/subst.in 2005-10-07 22:37:45.000000000 +0200 -@@ -1,35 +1,9 @@ - #!/usr/bin/awk - --function which(c,path) { -- cmd = "test -x " c; -- -- if (system(cmd)==0) { -- return c; -- } -- -- sub(/\/.*\//,"",c); -- for (dir in path) { -- cmd = "test -x " path[dir] "/" c; -- if (system(cmd)==0) { -- return path[dir] "/" c; -- } -- } -- -- -- return c; --} -- +diff -urNad nagios-plugins-1.4.13+git200906171200~/plugins-scripts/subst.in nagios-plugins-1.4.13+git200906171200/plugins-scripts/subst.in +--- nagios-plugins-1.4.13+git200906171200~/plugins-scripts/subst.in 2009-05-20 06:44:12.000000000 +0200 ++++ nagios-plugins-1.4.13+git200906171200/plugins-scripts/subst.in 2009-06-22 17:08:55.000000000 +0200 +@@ -22,14 +22,7 @@ # used to replace "use lib utils.pm" with "use lib @libexecdir" # function led() { @@ -44,20 +23,3 @@ diff -urNad sid2~/plugins-scripts/subst.in sid2/plugins-scripts/subst.in } BEGIN { -@@ -58,16 +32,6 @@ - sub(/\=.*$/,"='@with_trusted_path@' # autoconf-derived"); - } - --# If a script contains a reference to a fully qualified command, --# subst will replace the fully qualified command with whatever is --# returned from the which subroutine --# --/^[^#]/ && /(\/.*)?\/(bin|sbin|lib|libexec)\// { -- match($0,/(\/.*)?\/(bin|sbin|lib|libexec)\/[-_a-zA-Z0-9]+/); -- c=substr($0,RSTART,RLENGTH); -- sub(c,which(c,path)); --} -- - { - print; - } diff --git a/debian/patches/37_check_radius_nas-ip-address.dpatch b/debian/patches/37_check_radius_nas-ip-address.dpatch index 23b8991..703896c 100755 --- a/debian/patches/37_check_radius_nas-ip-address.dpatch +++ b/debian/patches/37_check_radius_nas-ip-address.dpatch @@ -5,10 +5,10 @@ ## DP: add nas-ip-address option @DPATCH@ -diff -urNad nagios-plugins-1.4.12~/plugins/check_radius.c nagios-plugins-1.4.12/plugins/check_radius.c ---- nagios-plugins-1.4.12~/plugins/check_radius.c 2008-06-06 15:00:49.000000000 +0200 -+++ nagios-plugins-1.4.12/plugins/check_radius.c 2008-06-06 15:02:33.000000000 +0200 -@@ -73,6 +73,7 @@ +diff -urNad nagios-plugins-1.4.13+git200906171632~/plugins/check_radius.c nagios-plugins-1.4.13+git200906171632/plugins/check_radius.c +--- nagios-plugins-1.4.13+git200906171632~/plugins/check_radius.c 2009-06-17 22:33:18.000000000 +0200 ++++ nagios-plugins-1.4.13+git200906171632/plugins/check_radius.c 2009-06-17 22:46:08.000000000 +0200 +@@ -69,6 +69,7 @@ char *username = NULL; char *password = NULL; char *nasid = NULL; @@ -16,7 +16,7 @@ diff -urNad nagios-plugins-1.4.12~/plugins/check_radius.c nagios-plugins-1.4.12/ char *expect = NULL; char *config_file = NULL; unsigned short port = PW_AUTH_UDP_PORT; -@@ -173,19 +174,26 @@ +@@ -169,19 +170,26 @@ memset (&data, 0, sizeof(data)); if (!(my_rc_avpair_add (&data.send_pairs, PW_SERVICE_TYPE, &service, 0) && my_rc_avpair_add (&data.send_pairs, PW_USER_NAME, username, 0) && @@ -26,8 +26,8 @@ diff -urNad nagios-plugins-1.4.12~/plugins/check_radius.c nagios-plugins-1.4.12/ + )) die (STATE_UNKNOWN, _("Out of Memory?")); -- /* -- * Fill in NAS-IP-Address +- /* +- * Fill in NAS-IP-Address - */ - - if ((client_id = my_rc_own_ipaddress ()) == 0) @@ -53,7 +53,7 @@ diff -urNad nagios-plugins-1.4.12~/plugins/check_radius.c nagios-plugins-1.4.12/ my_rc_buildreq (&data, PW_ACCESS_REQUEST, server, port, (int)timeout_interval, retries); -@@ -223,6 +231,7 @@ +@@ -219,6 +227,7 @@ {"username", required_argument, 0, 'u'}, {"password", required_argument, 0, 'p'}, {"nas-id", required_argument, 0, 'n'}, @@ -61,7 +61,7 @@ diff -urNad nagios-plugins-1.4.12~/plugins/check_radius.c nagios-plugins-1.4.12/ {"filename", required_argument, 0, 'F'}, {"expect", required_argument, 0, 'e'}, {"retries", required_argument, 0, 'r'}, -@@ -234,7 +243,7 @@ +@@ -230,7 +239,7 @@ }; while (1) { @@ -70,7 +70,7 @@ diff -urNad nagios-plugins-1.4.12~/plugins/check_radius.c nagios-plugins-1.4.12/ &option); if (c == -1 || c == EOF || c == 1) -@@ -279,6 +288,9 @@ +@@ -275,6 +284,9 @@ case 'n': /* nas id */ nasid = optarg; break; @@ -80,7 +80,7 @@ diff -urNad nagios-plugins-1.4.12~/plugins/check_radius.c nagios-plugins-1.4.12/ case 'F': /* configuration file */ config_file = optarg; break; -@@ -342,6 +354,8 @@ +@@ -338,6 +350,8 @@ printf (" %s\n", _("Password for autentication (SECURITY RISK)")); printf (" %s\n", "-n, --nas-id=STRING"); printf (" %s\n", _("NAS identifier")); @@ -89,7 +89,7 @@ diff -urNad nagios-plugins-1.4.12~/plugins/check_radius.c nagios-plugins-1.4.12/ printf (" %s\n", "-F, --filename=STRING"); printf (" %s\n", _("Configuration file")); printf (" %s\n", "-e, --expect=STRING"); -@@ -377,8 +391,9 @@ +@@ -373,8 +387,9 @@ print_usage (void) { printf (_("Usage:")); diff --git a/debian/rules b/debian/rules index 0a64131..1a4992c 100755 --- a/debian/rules +++ b/debian/rules @@ -130,6 +130,7 @@ install: build # Add here commands to install the package into debian/nagios-plugins. $(MAKE) install DESTDIR=${NP_BASIC_DIR} + $(MAKE) install-root DESTDIR=${NP_BASIC_DIR} chmod 644 ${NP_BASIC_DIR}/usr/lib/nagios/plugins/utils.pm # split up basic vs. standard plugins for p in ${std_plugins}; do \