Package: debian-handbook
Version: 8.20170323
Severity: serious
Tags: patch

Hi,

The debian-handbook package FTBFS with debhelper/11.1 as it has an
empty build target.  This is caused by debhelper had a bug in its
handling of "explicitly defined rules targets" that has now been
fixed.

Previously, this happened to work because dpkg-buildpackage would
invoke "debian/rules build" (which would be a no-op) followed by
"fakeroot debian/rules binary".  During the binary target, dh's
suboptimal handling would run the build commands.


The solution is trivial but less pretty; explicitly define "build"
with the same content as the "%:" target (or rename the "build" folder
and drop the ".PHONY" target).  I have attached a patch for this.

(There is also a bonus patch for a missing "set -e")


More details can be found in:
 * #886901 comment #35
 * #887688 comment #37
 * #880840

Apologies for the inconvenience.

Thanks,
~Niels
>From 0b89dcf55f2b0233e7a42359aa4d67a3ad8994f3 Mon Sep 17 00:00:00 2001
From: Niels Thykier <ni...@thykier.net>
Date: Sat, 27 Jan 2018 11:12:17 +0000
Subject: [PATCH 1/2] Avoid empty build target

The dh sequencer as of debhelper/11.1 is stricter with this in other
to solve #880840 (where debhelper would fail to handle such targets
correctly).

Signed-off-by: Niels Thykier <ni...@thykier.net>
---
 debian/rules | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index cafab34..83adbd9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,7 +5,12 @@ VERSION=$(shell sed -n -e 
's|.*<productnumber>\(.*\)</productnumber>.*|\1|p' en-
 LANGS=$(shell echo [a-z][a-z]-[A-Z][A-Z])
 
 %:
-       dh $@ 
+       dh $@
+
+# The build target must not be empty.  Sadly because of how make
+# works, we have do duplicate the target in this case.
+build:
+       dh $@
 
 override_dh_auto_build:
        set -e; for lang in $(LANGS); do \
-- 
2.15.1

>From be43e989f5d2e20555b4bbbc96e4ba9c6e220d63 Mon Sep 17 00:00:00 2001
From: Niels Thykier <ni...@thykier.net>
Date: Sat, 27 Jan 2018 11:18:20 +0000
Subject: [PATCH 2/2] d/rules: Add missing "set -e" in a for-loop

Signed-off-by: Niels Thykier <ni...@thykier.net>
---
 debian/rules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index 83adbd9..37ee082 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,7 +19,7 @@ override_dh_auto_build:
 
 override_dh_auto_install:
        mkdir -p $(DOCDIR)
-       for lang in $(LANGS); do \
+       set -e; for lang in $(LANGS); do \
                mv publish/$$lang/Debian/$(VERSION)/html/debian-handbook 
$(DOCDIR)/$$lang; \
        done
        # Drop some useless files
-- 
2.15.1

Reply via email to