Source: mc
Version: 3:4.8.17-1
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Hi!

While working on the "reproducible builds" effort [1], we have noticed
that mc could not be built reproducibly.
It embeds the current date into the mcedit manpage during build.

The attached patch uses SOURCE_DATE_EPOCH as a deterministic
timestamp instead.

Regards,
 Reiner

[1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/debian/patches/reproducible_man_date.patch b/debian/patches/reproducible_man_date.patch
new file mode 100644
index 0000000..5bcac25
--- /dev/null
+++ b/debian/patches/reproducible_man_date.patch
@@ -0,0 +1,13 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -428,7 +428,9 @@
+ dnl Documentation
+ dnl ############################################################################
+ 
+-MAN_DATE="$(LC_ALL=C date "+%B %Y")"
++DATE_FMT="%B %Y"
++SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(date +%s)}"
++MAN_DATE=$(LC_ALL=C date -u -d "@$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || LC_ALL=C date -u -r "$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || LC_ALL=C date -u "+$DATE_FMT")
+ AC_SUBST(MAN_DATE)
+ 
+ dnl Determine which help translations we want to install.
diff --git a/debian/patches/series b/debian/patches/series
index 861e26f..81c7c50 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -14,3 +14,4 @@ mcedit_full_path.patch
 mcedit_group_undo.patch
 ext_run-mailcap.patch
 ext_use_default_editor.patch
+reproducible_man_date.patch
_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to