Bug#849968: pciutils: please make the build reproducible under i386 with an amd64 kernel
Chris Lamb
lamby at debian.org
Mon Jan 2 18:56:38 UTC 2017
Source: pciutils
Version: 1:3.5.2-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: kernel
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
Hi,
Whilst working on the Reproducible Builds effort [0], we noticed
that pciutils could not be built reproducibly.
When built on an i386 Debian system with an amd64 kernel, you get:
#define PCI_ARCH_X86_64
instead of:
#define PCI_ARCH_I386
This could especially problematic if the package ever gets built
on a buildd with such a kernel configuration; all our users would
surely get the wrong #define.
Patch attached.
It uses $(DEB_TARGET_GNU_CPU) from dpkg-architecture(1) although I
am not 100% sure this is the right approach.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/rules 2017-01-02 18:27:54.143096179 +0000
--- b/debian/rules 2017-01-02 18:51:37.191032970 +0000
@@ -7,10 +7,12 @@
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/architecture.mk
-ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+HOST=$(DEB_TARGET_GNU_CPU)-$(DEB_TARGET_ARCH_OS)
+else
export PKG_CONFIG=$(DEB_HOST_GNU_TYPE)-pkg-config
-export HOST=$(DEB_HOST_GNU_CPU)-$(DEB_HOST_ARCH_OS)
-CROSS=CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)- HOST=$(HOST)
+HOST=$(DEB_HOST_GNU_CPU)-$(DEB_HOST_ARCH_OS)
+CROSS=CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)-
endif
ifeq ($(DEB_HOST_ARCH_OS),linux)
@@ -31,7 +33,7 @@
build-indep: build
build:
dh_testdir
- OPT="$(CFLAGS)" $(MAKE) $(CROSS) $(PATHS) SHARED=yes $(LINUX_FEATURES)
+ OPT="$(CFLAGS)" $(MAKE) $(CROSS) $(PATHS) SHARED=yes $(LINUX_FEATURES) HOST=$(HOST)
clean:
dh_testdir
@@ -50,7 +52,7 @@
dh_prep
dh_installdirs -a
- $(MAKE) $(CROSS) $(PATHS) install DESTDIR=debian/pciutils STRIP=
+ $(MAKE) $(CROSS) $(PATHS) install DESTDIR=debian/pciutils STRIP= HOST=$(HOST)
# pciutils
gunzip debian/pciutils/usr/share/misc/pci.ids.gz
More information about the Reproducible-bugs
mailing list