There are patches fixing embedded build paths, usernames, and
timestamps, one of which submitted in 2016, and one just a couple weeks
ago... both patches I'd certainly put into the mostly harmless category,
but would make zephyr build reproducibly :)

Would you be amenable to an NMU to unstable applying the following
patches and fixing these issues? If yes, should I build upon the package
in experimental? Plans for using salsa.debian.org? dgit?

Thanks for consideration!

live well,
  vagrant

From c1dd58714b0bf41effbc7ce4162ac2e0d347fc61 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Fri, 7 Oct 2022 00:06:50 +0000
Subject: [PATCH 2/2] debian/rules: Pass -ffile-prefix-map via CFLAGS to avoid
 embedding the build path.

https://reproducible-builds.org/docs/build-path/
---
 debian/rules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index f81ecc9..1e8f9ed 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,7 +9,7 @@
 # Uncomment this to turn on verbose mode. 
 #export DH_VERBOSE=1
 VARIETALS=krb5
-CFLAGS=-g -O
+CFLAGS=-g -O -ffile-prefix-map=$(CURDIR)=.
 
 PACKAGES:=-plibzephyr4 -pzephyr-clients -pzephyr-server -plibzephyr-dev 
$(foreach i,$(VARIETALS),-plibzephyr4-$(i) -pzephyr-server-$(i))
 

diff --git a/debian/patches/reproducible-build.patch 
b/debian/patches/reproducible-build.patch
new file mode 100644
index 0000000..34f3982
--- /dev/null
+++ b/debian/patches/reproducible-build.patch
@@ -0,0 +1,17 @@
+Author: Reiner Herrmann <rei...@reiner-h.de>
+Description: Strip non-deterministic information from the version string
+
+--- a/new_vers.sh
++++ b/new_vers.sh
+@@ -2,10 +2,7 @@
+ #
+ top_srcdir=${1:-`pwd`}
+ 
+-u=${USER-the_zephyr_builder}
+-h=`hostname`
+-t=`date`
+ v=`sh ${top_srcdir}/get_vers.sh ${top_srcdir}`
+ 
+ umask 002
+-/bin/echo "#define ZEPHYR_VERSION_STRING \"${v} (${t}) ${u}@${h}\"" > 
h/zephyr_version.h
++/bin/echo "#define ZEPHYR_VERSION_STRING \"${v}\"" > h/zephyr_version.h
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..55077d0
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+reproducible-build.patch

Attachment: signature.asc
Description: PGP signature

Reply via email to