Bug#1053356: rtpengine: please make the build reproducible
Chris Lamb
lamby at debian.org
Mon Oct 2 14:10:46 BST 2023
Source: rtpengine
Version: 11.5.1.3-2
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
Hi,
Whilst working on the Reproducible Builds effort [0], we noticed that
rtpengine could not be built reproducibly.
This is because the manpages generated by pandoc contained the current
build date.
An (upstreamable) patch is attached that uses the value from the
SOURCE_DATE_EPOCH environment variable if available.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/patches/reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/reproducible-build.patch 2023-10-02 15:02:34.238412892 +0200
@@ -0,0 +1,28 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2023-10-02
+
+--- rtpengine-11.5.1.3.orig/lib/common.Makefile
++++ rtpengine-11.5.1.3/lib/common.Makefile
+@@ -38,7 +38,7 @@ $(DAEMONSRCS) $(HASHSRCS): $(patsubst %,
+ cat "$<" | sed '/^# /d; s/^##/#/' | \
+ pandoc -s -t man \
+ -M "footer:$(RTPENGINE_VERSION)" \
+- -M "date:$(shell date -I)" \
++ -M "date:$(BUILD_DATE)" \
+ -o "$@"
+
+ resample.c codeclib.strhash.c mix.c packet.c: fix_frame_channel_layout.h
+--- rtpengine-11.5.1.3.orig/lib/lib.Makefile
++++ rtpengine-11.5.1.3/lib/lib.Makefile
+@@ -64,3 +64,10 @@ ifneq ($(DBG),yes)
+ endif
+ endif
+ endif
++
++DATE_FMT = +%Y-%m-%d
++ifdef SOURCE_DATE_EPOCH
++ BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u "$(DATE_FMT)")
++else
++ BUILD_DATE ?= $(shell date "$(DATE_FMT)")
++endif
--- a/debian/patches/series 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/series 2023-10-02 15:02:31.666403496 +0200
@@ -0,0 +1 @@
+reproducible-build.patch
More information about the Reproducible-bugs
mailing list