Source: monotone Version: 1.1-9 Severity: serious Tags: patch Hi,
The monotone 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. In the given case, monotone has an empty "build"-target to work around rather old Debian practises. Any supported version of Debian no longer need these work arounds (as far as I remember), so I have included a patch to remove said work arounds. More details can be found in: * #886901 comment #35 * #887688 comment #37 * #880840 Apologies for the inconvenience. Thanks, ~Niels
>From 58a8dd850ff9c294517677ce07487cc3f878b39d Mon Sep 17 00:00:00 2001 From: Niels Thykier <ni...@thykier.net> Date: Sat, 27 Jan 2018 19:12:20 +0000 Subject: [PATCH] Remove dummy "build" target and now obsolete work arounds Today, Debian buildds support build-arch and build-indep targets. Remove the work arounds that assume that do not and also remove the "magic" that attempts to undo "fakeroot" now that the build always happens as a regular user. Signed-off-by: Niels Thykier <ni...@thykier.net> --- debian/nofakeroot | 33 -------------------------------- debian/rules | 56 +++---------------------------------------------------- 2 files changed, 3 insertions(+), 86 deletions(-) delete mode 100755 debian/nofakeroot diff --git a/debian/nofakeroot b/debian/nofakeroot deleted file mode 100755 index 18f0d02..0000000 --- a/debian/nofakeroot +++ /dev/null @@ -1,33 +0,0 @@ -#! /bin/sh - -# Usage: -# nofakeroot [command ...] -# -# Runs command after removing any trace of fakeroot from the environment it -# receives. - -my_PRELOAD= -for l in $LD_PRELOAD; do - if ! echo $l | grep "libfakeroot[-a-z]*\\.so" > /dev/null; then - if [ -n "$my_PRELOAD" ]; then - my_PRELOAD="$my_PRELOAD $l" - else - my_PRELOAD="$l" - fi - fi -done - -was_IFS="$IFS" IFS=: -my_LIBRARY_PATH= -for p in $LD_LIBRARY_PATH; do - if ! echo $p | grep "/libfakeroot\$" > /dev/null; then - if [ -n "$my_LIBRARY_PATH" ]; then - my_LIBRARY_PATH="${my_LIBRARY_PATH}:$p" - else - my_LIBRARY_PATH="$p" - fi - fi -done -IFS="$was_IFS" - -LD_PRELOAD="$my_PRELOAD" LD_LIBRARY_PATH="$my_LIBRARY_PATH" eval "$@" diff --git a/debian/rules b/debian/rules index f3cabd8..ab54843 100755 --- a/debian/rules +++ b/debian/rules @@ -4,47 +4,6 @@ # debian/rules for monotone, by Richard Levitte # based on the dh7 template provided by dh_make(1) -# put this up top so it's the default rule. -# -# Policy (version 3.9.1.0, 2010-07-26, section 4.9) says that when -# different binary packages are produced in different ways, it doesn't -# make sense to have a build target that builds it all. Quoted: -# -# or some packages, notably ones where the same source tree is -# compiled in different ways to produce two binary packages, the -# build target does not make much sense. For these packages it is -# good enough to provide two (or more) targets (build-a and build-b -# or whatever) for each of the ways of building the package, and a -# build target that does nothing. The binary target will have to -# build the package in each of the possible ways and make the binary -# package out of each. -# -# ... -# -# When a package has a configuration and build routine which takes a -# long time, or when the makefiles are poorly designed, or when -# build needs to run clean first, it is a good idea to touch build -# when the build process is complete. This will ensure that if -# debian/rules build is run again it will not rebuild the whole -# program. -# -# We definitely have this situation, as we have -indep packages and -# -arch packages, and we need to treat them separately, because the -# buildds will build with -B after having installed only the Build- -# Depends (for they are ignorant of B-D-I. All die, O the -# embarrassment) -# -# However, it also means that we're having configuring, building and -# testing done via fakeroot, which isn't a good idea. However, that's -# easy to deal with with a little hack (see the file 'nofakeroot' in -# this directory) and overrides for those cases. -# -# So, we disable the build target entirely and let the binary targets -# take care of building as well (which dh provides support for, so we -# really need nothing extra here). -build: - @echo 'The build target is disabled, please use the appropriate binary target.' - # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 @@ -63,9 +22,6 @@ export BUILD_DATE = $(shell LC_ALL=C \ %: dh $@ --with=bash_completion,autoreconf -override_dh_auto_configure: - debian/nofakeroot dh_auto_configure - override_dh_auto_clean: test ! -f Makefile || $(MAKE) -C $(CURDIR) clean rm -rf config.h config.guess stamp-h1 config.status Makefile @@ -75,10 +31,8 @@ override_dh_auto_clean: # relevant dh_auto_* calls behave differently for arch and indep # calls. override_dh_auto_build: - LANG=POSIX debian/nofakeroot \ - dh_auto_build -pmonotone-doc -- info pdf html - LANG=POSIX debian/nofakeroot \ - dh_auto_build --remaining-packages -- INFO_DEPS='' + LANG=POSIX dh_auto_build -pmonotone-doc -- info pdf html + LANG=POSIX dh_auto_build --remaining-packages -- INFO_DEPS='' # Thanks to buildd configuration decisions that no one will explain to # me in sufficient detail to detect reliably, we have to disable all @@ -91,12 +45,8 @@ export DISABLE_NETWORK_TESTS = 1 export MTN_STACKTRACE_ON_CRASH = 1 override_dh_auto_test: -# While dh_auto_test checks for 'nocheck', running it through -# nofakeroot seems to confuse it. So we do the check, here. -ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) - debian/nofakeroot dh_auto_test -pmonotone -- INFO_DEPS='' || \ + dh_auto_test -pmonotone -- INFO_DEPS='' || \ sh extra/building/dump-test-logs.sh -endif override_dh_auto_install: dh_auto_install -Nmonotone-doc -- INFO_DEPS='' -- 2.15.1