Source: zpaq Version: 1.10-1 Severity: wishlist Tags: patch User: [email protected] Usertags: timestamps X-Debbugs-CC: [email protected]
Hi! While working on Debian's “reproducible builds” effort [1], we have noticed that zpaq doesn't build reproducibly. It embeds the current date into the manpage. The attached patch fixes this by using the last changelog date as a timestamp that will be embedded. Regards, Reiner [1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/debian/patches/reproducible_build.patch b/debian/patches/reproducible_build.patch new file mode 100644 index 0000000..1709a04 --- /dev/null +++ b/debian/patches/reproducible_build.patch @@ -0,0 +1,16 @@ +Author: Reiner Herrmann <[email protected]> +Description: Remove timestamp from binary to enable reproducible builds. + +Index: zpaq-1.10/zpaq.cpp +=================================================================== +--- zpaq-1.10.orig/zpaq.cpp ++++ zpaq-1.10/zpaq.cpp +@@ -4556,7 +4556,7 @@ void run(int argc, char** argv) { + // Print help message and exit + void usage() { + printf("ZPAQ v1.10 archiver, (C) 2009, Ocarina Networks Inc.\n" +- "Written by Matt Mahoney, " __DATE__ ".\n" ++ "Written by Matt Mahoney.\n" + "This is free software under GPL v3, http://www.gnu.org/copyleft/gpl.html\n" + "\n" + "To compress to new archive: zpaq [opnsitqv]c[F[,N...]] archive files...\n" diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..b2026fe --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +reproducible_build.patch diff --git a/debian/pod2man.mk b/debian/pod2man.mk index 64bc797..f878a28 100644 --- a/debian/pod2man.mk +++ b/debian/pod2man.mk @@ -34,9 +34,10 @@ endif PACKAGE ?= package # Optional variables to set +BUILD_DATE ?= $$(dpkg-parsechangelog -S Date -lchangelog) MANSECT ?= 1 PODCENTER ?= User Commands -PODDATE = $$(date "+%Y-%m-%d") +PODDATE = $$(date -u "+%Y-%m-%d" -d "$(BUILD_DATE)") # Directories MANSRC =
signature.asc
Description: OpenPGP digital signature

