[Reproducible-builds] please don't build on archs that packages don't declare support for

Steven Chamberlain steven at pyro.eu.org
Tue Feb 9 13:44:08 UTC 2016


Hi,

Holger Levsen wrote:
> khmer is being tried to build (on armhf), because it has "all" in the 
> Architecture field

I think bin/reproducible_build.sh makes a too broad assumption, that
packages producing arch:all parts can build on "any" arch.

dpkg-buildpackage proceeds, I think, because there are arch-indep parts
that 'might' be able to build.  But since this package has no separate
binary-indep target, debian/rules tries to build the arch-dep parts
and fails there.

It seems there was an attempt to fix this before:
https://anonscm.debian.org/cgit/qa/jenkins.debian.net.git/commit/bin/reproducible_build.sh?id=c1157ef4d
but reverted:
https://anonscm.debian.org/cgit/qa/jenkins.debian.net.git/commit/bin/reproducible_build.sh?id=cdbb4ce
https://anonscm.debian.org/cgit/qa/jenkins.debian.net.git/commit/bin/reproducible_build.sh?id=89b4833f

I checked the archive of this mailing list but can't find the reason it
was reverted?

The code has been much refactored since then.  Does my patch below seem
a neat way to try to fix this again?  (Though I totally have not tested
it).

Where I set ARCHITECTURES="any", that will not be a regression over
current behaviour, but can be substituted for ARCHITECTURES="amd64" if
too many arch:all packages FTBFS on armhf.

From a759d049b1fd6deeb24985e57a3b6f4fa2e1f72b Mon Sep 17 00:00:00 2001
From: Steven Chamberlain <steven at pyro.eu.org>
Date: Tue, 9 Feb 2016 13:02:13 +0000
Subject: [PATCH] reproducible: don't always build arch:all on "any" arch

If a package builds arch-dep parts on a restricted set of arches,
don't assume the arch-indep parts can build on "any" arch.

If a package *only* lists Architecture: all, keep the current behaviour:
(linux-)amd64 will most likely work;  armhf is less likely but is nice
to try anyway.
---
 bin/reproducible_build.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 4d5dd4b..7b11cef 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -525,8 +525,14 @@ check_suitability() {
 	# check whether the package is not for us...
 	local SUITABLE=false
 	local ARCHITECTURES=$(grep "^Architecture: " ${SRCPACKAGE}_*.dsc| cut -d " " -f2- | sed -s "s# #\n#g" | sort -u)
+
+	# packages that are *only* arch:all can be tried on any arch
+	if [ "$ARCHITECTURES" = "all" ]; then
+		ARCHITECTURES="any"
+	fi
+
 	for arch in ${ARCHITECTURES} ; do
-		if [ "$arch" = "any" ] || [ "$arch" = "$ARCH" ] || [ "$arch" = "linux-any" ] || [ "$arch" = "linux-$ARCH" ] || [ "$arch" = "any-$ARCH" ] || [ "$arch" = "all" ] ; then
+		if [ "$arch" = "any" ] || [ "$arch" = "$ARCH" ] || [ "$arch" = "linux-any" ] || [ "$arch" = "linux-$ARCH" ] || [ "$arch" = "any-$ARCH" ] ; then
 			SUITABLE=true
 			break
 		fi

Regards,
-- 
Steven Chamberlain
steven at pyro.eu.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20160209/d73ace05/attachment.sig>


More information about the Reproducible-builds mailing list