summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@scratchpost.org>2023-07-31 20:09:17 +0200
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-01-21 13:14:24 -0500
commitb756ea0686c30dd73b8f78c350168283481ff02d (patch)
treeda95da8921a2821e5c55c5b4480b2d1a22694d36
parent5dd994a2101c33d5d621f65c2b901da8d5550865 (diff)
gnu: openjdk13: Make reproducible.
* gnu/packages/patches/openjdk-13-classlist-reproducibility.patch: New file. * gnu/local.mk (dist_patch_DATA): Add patch. * gnu/packages/java.scm (openjdk13)[source]: Add patch. [arguments]<#:phases>[remove-timestamping]: Modify phase. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/java.scm17
-rw-r--r--gnu/packages/patches/openjdk-13-classlist-reproducibility.patch11
3 files changed, 26 insertions, 3 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index cacac57cf8..011d92511f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1782,6 +1782,7 @@ dist_patch_DATA = \
%D%/packages/patches/openjdk-10-pointer-comparison.patch \
%D%/packages/patches/openjdk-10-setsignalhandler.patch \
%D%/packages/patches/openjdk-11-classlist-reproducibility.patch \
+ %D%/packages/patches/openjdk-13-classlist-reproducibility.patch \
%D%/packages/patches/openjdk-15-xcursor-no-dynamic.patch \
%D%/packages/patches/openjdk-21-fix-rpath.patch \
%D%/packages/patches/openmpi-mtl-priorities.patch \
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 6d8e08d823..86934601f3 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -1666,9 +1666,20 @@ blacklisted.certs.pem"
(define-public openjdk13
(make-openjdk openjdk12 "13.0.13"
"0pxf4dlig61k0pg7amg4mi919hzam7nzwckry01avgq1wj8ambji"
- (source (origin
- (inherit (package-source base))
- (patches '())))))
+ (source (origin
+ (inherit (package-source base))
+ (patches (search-patches "openjdk-13-classlist-reproducibility.patch"
+ "openjdk-10-jtask-reproducibility.patch"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments openjdk12)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (replace 'remove-timestamping
+ (lambda _
+ (substitute*
+ "src/hotspot/share/runtime/abstract_vm_version.cpp"
+ (("__DATE__") "")
+ (("__TIME__") ""))))))))))
(define-public openjdk14
(make-openjdk
diff --git a/gnu/packages/patches/openjdk-13-classlist-reproducibility.patch b/gnu/packages/patches/openjdk-13-classlist-reproducibility.patch
new file mode 100644
index 0000000000..326f6875ec
--- /dev/null
+++ b/gnu/packages/patches/openjdk-13-classlist-reproducibility.patch
@@ -0,0 +1,11 @@
+--- 6cllxkf0narh0b4wgx8npwjkznd7ifq0-openjdk-13.0.7-checkout/make/GenerateLinkOptData.gmk.orig 2022-04-04 17:20:33.012539984 +0200
++++ 6cllxkf0narh0b4wgx8npwjkznd7ifq0-openjdk-13.0.7-checkout/make/GenerateLinkOptData.gmk 2022-04-04 17:20:51.181032859 +0200
+@@ -78,7 +78,7 @@
+ $(CAT) $(LINK_OPT_DIR)/stderr $(JLI_TRACE_FILE) ; \
+ exit $$exitcode \
+ )
+- $(GREP) -v HelloClasslist $@.raw > $@
++ $(GREP) -v HelloClasslist $@.raw | sort > $@
+
+ # The jli trace is created by the same recipe as classlist. By declaring these
+ # dependencies, make will correctly rebuild both jli trace and classlist