[Pkg-electronics-devel] Bug#955783: netgen-lvs: please make the build reproducible

Vagrant Cascadian vagrant at debian.org
Thu Dec 1 22:40:58 GMT 2022


Control: tags 955783 pending

On 2020-04-04, Chris Lamb wrote:
> Whilst working on the Reproducible Builds effort [0] we noticed that
> netgen-lvs could not be built reproducibly.
>
> This is because it embeds by the build date into the binary.

Uploaded an NMU to DELAYED/10 fixing this issue:

diff -Nru netgen-lvs-1.5.133/debian/changelog netgen-lvs-1.5.133/debian/changelog
--- netgen-lvs-1.5.133/debian/changelog	2021-11-07 10:50:30.000000000 -0800
+++ netgen-lvs-1.5.133/debian/changelog	2022-12-01 14:32:11.000000000 -0800
@@ -1,3 +1,12 @@
+netgen-lvs (1.5.133-1.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+
+  [ Chris Lamb ]
+  * Do not embed build timestamp (Closes: #955783)
+
+ -- Vagrant Cascadian <vagrant at reproducible-builds.org>  Thu, 01 Dec 2022 14:32:11 -0800
+
 netgen-lvs (1.5.133-1.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru netgen-lvs-1.5.133/debian/patches/do-not-embed-build-timestamp-closes-9557.patch netgen-lvs-1.5.133/debian/patches/do-not-embed-build-timestamp-closes-9557.patch
--- netgen-lvs-1.5.133/debian/patches/do-not-embed-build-timestamp-closes-9557.patch	1969-12-31 16:00:00.000000000 -0800
+++ netgen-lvs-1.5.133/debian/patches/do-not-embed-build-timestamp-closes-9557.patch	2022-12-01 14:32:11.000000000 -0800
@@ -0,0 +1,57 @@
+From: Chris Lamb <lamby at debian.org>
+Date: Sat, 4 Apr 2020 22:36:48 +0100
+X-Dgit-Generated: 1.5.133-1.2 d0def6605122fc8c1aeae62bd675d10394577f65
+Subject: Do not embed build timestamp (Closes: #955783)
+
+Adjusted-by: Vagrant Cascadian <vagrant at reproducible-builds.org>
+
+---
+
+diff --git a/base/Makefile b/base/Makefile
+index dbc0bb1..8c87439 100644
+--- a/base/Makefile
++++ b/base/Makefile
+@@ -10,7 +10,11 @@ include ${NETGENDIR}/defs.mak
+ 
+ SRCS   += ${GR_SRCS}
+ DFLAGS += ${GR_DFLAGS}
++ifdef SOURCE_DATE_EPOCH
++DFLAGS += -DNETGEN_DATE="\"`LC_ALL=C date -u -d "@$(SOURCE_DATE_EPOCH)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" 2>/dev/null || date -u`\""
++else
+ DFLAGS += -DNETGEN_DATE="\"`date`\""
++endif
+ CFLAGS += ${GR_CFLAGS}
+ 
+ include ${NETGENDIR}/rules.mak
+diff --git a/netgen/Makefile b/netgen/Makefile
+index 52beff7..9541edd 100644
+--- a/netgen/Makefile
++++ b/netgen/Makefile
+@@ -8,7 +8,11 @@ EXTRA_LIBS = ${NETGENDIR}/base/libbase.o \
+ 	     ${MAIN_EXTRA_LIBS}
+ 
+ DFLAGS += ${GR_DFLAGS}
++ifdef SOURCE_DATE_EPOCH
++DFLAGS += -DNETGEN_DATE="\"`LC_ALL=C date -u -d "@$(SOURCE_DATE_EPOCH)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" 2>/dev/null || date -u`\""
++else
+ DFLAGS += -DNETGEN_DATE="\"`date`\""
++endif
+ 
+ LIBS += ${GR_LIBS} -lm
+ CFLAGS += ${GR_CFLAGS} -I${NETGENDIR}/base
+diff --git a/tcltk/Makefile b/tcltk/Makefile
+index 861e185..5105765 100644
+--- a/tcltk/Makefile
++++ b/tcltk/Makefile
+@@ -6,7 +6,11 @@ include ${NETGENDIR}/defs.mak
+ 
+ EXTRA_LIBS = ${MAIN_EXTRA_LIBS}
+ 
++ifdef SOURCE_DATE_EPOCH
++DFLAGS += -DNETGEN_DATE="\"`LC_ALL=C date -u -d "@$(SOURCE_DATE_EPOCH)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" 2>/dev/null || date -u`\""
++else
+ DFLAGS += -DNETGEN_DATE="\"`date`\""
++endif
+ LIBS += -lm
+ CLEANS += netgen.sh netgen.tcl netgenexec${EXEEXT}
+ CFLAGS += -I${NETGENDIR}/base
diff -Nru netgen-lvs-1.5.133/debian/patches/series netgen-lvs-1.5.133/debian/patches/series
--- netgen-lvs-1.5.133/debian/patches/series	2021-11-07 10:50:30.000000000 -0800
+++ netgen-lvs-1.5.133/debian/patches/series	2022-12-01 14:32:11.000000000 -0800
@@ -1,3 +1,4 @@
 0002-Make-sure-hardening-flags-are-passed-down.patch
 0002-Fix-some-sprintf-calls.patch
 autoconf2.71.patch
+do-not-embed-build-timestamp-closes-9557.patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-electronics-devel/attachments/20221201/1b5f4ee1/attachment.sig>


More information about the Pkg-electronics-devel mailing list