From bea45a970309dabc65b78d0b5becb08c7c1bb7d6 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sat, 7 Jun 2008 10:02:29 +0000 Subject: [PATCH 01/25] Updating standards version to 3.8.0 --- debian/changelog | 3 ++- debian/control | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index e714bb1..b3cfdb0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ ps-watcher (1.06-10) UNRELEASED; urgency=low * bump copyright of packaging to 2008 + * Updating standards version to 3.8.0, no changes needed - -- Jan Wagner Thu, 03 Apr 2008 10:29:21 +0200 + -- Jan Wagner Thu, 03 Apr 2008 10:29:21 +0200 ps-watcher (1.06-9) unstable; urgency=low diff --git a/debian/control b/debian/control index 850af30..78501e5 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends-Indep: libconfig-inifiles-perl, perl-modules Homepage: http://ps-watcher.sourceforge.net/ Vcs-Browser: https://trac.cyconet.org/debian/browser/debian/ps-watcher Vcs-Svn: https://trac.cyconet.org/svn/debian/ps-watcher -Standards-Version: 3.7.3 +Standards-Version: 3.8.0 Package: ps-watcher Architecture: all From b1f9fae73c583a7797cd7612ef75953f368c1d14 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 20 Jul 2008 11:43:51 +0000 Subject: [PATCH 02/25] machine-interpretable copyright --- debian/changelog | 1 + debian/copyright | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/debian/changelog b/debian/changelog index b3cfdb0..de3a6c1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ ps-watcher (1.06-10) UNRELEASED; urgency=low * bump copyright of packaging to 2008 * Updating standards version to 3.8.0, no changes needed + * implement machine-interpretable copyright file -- Jan Wagner Thu, 03 Apr 2008 10:29:21 +0200 diff --git a/debian/copyright b/debian/copyright index 5699952..7566d3a 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,14 +1,19 @@ -This package was debianized by Jan Wagner on -Fri, 3 Nov 2006 14:39:48 +0100. - -It was downloaded from - -Upstream Author: Rocky Bernstein +Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196 +Packaged-By: Jan Wagner +Packaged-Date: Fri, 3 Nov 2006 14:39:48 +0100 +Upstream-Name: ps-watcher +Upstream-Maintainer: Rocky Bernstein +Upstream-Source: http://ps-watcher.sf.net +Files: * Copyright: (C) 2000-2006 Rocky Bernstein +License: GPL-2+ -License: +Files: debian/* +Copyright: (C) 2006, 2008 Jan Wagner +License: GPL-2+ +License: GPL-2+ 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; either version 2 of the License, or @@ -23,8 +28,5 @@ License: along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -On Debian systems, the complete text of the GNU General Public License -can be found in /usr/share/common-licenses/GPL file. - -The Debian packaging is (C) 2006-2008 Jan Wagner and -is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + On Debian systems, the complete text of the GNU General Public License can be + found in /usr/share/common-licenses/GPL-2 file. From 25b9c2fbb4bacd036f5668a756452839b14907ea Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 20 Jul 2008 11:44:04 +0000 Subject: [PATCH 03/25] release --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index de3a6c1..a17a644 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,10 @@ -ps-watcher (1.06-10) UNRELEASED; urgency=low +ps-watcher (1.06-10) unstable; urgency=low * bump copyright of packaging to 2008 * Updating standards version to 3.8.0, no changes needed * implement machine-interpretable copyright file - -- Jan Wagner Thu, 03 Apr 2008 10:29:21 +0200 + -- Jan Wagner Sun, 20 Jul 2008 13:43:55 +0200 ps-watcher (1.06-9) unstable; urgency=low From 95e5324a902968b480a84d1509defc44726b154d Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 20 Jul 2008 11:49:31 +0000 Subject: [PATCH 04/25] move autotools-dev to Build-Depends-Indep --- debian/changelog | 3 ++- debian/control | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index a17a644..13d287e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,9 @@ ps-watcher (1.06-10) unstable; urgency=low * bump copyright of packaging to 2008 * Updating standards version to 3.8.0, no changes needed * implement machine-interpretable copyright file + * move autotools-dev to Build-Depends-Indep - -- Jan Wagner Sun, 20 Jul 2008 13:43:55 +0200 + -- Jan Wagner Sun, 20 Jul 2008 13:43:55 +0200 ps-watcher (1.06-9) unstable; urgency=low diff --git a/debian/control b/debian/control index 78501e5..186a1bf 100644 --- a/debian/control +++ b/debian/control @@ -2,8 +2,8 @@ Source: ps-watcher Section: admin Priority: extra Maintainer: Jan Wagner -Build-Depends: debhelper (>= 5), autotools-dev, dpatch -Build-Depends-Indep: libconfig-inifiles-perl, perl-modules +Build-Depends: debhelper (>= 5), dpatch +Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl, perl-modules Homepage: http://ps-watcher.sourceforge.net/ Vcs-Browser: https://trac.cyconet.org/debian/browser/debian/ps-watcher Vcs-Svn: https://trac.cyconet.org/svn/debian/ps-watcher From c4b6006011b61bafb2c0d27dff11a0a0873fc483 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 20 Jul 2008 12:35:52 +0000 Subject: [PATCH 05/25] some more improvements --- debian/changelog | 4 ++++ debian/control | 2 +- debian/rules | 3 ++- debian/source.lintian-overrides | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 debian/source.lintian-overrides diff --git a/debian/changelog b/debian/changelog index 13d287e..d65282f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,10 @@ ps-watcher (1.06-10) unstable; urgency=low * Updating standards version to 3.8.0, no changes needed * implement machine-interpretable copyright file * move autotools-dev to Build-Depends-Indep + * cleanup rules a bit + * create lintian override for "outdated-autotools-helper-file", which we + copy over from autotools-dev + * add ${misc:Depends} to Depends -- Jan Wagner Sun, 20 Jul 2008 13:43:55 +0200 diff --git a/debian/control b/debian/control index 186a1bf..2a45362 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Standards-Version: 3.8.0 Package: ps-watcher Architecture: all -Depends: ${perl:Depends}, libconfig-inifiles-perl +Depends: ${perl:Depends}, ${misc:Depends}, libconfig-inifiles-perl Recommends: libsys-syslog-perl Description: monitoring a system via ps-like commands This program runs the ps command periodically and triggers commands on matches. diff --git a/debian/rules b/debian/rules index 33df5d5..9fd48b9 100755 --- a/debian/rules +++ b/debian/rules @@ -30,6 +30,7 @@ clean: unpatch dh_testdir dh_testroot rm -f build-stamp + rm -f config.guess config.sub # Add here commands to clean up after the build process. [ ! -f Makefile ] || $(MAKE) clean @@ -62,7 +63,7 @@ binary-indep: build install dh_builddeb # Build architecture-dependent files here. -binary-arch: build install +binary-arch: binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install diff --git a/debian/source.lintian-overrides b/debian/source.lintian-overrides new file mode 100644 index 0000000..b912f83 --- /dev/null +++ b/debian/source.lintian-overrides @@ -0,0 +1,2 @@ +outdated-autotools-helper-file config.guess 2002-07-23 +outdated-autotools-helper-file config.sub 2001-08-13 From 7364475f62981f79c00abe5ccccbb2c5ace17120 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 20 Jul 2008 13:47:05 +0000 Subject: [PATCH 06/25] new version --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index d65282f..5cdcecc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ps-watcher (1.06-11) UNRELEASED; urgency=low + + * NOT RELEASED YET + + -- Jan Wagner Sun, 20 Jul 2008 15:46:37 +0200 + ps-watcher (1.06-10) unstable; urgency=low * bump copyright of packaging to 2008 From 9aca40eb19f485b54683ee8703d9393b27b7e194 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 1 Oct 2008 09:08:17 +0000 Subject: [PATCH 07/25] removed use of pidof from init-script --- debian/changelog | 8 +++++--- debian/init.d | 1 - 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5cdcecc..a02312d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,10 @@ -ps-watcher (1.06-11) UNRELEASED; urgency=low +ps-watcher (1.06-11) unstable; urgency=low - * NOT RELEASED YET + * removed use of pidof from restart|force-reload init-script target, + since daemon has pidfile support and it never worked anyways + (Closes: #500741) - -- Jan Wagner Sun, 20 Jul 2008 15:46:37 +0200 + -- Jan Wagner Wed, 01 Oct 2008 11:05:25 +0200 ps-watcher (1.06-10) unstable; urgency=low diff --git a/debian/init.d b/debian/init.d index dfadeb5..047debf 100644 --- a/debian/init.d +++ b/debian/init.d @@ -74,7 +74,6 @@ case "$1" in sleep 1 start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ --exec $DAEMON -- -c $CONFIG --daemon $DAEMON_OPTS - /bin/pidof $DAEMON > /var/run/$NAME.pid echo "$NAME." ;; *) From a8cf5121a67c915cc23627dc80e6f8b1de7ae7a7 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 19 Feb 2009 16:25:10 +0000 Subject: [PATCH 08/25] new release --- debian/changelog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/debian/changelog b/debian/changelog index a02312d..fbe802b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +ps-watcher (1.07-1) unstable; urgency=low + + * new upstream release + - improve logfile handling + - new sample config file using perl-action + - minor typo fixes + + -- Jan Wagner Thu, 19 Feb 2009 17:24:47 +0100 + ps-watcher (1.06-11) unstable; urgency=low * removed use of pidof from restart|force-reload init-script target, From 4b9e10612f41a0ce6ab9ab770ca0045c94ddb862 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 19 Feb 2009 16:31:51 +0000 Subject: [PATCH 09/25] released --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index fbe802b..1d89b7c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ps-watcher (1.07-2) UNRELEASED; urgency=low + + * NOT RELEASED YET + + -- Jan Wagner Thu, 19 Feb 2009 17:31:31 +0100 + ps-watcher (1.07-1) unstable; urgency=low * new upstream release From dd87cc4560f4f7817743fccff9b0a974c292f841 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 16 Mar 2009 09:17:56 +0000 Subject: [PATCH 10/25] new upstream release --- debian/changelog | 7 +- debian/control | 2 +- debian/patches/00list | 1 - debian/patches/01_add_pidfile_support.dpatch | 108 ------------------- debian/rules | 6 +- 5 files changed, 8 insertions(+), 116 deletions(-) delete mode 100644 debian/patches/00list delete mode 100644 debian/patches/01_add_pidfile_support.dpatch diff --git a/debian/changelog b/debian/changelog index 1d89b7c..7ebf6aa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,9 @@ -ps-watcher (1.07-2) UNRELEASED; urgency=low +ps-watcher (1.08-1) UNRELEASED; urgency=low - * NOT RELEASED YET + * new upstream release + - pidfile support + - darwin support + * remove dpatch infrastructure -- Jan Wagner Thu, 19 Feb 2009 17:31:31 +0100 diff --git a/debian/control b/debian/control index 2a45362..a4efd6d 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: ps-watcher Section: admin Priority: extra Maintainer: Jan Wagner -Build-Depends: debhelper (>= 5), dpatch +Build-Depends: debhelper (>= 5) Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl, perl-modules Homepage: http://ps-watcher.sourceforge.net/ Vcs-Browser: https://trac.cyconet.org/debian/browser/debian/ps-watcher diff --git a/debian/patches/00list b/debian/patches/00list deleted file mode 100644 index 4b77285..0000000 --- a/debian/patches/00list +++ /dev/null @@ -1 +0,0 @@ -01_add_pidfile_support.dpatch diff --git a/debian/patches/01_add_pidfile_support.dpatch b/debian/patches/01_add_pidfile_support.dpatch deleted file mode 100644 index 7167245..0000000 --- a/debian/patches/01_add_pidfile_support.dpatch +++ /dev/null @@ -1,108 +0,0 @@ -#!/bin/sh /usr/share/dpatch/dpatch-run -## 01_add_pidfile_support.dpatch by Jan Wagner -## with hints by Sebastian Harl and -## Alexander Wirt -## -## DP: add pidfile support to ps-watcher - - ---- ps-watcher-1.06/ps-watcher.in.in 2007-07-04 21:34:23.000000000 +0200 -+++ ps-watcher-1.06/ps-watcher.in.in 2008-04-02 18:16:45.000000000 +0200 -@@ -23,8 +23,11 @@ - - use vars qw($program $ps_cmd $ps_cmdfull $ps_fullcmd_fmt @ps_vars $ps_dvars - $0 $logopened $ps_args_fmt $args -- $count $pid $command $ps_arg_opts $DEVNULL %opts -+ $count $pid $command $ps_arg_opts $DEVNULL %opts $PIDFILE - ); -+ -+$PIDFILE = "/var/run/ps-watcher.pid"; -+ - use strict; - BEGIN { require 5.00503 } - -@@ -130,6 +133,7 @@ - sub read_config($); - sub check_config_file($); - sub run_trigger($$$); -+sub check_pid(); - - init(); - process_options(); -@@ -147,7 +151,12 @@ - } - - if ($opts{daemon}) { -- daemonize(); -+ if (! check_pid()) { -+ exit 1; -+ } -+ if (! daemonize()) { -+ exit 1; -+ } - } - - install_handlers(); -@@ -584,14 +593,62 @@ - exit 10; - } - -+sub check_pid() { -+ if (-f $PIDFILE) { -+ if (open(PID,$PIDFILE)) { -+ my $pid = ; -+ if (!close(PID)) { -+ logger("Unable to close file handle PID for file '$PIDFILE': $!"); -+ return; -+ } -+ if (-f "/proc/$pid/stat") { -+ if (open(FH,"/proc/$pid/stat")) { -+ my $line = ; -+ if (!close(FH)) { -+ logger("Unable to close file handle FH for file '/proc/$pid/stat': $!"); -+ return; -+ } -+ if ($line =~ /\d+[^(]*\((.*)\)\s*/) { -+ my $process = $1; -+ if ($process =~ /^$program$/) { -+ logger("$program already running at PID $pid; exiting."); -+ exit(0); -+ } -+ } -+ } else { -+ logger("Unable to open file handle FH for file '/proc/$pid/stat': $!"); -+ return; -+ } -+ } else { -+ logger("Removing stale PID file."); -+ unlink($PIDFILE); -+ } -+ }else{ -+ logger("Unable to open file handle PID for file '$PIDFILE': $!"); -+ return; -+ } -+ } -+ return 1; -+} - - sub daemonize() { - chdir '/' or die "Can't chdir to /: $!"; - defined(my $pid = fork) or die "Can't fork: $!"; - exit 0 if $pid; -+ if (open(FH,">$PIDFILE")) { -+ print FH $$; -+ if (!close(FH)) { -+ logger("Unable to close file handle FH for file '$PIDFILE': $!"); -+ return; -+ } -+ } else { -+ logger("Unable to open file handle FH for file '$PIDFILE': $!"); -+ return; -+ } - use POSIX qw(setsid); - setsid() or die "Can't start a new session: $!"; - umask 0; -+ return 1; - } - - # Time configuration file was last read. diff --git a/debian/rules b/debian/rules index 9fd48b9..0ddd3d5 100755 --- a/debian/rules +++ b/debian/rules @@ -4,9 +4,7 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -include /usr/share/dpatch/dpatch.make - -config.status: patch-stamp configure +config.status: configure dh_testdir ifneq "$(wildcard /usr/share/misc/config.sub)" "" cp -f /usr/share/misc/config.sub config.sub @@ -26,7 +24,7 @@ build-stamp: config.status touch $@ -clean: unpatch +clean: dh_testdir dh_testroot rm -f build-stamp From 817c8355980843c1f0e7561f1dd8840f97c0ed81 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 24 Jul 2009 17:21:00 +0000 Subject: [PATCH 11/25] move start and stop positions --- debian/NEWS | 10 ++++++++++ debian/changelog | 6 ++++-- debian/postinst | 21 +++++++++++++++++++++ debian/rules | 2 +- 4 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 debian/NEWS create mode 100644 debian/postinst diff --git a/debian/NEWS b/debian/NEWS new file mode 100644 index 0000000..65a664b --- /dev/null +++ b/debian/NEWS @@ -0,0 +1,10 @@ +ps-watcher (1.08-1) unstable; urgency=low + + * moved startup to the end of the boot process and terminating to the + beginning of the shutdown process + + If you modified the order of ps-watcher runlevel scripts for your own, this + adjustment will not happen automatically and you have to handle it for + yourself. + + -- Jan Wagner Fri, 24 Jul 2009 19:16:09 +0200 diff --git a/debian/changelog b/debian/changelog index 7ebf6aa..d326cd5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,13 @@ -ps-watcher (1.08-1) UNRELEASED; urgency=low +ps-watcher (1.08-1) unstable; urgency=low * new upstream release - pidfile support - darwin support * remove dpatch infrastructure + * moved initscritps to S99 and K01, thanks Tim Miller Dyck (Closes: #508189) + * created NEWS.Debian - -- Jan Wagner Thu, 19 Feb 2009 17:31:31 +0100 + -- Jan Wagner Fri, 24 Jul 2009 19:12:00 +0200 ps-watcher (1.07-1) unstable; urgency=low diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..21a0a63 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +if [ "$1" != "configure" ]; then + exit 0 +fi + +if [ "$2" ] && dpkg --compare-versions "$2" lt "1.08-1"; then + if [ -e /etc/rc2.d/S40ps-watcher ] && \ + [ -e /etc/rc3.d/S40ps-watcher ] && \ + [ -e /etc/rc4.d/S40ps-watcher ] && \ + [ -e /etc/rc5.d/S40ps-watcher ] && \ + [ -e /etc/rc0.d/K40ps-watcher ] && \ + [ -e /etc/rc1.d/K40ps-watcher ] && \ + [ -e /etc/rc6.d/K40ps-watcher ]; then + update-rc.d -f ps-watcher remove >/dev/null + fi +fi + +#DEBHELPER# diff --git a/debian/rules b/debian/rules index 0ddd3d5..0f2b7a9 100755 --- a/debian/rules +++ b/debian/rules @@ -50,7 +50,7 @@ binary-indep: build install dh_installchangelogs ChangeLog dh_installdocs dh_installexamples samples/* - dh_installinit -- defaults 40 + dh_installinit -- defaults 99 01 dh_link dh_compress dh_fixperms From 6754ae782883292e3f85dd6d1ced0203186f02e6 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 24 Jul 2009 17:23:05 +0000 Subject: [PATCH 12/25] bump policy --- debian/changelog | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index d326cd5..b893c69 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ ps-watcher (1.08-1) unstable; urgency=low * remove dpatch infrastructure * moved initscritps to S99 and K01, thanks Tim Miller Dyck (Closes: #508189) * created NEWS.Debian + * bump standards version to 3.8.2 (no changes needed) -- Jan Wagner Fri, 24 Jul 2009 19:12:00 +0200 diff --git a/debian/control b/debian/control index a4efd6d..d0bfce4 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl, perl-modules Homepage: http://ps-watcher.sourceforge.net/ Vcs-Browser: https://trac.cyconet.org/debian/browser/debian/ps-watcher Vcs-Svn: https://trac.cyconet.org/svn/debian/ps-watcher -Standards-Version: 3.8.0 +Standards-Version: 3.8.2 Package: ps-watcher Architecture: all From 5992785d5140b8de2c0bd0ff432eea0d5a0468fe Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 24 Jul 2009 17:29:11 +0000 Subject: [PATCH 13/25] remove path from pidof --- debian/changelog | 1 + debian/preinst | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index b893c69..ec62cc0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ ps-watcher (1.08-1) unstable; urgency=low * moved initscritps to S99 and K01, thanks Tim Miller Dyck (Closes: #508189) * created NEWS.Debian * bump standards version to 3.8.2 (no changes needed) + * calling pidof in preinst without absolut path -- Jan Wagner Fri, 24 Jul 2009 19:12:00 +0200 diff --git a/debian/preinst b/debian/preinst index 36daa0b..0bb90a1 100755 --- a/debian/preinst +++ b/debian/preinst @@ -3,6 +3,6 @@ set -e # generate correct pid file, for versions where was non or incorrect if [ "$1" = "upgrade" ] && [ "$2" ] && dpkg --compare-versions "$2" <= "1.06-6"; then - /bin/pidof ps-watcher > /var/run/ps-watcher.pid + pidof ps-watcher > /var/run/ps-watcher.pid fi #DEBHELPER# From 8bd82d31a9836e2eaa32dc73db7ac1fcb1f8e9ea Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 24 Jul 2009 18:00:08 +0000 Subject: [PATCH 14/25] be smarter --- debian/postinst | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/debian/postinst b/debian/postinst index 21a0a63..e44e87a 100644 --- a/debian/postinst +++ b/debian/postinst @@ -2,11 +2,7 @@ set -e -if [ "$1" != "configure" ]; then - exit 0 -fi - -if [ "$2" ] && dpkg --compare-versions "$2" lt "1.08-1"; then +if [ "$1" = "configure" ] && [ "$2" ] && dpkg --compare-versions "$2" lt "1.08-1"; then if [ -e /etc/rc2.d/S40ps-watcher ] && \ [ -e /etc/rc3.d/S40ps-watcher ] && \ [ -e /etc/rc4.d/S40ps-watcher ] && \ From f0401d2e3544e79534d71a5098a14f2ad10721b9 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 24 Jul 2009 18:00:29 +0000 Subject: [PATCH 15/25] make lintian happy --- debian/changelog | 3 ++- debian/source.lintian-overrides | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index ec62cc0..3852368 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,7 +7,8 @@ ps-watcher (1.08-1) unstable; urgency=low * moved initscritps to S99 and K01, thanks Tim Miller Dyck (Closes: #508189) * created NEWS.Debian * bump standards version to 3.8.2 (no changes needed) - * calling pidof in preinst without absolut path + * calling pidof in preinst without absolute path + * adjust lintian overrides for config* files -- Jan Wagner Fri, 24 Jul 2009 19:12:00 +0200 diff --git a/debian/source.lintian-overrides b/debian/source.lintian-overrides index b912f83..01dd852 100644 --- a/debian/source.lintian-overrides +++ b/debian/source.lintian-overrides @@ -1,2 +1,3 @@ -outdated-autotools-helper-file config.guess 2002-07-23 -outdated-autotools-helper-file config.sub 2001-08-13 +# we copy the files over from autotools-dev +ps-watcher source: ancient-autotools-helper-file config.sub 2001-08-13 +ps-watcher source: ancient-autotools-helper-file config.guess 2002-07-23 From e88343e79b75523e837dbd2c144102469212e7ea Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sat, 25 Jul 2009 23:41:11 +0000 Subject: [PATCH 16/25] fixup copyright --- debian/changelog | 6 ++++++ debian/copyright | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3852368..9f33562 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ps-watcher (1.08-2) UNRELEASED; urgency=low + + * add "Copyright" to all copyrights in debian/copyright + + -- Jan Wagner Fri, 24 Jul 2009 20:15:50 +0200 + ps-watcher (1.08-1) unstable; urgency=low * new upstream release diff --git a/debian/copyright b/debian/copyright index 7566d3a..cf5da2f 100644 --- a/debian/copyright +++ b/debian/copyright @@ -6,11 +6,11 @@ Upstream-Maintainer: Rocky Bernstein Upstream-Source: http://ps-watcher.sf.net Files: * -Copyright: (C) 2000-2006 Rocky Bernstein +Copyright: Copyright (C) 2000-2006 Rocky Bernstein License: GPL-2+ Files: debian/* -Copyright: (C) 2006, 2008 Jan Wagner +Copyright: Copyright (C) 2006, 2008 Jan Wagner License: GPL-2+ License: GPL-2+ From 1247f08ec9de8391d8b88d8f2969d542d5114bc1 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Tue, 23 Feb 2010 15:46:31 +0000 Subject: [PATCH 17/25] * Bump Standards-Version to 3.8.4, no changes needed * Migrate Vcs-Fields over to scm.uncompleted.org * Add 1.0 to debian/source/format --- debian/changelog | 5 ++++- debian/control | 6 +++--- debian/source/format | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 debian/source/format diff --git a/debian/changelog b/debian/changelog index 9f33562..ba5766f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,9 @@ ps-watcher (1.08-2) UNRELEASED; urgency=low - * add "Copyright" to all copyrights in debian/copyright + * Add "Copyright" to all copyrights in debian/copyright + * Bump Standards-Version to 3.8.4, no changes needed + * Migrate Vcs-Fields over to scm.uncompleted.org + * Add 1.0 to debian/source/format -- Jan Wagner Fri, 24 Jul 2009 20:15:50 +0200 diff --git a/debian/control b/debian/control index d0bfce4..69d8f48 100644 --- a/debian/control +++ b/debian/control @@ -5,9 +5,9 @@ Maintainer: Jan Wagner Build-Depends: debhelper (>= 5) Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl, perl-modules Homepage: http://ps-watcher.sourceforge.net/ -Vcs-Browser: https://trac.cyconet.org/debian/browser/debian/ps-watcher -Vcs-Svn: https://trac.cyconet.org/svn/debian/ps-watcher -Standards-Version: 3.8.2 +Vcs-Browser: https://scm.uncompleted.org/projects/debian/repository/show/ps-watcher +Vcs-Svn: https://scm.uncompleted.org/svn/debian/ps-watcher +Standards-Version: 3.8.4 Package: ps-watcher Architecture: all diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..d3827e7 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +1.0 From 13e3215b4ca806f5b8692b61843789925e8f11c9 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 10 Mar 2010 08:16:46 +0000 Subject: [PATCH 18/25] Add trailing trunk/ at Vcs-Svn-field --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 69d8f48..65c2821 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 5) Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl, perl-modules Homepage: http://ps-watcher.sourceforge.net/ Vcs-Browser: https://scm.uncompleted.org/projects/debian/repository/show/ps-watcher -Vcs-Svn: https://scm.uncompleted.org/svn/debian/ps-watcher +Vcs-Svn: https://scm.uncompleted.org/svn/debian/ps-watcher/trunk Standards-Version: 3.8.4 Package: ps-watcher From 16f0e23a66d1d6d47470bcc13f8e092e0353435a Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 10 Mar 2010 11:42:07 +0000 Subject: [PATCH 19/25] fixing #523405 --- debian/README.Debian | 2 +- debian/changelog | 1 + debian/init.d | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/README.Debian b/debian/README.Debian index a0dfc7b..9ee3fa9 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -4,7 +4,7 @@ ps-watcher for Debian 1. PROVIDE A CONFIGFILE ----------------------- -Please provide a config file, usualy /etc/ps-watcher.conf. Examples are +Please provide a config file, usually /etc/ps-watcher.conf. Examples are located in /usr/share/doc/ps-watcher/examples/. 2. AUTOMATIC STARTUP diff --git a/debian/changelog b/debian/changelog index ba5766f..52e4dd0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ ps-watcher (1.08-2) UNRELEASED; urgency=low * Bump Standards-Version to 3.8.4, no changes needed * Migrate Vcs-Fields over to scm.uncompleted.org * Add 1.0 to debian/source/format + * refer README.Debian* in initscript (Closes: #523405) -- Jan Wagner Fri, 24 Jul 2009 20:15:50 +0200 diff --git a/debian/init.d b/debian/init.d index 047debf..093cc77 100644 --- a/debian/init.d +++ b/debian/init.d @@ -37,7 +37,7 @@ not_configured () { then echo "" echo "Please pease provide a configfile!" - echo "See /usr/share/doc/ps-watcher/README.Debian.gz." + echo "See /usr/share/doc/ps-watcher/README.Debian*." fi echo "#################" exit 0 From 57b0f54dab993d0fd0f30823e09f2d6d7d32f914 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 10 Mar 2010 11:44:58 +0000 Subject: [PATCH 20/25] prepare release --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 52e4dd0..9896478 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ps-watcher (1.08-2) UNRELEASED; urgency=low +ps-watcher (1.08-2) unstable; urgency=low * Add "Copyright" to all copyrights in debian/copyright * Bump Standards-Version to 3.8.4, no changes needed @@ -6,7 +6,7 @@ ps-watcher (1.08-2) UNRELEASED; urgency=low * Add 1.0 to debian/source/format * refer README.Debian* in initscript (Closes: #523405) - -- Jan Wagner Fri, 24 Jul 2009 20:15:50 +0200 + -- Jan Wagner Wed, 10 Mar 2010 12:44:44 +0100 ps-watcher (1.08-1) unstable; urgency=low From a87a8a38fa2e965aec70d9f8af47a0065f3ece82 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 10 Mar 2010 11:47:38 +0000 Subject: [PATCH 21/25] new changelog --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 9896478..73b8c7c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ps-watcher (1.08-3) UNRELEASED; urgency=low + + * NOT RELEASED YET + + -- Jan Wagner Wed, 10 Mar 2010 12:47:29 +0100 + ps-watcher (1.08-2) unstable; urgency=low * Add "Copyright" to all copyrights in debian/copyright From 8aa3e507ac56493e52c7aacc12b045798495e88c Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 28 Mar 2012 06:14:25 +0000 Subject: [PATCH 22/25] switch to packaging 3.0 and bump standards --- debian/changelog | 4 +++- debian/control | 4 ++-- debian/source/format | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 73b8c7c..6917ae6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ ps-watcher (1.08-3) UNRELEASED; urgency=low - * NOT RELEASED YET + * Bump Standards-Version to 3.9.3, no changes needed + * Raise debhelper version to 9 + * Switch packaging format to "3.0 (quilt)" -- Jan Wagner Wed, 10 Mar 2010 12:47:29 +0100 diff --git a/debian/control b/debian/control index 65c2821..085756f 100644 --- a/debian/control +++ b/debian/control @@ -2,12 +2,12 @@ Source: ps-watcher Section: admin Priority: extra Maintainer: Jan Wagner -Build-Depends: debhelper (>= 5) +Build-Depends: debhelper (>= 9) Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl, perl-modules Homepage: http://ps-watcher.sourceforge.net/ Vcs-Browser: https://scm.uncompleted.org/projects/debian/repository/show/ps-watcher Vcs-Svn: https://scm.uncompleted.org/svn/debian/ps-watcher/trunk -Standards-Version: 3.8.4 +Standards-Version: 3.9.3 Package: ps-watcher Architecture: all diff --git a/debian/source/format b/debian/source/format index d3827e7..163aaf8 100644 --- a/debian/source/format +++ b/debian/source/format @@ -1 +1 @@ -1.0 +3.0 (quilt) From 5cf9d869f415cb33edeaca5d1a3909a696c6f0be Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 28 Mar 2012 06:22:26 +0000 Subject: [PATCH 23/25] add build-arch and build-indep targets --- debian/changelog | 1 + debian/rules | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 6917ae6..628a056 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ ps-watcher (1.08-3) UNRELEASED; urgency=low * Bump Standards-Version to 3.9.3, no changes needed * Raise debhelper version to 9 * Switch packaging format to "3.0 (quilt)" + * Add build-arch and build-indep targets to debian/rules -- Jan Wagner Wed, 10 Mar 2010 12:47:29 +0100 diff --git a/debian/rules b/debian/rules index 0f2b7a9..9122b01 100755 --- a/debian/rules +++ b/debian/rules @@ -15,7 +15,10 @@ endif # Add here commands to configure the package. ./configure --prefix=/usr --mandir=\$${prefix}/share/man -build: build-stamp +build: build-arch build-indep +build-arch: build-stamp +build-indep: build-stamp + build-stamp: config.status dh_testdir From f24ac4d4f7fecc7c7b1533ff674e7dd2de6c4642 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 28 Mar 2012 06:50:43 +0000 Subject: [PATCH 24/25] set ps_prog to "/bin/ps" --- debian/changelog | 2 ++ debian/patches/ps_binary | 15 +++++++++++++++ debian/patches/series | 1 + 3 files changed, 18 insertions(+) create mode 100644 debian/patches/ps_binary create mode 100644 debian/patches/series diff --git a/debian/changelog b/debian/changelog index 628a056..5a260e3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ ps-watcher (1.08-3) UNRELEASED; urgency=low * Raise debhelper version to 9 * Switch packaging format to "3.0 (quilt)" * Add build-arch and build-indep targets to debian/rules + * Add patches/ps_binary to set ps_prog to "/bin/ps", thank to Gregory Davis + (Closes: 645791) -- Jan Wagner Wed, 10 Mar 2010 12:47:29 +0100 diff --git a/debian/patches/ps_binary b/debian/patches/ps_binary new file mode 100644 index 0000000..a5d1b8e --- /dev/null +++ b/debian/patches/ps_binary @@ -0,0 +1,15 @@ +From: Jan Wagner +Subject: Patch path of ps, so we don't need to have the binary installed on compiletime +Index: ps-watcher-1.08/ps-watcher.in.in +=================================================================== +--- ps-watcher-1.08.orig/ps-watcher.in.in 2012-03-28 08:37:45.000000000 +0200 ++++ ps-watcher-1.08/ps-watcher.in.in 2012-03-28 08:38:13.000000000 +0200 +@@ -339,7 +339,7 @@ + $opts{syslog} = 1; # Log errors to syslog + $opts{logfile} = $DEVNULL; + $opts{daemon} = 1; # Run as daemon; +- $opts{ps_prog} = '@PS@'; # Where is ps? ++ $opts{ps_prog} = '/bin/ps'; # Where is ps? + $opts{ps_pid_opts} = '@PS_PID_OPTS@'; # How do I get pids and commands? + + $ps_arg_opts = '@PS_ARGS@'; # How do I get full process command? diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..0d7b32d --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +ps_binary From df6e1606b3ab9120c852020e6190c0237ad6a904 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 28 Mar 2012 06:55:05 +0000 Subject: [PATCH 25/25] prepare release --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5a260e3..a39ca91 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ps-watcher (1.08-3) UNRELEASED; urgency=low +ps-watcher (1.08-3) unstable; urgency=low * Bump Standards-Version to 3.9.3, no changes needed * Raise debhelper version to 9 @@ -7,7 +7,7 @@ ps-watcher (1.08-3) UNRELEASED; urgency=low * Add patches/ps_binary to set ps_prog to "/bin/ps", thank to Gregory Davis (Closes: 645791) - -- Jan Wagner Wed, 10 Mar 2010 12:47:29 +0100 + -- Jan Wagner Wed, 28 Mar 2012 08:53:20 +0200 ps-watcher (1.08-2) unstable; urgency=low