Source: kyua
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: cpu
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

When building for armhf and running an arm64 kernel, the configure
script uses "uname -m" to determine the architecture for KYUA_PLATFORM,
but this introduces variations depending on the kernel used to perform
the build:

  
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/armhf/diffoscope-results/kyua.html

  632 ··0x000837d0·61726d76·376c0000·556e7375·70706f72·armv7l..Unsuppor
  632 ··0x000837d0·61617263·68363400·556e7375·70706f72·aarch64.Unsuppo


While this is often worked around in chroots by running with a "linux32"
personality, using the running kernel is not the correct way to
determine the architecture.

The attached patch fixes this by passing KYUA_PLATFORM to configure from
debian/rules.


An alternate fix might be to determine the architecture from the
compiler or other userspace utility that is independent from the kernel,
which might be more appropriate to submit upstream.


Thanks for maintaining kyua!


live well,
  vagrant
From 7550204861005095126dd68b2c727702abced3a8 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Tue, 15 Dec 2020 01:23:52 +0000
Subject: [PATCH 1/2] debian/rules: Pass KYUA_PLATFORM to configure.

Ensure that the architecture being built for is the userspace
architecture and not the kernel architecture.

https://tests.reproducible-builds.org/debian/issues/unstable/captures_build_arch_issue.html
---
 debian/rules | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index d89b793..df806c9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,7 +6,8 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 	dh $@
 
 override_dh_auto_configure:
-	dh_auto_configure -- --disable-developer
+	dh_auto_configure -- --disable-developer \
+		KYUA_PLATFORM=$(DEB_HOST_GNU_CPU) \
 
 override_dh_auto_install:
 	dh_auto_install --destdir=debian/tmp
-- 
2.20.1

Attachment: signature.asc
Description: PGP signature

Reply via email to