Debian Bug report logs -
#974863
vboot-utils: uses uname to determine architecture
Reported by: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Sun, 15 Nov 2020 18:57:01 UTC
Severity: normal
Tags: patch
Fixed in version vboot-utils/0~R88-13597.B-1
Done: Sophie Brun <sophie@offensive-security.com>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, reproducible-bugs@lists.alioth.debian.org, Sophie Brun <sophie@offensive-security.com>:
Bug#974863; Package src:vboot-utils.
(Sun, 15 Nov 2020 18:57:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Vagrant Cascadian <vagrant@reproducible-builds.org>:
New Bug report received and forwarded. Copy sent to reproducible-bugs@lists.alioth.debian.org, Sophie Brun <sophie@offensive-security.com>.
(Sun, 15 Nov 2020 18:57:03 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Source: vboot-utils
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: cpu
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org
When building for i386 and running an amd64 kernel, the Makefile uses
"uname -m" to determine the architecture, but this introduces variations
depending on the kernel used to perform the build:
44277 ./host/arch/x86/lib/crossystem_arch.c:161 44277 ./host/arch/x86_64/lib/crossystem_arch.c:161
See also:
https://tests.reproducible-builds.org/debian/rb-pkg/bullseye/i386/diffoscope-results/vboot-utils.html
https://tests.reproducible-builds.org/debian/issues/unstable/captures_build_arch_issue.html
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 the debian architecture via
debian/rules, and patching the Makefile to treat i386 as x86.
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 vboot-utils!
live well,
vagrant
[0001-debian-rules-Pass-the-Debian-architecture-as-_machna.patch (text/x-diff, inline)]
From 1ab1bb1754501761cbe89196f55a7c557ab6c937 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Sun, 15 Nov 2020 18:32:37 +0000
Subject: [PATCH] debian/rules: Pass the Debian architecture as _machname from
debian rules, and patch the Makefile to treat i386 as x86.
This is needed to ensure reproducible builds when the running kernel
and Debian architecture do not match, as uname may be misleading:
https://tests.reproducible-builds.org/debian/issues/unstable/captures_build_arch_issue.html
---
debian/patches/series | 1 +
debian/patches/treat-i386-as-x86 | 14 ++++++++++++++
debian/rules | 1 +
3 files changed, 16 insertions(+)
create mode 100644 debian/patches/treat-i386-as-x86
diff --git a/debian/patches/series b/debian/patches/series
index c24a3d3..a5035b4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@
dont-build-with-werror.patch
add-missing-flags-pie.patch
do-not-embed-user-and-time-in-version.patch
+treat-i386-as-x86
diff --git a/debian/patches/treat-i386-as-x86 b/debian/patches/treat-i386-as-x86
new file mode 100644
index 0000000..84c5c7f
--- /dev/null
+++ b/debian/patches/treat-i386-as-x86
@@ -0,0 +1,14 @@
+Index: vboot-utils/Makefile
+===================================================================
+--- vboot-utils.orig/Makefile
++++ vboot-utils/Makefile
+@@ -93,6 +93,9 @@ endif
+ ifneq (,$(findstring i686,${_machname}))
+ override _machname := x86
+ endif
++ifneq (,$(findstring i386,${_machname}))
++ override _machname := x86
++endif
+ HOST_ARCH ?= ${_machname}
+
+ # ARCH and/or FIRMWARE_ARCH are defined by the Chromium OS ebuild.
diff --git a/debian/rules b/debian/rules
index dce9471..0e92bd6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,6 +2,7 @@
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export CC = clang-10
+export _machname = $(DEB_HOST_ARCH)
override_dh_auto_build:
dh_auto_build -- V=1
--
2.20.1
[signature.asc (application/pgp-signature, inline)]
Message sent on
to Vagrant Cascadian <vagrant@reproducible-builds.org>:
Bug#974863.
(Tue, 01 Dec 2020 10:15:05 GMT) (full text, mbox, link).
Message #8 received at 974863-submitter@bugs.debian.org (full text, mbox, reply):
Control: tag -1 pending
Hello,
Bug #974863 in vboot-utils reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:
https://salsa.debian.org/debian/vboot-utils/-/commit/b7edc093c14d2a516e11619aa94b3d1d5db6ac96
------------------------------------------------------------------------
Add a patch to fix reproducible build (Closes: #974863)
------------------------------------------------------------------------
(this message was generated automatically)
--
Greetings
https://bugs.debian.org/974863
Added tag(s) pending.
Request was from Sophie Brun <noreply@salsa.debian.org>
to 974863-submitter@bugs.debian.org.
(Tue, 01 Dec 2020 10:15:05 GMT) (full text, mbox, link).
Reply sent
to Sophie Brun <sophie@offensive-security.com>:
You have taken responsibility.
(Thu, 03 Dec 2020 14:51:05 GMT) (full text, mbox, link).
Notification sent
to Vagrant Cascadian <vagrant@reproducible-builds.org>:
Bug acknowledged by developer.
(Thu, 03 Dec 2020 14:51:05 GMT) (full text, mbox, link).
Message #15 received at 974863-close@bugs.debian.org (full text, mbox, reply):
Source: vboot-utils
Source-Version: 0~R88-13597.B-1
Done: Sophie Brun <sophie@offensive-security.com>
We believe that the bug you reported is fixed in the latest version of
vboot-utils, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 974863@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Sophie Brun <sophie@offensive-security.com> (supplier of updated vboot-utils package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Tue, 01 Dec 2020 10:59:21 +0100
Source: vboot-utils
Architecture: source
Version: 0~R88-13597.B-1
Distribution: unstable
Urgency: medium
Maintainer: Sophie Brun <sophie@offensive-security.com>
Changed-By: Sophie Brun <sophie@offensive-security.com>
Closes: 974776 974863
Changes:
vboot-utils (0~R88-13597.B-1) unstable; urgency=medium
.
[ Sophie Brun ]
* Add a patch to fix reproducible build (Closes: #974863)
* Upgrade to clang-11 (Closes: #974776)
* Bump Standards-Version to 4.5.1 (no changes)
* Use version=4 in debian/watch
* New upstream version 0~R88-13597.B
* Refresh patches
.
[ Raphael Hertzog ]
* Use libfuzzer-11-dev instead of libfuzzer-10-dev
Checksums-Sha1:
3201b7cf91ade608e68687b0c4724ff06b2799c6 2025 vboot-utils_0~R88-13597.B-1.dsc
a03f816a91fb3ec330dba55b356d80869351d692 35838842 vboot-utils_0~R88-13597.B.orig.tar.gz
75a52167ac0c1540ac158faf6f37dd09d3b89697 11036 vboot-utils_0~R88-13597.B-1.debian.tar.xz
c37ea6b6a63e213deefc2d6cc9dd358d499ae7d4 6621 vboot-utils_0~R88-13597.B-1_source.buildinfo
Checksums-Sha256:
dc822072e91c0dfda205379402416c07dcfc60729b241e528e1c6b443aecd7c1 2025 vboot-utils_0~R88-13597.B-1.dsc
3453b64c97bd783d4c8bccd718b5025d38ce9344e3c8a15c08abe19fb0a3d7d2 35838842 vboot-utils_0~R88-13597.B.orig.tar.gz
7f8a2ae7aab9453e0e48242894e8a06fa1a91336096f534774917fe3f1414ab5 11036 vboot-utils_0~R88-13597.B-1.debian.tar.xz
4ce8b8eb685d532947367558b55313bbd8820209c086d9bb3c278399b4e9f38c 6621 vboot-utils_0~R88-13597.B-1_source.buildinfo
Files:
221fca85566c82d239d7948b7f545658 2025 admin optional vboot-utils_0~R88-13597.B-1.dsc
0394cd67728bdaeacc07fb6bbdec7390 35838842 admin optional vboot-utils_0~R88-13597.B.orig.tar.gz
6eae7b5b17e025b65ab056ec2074557f 11036 admin optional vboot-utils_0~R88-13597.B-1.debian.tar.xz
0abe2a3ea4f4bc7a85beab375bda56da 6621 admin optional vboot-utils_0~R88-13597.B-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----
Comment: Signed by Raphael Hertzog
iQEzBAEBCgAdFiEE1823g1EQnhJ1LsbSA4gdq+vCmrkFAl/I8ssACgkQA4gdq+vC
mrl48wf/Q1s/cLNmOoKm3SeNRiX7eRY/DeR+wyi04Wg1cgWuR/yNk/V1vEzo9MpN
KCrdoVBhnvtgwULqfwgn03gwbYFql6Pt/iwodVBrIaYwFrdCo+yOX3DIwrGfbnKx
uSwQXTh2N+PrTEbxlmuvKhwdyyKHmbWlm14k2hMX6Mpy9pYmr6c9MgFmiWoCWelG
85/DVYJLpqfPXwDnADgDQVF+hODLZZUKVTIXY20Q/eafT+GdfwwvgE8hwG2Yziku
rnIvwsCg/Kwl8f8tWWFBqFZWF3Nip5Bw0LVYBn/LCtxSuAvJqZ/BDlVrs9CSC1yW
KCtYS4z2Kq5YKuKqg3Kfi5cf2YfCLg==
=QgTY
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Wed, 06 Jan 2021 07:30:48 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Wed May 17 10:57:35 2023;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.