Package: wp2x
Severity: normal
Tags: patch

Hi,

The hardened build flags is one of the release goals of forthcoming
Debian releases. Number of security problems in the past have been
identified in packages that hadn't been fortified. For more
information, see:

    http://lists.debian.org/debian-devel-announce/2012/02/msg00016.html
    http://lists.debian.org/debian-dpkg/2011/09/msg00013.html
    http://wiki.debian.org/ReleaseGoals/SecurityHardeningBuildFlags

See attached patch to help to migrate to hardened flags. At the same
time I fixed some items reported by Lintian and upgraded the package to the
latest tools and standards version.

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 821f39a97db7431f9cb2f3497232c1a34192cc2a Mon Sep 17 00:00:00 2001
From: Jari Aalto <[email protected]>
Date: Sat, 14 Apr 2012 16:35:03 +0300
Subject: [PATCH] dh-harden
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Signed-off-by: Jari Aalto <[email protected]>
---
 debian/changelog                                   |   12 +++++++++
 debian/compat                                      |    2 +-
 debian/control                                     |    2 +-
 debian/menu                                        |    2 +-
 debian/patches/00list                              |    2 --
 debian/patches/{01_misc.dpatch => 01-misc.patch}   |    8 ++----
 .../{02_nostrip.dpatch => 02-nostrip.patch}        |   10 +++-----
 debian/patches/series                              |    2 ++
 debian/rules                                       |   26 +++++++++++---------
 debian/source/format                               |    2 +-
 10 files changed, 37 insertions(+), 31 deletions(-)
 delete mode 100644 debian/patches/00list
 rename debian/patches/{01_misc.dpatch => 01-misc.patch} (98%)
 rename debian/patches/{02_nostrip.dpatch => 02-nostrip.patch} (50%)
 create mode 100644 debian/patches/series

diff --git a/debian/changelog b/debian/changelog
index ab2c724..f400be7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+wp2x (2.5-mhi-10.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Update to debhelper to 9.
+  * Remove deprecated dpatch and upgrade to packaging format "3.0 quilt".
+    - Enable all hardening build flags using newest debhelper in rules file.
+    - Fix manpage-section-mismatch (Lintian) in rules file.
+  * Fix menu-item-uses-apps-section (Lintian).
+  * Fix menu-item-creates-new-section (Lintian).
+
+ -- Jari Aalto <[email protected]>  Sat, 14 Apr 2012 15:50:32 +0300
+
 wp2x (2.5-mhi-10) unstable; urgency=low
 
   * Replace rules file to use dh, and update debhelper compat level to 8.
diff --git a/debian/compat b/debian/compat
index 45a4fb7..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-8
+9
diff --git a/debian/control b/debian/control
index 3694d12..f387130 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: wp2x
 Section: text
 Priority: optional
 Maintainer: Petter Reinholdtsen <[email protected]>
-Build-Depends: debhelper (>> 8.0), dpatch
+Build-Depends: debhelper (>= 9)
 Standards-Version: 3.9.3
 
 Package: wp2x
diff --git a/debian/menu b/debian/menu
index 9e9d023..f5c3689 100644
--- a/debian/menu
+++ b/debian/menu
@@ -1,2 +1,2 @@
-?package(wp2x):needs="text" section="Apps/Tools" \
+?package(wp2x):needs="text" section="Applications/Office" \
  title="wp2x" command="/usr/bin/wp2x"
diff --git a/debian/patches/00list b/debian/patches/00list
deleted file mode 100644
index fbe3392..0000000
--- a/debian/patches/00list
+++ /dev/null
@@ -1,2 +0,0 @@
-01_misc
-02_nostrip
diff --git a/debian/patches/01_misc.dpatch b/debian/patches/01-misc.patch
similarity index 98%
rename from debian/patches/01_misc.dpatch
rename to debian/patches/01-misc.patch
index 096e77d..fd10273 100644
--- a/debian/patches/01_misc.dpatch
+++ b/debian/patches/01-misc.patch
@@ -1,10 +1,6 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 01_misc.dpatch by Unknown
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: All debian-specific patches included in wp2x 2.5-mhi-7.
+From: Unknown
+Subject: All debian-specific patches included in wp2x 2.5-mhi-7.
 
-@DPATCH@
 --- wp2x-2.5-mhi.orig/test/do-regress
 +++ wp2x-2.5-mhi/test/do-regress
 @@ -1,5 +1,7 @@
diff --git a/debian/patches/02_nostrip.dpatch b/debian/patches/02-nostrip.patch
similarity index 50%
rename from debian/patches/02_nostrip.dpatch
rename to debian/patches/02-nostrip.patch
index 142558c..02d97b6 100644
--- a/debian/patches/02_nostrip.dpatch
+++ b/debian/patches/02-nostrip.patch
@@ -1,11 +1,7 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 02_nostrip.dpatch by Petter Reinholdtsen
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: New patch to give dh_strip the chance to decide if the binary
-## DP: should be stripped or not.  BTS #438279.
+From: Petter Reinholdtsen
+Subject: New patch to give dh_strip the chance to decide if the binary
+ should be stripped or not. Closes bug #438279.
 
-@DPATCH@
 --- wp2x-2.5-mhi.orig/src/Makefile
 +++ wp2x-2.5-mhi/src/Makefile
 @@ -9,7 +9,7 @@
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..3e9742b
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+01-misc.patch
+02-nostrip.patch
diff --git a/debian/rules b/debian/rules
index 5f5c377..011d3e7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,17 +1,19 @@
 #!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
 
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+export DEB_BUILD_MAINT_OPTIONS	= hardening=+all
+export DEB_CFLAGS_MAINT_APPEND	= -Wall
+export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+
+override_dh_auto_build:
+	dh_auto_build -- CC="$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)"
+
+override_dh_installman:
+	dh_installman
+	# Correct section
+	mv debian/wp2x/usr/share/man/man1/wp2x.1l \
+	   debian/wp2x/usr/share/man/man1/wp2x.1 \
+
+override_dh_auto_test:
 
 %:
 	dh $@
-
-include /usr/share/dpatch/dpatch.make
-build: patch-stamp
-clean: unpatch
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)
-- 
1.7.9.5

Reply via email to