Bug#1030715: adacgi: please make the build reproducible
Chris Lamb
lamby at debian.org
Mon Feb 6 17:50:44 GMT 2023
Source: adacgi
Version: 1.6-31
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
Hi,
Whilst working on the Reproducible Builds effort [0] we noticed that
adacgi could not be built reproducibly.
This is because it installs /usr/share/gpr/adacgi.gpr that contains
the build flags that it was built with. This causes a problem because
these contain the current build directory, making the package
unreproducible:
ldflags := ("-Wl,-z,relro", "-Wl,-z,now", "-Wl,--no-allow-shlib-undefined", "-Wl,--no-copy-dt-needed-entries", "-Wl,--no-undefined");
- adaflags := ("-g", "-O2", "-ffile-prefix-map=/build/1st/adacgi-1.6=.", "-fstack-protector-strong", "", "-gno-record-gcc-switches");
+ adaflags := ("-g", "-O2", "-ffile-prefix-map=/build/2/adacgi-1.6/2nd=.", "-fstack-protector-strong", "", "-gno-record-gcc-switches");
soversion := "4";
A patch is attached that will modify this file just prior to
installation, but the better solution may actually belong somewhere
else in Debian's Ada toolchain. Unfortunately, I lack the knowledge
to know precisely where, but hopefully this helps demonstrate the
problem and a route to a solution.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/rules 2023-02-06 08:36:58.934987698 -0800
--- b/debian/rules 2023-02-06 09:47:37.153782287 -0800
@@ -34,6 +34,9 @@
gprinstall debian/adacgi.gpr $(call shared_GPRINSTALLFLAGS,adacgi) \
-Xsoversion=$(adacgi_SO_VERSION)
+execute_before_dh_ada_library:
+ sed -i -e 's@$(CURDIR)@/build at g' debian/tmp/usr/share/gpr/adacgi.gpr
+
.PHONY: override_dh_installchangelogs
override_dh_installchangelogs:
dh_installchangelogs debian/upstream_changelog.txt
More information about the Reproducible-bugs
mailing list