Package: ipcalc
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 1c4fadaed529b78cf2d6748893cc678073a50595 Mon Sep 17 00:00:00 2001
From: Jari Aalto <[email protected]>
Date: Sat, 28 Apr 2012 18:40:22 +0300
Subject: [PATCH] format-3.0
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Signed-off-by: Jari Aalto <[email protected]>
---
debian/changelog | 10 +++
debian/compat | 2 +-
debian/control | 6 +-
debian/patches/00list | 3 -
debian/patches/{01_paths.dpatch => 01-paths.patch} | 26 ++-----
debian/patches/{02_emacs.dpatch => 02-emacs.patch} | 23 +-----
debian/patches/{03_width.dpatch => 03-width.patch} | 73 +++++++++-----------
debian/patches/series | 3 +
debian/rules | 13 ++--
debian/source/format | 1 +
10 files changed, 63 insertions(+), 97 deletions(-)
delete mode 100644 debian/patches/00list
rename debian/patches/{01_paths.dpatch => 01-paths.patch} (80%)
rename debian/patches/{02_emacs.dpatch => 02-emacs.patch} (68%)
rename debian/patches/{03_width.dpatch => 03-width.patch} (83%)
create mode 100644 debian/patches/series
create mode 100644 debian/source/format
diff --git a/debian/changelog b/debian/changelog
index a775a77..d5467ec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+ipcalc (0.41-2.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.
+ * Patch 03: update with "quilt refresh" to make it apply cleanly.
+
+ -- Jari Aalto <[email protected]> Sat, 28 Apr 2012 18:26:11 +0300
+
ipcalc (0.41-2.1) unstable; urgency=low
* Non-maintainer upload.
diff --git a/debian/compat b/debian/compat
index 7ed6ff8..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-5
+9
diff --git a/debian/control b/debian/control
index 83d57c0..712bd19 100644
--- a/debian/control
+++ b/debian/control
@@ -3,13 +3,13 @@ Section: net
Priority: optional
Maintainer: Bartosz Fenski <[email protected]>
Uploaders: martin f. krafft <[email protected]>
-Build-Depends: debhelper (>> 5.0.0), dpatch
-Standards-Version: 3.8.2
+Build-Depends: debhelper (>= 9)
+Standards-Version: 3.9.3
Homepage: http://jodies.de/ipcalc
Package: ipcalc
Architecture: all
-Depends: ${perl:Depends}
+Depends: ${misc:Depends}, ${perl:Depends}
Description: parameter calculator for IPv4 addresses
ipcalc takes an IP address and netmask and calculates the resulting
broadcast, network, Cisco wildcard mask, and host range. By giving a
diff --git a/debian/patches/00list b/debian/patches/00list
deleted file mode 100644
index 4e76d85..0000000
--- a/debian/patches/00list
+++ /dev/null
@@ -1,3 +0,0 @@
-01_paths
-02_emacs
-03_width
diff --git a/debian/patches/01_paths.dpatch b/debian/patches/01-paths.patch
similarity index 80%
rename from debian/patches/01_paths.dpatch
rename to debian/patches/01-paths.patch
index b6255b2..d44cd02 100644
--- a/debian/patches/01_paths.dpatch
+++ b/debian/patches/01-paths.patch
@@ -1,26 +1,8 @@
-#! /bin/sh -e
-## ipcalc.dpatch
-## Bartosz Fenski <[email protected]>
+From: Bartosz Fenski <[email protected]>
+Subject: Correct absolute path, use plain background etc.
-patch_opts="${patch_opts:--f --no-backup-if-mismatch ${2:+-d $2}}"
-
-if [ $# -ne 1 ]; then
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-fi
-case "$1" in
- -patch) patch $patch_opts -p0 < $0;;
- -unpatch) patch $patch_opts -R -p0 < $0;;
- *)
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
---- ipcalc.cgi.orig 2006-09-22 12:33:45.000000000 +0200
-+++ ipcalc.cgi 2006-09-22 12:35:58.000000000 +0200
+--- a/ipcalc.cgi.orig 2006-09-22 12:33:45.000000000 +0200
++++ b/ipcalc.cgi 2006-09-22 12:35:58.000000000 +0200
@@ -40,7 +40,7 @@
# 0.26 27.07.2006 Replaced REQUEST_URI with SCRIPT_URL to prevent cross-site-scripting attacks
diff --git a/debian/patches/02_emacs.dpatch b/debian/patches/02-emacs.patch
similarity index 68%
rename from debian/patches/02_emacs.dpatch
rename to debian/patches/02-emacs.patch
index 0fbd5ce..5af2141 100644
--- a/debian/patches/02_emacs.dpatch
+++ b/debian/patches/02-emacs.patch
@@ -1,25 +1,6 @@
-#! /bin/sh -e
-## ipcalc.dpatch
-## Bartosz Fenski <[email protected]>
+From: Bartosz Fenski <[email protected]>
+Subject: If running inside Emacs M-x shell, turn of colors by default
-patch_opts="${patch_opts:--f --no-backup-if-mismatch ${2:+-d $2}}"
-
-if [ $# -ne 1 ]; then
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-fi
-case "$1" in
- -patch) patch $patch_opts -p1 < $0;;
- -unpatch) patch $patch_opts -R -p1 < $0;;
- *)
- echo >&2 "`basename $0`: script expects -patch|-unpatch as
-argument"
- exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
--- a/ipcalc
+++ b/ipcalc
@@ -708,7 +708,13 @@ sub getopts
diff --git a/debian/patches/03_width.dpatch b/debian/patches/03-width.patch
similarity index 83%
rename from debian/patches/03_width.dpatch
rename to debian/patches/03-width.patch
index cdcf3bc..cc6fa01 100644
--- a/debian/patches/03_width.dpatch
+++ b/debian/patches/03-width.patch
@@ -1,28 +1,13 @@
-#! /bin/sh -e
-## ipcalc.dpatch
-## Bartosz Fenski <[email protected]>
+From: Bartosz Fenski <[email protected]>
+Subject: Adjust usage() text
-patch_opts="${patch_opts:--f --no-backup-if-mismatch ${2:+-d $2}}"
+---
+ ipcalc | 62 +++++++++++++++++++++++++++++++-------------------------------
+ 1 file changed, 31 insertions(+), 31 deletions(-)
-if [ $# -ne 1 ]; then
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-fi
-case "$1" in
- -patch) patch $patch_opts -p1 < $0;;
- -unpatch) patch $patch_opts -R -p1 < $0;;
- *)
- echo >&2 "`basename $0`: script expects -patch|-unpatch as
-argument"
- exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
--- a/ipcalc
+++ b/ipcalc
-@@ -1041,10 +1041,11 @@ sub usage {
+@@ -1050,10 +1050,11 @@
print << "EOF";
Usage: ipcalc [options] <ADDRESS>[[/]<NETMASK>] [NETMASK]
@@ -37,8 +22,8 @@ exit 0
+easy-to-understand binary values.
-n --nocolor Don't display ANSI color codes.
- -b --nobinary Suppress the bitwise output.
-@@ -1055,7 +1056,7 @@ and presents the results as easy-to-understand binary values.
+ -c --color Display ANSI color codes (default).
+@@ -1065,7 +1066,7 @@
Split into networks of size n1, n2, n3.
-r --range Deaggregate address range.
--help Longer help text.
@@ -47,50 +32,55 @@ exit 0
Examples:
ipcalc 192.168.0.1/24
-@@ -1078,37 +1078,36 @@ EOF
+@@ -1088,37 +1089,36 @@
sub help {
print << "EOF";
-
-IP Calculator $version
-
+-
-Enter your netmask(s) in CIDR notation (/25) or dotted decimals (255.255.255.0).
-Inverse netmask are recognized. If you mmit the netmask, ipcalc uses the default
-netmask for the class of your network.
-+IP Calculator $version
-
+-
-Look at the space between the bits of the addresses: The bits before it are
-the network part of the address, the bits after it are the host part. You can
-see two simple facts: In a network address all host bits are zero, in a
-broadcast address they are all set.
+
+-The class of your network is determined by its first bits.
+-
+-If your network is a private internet according to RFC 1918 this is remarked.
+-When displaying subnets the new bits in the network part of the netmask are
+-marked in a different color.
+-
+-The wildcard is the inverse netmask as used for access control lists in Cisco
+-routers. You can also enter netmasks in wildcard notation.
+-
+-Do you want to split your network into subnets? Enter the address and netmask
+-of your original network and play with the second netmask until the result
+-matches your needs.
++IP Calculator $version
+
+Enter your netmask(s) in CIDR notation (/25) or dotted decimals
+(255.255.255.0). Inverse netmask are recognized. If you mmit the
+netmask, ipcalc uses the default netmask for the class of your
+network.
-
--The class of your network is determined by its first bits.
++
+Look at the space between the bits of the addresses: The bits before
+it are the network part of the address, the bits after it are the host
+part. You can see two simple facts: In a network address all host bits
+are zero, in a broadcast address they are all set.
-
--If your network is a private internet according to RFC 1918 this is remarked.
--When displaying subnets the new bits in the network part of the netmask are
--marked in a different color.
++
+The class of your network is determined by its first bits.
-
--The wildcard is the inverse netmask as used for access control lists in Cisco
--routers. You can also enter netmasks in wildcard notation.
++
+If your network is a private internet according to RFC 1918 this is
+remarked. When displaying subnets the new bits in the network part of
+the netmask are marked in a different color.
-
--Do you want to split your network into subnets? Enter the address and netmask
--of your original network and play with the second netmask until the result
--matches your needs.
++
+The wildcard is the inverse netmask as used for access control lists
+in Cisco routers. You can also enter netmasks in wildcard notation.
-
++
+Do you want to split your network into subnets? Enter the address and
+netmask of your original network and play with the second netmask
+until the result matches your needs.
@@ -105,4 +95,3 @@ exit 0
Bartosz Fenski
Denis A. Hainsworth
-
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..69b7922
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+01-paths.patch
+02-emacs.patch
+03-width.patch
diff --git a/debian/rules b/debian/rules
index 8faf7da..c760bb6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,19 +5,22 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-include /usr/share/dpatch/dpatch.make
configure: configure-stamp
configure-stamp:
dh_testdir
touch configure-stamp
-build: patch-stamp configure-stamp build-stamp
+
+build-arch: build
+build-indep: build
+
+build: configure-stamp build-stamp
build-stamp:
dh_testdir
touch build-stamp
-clean: unpatch
+clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
@@ -26,7 +29,7 @@ clean: unpatch
install: build
dh_testdir
dh_testroot
- dh_clean -k
+ dh_prep
dh_installdirs
dh_install
mv debian/ipcalc/usr/lib/cgi-bin/ipcalc.cgi \
@@ -51,4 +54,4 @@ binary-indep: build install
binary-arch: build install
binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure patch unpatch
+.PHONY: build clean binary-indep binary-arch binary install configure
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.10