Source: gcc-13 Version: 13.1.0-2 Severity: normal Tags: patch User: reproducible-builds@lists.alioth.debian.org Usertags: timestamps X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org The build dates and timestamps are embedded in various files shipped in documentation. The attached patches fix this by adding SOURCE_DATE_EPOCH support to the doxygen scripts used to generate the libstdc++ documentation, and by adjusting debian/rules2 to remove the leftover _formulas.log files from the generated package. According to my local tests, applying these patches should allow gcc-13 to build reproducibly with stable build paths and DEB_BUILD_OPTIONS="nocheck nolto nopgo". Thanks for maintaining gcc-13! live well, vagrant
From 41780dfa54abbc7a1d6a1acd744d725b3799eb50 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Sun, 30 Apr 2023 14:37:31 -0700
Subject: [PATCH 1/2] Patch libstdc++ to support SOURCE_DATE_EPOCH in
documentation.
https://reproducible-builds.org/docs/source-date-epoch/
---
...ripts-run_doxygen-support-SOURCE_DATE_EPOCH.diff | 13 +++++++++++++
debian/rules.patch | 1 +
2 files changed, 14 insertions(+)
create mode 100644 debian/patches/libstdc++-scripts-run_doxygen-support-SOURCE_DATE_EPOCH.diff
diff --git a/debian/patches/libstdc++-scripts-run_doxygen-support-SOURCE_DATE_EPOCH.diff b/debian/patches/libstdc++-scripts-run_doxygen-support-SOURCE_DATE_EPOCH.diff
new file mode 100644
index 0000000..1636c08
--- /dev/null
+++ b/debian/patches/libstdc++-scripts-run_doxygen-support-SOURCE_DATE_EPOCH.diff
@@ -0,0 +1,13 @@
+--- gcc-13.1.0/src/libstdc++-v3/scripts/run_doxygen 2023-04-26 00:09:43.000000000 -0700
++++ gcc-13.1.0/src/libstdc++-v3/scripts/run_doxygen.new 2023-04-30 14:34:47.513318389 -0700
+@@ -130,7 +130,9 @@
+ latex_cmd=
+ enabled_sections=
+ generate_tagfile=
+-DATEtext=`date '+%Y-%m-%d'`
++DATE_FMT="+%Y-%m-%d"
++SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(date +%s)}"
++DATEtext=`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"`
+
+ # Show how this script is called.
+ echo run_doxygen $*
diff --git a/debian/rules.patch b/debian/rules.patch
index 89ecbe2..274514d 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -39,6 +39,7 @@ debian_patches += \
libstdc++-doclink \
libstdc++-man-3cxx \
libstdc++-test-installed \
+ libstdc++-scripts-run_doxygen-support-SOURCE_DATE_EPOCH \
alpha-no-ev4-directive \
note-gnu-stack \
libgomp-omp_h-multilib \
--
2.39.2
From cd27050d2ff32b1ce1f065d8e7ee0c6abffbf8d5 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian <vagrant@reproducible-builds.org> Date: Sun, 30 Apr 2023 14:38:34 -0700 Subject: [PATCH 2/2] debian/rules2: Remove _formulas.log files. These files are artifacts from the documentation creation process and may embed build dates. --- debian/rules2 | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/rules2 b/debian/rules2 index 1b431e2..43c077f 100644 --- a/debian/rules2 +++ b/debian/rules2 @@ -2930,6 +2930,7 @@ debian/indep_binaries.all: $(foreach i,$(indep_binaries),$(binary_stamp)-$(i)) cat debian/indep_binaries debian/indep_binaries.epoch > debian/indep_binaries.all binary-indep: $(foreach i,$(indep_binaries),$(binary_stamp)-$(i)) debian/indep_binaries.all + find debian -name _formulas.log -delete -print dh_compress $(foreach p,$(shell echo `cat debian/indep_binaries.all`),-p$(p)) \ -X.log.xz -X.sum.xz -X.c -X.txt -X.tag -X.map -XREADME.Bugs dh_fixperms $(foreach p,$(shell echo `cat debian/indep_binaries.all`),-p$(p)) -- 2.39.2
Attachment:
signature.asc
Description: PGP signature