Control: tags -1 + patch

On 2021-02-06 09:28 +0100, Sven Joachim wrote:

> Source: doas
> Version: 6.8.1-2
>
> After "debian/rules build clean" there is cruft left in the source
> directory:
>
> At first this looked like an oversight in the override_dh_auto_clean
> target, and I thought it would be easily fixable by invoking
> dh_auto_clean in the override.  Alas, this does not actually work: the
> upstream build system is broken and requires config.mk to be present
> even for the clean target, so running "make clean" from an unconfigured
> source tree fails. :-(

The attached patch works around that problem by only invoking
dh_auto_clean if config.mk is present.

> I suggest discussing this issue with upstream.

Still seems a good idea to me.

Cheers,
       Sven

From c5a78feb71c9a33f2e2edef62abb4de8cebf294f Mon Sep 17 00:00:00 2001
From: Sven Joachim <[email protected]>
Date: Sat, 6 Feb 2021 09:51:54 +0100
Subject: [PATCH] Fix clean target in debian/rules

Unfortunately, the upstream GNUmakefile requires config.mk to be
present even for the clean target, leading dh_auto_clean to fail if it
does not exist.

Work around the problem by only running dh_auto_clean if config.mk is
present.

Closes: #982065
---
 debian/rules | 1 +
 1 file changed, 1 insertion(+)

diff --git a/debian/rules b/debian/rules
index b512448..d67bdea 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,6 +6,7 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 	dh $@

 override_dh_auto_clean:
+	[ ! -f ./config.mk ] || dh_auto_clean
 	rm -rf ./config.h ./config.mk

 override_dh_auto_configure:
--
2.30.0

Reply via email to