Package: hibernate Severity: wishlist Tags: patch Hi Martin,
The dpatch patch management system has been deprecated for some time. The Lintian currently flags use of dpatch packages as an error. The new 3.0 packaging format is an improved version which, among other things, contains patch management built-in. For more information, see: http://wiki.debian.org/Projects/DebSrc3.0 I had some free time; see attached patch to migrate to new package format. Note that all files in debian/patches/* are canocalized to *.patch. Let me know if there is anything that needs adjusting or if it is ok to upload this version in a NMU in case you are working on other issues needing attention. Thanks, Jari
>From a912d3fc17cce88adb7df5cce15220020ca0d58a Mon Sep 17 00:00:00 2001 From: Jari Aalto <jari.aa...@cante.net> Date: Sat, 21 Apr 2012 22:35:38 +0300 Subject: [PATCH] format-3.0 Organization: Private Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Signed-off-by: Jari Aalto <jari.aa...@cante.net> --- debian/changelog | 13 ++++++++ debian/compat | 2 +- debian/control | 6 ++-- debian/copyright | 2 +- debian/hibernate.postinst | 5 ++- debian/hibernate.prerm | 6 ++-- debian/patches/00list | 5 --- ...{10-grub-backup.dpatch => 10-grub-backup.patch} | 27 ++++++++------- debian/patches/20-suspend2-note.disabled | 8 ++--- debian/patches/50-init.d-lsb-depends.dpatch | 19 ----------- debian/patches/50-init.d-lsb-depends.patch | 22 ++++++++++++ debian/patches/70-laptop-mode-rename.dpatch | 19 ----------- debian/patches/70-laptop-mode-rename.patch | 18 ++++++++++ debian/patches/80-log-permissions.dpatch | 35 -------------------- debian/patches/80-log-permissions.patch | 34 +++++++++++++++++++ ...down-auto.dpatch => 99-store-ifdown-auto.patch} | 8 ++--- debian/patches/Makefile | 4 --- debian/patches/series | 5 +++ debian/rules | 23 ++++--------- debian/source/format | 1 + 20 files changed, 129 insertions(+), 133 deletions(-) mode change 100644 => 100755 debian/hibernate.postinst mode change 100644 => 100755 debian/hibernate.prerm delete mode 100644 debian/patches/00list rename debian/patches/{10-grub-backup.dpatch => 10-grub-backup.patch} (76%) delete mode 100644 debian/patches/50-init.d-lsb-depends.dpatch create mode 100644 debian/patches/50-init.d-lsb-depends.patch delete mode 100644 debian/patches/70-laptop-mode-rename.dpatch create mode 100644 debian/patches/70-laptop-mode-rename.patch delete mode 100644 debian/patches/80-log-permissions.dpatch create mode 100644 debian/patches/80-log-permissions.patch rename debian/patches/{99-store-ifdown-auto.dpatch => 99-store-ifdown-auto.patch} (93%) delete mode 100644 debian/patches/Makefile create mode 100644 debian/patches/series create mode 100644 debian/source/format diff --git a/debian/changelog b/debian/changelog index f138efe..0a45237 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +hibernate (1.99-1.2) unstable; urgency=low + + * Non-maintainer upload. + * Remove deprecated dpatch and upgrade to packaging format "3.0 quilt". + * Update to Standards-Version to 3.9.3 and debhelper to 9. + * Add build-arch and build-indep targets; use dh_prep in rules file. + * Note: Update some patches with "quilt refresh" to make them apply cleanly. + * Fix copyright-refers-to-symlink-license (Lintian). + * Fix maintainer-script-without-set-e (Lintian). + * Fix init.d-script-missing-dependency-on-local_fs (Lintian) with patch 50. + + -- Jari Aalto <jari.aa...@cante.net> Sat, 21 Apr 2012 22:34:33 +0300 + hibernate (1.99-1.1) unstable; urgency=low * Non-maintainer upload. diff --git a/debian/compat b/debian/compat index 1e8b314..ec63514 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -6 +9 diff --git a/debian/control b/debian/control index 6fde730..07b834b 100644 --- a/debian/control +++ b/debian/control @@ -3,14 +3,14 @@ Section: utils Priority: extra Maintainer: martin f. krafft <madd...@debian.org> Uploaders: Cameron Patrick <came...@patrick.wattle.id.au> -Build-Depends: debhelper (>> 6), dpatch -Standards-Version: 3.7.3 +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.3 Vcs-Git: git://git.debian.org/collab-maint/hibernate.git Vcs-Browser: http://git.debian.org/?p=collab-maint/hibernate.git Package: hibernate Architecture: all -Depends: console-tools | kbd +Depends: ${misc:Depends}, console-tools | kbd Recommends: dash, hdparm, vbetool, uswsusp Suggests: 915resolution, xscreensaver | kscreensaver | gnome-screensaver | xlock | vlock Conflicts: suspend-script (<= 0.94-1) diff --git a/debian/copyright b/debian/copyright index a4a030b..468bff9 100644 --- a/debian/copyright +++ b/debian/copyright @@ -17,4 +17,4 @@ the Free Software Foundation; either version 2 of the License, or (at your option) any later version. On Debian GNU/Linux systems, the complete text of the GNU General -Public License can be found in '/usr/share/common-licenses/GPL'. +Public License can be found in '/usr/share/common-licenses/GPL-2'. diff --git a/debian/hibernate.postinst b/debian/hibernate.postinst old mode 100644 new mode 100755 index 6bd99e1..02b2c01 --- a/debian/hibernate.postinst +++ b/debian/hibernate.postinst @@ -1,4 +1,4 @@ -#!/bin/sh -eu +#!/bin/sh # # Post-install script for Debian hibernate package # @@ -11,6 +11,9 @@ # $Id$ # +set -e +set -u + if [ "${1:-}" = configure ]; then mkdir --parent /usr/local/share/hibernate/scriptlets.d || : fi diff --git a/debian/hibernate.prerm b/debian/hibernate.prerm old mode 100644 new mode 100755 index 11097cb..515cbf3 --- a/debian/hibernate.prerm +++ b/debian/hibernate.prerm @@ -1,4 +1,4 @@ -#! /bin/sh -eu +#! /bin/sh # # Pre-removal hook script for hibernate # @@ -9,7 +9,9 @@ # Released under the terms of the Artistic Licence 2.0 # # $Id$ -# + +set -e +set -u if [ "${1:-}" = remove ]; then rmdir --ignore-fail-on-non-empty --parents \ diff --git a/debian/patches/00list b/debian/patches/00list deleted file mode 100644 index 4a9fdc7..0000000 --- a/debian/patches/00list +++ /dev/null @@ -1,5 +0,0 @@ -10-grub-backup -50-init.d-lsb-depends -70-laptop-mode-rename -80-log-permissions -99-store-ifdown-auto diff --git a/debian/patches/10-grub-backup.dpatch b/debian/patches/10-grub-backup.patch similarity index 76% rename from debian/patches/10-grub-backup.dpatch rename to debian/patches/10-grub-backup.patch index d2e4754..6181812 100644 --- a/debian/patches/10-grub-backup.dpatch +++ b/debian/patches/10-grub-backup.patch @@ -1,13 +1,13 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 10-grub-backup.dpatch by martin f. krafft <madd...@debian.org> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Moves the grub menu.lst backup file to /var/backups . +From: martin f. krafft <madd...@debian.org> +Subject: Moves the grub menu.lst backup file to /var/backups . -@DPATCH@ -diff -urNad upstream.trunk~/common.conf upstream.trunk/common.conf ---- upstream.trunk~/common.conf 2006-09-13 15:17:41.000000000 +0200 -+++ upstream.trunk/common.conf 2006-09-13 15:17:52.000000000 +0200 +--- + common.conf | 2 +- + scriptlets.d/grub | 10 ++++++---- + 2 files changed, 7 insertions(+), 5 deletions(-) + +--- a/common.conf ++++ b/common.conf @@ -54,7 +54,7 @@ # ChangeGrubMenu yes # GrubMenuFile /boot/grub/menu.lst @@ -15,11 +15,10 @@ diff -urNad upstream.trunk~/common.conf upstream.trunk/common.conf -# BackupGrubMenuFile /boot/grub/menu.lst.hibernate.bak +# BackupGrubMenuFile /var/backups/grub.conf.hibernate - ### hardware_tweaks - # IbmAcpi yes -diff -urNad upstream.trunk~/scriptlets.d/grub upstream.trunk/scriptlets.d/grub ---- upstream.trunk~/scriptlets.d/grub 2006-09-13 15:16:38.000000000 +0200 -+++ upstream.trunk/scriptlets.d/grub 2006-09-13 15:17:44.000000000 +0200 + # see http://bugs.debian.org/317479 + # RemountXFSBoot yes +--- a/scriptlets.d/grub ++++ b/scriptlets.d/grub @@ -1,18 +1,20 @@ # -*- sh -*- # vim:ft=sh:ts=8:sw=4:noet diff --git a/debian/patches/20-suspend2-note.disabled b/debian/patches/20-suspend2-note.disabled index b14be12..a161af3 100644 --- a/debian/patches/20-suspend2-note.disabled +++ b/debian/patches/20-suspend2-note.disabled @@ -1,10 +1,6 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 20-suspend2-note.dpatch by martin f. krafft <madd...@debian.org> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Add note for kernel-patch-suspend2. +From: martin f. krafft <madd...@debian.org> +Subject: Add note for kernel-patch-suspend2. -@DPATCH@ diff -urNad hibernate-1.91~/suspend2.conf hibernate-1.91/suspend2.conf --- hibernate-1.91~/suspend2.conf 2006-06-05 13:20:32.000000000 +0200 +++ hibernate-1.91/suspend2.conf 2006-06-05 13:41:10.440408368 +0200 diff --git a/debian/patches/50-init.d-lsb-depends.dpatch b/debian/patches/50-init.d-lsb-depends.dpatch deleted file mode 100644 index 0d84c6c..0000000 --- a/debian/patches/50-init.d-lsb-depends.dpatch +++ /dev/null @@ -1,19 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 50-init.d-lsb-depends.dpatch by martin f. krafft <madd...@debian.org> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -diff -urNad hibernate-1.99~/init.d/hibernate-cleanup.sh hibernate-1.99/init.d/hibernate-cleanup.sh ---- hibernate-1.99~/init.d/hibernate-cleanup.sh 2008-05-01 13:59:59.000000000 +0200 -+++ hibernate-1.99/init.d/hibernate-cleanup.sh 2009-12-20 15:00:29.090706611 +0100 -@@ -20,6 +20,8 @@ - # Default-Stop: - # Required-Start: - # Required-Stop: -+# Should-Start: udev devfsd raid2 mdadm-raid lvm evms cryptdisks -+# X-Start-Before: mountall - # Short-Description: invalidates stale swsusp and Software Suspend 2 image - # Description: This script invalidates any stale swsusp and Software Suspend 2 images. It - # searches all swap partitions on your machine, as well as diff --git a/debian/patches/50-init.d-lsb-depends.patch b/debian/patches/50-init.d-lsb-depends.patch new file mode 100644 index 0000000..daa90aa --- /dev/null +++ b/debian/patches/50-init.d-lsb-depends.patch @@ -0,0 +1,22 @@ +From: martin f. krafft <madd...@debian.org> +Subject: No description. + +--- + init.d/hibernate-cleanup.sh | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/init.d/hibernate-cleanup.sh ++++ b/init.d/hibernate-cleanup.sh +@@ -18,8 +18,10 @@ + # Provides: hibernate-cleanup + # Default-Start: S + # Default-Stop: +-# Required-Start: +-# Required-Stop: ++# Required-Start: $local_fs ++# Required-Stop: $local_fs ++# Should-Start: udev devfsd raid2 mdadm-raid lvm evms cryptdisks ++# X-Start-Before: mountall + # Short-Description: invalidates stale swsusp and Software Suspend 2 image + # Description: This script invalidates any stale swsusp and Software Suspend 2 images. It + # searches all swap partitions on your machine, as well as diff --git a/debian/patches/70-laptop-mode-rename.dpatch b/debian/patches/70-laptop-mode-rename.dpatch deleted file mode 100644 index 3b10e03..0000000 --- a/debian/patches/70-laptop-mode-rename.dpatch +++ /dev/null @@ -1,19 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 99-debian-misc.dpatch by martin f. krafft <madd...@debian.org> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Change laptop-mode init.d script name. - -@DPATCH@ -diff -urNad hibernate-1.91~/common.conf hibernate-1.91/common.conf ---- hibernate-1.91~/common.conf 2006-06-05 14:13:19.328072919 +0200 -+++ hibernate-1.91/common.conf 2006-06-05 14:13:26.517094913 +0200 -@@ -99,7 +99,7 @@ - # IncompatiblePrograms xmms - - ### services --# RestartServices laptop_mode anacron -+# RestartServices laptop-mode anacron - # StopServices alsasound - # StartServices aumix - diff --git a/debian/patches/70-laptop-mode-rename.patch b/debian/patches/70-laptop-mode-rename.patch new file mode 100644 index 0000000..809124f --- /dev/null +++ b/debian/patches/70-laptop-mode-rename.patch @@ -0,0 +1,18 @@ +From: martin f. krafft <madd...@debian.org> +Subject: Change laptop-mode init.d script name. + +--- + common.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/common.conf ++++ b/common.conf +@@ -115,7 +115,7 @@ + # IncompatiblePrograms xmms + + ### services +-# RestartServices laptop_mode anacron ++# RestartServices laptop-mode anacron + # StopServices alsasound + # StartServices aumix + diff --git a/debian/patches/80-log-permissions.dpatch b/debian/patches/80-log-permissions.dpatch deleted file mode 100644 index 63c3272..0000000 --- a/debian/patches/80-log-permissions.dpatch +++ /dev/null @@ -1,35 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 80-log-permissions.dpatch by martin f. krafft <madd...@debian.org> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -diff -urNad upstream.trunk~/hibernate.sh upstream.trunk/hibernate.sh ---- upstream.trunk~/hibernate.sh 2006-08-07 23:56:03.000000000 +0100 -+++ upstream.trunk/hibernate.sh 2006-08-08 11:45:52.198837598 +0100 -@@ -826,7 +826,14 @@ - ParseOptions "$@" - - # Set a logfile if we need one. --[ -n "$LOGFILE" ] && LOGPIPE="tee -a -i $LOGFILE" -+if [ -n "$LOGFILE" ]; then -+ if [ ! -f "$LOGFILE" ]; then -+ touch "$LOGFILE" -+ chmod 644 "$LOGFILE" -+ chown root:adm "$LOGFILE" -+ fi -+ LOGPIPE="tee -a -i $LOGFILE" -+fi - - # Redirect everything to a given VT if we've been given one - if [ -n "$SWSUSPVT" ] && [ -c /dev/tty$SWSUSPVT ] ; then -diff -urNad upstream.trunk~/logrotate.d-hibernate-script upstream.trunk/logrotate.d-hibernate-script ---- upstream.trunk~/logrotate.d-hibernate-script 2006-08-07 23:56:03.000000000 +0100 -+++ upstream.trunk/logrotate.d-hibernate-script 2006-08-08 11:46:11.439702283 +0100 -@@ -3,4 +3,5 @@ - rotate 5 - size 100k - weekly -+ notifempty - } diff --git a/debian/patches/80-log-permissions.patch b/debian/patches/80-log-permissions.patch new file mode 100644 index 0000000..dab282e --- /dev/null +++ b/debian/patches/80-log-permissions.patch @@ -0,0 +1,34 @@ +From: martin f. krafft <madd...@debian.org> +Subject: No description. + +--- + hibernate.sh | 9 ++++++++- + logrotate.d-hibernate-script | 1 + + 2 files changed, 9 insertions(+), 1 deletion(-) + +--- a/hibernate.sh ++++ b/hibernate.sh +@@ -874,7 +874,14 @@ + ParseOptions "$@" + + # Set a logfile if we need one. +-[ -n "$LOGFILE" ] && LOGPIPE="tee -a -i $LOGFILE" ++if [ -n "$LOGFILE" ]; then ++ if [ ! -f "$LOGFILE" ]; then ++ touch "$LOGFILE" ++ chmod 644 "$LOGFILE" ++ chown root:adm "$LOGFILE" ++ fi ++ LOGPIPE="tee -a -i $LOGFILE" ++fi + + # Redirect everything to a given VT if we've been given one + if [ -n "$SWSUSPVT" ] && [ -c /dev/tty$SWSUSPVT ] ; then +--- a/logrotate.d-hibernate-script ++++ b/logrotate.d-hibernate-script +@@ -3,4 +3,5 @@ + rotate 5 + size 100k + weekly ++ notifempty + } diff --git a/debian/patches/99-store-ifdown-auto.dpatch b/debian/patches/99-store-ifdown-auto.patch similarity index 93% rename from debian/patches/99-store-ifdown-auto.dpatch rename to debian/patches/99-store-ifdown-auto.patch index 258be59..050b623 100644 --- a/debian/patches/99-store-ifdown-auto.dpatch +++ b/debian/patches/99-store-ifdown-auto.patch @@ -1,10 +1,6 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 99-store-ifdown-auto.dpatch by martin f. krafft <madd...@debian.org> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. +From: martin f. krafft <madd...@debian.org> +Subject: No description. -@DPATCH@ diff -urNad upstream.trunk~/scriptlets.d/network upstream.trunk/scriptlets.d/network --- upstream.trunk~/scriptlets.d/network 2007-07-09 17:34:28.000000000 +0200 +++ upstream.trunk/scriptlets.d/network 2007-07-09 17:46:09.000000000 +0200 diff --git a/debian/patches/Makefile b/debian/patches/Makefile deleted file mode 100644 index 4e8ee11..0000000 --- a/debian/patches/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -.PHONY: 00list -00list: - find . -maxdepth 1 -name Makefile -prune -o -name 00list -prune -o -type f -print \ - | sed -ne 's,\./\(.*\)\.dpatch,\1,p' | sort -n > $@ diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..98679a0 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,5 @@ +10-grub-backup.patch +50-init.d-lsb-depends.patch +70-laptop-mode-rename.patch +80-log-permissions.patch +99-store-ifdown-auto.patch diff --git a/debian/rules b/debian/rules index 93b657d..c4193c0 100755 --- a/debian/rules +++ b/debian/rules @@ -11,17 +11,6 @@ # $Id$ # -include /usr/share/dpatch/dpatch.make - -$(DPATCH_STAMPFN): debian/patches/00list -force-run: -.PHONY: force-run -debian/patches/00list: force-run - dh_testdir - make -sC debian/patches - -configure: debian/patches/00list - hibernate: hibernate.sh install -m755 $< $@ @@ -31,8 +20,11 @@ hibernate.8 hibernate.conf.5: debian/hibernate.init: init.d/hibernate-cleanup.sh ln $< $@ +build-arch: build +build-indep: build + build: build-stamp -build-stamp: configure patch hibernate hibernate.8 hibernate.conf.5 debian/hibernate.init +build-stamp: hibernate hibernate.8 hibernate.conf.5 debian/hibernate.init dh_testdir touch $@ .PHONY: build-stamp @@ -44,7 +36,7 @@ binary-arch: binary-indep: build dh_testroot dh_testdir - dh_clean -i -k + dh_prep dh_installdirs -i dh_install -i @@ -72,13 +64,10 @@ binary-indep: build dh_gencontrol -i dh_builddeb -i -clean: clean-patched unpatch - -clean-patched: +clean: dh_testdir dh_testroot dh_clean - $(MAKE) -C debian/patches rm -f hibernate hibernate.8 hibernate.conf.5 debian/hibernate.init rm -f configure-stamp build-stamp diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) -- 1.7.9.5