Source: bowtie2
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

The debugging symbols embed the build time:

  
https://tests.reproducible-builds.org/debian/rb-pkg/bullseye/amd64/diffoscope-results/bowtie2.html

  ./usr/lib/debug/.dwz/x86_64-linux-gnu/bowtie2.debug 
  501   ··[··2df6]··BUILD_TIME·"Thu·Dec·10·16:47:13·UTC·2020"
  504   ··[··2f02]··BUILD_TIME·"Thu·Jan·13·00:06:51·UTC·2022"

The attached patch fixes this by adjusting the Makefile to have date to
produce a consistent timestamp using SOURCE_DATE_EPOCH.


Thanks for maintaining bowtie2!


live well,
  vagrant
From abf1a60be6d2bf1b2d86cc66a001f1d233e3d2da Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Tue, 15 Dec 2020 03:41:17 +0000
Subject: [PATCH 1/2] debian/patches: Patch Makefile to use SOURCE_DATE_EPOCH.

---
 debian/patches/series                          |  1 +
 .../patches/use-source-date-epoch-in-Makefile  | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+)
 create mode 100644 debian/patches/use-source-date-epoch-in-Makefile

diff --git a/debian/patches/series b/debian/patches/series
index e11a345..d85c587 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@ silence_tbb_deprecation_warning.patch
 simde
 correct_64bit_test
 no_sanity
+use-source-date-epoch-in-Makefile
diff --git a/debian/patches/use-source-date-epoch-in-Makefile b/debian/patches/use-source-date-epoch-in-Makefile
new file mode 100644
index 0000000..a37f05c
--- /dev/null
+++ b/debian/patches/use-source-date-epoch-in-Makefile
@@ -0,0 +1,18 @@
+From: Vagrant Cascadian <vagr...@reproducible-builds.org>
+Subject: Patch Makefile to set date for BUILD_TIME using SOURCE_DATE_EPOCH.
+
+https://reproducible-builds.org/docs/source-date-epoch/
+
+Index: bowtie2/Makefile
+===================================================================
+--- bowtie2.orig/Makefile
++++ bowtie2/Makefile
+@@ -279,7 +279,7 @@ both-debug: bowtie2-align-s-debug bowtie
+ DEFS := -fno-strict-aliasing \
+   -DBOWTIE2_VERSION="\"`cat BOWTIE2_VERSION`\"" \
+   -DBUILD_HOST="\"$${HOSTNAME:-`hostname`}\"" \
+-  -DBUILD_TIME="\"`date -u`\"" \
++  -DBUILD_TIME="\"`LC_ALL=C date -u -d@$(SOURCE_DATE_EPOCH)`\"" \
+   -DCOMPILER_VERSION="\"`$(CXX) -v 2>&1 | tail -1`\"" \
+   $(FILE_FLAGS) \
+   $(PREF_DEF) \
-- 
2.29.2

Attachment: signature.asc
Description: PGP signature

Reply via email to