Package: libnet-socks-perl Severity: wishlist Tags: patch Hi,
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 58d799e820f87f2d478484d88c02faee918d205c Mon Sep 17 00:00:00 2001 From: Jari Aalto <jari.aa...@cante.net> Date: Thu, 12 Apr 2012 12:56:16 +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/README.source | 4 -- debian/changelog | 9 +++++ debian/compat | 2 +- debian/control | 6 +-- debian/patches/00list | 3 -- .../{10_example.dpatch => 10-example.patch} | 30 ++------------ debian/patches/20-SOCKS-pm.patch | 20 ++++++++++ debian/patches/20_SOCKS-pm.dpatch | 42 -------------------- .../patches/{30_dns_patch.dpatch => 30-dns.patch} | 9 +---- debian/patches/series | 3 ++ debian/rules | 13 +++--- debian/source/format | 1 + 12 files changed, 51 insertions(+), 91 deletions(-) delete mode 100644 debian/README.source delete mode 100644 debian/patches/00list rename debian/patches/{10_example.dpatch => 10-example.patch} (79%) create mode 100644 debian/patches/20-SOCKS-pm.patch delete mode 100644 debian/patches/20_SOCKS-pm.dpatch rename debian/patches/{30_dns_patch.dpatch => 30-dns.patch} (82%) create mode 100644 debian/patches/series create mode 100644 debian/source/format diff --git a/debian/README.source b/debian/README.source deleted file mode 100644 index 096d38b..0000000 --- a/debian/README.source +++ /dev/null @@ -1,4 +0,0 @@ -Please refer to /usr/share/doc/dpatch/README.source.gz for more -information about dpatch. - - -- Sebastien Delafond <s...@debian.org> Mon, 28 Sep 2009 18:12:26 +0200 diff --git a/debian/changelog b/debian/changelog index d90b9a9..8356016 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +libnet-socks-perl (0.03-12.1) 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. + + -- Jari Aalto <jari.aa...@cante.net> Thu, 12 Apr 2012 12:54:44 +0300 + libnet-socks-perl (0.03-12) unstable; urgency=low * Lintian cleanups. 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 f23f5d5..b1d84fc 100644 --- a/debian/control +++ b/debian/control @@ -2,14 +2,14 @@ Source: libnet-socks-perl Section: perl Priority: optional Build-Depends-Indep: perl, libnet-dns-perl -Build-Depends: debhelper (>= 6), dpatch +Build-Depends: debhelper (>= 9) Maintainer: Sebastien Delafond <s...@debian.org> -Standards-Version: 3.8.3 +Standards-Version: 3.9.3 Homepage: http://search.cpan.org/~clintdw/ Package: libnet-socks-perl Architecture: all -Depends: ${perl:Depends}, libnet-dns-perl +Depends: ${misc:Depends}, ${perl:Depends}, libnet-dns-perl Enhances: elza (>= 1.4.3-6) Description: Perl module providing an API to communicate with SOCKS servers This is a SOCKS client module that can communicate with SOCKS v4 and diff --git a/debian/patches/00list b/debian/patches/00list deleted file mode 100644 index 040a616..0000000 --- a/debian/patches/00list +++ /dev/null @@ -1,3 +0,0 @@ -10_example.dpatch -20_SOCKS-pm.dpatch -30_dns_patch.dpatch \ No newline at end of file diff --git a/debian/patches/10_example.dpatch b/debian/patches/10-example.patch similarity index 79% rename from debian/patches/10_example.dpatch rename to debian/patches/10-example.patch index 66719d0..c37b57d 100644 --- a/debian/patches/10_example.dpatch +++ b/debian/patches/10-example.patch @@ -1,29 +1,7 @@ -#!/bin/sh -e -## 10example.dpatch by Sebastien Delafond <sdelaf...@gmx.net> -## -## All lines beginning with `## DP:' are a description of the patch. -## -## DP: Change shebang to /usr/bin/perl -## DP: Ask for command-line parameters -## DP: Remove the "accept"part of the listening test - -if [ $# -lt 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi - -[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts -patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}" - -case "$1" in - -patch) patch $patch_opts -p1 < $0;; - -unpatch) patch $patch_opts -p1 -R < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1;; -esac - -exit 0 +From: Sebastien Delafond <sdelaf...@gmx.net> +Subject: Change shebang to /usr/bin/perl + Ask for command-line parameters + Remove the "accept"part of the listening test --- SOCKS-0.03.orig/example 1998-05-19 04:49:07.000000000 -0700 +++ SOCKS-0.03/example 2004-09-20 11:29:27.000000000 -0700 diff --git a/debian/patches/20-SOCKS-pm.patch b/debian/patches/20-SOCKS-pm.patch new file mode 100644 index 0000000..cbc3fc4 --- /dev/null +++ b/debian/patches/20-SOCKS-pm.patch @@ -0,0 +1,20 @@ +From: Sebastien Delafond <sdelaf...@gmx.net> +Subject: Added a test to get rid of a warning message + +--- SOCKS-0.03.orig/lib/Net/SOCKS.pm 2004-10-24 16:14:19.000000000 -0700 ++++ SOCKS-0.03/lib/Net/SOCKS.pm 1998-05-19 05:22:47.000000000 -0700 +@@ -231,7 +231,13 @@ + ${*self}{listen_addr} = ${*self}{socks_addr}; + } + +- my $dotted_dec = inet_ntoa( pack ("N", ${*self}{listen_addr} ) ); ++ my $dotted_dec; ++ if (${*self}{listen_addr} =~ m/(\d+\.){3}\d+/) { ++ $dotted_dec = ${*self}{listen_addr}; ++ } else { ++ $dotted_dec = inet_ntoa( pack ("N", ${*self}{listen_addr} ) ); ++ } ++ + if (${*self}{status_num}==SOCKS_OKAY) { + return (${*self}{listen_addr}, $dotted_dec, ${*self}{listen_port}) + } diff --git a/debian/patches/20_SOCKS-pm.dpatch b/debian/patches/20_SOCKS-pm.dpatch deleted file mode 100644 index f1394b0..0000000 --- a/debian/patches/20_SOCKS-pm.dpatch +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh -e -## 20_SOCKS-pm.dpatch by Sebastien Delafond <sdelaf...@gmx.net> -## -## All lines beginning with `## DP:' are a description of the patch. -## -## DP: Added a test to get rid of a warning message - -if [ $# -lt 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi - -[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts -patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}" - -case "$1" in - -patch) patch $patch_opts -p1 < $0;; - -unpatch) patch $patch_opts -p1 -R < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1;; -esac - -exit 0 - ---- SOCKS-0.03.orig/lib/Net/SOCKS.pm 2004-10-24 16:14:19.000000000 -0700 -+++ SOCKS-0.03/lib/Net/SOCKS.pm 1998-05-19 05:22:47.000000000 -0700 -@@ -231,7 +231,13 @@ - ${*self}{listen_addr} = ${*self}{socks_addr}; - } - -- my $dotted_dec = inet_ntoa( pack ("N", ${*self}{listen_addr} ) ); -+ my $dotted_dec; -+ if (${*self}{listen_addr} =~ m/(\d+\.){3}\d+/) { -+ $dotted_dec = ${*self}{listen_addr}; -+ } else { -+ $dotted_dec = inet_ntoa( pack ("N", ${*self}{listen_addr} ) ); -+ } -+ - if (${*self}{status_num}==SOCKS_OKAY) { - return (${*self}{listen_addr}, $dotted_dec, ${*self}{listen_port}) - } diff --git a/debian/patches/30_dns_patch.dpatch b/debian/patches/30-dns.patch similarity index 82% rename from debian/patches/30_dns_patch.dpatch rename to debian/patches/30-dns.patch index c335838..01e7b3c 100644 --- a/debian/patches/30_dns_patch.dpatch +++ b/debian/patches/30-dns.patch @@ -1,11 +1,6 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 30_dns_patch.dpatch by Sebastien Delafond <s...@debian.org> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Resolve name to numeric IP. -## DP: Patch by Christian Schwarz <ch...@schwarz-online.com> +From: Christian Schwarz <ch...@schwarz-online.com> +Subject: Resolve name to numeric IP -@DPATCH@ diff -urNad libnet-socks-perl-0.03~/lib/Net/SOCKS.pm libnet-socks-perl-0.03/lib/Net/SOCKS.pm --- libnet-socks-perl-0.03~/lib/Net/SOCKS.pm 2006-11-28 00:48:44.000000000 -0800 +++ libnet-socks-perl-0.03/lib/Net/SOCKS.pm 2006-11-28 00:48:51.000000000 -0800 diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..a5a5444 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,3 @@ +10-example.patch +20-SOCKS-pm.patch +30-dns.patch diff --git a/debian/rules b/debian/rules index 4708ff6..4fc7927 100755 --- a/debian/rules +++ b/debian/rules @@ -11,7 +11,6 @@ # always return the default without waiting for user input. export PERL_MM_USE_DEFAULT=1 -include /usr/share/dpatch/dpatch.make PACKAGE=$(shell dh_listpackages) @@ -21,8 +20,12 @@ endif TMP =$(CURDIR)/debian/$(PACKAGE) + +build-arch: build +build-indep: build + build: build-stamp -build-stamp: patch +build-stamp: dh_testdir # Add commands to compile the package here @@ -31,7 +34,7 @@ build-stamp: patch touch build-stamp -clean: unpatch +clean: dh_testdir dh_testroot @@ -44,7 +47,7 @@ install: install-stamp install-stamp: build-stamp dh_testdir dh_testroot - dh_clean -k + dh_prep $(MAKE) test $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr @@ -81,4 +84,4 @@ source diff: @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install patch unpatch +.PHONY: build clean binary-indep binary-arch binary install 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