aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorBjörn Höfling <bjoern.hoefling@bjoernhoefling.de>2018-08-09 16:45:45 +0200
committerLeo Famulari <leo@famulari.name>2018-08-16 17:09:46 -0400
commit4866cba66ae40d722bb6c50b7dca27725ffa4532 (patch)
treef34d5bcb9bafc5bcd8880d998a7bcdfc9e00ab0d /gnu
parentb86c019efbc5c4ea35f3cd6d2f52985f40e49e6c (diff)
downloadpatches-4866cba66ae40d722bb6c50b7dca27725ffa4532.tar
patches-4866cba66ae40d722bb6c50b7dca27725ffa4532.tar.gz
gnu: libgcrypt: Make build reproducible.
* gnu/packages/patches/libgcrypt-make-yat2m-reproducible.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gnupg.scm (libgcrypt)[source]: Use it. Signed-off-by: Leo Famulari <leo@famulari.name>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/gnupg.scm4
-rw-r--r--gnu/packages/patches/libgcrypt-make-yat2m-reproducible.patch32
3 files changed, 36 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 1e2ce8f49e..341e1c4fdf 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -860,6 +860,7 @@ dist_patch_DATA = \
%D%/packages/patches/libevent-2.1-skip-failing-test.patch \
%D%/packages/patches/libexif-CVE-2016-6328.patch \
%D%/packages/patches/libexif-CVE-2017-7544.patch \
+ %D%/packages/patches/libgcrypt-make-yat2m-reproducible.patch \
%D%/packages/patches/libgit2-mtime-0.patch \
%D%/packages/patches/libgdata-fix-tests.patch \
%D%/packages/patches/libgdata-glib-duplicate-tests.patch \
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index 54b44996ef..942f975e56 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -101,7 +101,9 @@ Daemon and possibly more in the future.")
version ".tar.bz2"))
(sha256
(base32
- "0z5gs1khzyknyfjr19k8gk4q148s6q987ya85cpn0iv70fz91v36"))))
+ "0z5gs1khzyknyfjr19k8gk4q148s6q987ya85cpn0iv70fz91v36"))
+ (patches
+ (search-patches "libgcrypt-make-yat2m-reproducible.patch"))))
(build-system gnu-build-system)
(propagated-inputs
`(("libgpg-error-host" ,libgpg-error)))
diff --git a/gnu/packages/patches/libgcrypt-make-yat2m-reproducible.patch b/gnu/packages/patches/libgcrypt-make-yat2m-reproducible.patch
new file mode 100644
index 0000000000..3056f0baad
--- /dev/null
+++ b/gnu/packages/patches/libgcrypt-make-yat2m-reproducible.patch
@@ -0,0 +1,32 @@
+Make yat2m in libgcrypt respect SOURCE_DATE_EPOCH, making
+the build reproducible.
+
+This was already fixed upstream in GnuPG:
+https://dev.gnupg.org/rG139de02b93773615bdd95e04a7f0c1ad73b4f6fb
+
+and in libgpg-error:
+https://dev.gnupg.org/rE5494a5728418938d2e42158bb646b07124184e64
+
+
+--- a/doc/yat2m.c 2017-11-23 19:16:58.000000000 +0100
++++ b/doc/yat2m.c 2017-08-28 12:22:54.000000000 +0200
+@@ -1475,6 +1484,7 @@
+ main (int argc, char **argv)
+ {
+ int last_argc = -1;
++ const char *s;
+
+ opt_source = "GNU";
+ opt_release = "";
+@@ -1608,6 +1618,11 @@
+ if (argc > 1)
+ die ("usage: " PGM " [OPTION] [FILE] (try --help for more information)\n");
+
++ /* Take care of supplied timestamp for reproducible builds. See
++ * https://reproducible-builds.org/specs/source-date-epoch/ */
++ if (!opt_date && (s = getenv ("SOURCE_DATE_EPOCH")) && *s)
++ opt_date = s;
++
+ /* Start processing. */
+ if (argc && strcmp (*argv, "-"))
+ {