From unknown Tue Aug 19 07:14:12 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#55751 <55751@debbugs.gnu.org> To: bug#55751 <55751@debbugs.gnu.org> Subject: Status: [PATCH 0/8] Towards reproducible openjdk Reply-To: bug#55751 <55751@debbugs.gnu.org> Date: Tue, 19 Aug 2025 14:14:12 +0000 retitle 55751 [PATCH 0/8] Towards reproducible openjdk reassign 55751 guix-patches submitter 55751 dannym@scratchpost.org severity 55751 normal tag 55751 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 01 08:58:16 2022 Received: (at submit) by debbugs.gnu.org; 1 Jun 2022 12:58:16 +0000 Received: from localhost ([127.0.0.1]:49948 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwNvT-0002FS-U5 for submit@debbugs.gnu.org; Wed, 01 Jun 2022 08:58:16 -0400 Received: from lists.gnu.org ([209.51.188.17]:46816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwNvP-0002FH-4Z for submit@debbugs.gnu.org; Wed, 01 Jun 2022 08:58:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwNvN-0001aM-9F for guix-patches@gnu.org; Wed, 01 Jun 2022 08:58:10 -0400 Received: from dd30410.kasserver.com ([85.13.145.193]:38522) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwNvJ-0003Cc-Oh for guix-patches@gnu.org; Wed, 01 Jun 2022 08:58:08 -0400 Received: from dayas.lan (84-115-234-55.cable.dynamic.surfer.at [84.115.234.55]) by dd30410.kasserver.com (Postfix) with ESMTPSA id 62F041120248; Wed, 1 Jun 2022 14:57:49 +0200 (CEST) From: dannym@scratchpost.org To: guix-patches@gnu.org Subject: [PATCH 0/8] Towards reproducible openjdk Date: Wed, 1 Jun 2022 14:57:41 +0200 Message-Id: <20220601125741.9898-1-dannym@scratchpost.org> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: none client-ip=85.13.145.193; envelope-from=dannym@scratchpost.org; helo=dd30410.kasserver.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: Danny Milosavljevic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) From: Danny Milosavljevic This patchseries improves the reproducibility of openjdk. After it: * openjdk9 is reproducible. * openjdk10 has only a few non-reproducible parts. * openjdk11 has a number of non-reproducible parts. * openjdk12's "doc" output is still not reproducible ("Generated by javadoc" comment with timestamp in it) * openjdk13 still has non-reproducible parts (jmod, modules, classes.jsa, src.zip) * openjdk14 still has very few non-reproducible parts (jmod, modules, classes.jsa) * openjdk15 still has a number of non-reproducible parts (diz files only). * openjdk16 still has one non-reproducible part (classes*.jsa) Danny Milosavljevic (8): gnu: openjdk9: Make build reproducible. gnu: openjdk10: Make more reproducible. gnu: openjdk11: Make more reproducible. gnu: openjdk12: Make reproducible. gnu: openjdk13: Make reproducible. gnu: openjdk14: Make reproducible. gnu: openjdk15: Make reproducible. gnu: openjdk16: Make reproducible. gnu/local.mk | 16 + gnu/packages/java.scm | 123 ++++++- .../openjdk-10-char-reproducibility.patch | 12 + ...openjdk-10-classlist-reproducibility.patch | 27 ++ .../openjdk-10-corba-reproducibility.patch | 12 + .../openjdk-10-jar-reproducibility.patch | 103 ++++++ .../openjdk-10-jtask-reproducibility.patch | 53 +++ .../openjdk-10-module-reproducibility.patch | 305 ++++++++++++++++++ .../openjdk-10-module3-reproducibility.patch | 34 ++ .../openjdk-10-module4-reproducibility.patch | 14 + ...openjdk-11-classlist-reproducibility.patch | 11 + ...openjdk-13-classlist-reproducibility.patch | 11 + .../openjdk-9-classlist-reproducibility.patch | 31 ++ .../openjdk-9-idlj-reproducibility.patch | 37 +++ .../openjdk-9-jar-reproducibility.patch | 107 ++++++ .../openjdk-9-module-reproducibility.patch | 296 +++++++++++++++++ .../openjdk-9-module2-reproducibility.patch | 125 +++++++ .../openjdk-9-module3-reproducibility.patch | 36 +++ 18 files changed, 1342 insertions(+), 11 deletions(-) create mode 100644 gnu/packages/patches/openjdk-10-char-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-classlist-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-corba-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-jar-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-jtask-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-module-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-module3-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-module4-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-11-classlist-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-13-classlist-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-9-classlist-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-9-idlj-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-9-jar-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-9-module-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-9-module2-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-9-module3-reproducibility.patch -- 2.36.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 01 09:00:46 2022 Received: (at 55751) by debbugs.gnu.org; 1 Jun 2022 13:00:47 +0000 Received: from localhost ([127.0.0.1]:49966 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwNxs-0002Ms-3n for submit@debbugs.gnu.org; Wed, 01 Jun 2022 09:00:46 -0400 Received: from dd30410.kasserver.com ([85.13.145.193]:50290) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwNxm-0002Lz-1K for 55751@debbugs.gnu.org; Wed, 01 Jun 2022 09:00:41 -0400 Received: from dayas.lan (84-115-234-55.cable.dynamic.surfer.at [84.115.234.55]) by dd30410.kasserver.com (Postfix) with ESMTPSA id D441611200FE; Wed, 1 Jun 2022 15:00:36 +0200 (CEST) From: dannym@scratchpost.org To: 55751@debbugs.gnu.org Subject: [PATCH 1/8] gnu: openjdk9: Make build reproducible. Date: Wed, 1 Jun 2022 15:00:04 +0200 Message-Id: <20220601130011.9910-2-dannym@scratchpost.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220601125741.9898-1-dannym@scratchpost.org> References: <20220601125741.9898-1-dannym@scratchpost.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 55751 Cc: Danny Milosavljevic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) From: Danny Milosavljevic * gnu/packages/patches/openjdk-9-classlist-reproducibility.patch: New file. * gnu/packages/patches/openjdk-9-jar-reproducibility.patch: New file. * gnu/packages/patches/openjdk-9-module-reproducibility.patch: New file. * gnu/packages/patches/openjdk-9-module2-reproducibility.patch: New file. * gnu/packages/patches/openjdk-9-module3-reproducibility.patch: New file. * gnu/packages/patches/openjdk-9-idlj-reproducibility.patch: New file. * gnu/packages/java.scm (openjdk9)[source]: Add patches. [arguments]<#:phases>[strip-zip-timestamps]: Modify. * gnu/local/mk (dist_patch_DATA): Add patches. --- gnu/local.mk | 6 + gnu/packages/java.scm | 61 +++- .../openjdk-9-classlist-reproducibility.patch | 31 ++ .../openjdk-9-idlj-reproducibility.patch | 37 +++ .../openjdk-9-jar-reproducibility.patch | 107 +++++++ .../openjdk-9-module-reproducibility.patch | 296 ++++++++++++++++++ .../openjdk-9-module2-reproducibility.patch | 125 ++++++++ .../openjdk-9-module3-reproducibility.patch | 36 +++ 8 files changed, 692 insertions(+), 7 deletions(-) create mode 100644 gnu/packages/patches/openjdk-9-classlist-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-9-idlj-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-9-jar-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-9-module-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-9-module2-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-9-module3-reproducibility.patch diff --git a/gnu/local.mk b/gnu/local.mk index bc82c5ba9f..5ba5af94a6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1567,6 +1567,12 @@ dist_patch_DATA = \ %D%/packages/patches/openboardview-use-system-utf8.patch \ %D%/packages/patches/opencascade-oce-glibc-2.26.patch \ %D%/packages/patches/openfoam-4.1-cleanup.patch \ + %D%/packages/patches/openjdk-9-classlist-reproducibility.patch \ + %D%/packages/patches/openjdk-9-idlj-reproducibility.patch \ + %D%/packages/patches/openjdk-9-jar-reproducibility.patch \ + %D%/packages/patches/openjdk-9-module-reproducibility.patch \ + %D%/packages/patches/openjdk-9-module2-reproducibility.patch \ + %D%/packages/patches/openjdk-9-module3-reproducibility.patch \ %D%/packages/patches/openjdk-10-idlj-reproducibility.patch \ %D%/packages/patches/openjdk-15-xcursor-no-dynamic.patch \ %D%/packages/patches/openmpi-mtl-priorities.patch \ diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 336e84e3e5..3d36849f7d 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1526,7 +1526,16 @@ (define-public openjdk9 (sha256 (base32 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq")) - (modules '((guix build utils))) + (patches + (search-patches "openjdk-9-classlist-reproducibility.patch" + "openjdk-9-jar-reproducibility.patch" + "openjdk-9-module-reproducibility.patch" + "openjdk-9-module2-reproducibility.patch" + "openjdk-9-module3-reproducibility.patch" + "openjdk-9-idlj-reproducibility.patch")) + (modules '((guix build utils) + (srfi srfi-35) + (ice-9 binary-ports))) (snippet `(begin (for-each delete-file @@ -1539,6 +1548,7 @@ (define-public openjdk9 #:make-flags '("all") #:imported-modules ((guix build syscalls) + (srfi srfi-35) ,@%gnu-build-system-modules) #:disallowed-references ,(list (gexp-input icedtea-8) @@ -1658,18 +1668,55 @@ (define (icedtea-or-openjdk? path) (for-each (lambda (zip) (let ((dir (mkdtemp! "zip-contents.XXXXXX"))) (with-directory-excursion dir - (invoke "unzip" zip)) + (let ((code (system* "unzip" "--" zip))) + (write code) + (newline) + (when (> (status:exit-val code) 1) ; 1 is just a warning + (raise (condition (&invoke-error + (program "unzip") + (arguments (list "--" zip)) + (exit-status (status:exit-val code)) + (term-signal (status:term-sig code)) + (stop-signal (status:stop-sig code)))))))) (delete-file zip) (for-each (lambda (file) (let ((s (lstat file))) - (unless (eq? (stat:type s) 'symlink) (format #t "reset ~a~%" file) - (utime file 0 0 0 0)))) + (utime file 1 1 0 0 + AT_SYMLINK_NOFOLLOW))) (find-files dir #:directories? #t)) (with-directory-excursion dir - (let ((files (find-files "." ".*" #:directories? #t))) - (apply invoke "zip" "-0" "-X" zip files))))) - (find-files (assoc-ref outputs "doc") ".*.zip$")) + (let ((files (cons "./META-INF/MANIFEST.MF" + (append (find-files "./META-INF" ".*") + ;; for jmod: + (list "./classes/module-info.class") + (find-files "." ".*"))))) + (apply invoke "zip" "--symlinks" "-0" "-X" zip files) + (when (string-suffix? ".jmod" zip) + (let ((new-zip (string-append zip "n")) + (contents (call-with-input-file zip + (@ (ice-9 binary-ports) get-bytevector-all)))) + (call-with-output-file new-zip + (lambda (output-port) + ((@ (ice-9 binary-ports) put-bytevector) output-port + #vu8(#x4a #x4d #x01 #x00)) ; JM + ((@ (ice-9 binary-ports) put-bytevector) output-port + contents))) + (rename-file new-zip zip))))))) + (append (find-files (string-append + (assoc-ref outputs "doc") + "/api") + "\\.zip$") + (find-files (assoc-ref outputs "doc") "src\\.zip$") + (find-files (assoc-ref outputs "jdk") "src\\.zip$") + (find-files (assoc-ref outputs "jdk") "\\.jmod$") + (find-files (assoc-ref outputs "jdk") "\\.diz$") + (find-files (assoc-ref outputs "out") "\\.diz$") + + (list (string-append (assoc-ref outputs "jdk") "/lib/jrt-fs.jar")) + (find-files (string-append (assoc-ref outputs "jdk") + "/demo") + "\\.jar$"))) #t))))) (inputs `(("alsa-lib" ,alsa-lib) diff --git a/gnu/packages/patches/openjdk-9-classlist-reproducibility.patch b/gnu/packages/patches/openjdk-9-classlist-reproducibility.patch new file mode 100644 index 0000000000..d0ce7bc4d6 --- /dev/null +++ b/gnu/packages/patches/openjdk-9-classlist-reproducibility.patch @@ -0,0 +1,31 @@ +From: Danny Milosavljevic +Date: Wed, 18 Apr 2022 18:38:28 +0100 +Subject: Make classlist reproducible + +--- jdk-09/make/GenerateLinkOptData.gmk.orig 2022-04-05 10:05:35.892134188 +0200 ++++ jdk-09/make/GenerateLinkOptData.gmk 2022-04-05 10:06:07.885003056 +0200 +@@ -61,11 +61,12 @@ + $(call MakeDir, $(LINK_OPT_DIR)) + $(call LogInfo, Generating $(patsubst $(OUTPUT_ROOT)/%, %, $@)) + $(call LogInfo, Generating $(patsubst $(OUTPUT_ROOT)/%, %, $(JLI_TRACE_FILE))) +- $(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@ \ ++ $(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.tmp \ + -Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \ + -cp $(SUPPORT_OUTPUTDIR)/classlist.jar \ + build.tools.classlist.HelloClasslist \ + $(LOG_DEBUG) 2>&1 > $(JLI_TRACE_FILE) ++ sort $@.tmp >$@ + + # The jli trace is created by the same recipe as classlist. By declaring these + # dependencies, make will correctly rebuild both jli trace and classlist +--- jdk-09/langtools/make/gendata/Gendata-jdk.compiler.gmk.orig 2022-04-08 22:04:05.784424812 +0200 ++++ jdk-09/langtools/make/gendata/Gendata-jdk.compiler.gmk 2022-04-08 22:09:36.333575143 +0200 +@@ -79,6 +79,8 @@ + $(CT_MODULESOURCEPATH) \ + $(CT_MODULES) \ + >$(@D)/9/system-modules ++ # Make files reproducible ++ find $(@D) -exec $(TOUCH) -h -c -t 197001010000.01 {} \; + $(TOUCH) $@ + + # Can't generate ct.sym directly into modules libs as the SetupJarArchive macro diff --git a/gnu/packages/patches/openjdk-9-idlj-reproducibility.patch b/gnu/packages/patches/openjdk-9-idlj-reproducibility.patch new file mode 100644 index 0000000000..30dcdf2496 --- /dev/null +++ b/gnu/packages/patches/openjdk-9-idlj-reproducibility.patch @@ -0,0 +1,37 @@ +From: Danny Milosavljevic +Date: Wed, 18 Apr 2022 19:28:00 +0100 +Subject: Make IDL reproducible + +--- jdk-09/corba/src/java.corba/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java.orig 2022-04-05 02:46:26.805340292 +0200 ++++ jdk-09/corba/src/java.corba/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java 2022-04-05 02:48:23.152494213 +0200 +@@ -1146,7 +1146,7 @@ + else + formatter.setTimeZone (java.util.TimeZone.getDefault ()); + +- stream.println ("* " + formatter.format (new Date ())); ++ stream.println ("* " + formatter.format (System.getenv("SOURCE_DATE_EPOCH") == null ? new Date () : new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))))); + + // + /////////////// +--- jdk-09/corba/make/src/classes/build/tools/logutil/MC.java.orig 2022-04-05 11:09:43.824720493 +0200 ++++ jdk-09/corba/make/src/classes/build/tools/logutil/MC.java 2022-04-05 11:10:46.518435511 +0200 +@@ -154,7 +154,7 @@ + groupName); + pw.println("//"); + pw.printMsg("// Generated by MC.java version @, DO NOT EDIT BY HAND!", VERSION); +- pw.printMsg("// Generated from input file @ on @", inFile, new Date()); ++ pw.printMsg("// Generated from input file @ on @", inFile, System.getenv("SOURCE_DATE_EPOCH") == null ? new Date() : new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")))); + pw.println(); + } + +--- jdk-09/jdk/make/src/classes/build/tools/generatecharacter/GenerateCharacter.java.orig 2022-04-05 11:14:29.228526408 +0200 ++++ jdk-09/jdk/make/src/classes/build/tools/generatecharacter/GenerateCharacter.java 2022-04-05 11:15:32.658260748 +0200 +@@ -693,7 +693,7 @@ + PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(theOutputFileName))); + out.println(commentStart + + " This file was generated AUTOMATICALLY from a template file " + +- new java.util.Date() + commentEnd); ++ (System.getenv("SOURCE_DATE_EPOCH") == null ? new java.util.Date() : new java.util.Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")))) + commentEnd); + int marklen = commandMarker.length(); + LOOP: while(true) { + try { diff --git a/gnu/packages/patches/openjdk-9-jar-reproducibility.patch b/gnu/packages/patches/openjdk-9-jar-reproducibility.patch new file mode 100644 index 0000000000..130eacd867 --- /dev/null +++ b/gnu/packages/patches/openjdk-9-jar-reproducibility.patch @@ -0,0 +1,107 @@ +From: Danny Milosavljevic +Date: Wed, 18 Apr 2022 20:10:01 +0100 +Subject: Make JARs reproducible + +--- jdk-09/make/common/JarArchive.gmk.orig 2022-04-08 21:56:04.075111687 +0200 ++++ jdk-09/make/common/JarArchive.gmk 2022-04-11 00:49:16.809140388 +0200 +@@ -249,12 +249,16 @@ + $(ECHO) "Main-Class: $$(strip $$($1_JARMAIN))" >> $$($1_MANIFEST_FILE) $$(NEWLINE)) \ + $$(if $$($1_EXTRA_MANIFEST_ATTR), \ + $(PRINTF) "$$($1_EXTRA_MANIFEST_ATTR)\n" >> $$($1_MANIFEST_FILE) $$(NEWLINE)) \ +- $(ECHO) Creating $$($1_NAME) $$(NEWLINE) \ ++ $(TOUCH) -h -c -t 197001010000.00 $$($1_MANIFEST_FILE) $$(NEWLINE) \ ++ $(ECHO) XCreating $$($1_NAME) $(JAR) $$($1_JAR_CREATE_OPTIONS) $$@ $$($1_MANIFEST_FILE) $$(NEWLINE) \ + $(JAR) $$($1_JAR_CREATE_OPTIONS) $$@ $$($1_MANIFEST_FILE) $$(NEWLINE) \ + $$($1_SCAPTURE_CONTENTS) \ + $$($1_SCAPTURE_METAINF) \ + $$($1_SUPDATE_CONTENTS) \ +- $$($1_JARINDEX) && true \ ++ $$($1_JARINDEX) && true $$(NEWLINE) \ ++ $(ECHO) Kreppel2 $$@ $$(NEWLINE) \ ++ unzip -v $$@ $$(NEWLINE) \ ++ d="`mktemp -d`" && $(CP) -f $$@ "$$$$d/a.jar" && (cd "$$$$d" && unzip a.jar META-INF/MANIFEST.MF && $(TOUCH) -h -c -t 197001010000.00 META-INF && $(TOUCH) -h -c -t 197001010000.00 META-INF/MANIFEST.MF && (zip --symlinks -0 -X a.jar META-INF META-INF/MANIFEST.MF; zip --symlinks -0 -X a.jar META-INF META-INF/MANIFEST.MF)) && $(CP) -f "$$$$d/a.jar" $$@ \ + , \ + $(ECHO) Modifying $$($1_NAME) $$(NEWLINE) \ + $$($1_CAPTURE_CONTENTS) \ +--- jdk-09/make/JrtfsJar.gmk.orig 2022-04-10 13:48:57.385120008 +0200 ++++ jdk-09/make/JrtfsJar.gmk 2022-04-10 13:58:04.688158538 +0200 +@@ -57,13 +57,18 @@ + # file will not be copied unless META-INF/services would also be added to the INCLUDES. + # Adding META-INF/services would include all files in that directory when only the one + # is needed, which is why this explicit copy is defined instead. +-$(eval $(call SetupCopyFiles, COPY_JIMAGE_SERVICE_PROVIDER, \ ++$(eval $(call SetupCopyFiles, COPY_JIMAGE_SERVICE_PROVIDER1, \ + SRC := $(JDK_TOPDIR)/src/java.base/share/classes, \ + DEST := $(SUPPORT_OUTPUTDIR)/jrtfs_classes, \ + FILES := META-INF/services/java.nio.file.spi.FileSystemProvider)) + ++.PHONY: jrtfsfixtimestamps47 ++jrtfsfixtimestamps47: $(COPY_JIMAGE_SERVICE_PROVIDER1) ++ find $(SUPPORT_OUTPUTDIR)/jrtfs_classes -exec $(TOUCH) -h -c -t 197001010000.00 {} \; ++ $(TOUCH) -h -c -t 197001010000.00 $(SUPPORT_OUTPUTDIR)/java-main-manifest.mf ++ + $(eval $(call SetupJarArchive,BUILD_JRTFS_JAR, \ +- DEPENDENCIES := $(BUILD_JRTFS) $(COPY_JIMAGE_SERVICE_PROVIDER), \ ++ DEPENDENCIES := $(BUILD_JRTFS) jrtfsfixtimestamps47, \ + SRCS := $(SUPPORT_OUTPUTDIR)/jrtfs_classes, \ + JAR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/jrt-fs.jar, \ + MANIFEST := $(SUPPORT_OUTPUTDIR)/java-main-manifest.mf, \ +--- jdk-09/jdk/src/jdk.jartool/share/classes/sun/tools/jar/Main.java.orig 2022-04-10 02:05:50.983247794 +0200 ++++ jdk-09/jdk/src/jdk.jartool/share/classes/sun/tools/jar/Main.java 2022-04-10 02:13:01.638960337 +0200 +@@ -850,12 +850,18 @@ + output(getMsg("out.added.manifest")); + } + ZipEntry e = new ZipEntry(MANIFEST_DIR); +- e.setTime(System.currentTimeMillis()); ++ if (System.getenv("SOURCE_DATE_EPOCH") != null) ++ e.setTime(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))); ++ else ++ e.setTime(System.currentTimeMillis()); + e.setSize(0); + e.setCrc(0); + zos.putNextEntry(e); + e = new ZipEntry(MANIFEST_NAME); +- e.setTime(System.currentTimeMillis()); ++ if (System.getenv("SOURCE_DATE_EPOCH") != null) ++ e.setTime(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))); ++ else ++ e.setTime(System.currentTimeMillis()); + if (flag0) { + crc32Manifest(e, manifest); + } +@@ -1022,7 +1028,10 @@ + throws IOException + { + ZipEntry e = new ZipEntry(INDEX_NAME); +- e.setTime(System.currentTimeMillis()); ++ if (System.getenv("SOURCE_DATE_EPOCH") != null) ++ e.setTime(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))); ++ else ++ e.setTime(System.currentTimeMillis()); + if (flag0) { + CRC32OutputStream os = new CRC32OutputStream(); + index.write(os); +@@ -1041,7 +1050,10 @@ + String name = mi.getKey(); + byte[] bytes = mi.getValue(); + ZipEntry e = new ZipEntry(name); +- e.setTime(System.currentTimeMillis()); ++ if (System.getenv("SOURCE_DATE_EPOCH") != null) ++ e.setTime(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))); ++ else ++ e.setTime(System.currentTimeMillis()); + if (flag0) { + crc32ModuleInfo(e, bytes); + } +@@ -1066,7 +1078,10 @@ + addMultiRelease(m); + } + ZipEntry e = new ZipEntry(MANIFEST_NAME); +- e.setTime(System.currentTimeMillis()); ++ if (System.getenv("SOURCE_DATE_EPOCH") != null) ++ e.setTime(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))); ++ else ++ e.setTime(System.currentTimeMillis()); + if (flag0) { + crc32Manifest(e, m); + } diff --git a/gnu/packages/patches/openjdk-9-module-reproducibility.patch b/gnu/packages/patches/openjdk-9-module-reproducibility.patch new file mode 100644 index 0000000000..80b6808395 --- /dev/null +++ b/gnu/packages/patches/openjdk-9-module-reproducibility.patch @@ -0,0 +1,296 @@ +From a52c4ef44c0553a399a8a47e528db92e3bf51c6c Mon Sep 17 00:00:00 2001 +From: Alan Bateman +Date: Wed, 29 Apr 2020 08:38:28 +0100 +Subject: [PATCH] 8243666: ModuleHashes attribute generated for JMOD and JAR + files depends on timestamps + +Reviewed-by: mchung +--- + +diff -ru orig/jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleHashesBuilder.java jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleHashesBuilder.java +--- orig/jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleHashesBuilder.java 1970-01-01 01:00:01.000000000 +0100 ++++ jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleHashesBuilder.java 2022-04-12 16:47:15.690423653 +0200 +@@ -27,9 +27,8 @@ + + import java.io.PrintStream; + import java.lang.module.Configuration; ++import java.lang.module.ModuleReference; + import java.lang.module.ResolvedModule; +-import java.net.URI; +-import java.nio.file.Path; + import java.nio.file.Paths; + import java.util.ArrayDeque; + import java.util.Collections; +@@ -40,7 +39,6 @@ + import java.util.Map; + import java.util.Set; + import java.util.function.Consumer; +-import java.util.function.Function; + import java.util.stream.Stream; + import static java.util.stream.Collectors.*; + +@@ -116,27 +114,17 @@ + mods.addAll(ns); + + if (!ns.isEmpty()) { +- Map moduleToPath = ns.stream() +- .collect(toMap(Function.identity(), this::moduleToPath)); +- hashes.put(mn, ModuleHashes.generate(moduleToPath, "SHA-256")); ++ Set mrefs = ns.stream() ++ .map(name -> configuration.findModule(name) ++ .orElseThrow(InternalError::new)) ++ .map(ResolvedModule::reference) ++ .collect(toSet()); ++ hashes.put(mn, ModuleHashes.generate(mrefs, "SHA-256")); + } + }); + return hashes; + } + +- private Path moduleToPath(String name) { +- ResolvedModule rm = configuration.findModule(name).orElseThrow( +- () -> new InternalError("Selected module " + name + " not on module path")); +- +- URI uri = rm.reference().location().get(); +- Path path = Paths.get(uri); +- String fn = path.getFileName().toString(); +- if (!fn.endsWith(".jar") && !fn.endsWith(".jmod")) { +- throw new UnsupportedOperationException(path + " is not a modular JAR or jmod file"); +- } +- return path; +- } +- + /* + * Utility class + */ +diff -ru orig/jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleHashes.java jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleHashes.java +--- orig/jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleHashes.java 1970-01-01 01:00:01.000000000 +0100 ++++ jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleHashes.java 2022-04-12 16:58:05.639985936 +0200 +@@ -26,17 +26,21 @@ + package jdk.internal.module; + + import java.io.IOException; ++import java.io.InputStream; + import java.io.UncheckedIOException; +-import java.nio.ByteBuffer; +-import java.nio.channels.FileChannel; +-import java.nio.file.Path; ++import java.lang.module.ModuleReader; ++import java.lang.module.ModuleReference; ++import java.nio.charset.StandardCharsets; + import java.security.MessageDigest; + import java.security.NoSuchAlgorithmException; ++import java.util.Arrays; + import java.util.Collections; + import java.util.HashMap; + import java.util.Map; + import java.util.Objects; + import java.util.Set; ++import java.util.TreeMap; ++import java.util.function.Supplier; + + /** + * The result of hashing the contents of a number of module artifacts. +@@ -60,8 +64,8 @@ + * @param algorithm the algorithm used to create the hashes + * @param nameToHash the map of module name to hash value + */ +- public ModuleHashes(String algorithm, Map nameToHash) { +- this.algorithm = algorithm; ++ ModuleHashes(String algorithm, Map nameToHash) { ++ this.algorithm = Objects.requireNonNull(algorithm); + this.nameToHash = Collections.unmodifiableMap(nameToHash); + } + +@@ -95,54 +99,125 @@ + } + + /** +- * Computes the hash for the given file with the given message digest +- * algorithm. ++ * Computes a hash from the names and content of a module. + * ++ * @param reader the module reader to access the module content ++ * @param algorithm the name of the message digest algorithm to use ++ * @return the hash ++ * @throws IllegalArgumentException if digest algorithm is not supported + * @throws UncheckedIOException if an I/O error occurs + * @throws RuntimeException if the algorithm is not available + */ +- public static byte[] computeHash(Path file, String algorithm) { ++ private static byte[] computeHash(ModuleReader reader, String algorithm) { ++ MessageDigest md; + try { +- MessageDigest md = MessageDigest.getInstance(algorithm); +- +- // Ideally we would just mmap the file but this consumes too much +- // memory when jlink is running concurrently on very large jmods +- try (FileChannel fc = FileChannel.open(file)) { +- ByteBuffer bb = ByteBuffer.allocate(32*1024); +- while (fc.read(bb) > 0) { +- bb.flip(); +- md.update(bb); +- assert bb.remaining() == 0; +- bb.clear(); +- } +- } +- +- return md.digest(); ++ md = MessageDigest.getInstance(algorithm); + } catch (NoSuchAlgorithmException e) { +- throw new RuntimeException(e); ++ throw new IllegalArgumentException(e); ++ } ++ try { ++ byte[] buf = new byte[32*1024]; ++ reader.list().sorted().forEach(rn -> { ++ md.update(rn.getBytes(StandardCharsets.UTF_8)); ++ try (InputStream in = reader.open(rn).orElseThrow(java.util.NoSuchElementException::new)) { ++ int n; ++ while ((n = in.read(buf)) > 0) { ++ md.update(buf, 0, n); ++ } ++ } catch (IOException ioe) { ++ throw new UncheckedIOException(ioe); ++ } ++ }); + } catch (IOException ioe) { + throw new UncheckedIOException(ioe); + } ++ return md.digest(); + } + + /** +- * Computes the hash for every entry in the given map, returning a +- * {@code ModuleHashes} to encapsulate the result. The map key is +- * the entry name, typically the module name. The map value is the file +- * path to the entry (module artifact). ++ * Computes a hash from the names and content of a module. + * ++ * @param supplier supplies the module reader to access the module content ++ * @param algorithm the name of the message digest algorithm to use ++ * @return the hash ++ * @throws IllegalArgumentException if digest algorithm is not supported ++ * @throws UncheckedIOException if an I/O error occurs ++ */ ++ static byte[] computeHash(Supplier supplier, String algorithm) { ++ try (ModuleReader reader = supplier.get()) { ++ return computeHash(reader, algorithm); ++ } catch (IOException ioe) { ++ throw new UncheckedIOException(ioe); ++ } ++ } ++ ++ /** ++ * Computes the hash from the names and content of a set of modules. Returns ++ * a {@code ModuleHashes} to encapsulate the result. ++ * @param mrefs the set of modules ++ * @param algorithm the name of the message digest algorithm to use + * @return ModuleHashes that encapsulates the hashes ++ * @throws IllegalArgumentException if digest algorithm is not supported ++ * @throws UncheckedIOException if an I/O error occurs + */ +- public static ModuleHashes generate(Map map, String algorithm) { ++ static ModuleHashes generate(Set mrefs, String algorithm) { + Map nameToHash = new HashMap<>(); +- for (Map.Entry entry: map.entrySet()) { +- String name = entry.getKey(); +- Path path = entry.getValue(); +- nameToHash.put(name, computeHash(path, algorithm)); ++ for (ModuleReference mref : mrefs) { ++ try (ModuleReader reader = mref.open()) { ++ byte[] hash = computeHash(reader, algorithm); ++ nameToHash.put(mref.descriptor().name(), hash); ++ } catch (IOException ioe) { ++ throw new UncheckedIOException(ioe); ++ } + } + return new ModuleHashes(algorithm, nameToHash); + } + ++ @Override ++ public int hashCode() { ++ int h = algorithm.hashCode(); ++ for (Map.Entry e : nameToHash.entrySet()) { ++ h = h * 31 + e.getKey().hashCode(); ++ h = h * 31 + Arrays.hashCode(e.getValue()); ++ } ++ return h; ++ } ++ ++ @Override ++ public boolean equals(Object obj) { ++ if (!(obj instanceof ModuleHashes)) ++ return false; ++ ModuleHashes other = (ModuleHashes) obj; ++ if (!algorithm.equals(other.algorithm) ++ || nameToHash.size() != other.nameToHash.size()) ++ return false; ++ for (Map.Entry e : nameToHash.entrySet()) { ++ String name = e.getKey(); ++ byte[] hash = e.getValue(); ++ if (!Arrays.equals(hash, other.nameToHash.get(name))) ++ return false; ++ } ++ return true; ++ } ++ ++ @Override ++ public String toString() { ++ StringBuilder sb = new StringBuilder(algorithm); ++ sb.append(" "); ++ nameToHash.entrySet() ++ .stream() ++ .sorted(Map.Entry.comparingByKey()) ++ .forEach(e -> { ++ sb.append(e.getKey()); ++ sb.append("="); ++ byte[] ba = e.getValue(); ++ for (byte b : ba) { ++ sb.append(String.format("%02x", b & 0xff)); ++ } ++ }); ++ return sb.toString(); ++ } ++ + /** + * This is used by jdk.internal.module.SystemModules class + * generated at link time. +diff -ru orig/jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java +--- orig/jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java 1970-01-01 01:00:01.000000000 +0100 ++++ jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java 2022-04-12 16:43:12.967868689 +0200 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +diff -ru orig/jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java +--- orig/jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java 1970-01-01 01:00:01.000000000 +0100 ++++ jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java 2022-04-12 16:43:12.971868797 +0200 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -95,7 +95,7 @@ + Path file) { + URI uri = file.toUri(); + Supplier supplier = () -> new JarModuleReader(file, uri); +- HashSupplier hasher = (a) -> ModuleHashes.computeHash(file, a); ++ HashSupplier hasher = (a) -> ModuleHashes.computeHash(supplier, a); + return newModule(attrs, uri, supplier, patcher, hasher); + } + +@@ -105,7 +105,7 @@ + static ModuleReference newJModModule(ModuleInfo.Attributes attrs, Path file) { + URI uri = file.toUri(); + Supplier supplier = () -> new JModModuleReader(file, uri); +- HashSupplier hasher = (a) -> ModuleHashes.computeHash(file, a); ++ HashSupplier hasher = (a) -> ModuleHashes.computeHash(supplier, a); + return newModule(attrs, uri, supplier, null, hasher); + } + diff --git a/gnu/packages/patches/openjdk-9-module2-reproducibility.patch b/gnu/packages/patches/openjdk-9-module2-reproducibility.patch new file mode 100644 index 0000000000..f167d94dc8 --- /dev/null +++ b/gnu/packages/patches/openjdk-9-module2-reproducibility.patch @@ -0,0 +1,125 @@ +Backport from openjdk 10 + +--- orig/jdk-3cc80be736f2/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ModuleSorter.java 1970-01-01 01:00:01.000000000 +0100 ++++ jdk-3cc80be736f2/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ModuleSorter.java 2022-04-12 20:48:04.474353305 +0200 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -30,13 +30,16 @@ + import jdk.tools.jlink.plugin.ResourcePoolModuleView; + + import java.lang.module.ModuleDescriptor; ++import java.lang.module.ModuleDescriptor.Requires; + import java.lang.module.ModuleDescriptor.Requires.Modifier; + + import java.nio.ByteBuffer; +-import java.util.Deque; ++import java.util.ArrayList; ++import java.util.Comparator; + import java.util.HashMap; + import java.util.HashSet; +-import java.util.LinkedList; ++import java.util.LinkedHashSet; ++import java.util.List; + import java.util.Map; + import java.util.Set; + import java.util.stream.Stream; +@@ -45,9 +48,8 @@ + * Helper class to sort modules in topological order + */ + public final class ModuleSorter { +- private final Deque nodes = new LinkedList<>(); +- private final Map> edges = new HashMap<>(); +- private final Deque result = new LinkedList<>(); ++ private final Map> graph = new HashMap<>(); ++ private final List result = new ArrayList<>(); + + private final ResourcePoolModuleView moduleView; + +@@ -69,11 +71,17 @@ + + private ModuleSorter addModule(ResourcePoolModule module) { + addNode(module); +- readModuleDescriptor(module).requires().forEach(req -> { ++ // the module graph will be traversed in a stable order for ++ // the topological sort. So add the dependences in the module name order ++ readModuleDescriptor(module).requires() ++ .stream() ++ .sorted(Comparator.comparing(Requires::name)) ++ .forEach(req -> ++ { + ResourcePoolModule dep = moduleView.findModule(req.name()).orElse(null); + if (dep != null) { + addNode(dep); +- edges.get(module.name()).add(dep); ++ graph.get(module).add(dep); + } else if (!req.modifiers().contains(Modifier.STATIC)) { + throw new PluginException(req.name() + " not found"); + } +@@ -82,22 +90,23 @@ + } + + private void addNode(ResourcePoolModule module) { +- nodes.add(module); +- edges.computeIfAbsent(module.name(), _n -> new HashSet<>()); ++ graph.computeIfAbsent(module, _n -> new LinkedHashSet<>()); + } + ++ /* ++ * The module graph will be traversed in a stable order ++ * (traversing the modules and their dependences in alphabetical order) ++ * so that it will produce the same result of a given module graph. ++ */ + private synchronized void build() { +- if (!result.isEmpty() || nodes.isEmpty()) ++ if (!result.isEmpty() || graph.isEmpty()) + return; + +- Deque visited = new LinkedList<>(); +- Deque done = new LinkedList<>(); +- ResourcePoolModule node; +- while ((node = nodes.poll()) != null) { +- if (!visited.contains(node)) { +- visit(node, visited, done); +- } +- } ++ Set visited = new HashSet<>(); ++ Set done = new HashSet<>(); ++ graph.keySet().stream() ++ .sorted(Comparator.comparing(ResourcePoolModule::name)) ++ .forEach(node -> visit(node, visited, done)); + } + + public Stream sorted() { +@@ -106,19 +115,21 @@ + } + + private void visit(ResourcePoolModule node, +- Deque visited, +- Deque done) { ++ Set visited, ++ Set done) { + if (visited.contains(node)) { + if (!done.contains(node)) { + throw new IllegalArgumentException("Cyclic detected: " + +- node + " " + edges.get(node.name())); ++ node + " " + graph.get(node)); + } + return; + } ++ ++ // traverse the dependences of the given module which are ++ // also sorted in alphabetical order + visited.add(node); +- edges.get(node.name()) +- .forEach(x -> visit(x, visited, done)); ++ graph.get(node).forEach(x -> visit(x, visited, done)); + done.add(node); +- result.addLast(node); ++ result.add(node); + } + } diff --git a/gnu/packages/patches/openjdk-9-module3-reproducibility.patch b/gnu/packages/patches/openjdk-9-module3-reproducibility.patch new file mode 100644 index 0000000000..9db54f5531 --- /dev/null +++ b/gnu/packages/patches/openjdk-9-module3-reproducibility.patch @@ -0,0 +1,36 @@ +From: Danny Milosavljevic +Date: Wed, 18 Apr 2022 21:50:00 +0100 +Subject: Make module descriptor reproducible + +--- orig/jdk-3cc80be736f2/jdk/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java 1970-01-01 01:00:01.000000000 +0100 ++++ jdk-3cc80be736f2/jdk/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java 2022-04-13 17:30:37.242775977 +0200 +@@ -43,6 +43,7 @@ + import java.util.Objects; + import java.util.Optional; + import java.util.Set; ++import java.util.TreeSet; + import java.util.function.Supplier; + import java.util.stream.Collectors; + import java.util.stream.Stream; +@@ -2155,9 +2156,9 @@ + * @return The module descriptor + */ + public ModuleDescriptor build() { +- Set requires = new HashSet<>(this.requires.values()); +- Set exports = new HashSet<>(this.exports.values()); +- Set opens = new HashSet<>(this.opens.values()); ++ Set requires = new TreeSet<>(this.requires.values()); ++ Set exports = new TreeSet<>(this.exports.values()); ++ Set opens = new TreeSet<>(this.opens.values()); + + // add dependency on java.base + if (strict +@@ -2169,7 +2170,7 @@ + null)); + } + +- Set provides = new HashSet<>(this.provides.values()); ++ Set provides = new TreeSet<>(this.provides.values()); + + return new ModuleDescriptor(name, + version, -- 2.36.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 01 09:00:47 2022 Received: (at 55751) by debbugs.gnu.org; 1 Jun 2022 13:00:47 +0000 Received: from localhost ([127.0.0.1]:49968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwNxu-0002N3-S5 for submit@debbugs.gnu.org; Wed, 01 Jun 2022 09:00:47 -0400 Received: from dd30410.kasserver.com ([85.13.145.193]:50292) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwNxm-0002M2-3L for 55751@debbugs.gnu.org; Wed, 01 Jun 2022 09:00:42 -0400 Received: from dayas.lan (84-115-234-55.cable.dynamic.surfer.at [84.115.234.55]) by dd30410.kasserver.com (Postfix) with ESMTPSA id 6429411204C9; Wed, 1 Jun 2022 15:00:37 +0200 (CEST) From: dannym@scratchpost.org To: 55751@debbugs.gnu.org Subject: [PATCH 3/8] gnu: openjdk11: Make more reproducible. Date: Wed, 1 Jun 2022 15:00:06 +0200 Message-Id: <20220601130011.9910-4-dannym@scratchpost.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220601125741.9898-1-dannym@scratchpost.org> References: <20220601125741.9898-1-dannym@scratchpost.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 55751 Cc: Danny Milosavljevic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) From: Danny Milosavljevic * gnu/packages/java.scm (openjdk11)[source]: Add patches. [arguments]<#:phases>[remove-timestamping]: Add phase. * gnu/packages/patches/openjdk-11-classlist-reproducibility.patch: New file. * gnu/local.mk (dist_patch_DATA): Add patches. --- gnu/local.mk | 1 + gnu/packages/java.scm | 21 ++++++++++++++++++- ...openjdk-11-classlist-reproducibility.patch | 11 ++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/openjdk-11-classlist-reproducibility.patch diff --git a/gnu/local.mk b/gnu/local.mk index 0a81e0fe75..eaf0e306fb 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1582,6 +1582,7 @@ dist_patch_DATA = \ %D%/packages/patches/openjdk-10-module-reproducibility.patch \ %D%/packages/patches/openjdk-10-module3-reproducibility.patch \ %D%/packages/patches/openjdk-10-module4-reproducibility.patch \ + %D%/packages/patches/openjdk-11-classlist-reproducibility.patch \ %D%/packages/patches/openjdk-15-xcursor-no-dynamic.patch \ %D%/packages/patches/openmpi-mtl-priorities.patch \ %D%/packages/patches/openssh-hurd.patch \ diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 37b310141e..5a1e45ca68 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1842,7 +1842,17 @@ (define-public openjdk11 (snippet `(begin (for-each delete-file (find-files "." ".*.(bin|exe|jar)$")) - #t)))) + #t)) + (patches + (search-patches ;"openjdk-10-module-reproducibility.patch" + "openjdk-10-module3-reproducibility.patch" + "openjdk-10-module4-reproducibility.patch" + "openjdk-10-char-reproducibility.patch" + "openjdk-11-classlist-reproducibility.patch" + ;"openjdk-10-corba-reproducibility.patch" + ;"openjdk-10-idlj-reproducibility.patch" + "openjdk-10-jar-reproducibility.patch" + "openjdk-10-jtask-reproducibility.patch")))) (build-system gnu-build-system) (outputs '("out" "jdk" "doc")) (arguments @@ -1869,6 +1879,10 @@ (define-public openjdk11 "--with-libjpeg=system" "--with-libpng=system" "--with-version-pre=" + ;; should be set by SOURCE_DATE_EPOCH handler, but + ;; isn't being set. So manually do it. + "--with-hotspot-build-time=1970-01-01T00:00:01" + "--enable-reproducible-build" ; to be sure ;; allow the build system to locate the system freetype ,(string-append "--with-freetype-include=" (assoc-ref %build-inputs "freetype") "/include") @@ -1883,6 +1897,11 @@ (define-public openjdk11 (substitute* "make/data/blockedcertsconverter/blocked.certs.pem" (("^#!.*") "#! java BlockedCertsConverter SHA-256\n")) #t)) + (add-after 'unpack 'remove-timestamping + (lambda _ + (substitute* "src/hotspot/share/runtime/abstract_vm_version.cpp" + (("__DATE__") "") + (("__TIME__") "")))) (add-after 'unpack 'patch-jni-libs ;; Hardcode dynamically loaded libraries. (lambda _ diff --git a/gnu/packages/patches/openjdk-11-classlist-reproducibility.patch b/gnu/packages/patches/openjdk-11-classlist-reproducibility.patch new file mode 100644 index 0000000000..2ac7c2b664 --- /dev/null +++ b/gnu/packages/patches/openjdk-11-classlist-reproducibility.patch @@ -0,0 +1,11 @@ +--- jdk-11.0.13-ga/make/GenerateLinkOptData.gmk.orig 2022-04-04 17:18:56.801929954 +0200 ++++ jdk-11.0.13-ga/make/GenerateLinkOptData.gmk 2022-04-04 17:19:14.962422622 +0200 +@@ -66,7 +66,7 @@ + -cp $(SUPPORT_OUTPUTDIR)/classlist.jar \ + build.tools.classlist.HelloClasslist \ + $(LOG_DEBUG) 2>&1 > $(JLI_TRACE_FILE) +- $(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 -- 2.36.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 01 09:00:47 2022 Received: (at 55751) by debbugs.gnu.org; 1 Jun 2022 13:00:47 +0000 Received: from localhost ([127.0.0.1]:49970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwNxv-0002NA-Dx for submit@debbugs.gnu.org; Wed, 01 Jun 2022 09:00:47 -0400 Received: from dd30410.kasserver.com ([85.13.145.193]:50294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwNxm-0002M3-A8 for 55751@debbugs.gnu.org; Wed, 01 Jun 2022 09:00:42 -0400 Received: from dayas.lan (84-115-234-55.cable.dynamic.surfer.at [84.115.234.55]) by dd30410.kasserver.com (Postfix) with ESMTPSA id 9A9931120D3E; Wed, 1 Jun 2022 15:00:37 +0200 (CEST) From: dannym@scratchpost.org To: 55751@debbugs.gnu.org Subject: [PATCH 4/8] gnu: openjdk12: Make reproducible. Date: Wed, 1 Jun 2022 15:00:07 +0200 Message-Id: <20220601130011.9910-5-dannym@scratchpost.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220601125741.9898-1-dannym@scratchpost.org> References: <20220601125741.9898-1-dannym@scratchpost.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 55751 Cc: Danny Milosavljevic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) From: Danny Milosavljevic * gnu/packages/java.scm (openjdk12)[arguments]<#:phases>[remove-timestamping]: Modify phase. --- gnu/packages/java.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 5a1e45ca68..1a872ce786 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2138,6 +2138,11 @@ (define-public openjdk12 (substitute-keyword-arguments (package-arguments openjdk11) ((#:phases phases) `(modify-phases ,phases + (replace 'remove-timestamping + (lambda _ + (substitute* "src/hotspot/share/runtime/vm_version.cpp" + (("__DATE__") "") + (("__TIME__") "")))) (replace 'fix-java-shebangs (lambda _ ;; This file was "fixed" by patch-source-shebangs, but it requires -- 2.36.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 01 09:00:48 2022 Received: (at 55751) by debbugs.gnu.org; 1 Jun 2022 13:00:48 +0000 Received: from localhost ([127.0.0.1]:49972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwNxv-0002NI-P0 for submit@debbugs.gnu.org; Wed, 01 Jun 2022 09:00:48 -0400 Received: from dd30410.kasserver.com ([85.13.145.193]:50310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwNxq-0002MJ-CZ for 55751@debbugs.gnu.org; Wed, 01 Jun 2022 09:00:43 -0400 Received: from dayas.lan (84-115-234-55.cable.dynamic.surfer.at [84.115.234.55]) by dd30410.kasserver.com (Postfix) with ESMTPSA id 0DBAB1120E3D; Wed, 1 Jun 2022 15:00:38 +0200 (CEST) From: dannym@scratchpost.org To: 55751@debbugs.gnu.org Subject: [PATCH 6/8] gnu: openjdk14: Make reproducible. Date: Wed, 1 Jun 2022 15:00:09 +0200 Message-Id: <20220601130011.9910-7-dannym@scratchpost.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220601125741.9898-1-dannym@scratchpost.org> References: <20220601125741.9898-1-dannym@scratchpost.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 55751 Cc: Danny Milosavljevic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) From: Danny Milosavljevic * gnu/packages/java.scm (openjdk14)[source]: Add patches. --- gnu/packages/java.scm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 7bf8527d67..2599170d84 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2245,6 +2245,9 @@ (define-public openjdk14 (sha256 (base32 "07k9bsbxwyf2z2n50z96nvhsdai916mxdxcr5lm44jz7f6xrwfq6")) + (patches + (search-patches "openjdk-13-classlist-reproducibility.patch" + "openjdk-10-jtask-reproducibility.patch")) (modules '((guix build utils))) (snippet `(begin -- 2.36.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 01 09:00:48 2022 Received: (at 55751) by debbugs.gnu.org; 1 Jun 2022 13:00:48 +0000 Received: from localhost ([127.0.0.1]:49974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwNxw-0002NP-29 for submit@debbugs.gnu.org; Wed, 01 Jun 2022 09:00:48 -0400 Received: from dd30410.kasserver.com ([85.13.145.193]:50296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwNxm-0002M4-Gy for 55751@debbugs.gnu.org; Wed, 01 Jun 2022 09:00:43 -0400 Received: from dayas.lan (84-115-234-55.cable.dynamic.surfer.at [84.115.234.55]) by dd30410.kasserver.com (Postfix) with ESMTPSA id CC1281120ECD; Wed, 1 Jun 2022 15:00:37 +0200 (CEST) From: dannym@scratchpost.org To: 55751@debbugs.gnu.org Subject: [PATCH 5/8] gnu: openjdk13: Make reproducible. Date: Wed, 1 Jun 2022 15:00:08 +0200 Message-Id: <20220601130011.9910-6-dannym@scratchpost.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220601125741.9898-1-dannym@scratchpost.org> References: <20220601125741.9898-1-dannym@scratchpost.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 55751 Cc: Danny Milosavljevic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) From: Danny Milosavljevic * 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. --- gnu/local.mk | 1 + gnu/packages/java.scm | 12 ++++++++++++ .../openjdk-13-classlist-reproducibility.patch | 11 +++++++++++ 3 files changed, 24 insertions(+) create mode 100644 gnu/packages/patches/openjdk-13-classlist-reproducibility.patch diff --git a/gnu/local.mk b/gnu/local.mk index eaf0e306fb..aab850b4f7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1583,6 +1583,7 @@ dist_patch_DATA = \ %D%/packages/patches/openjdk-10-module3-reproducibility.patch \ %D%/packages/patches/openjdk-10-module4-reproducibility.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/openmpi-mtl-priorities.patch \ %D%/packages/patches/openssh-hurd.patch \ diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 1a872ce786..7bf8527d67 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2189,11 +2189,23 @@ (define-public openjdk13 (sha256 (base32 "0wrrr0d7lz1v8qqm752mn4gz5l2vpl2kmx4ac3ysvk4mljc924hp")) + (patches + (search-patches "openjdk-13-classlist-reproducibility.patch" + "openjdk-10-jtask-reproducibility.patch")) (modules '((guix build utils))) (snippet `(begin (for-each delete-file (find-files "." ".*.(bin|exe|jar)$")) #t)))) + (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__") "")))))))) (inputs `(("alsa-lib" ,alsa-lib) ("cups" ,cups) 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 -- 2.36.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 01 09:00:48 2022 Received: (at 55751) by debbugs.gnu.org; 1 Jun 2022 13:00:48 +0000 Received: from localhost ([127.0.0.1]:49976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwNxw-0002NW-Jn for submit@debbugs.gnu.org; Wed, 01 Jun 2022 09:00:48 -0400 Received: from dd30410.kasserver.com ([85.13.145.193]:50308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwNxq-0002MI-Ca for 55751@debbugs.gnu.org; Wed, 01 Jun 2022 09:00:43 -0400 Received: from dayas.lan (84-115-234-55.cable.dynamic.surfer.at [84.115.234.55]) by dd30410.kasserver.com (Postfix) with ESMTPSA id 4AEDD112101C; Wed, 1 Jun 2022 15:00:38 +0200 (CEST) From: dannym@scratchpost.org To: 55751@debbugs.gnu.org Subject: [PATCH 7/8] gnu: openjdk15: Make reproducible. Date: Wed, 1 Jun 2022 15:00:10 +0200 Message-Id: <20220601130011.9910-8-dannym@scratchpost.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220601125741.9898-1-dannym@scratchpost.org> References: <20220601125741.9898-1-dannym@scratchpost.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 55751 Cc: Danny Milosavljevic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) From: Danny Milosavljevic * gnu/packages/java.scm (openjdk15)[source]: Add patch. --- gnu/packages/java.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 2599170d84..368abf8ba6 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2297,7 +2297,8 @@ (define-public openjdk15 (base32 "168cr08nywp0q3vyj8njkhsmmnyd8rz9r58hk4xhzdzc6bdfkl1i")) (patches - (search-patches "openjdk-15-xcursor-no-dynamic.patch")))) + (search-patches "openjdk-15-jtask-reproducibility.patch" + "openjdk-15-xcursor-no-dynamic.patch")))) (inputs (cons `("libxcursor" ,libxcursor) ; for our patch to work (package-inputs openjdk14))) -- 2.36.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 01 09:00:49 2022 Received: (at 55751) by debbugs.gnu.org; 1 Jun 2022 13:00:49 +0000 Received: from localhost ([127.0.0.1]:49978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwNxw-0002Ne-Rp for submit@debbugs.gnu.org; Wed, 01 Jun 2022 09:00:49 -0400 Received: from dd30410.kasserver.com ([85.13.145.193]:50314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwNxq-0002MR-Si for 55751@debbugs.gnu.org; Wed, 01 Jun 2022 09:00:43 -0400 Received: from dayas.lan (84-115-234-55.cable.dynamic.surfer.at [84.115.234.55]) by dd30410.kasserver.com (Postfix) with ESMTPSA id 8510C11210DF; Wed, 1 Jun 2022 15:00:38 +0200 (CEST) From: dannym@scratchpost.org To: 55751@debbugs.gnu.org Subject: [PATCH 8/8] gnu: openjdk16: Make reproducible. Date: Wed, 1 Jun 2022 15:00:11 +0200 Message-Id: <20220601130011.9910-9-dannym@scratchpost.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220601125741.9898-1-dannym@scratchpost.org> References: <20220601125741.9898-1-dannym@scratchpost.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 55751 Cc: Danny Milosavljevic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) From: Danny Milosavljevic * gnu/packages/java.scm (openjdk16)[source]: Add patch. --- gnu/packages/java.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 368abf8ba6..d1538d0afa 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2326,7 +2326,8 @@ (define-public openjdk16 (base32 "1ggddsbsar4dj2fycfqqqagqil7prhb30afvq6933rz7pa9apm2f")) (patches - (search-patches "openjdk-15-xcursor-no-dynamic.patch")))) + (search-patches "openjdk-15-jtask-reproducibility.patch" + "openjdk-15-xcursor-no-dynamic.patch")))) (native-inputs `(("autoconf" ,autoconf) ("openjdk15:jdk" ,openjdk15 "jdk") -- 2.36.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 01 09:00:50 2022 Received: (at 55751) by debbugs.gnu.org; 1 Jun 2022 13:00:50 +0000 Received: from localhost ([127.0.0.1]:49980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwNxx-0002Nl-2v for submit@debbugs.gnu.org; Wed, 01 Jun 2022 09:00:50 -0400 Received: from dd30410.kasserver.com ([85.13.145.193]:50288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwNxm-0002M0-1w for 55751@debbugs.gnu.org; Wed, 01 Jun 2022 09:00:45 -0400 Received: from dayas.lan (84-115-234-55.cable.dynamic.surfer.at [84.115.234.55]) by dd30410.kasserver.com (Postfix) with ESMTPSA id 2659F1120248; Wed, 1 Jun 2022 15:00:37 +0200 (CEST) From: dannym@scratchpost.org To: 55751@debbugs.gnu.org Subject: [PATCH 2/8] gnu: openjdk10: Make more reproducible. Date: Wed, 1 Jun 2022 15:00:05 +0200 Message-Id: <20220601130011.9910-3-dannym@scratchpost.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220601125741.9898-1-dannym@scratchpost.org> References: <20220601125741.9898-1-dannym@scratchpost.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 55751 Cc: Danny Milosavljevic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) From: Danny Milosavljevic * gnu/packages/patches/openjdk-10-char-reproducibility.patch: New file. * gnu/packages/patches/openjdk-10-classlist-reproducibility.patch: New file. * gnu/packages/patches/openjdk-10-corba-reproducibility.patch: New file. * gnu/packages/patches/openjdk-10-jar-reproducibility.patch: New file. * gnu/packages/patches/openjdk-10-jtask-reproducibility.patch: New file. * gnu/packages/patches/openjdk-10-module-reproducibility.patch: New file. * gnu/packages/patches/openjdk-10-module3-reproducibility.patch: New file. * gnu/packages/patches/openjdk-10-module4-reproducibility.patch: New file. * gnu/packages/java.scm (openjdk10)[source]: Add patches. [arguments]<#:phases>[remove-timestamping]: New phase. * gnu/local.mk (dist_patch_DATA): Add patches. --- gnu/local.mk | 8 + gnu/packages/java.scm | 15 +- .../openjdk-10-char-reproducibility.patch | 12 + ...openjdk-10-classlist-reproducibility.patch | 27 ++ .../openjdk-10-corba-reproducibility.patch | 12 + .../openjdk-10-jar-reproducibility.patch | 103 ++++++ .../openjdk-10-jtask-reproducibility.patch | 53 +++ .../openjdk-10-module-reproducibility.patch | 305 ++++++++++++++++++ .../openjdk-10-module3-reproducibility.patch | 34 ++ .../openjdk-10-module4-reproducibility.patch | 14 + 10 files changed, 582 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/openjdk-10-char-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-classlist-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-corba-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-jar-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-jtask-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-module-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-module3-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-module4-reproducibility.patch diff --git a/gnu/local.mk b/gnu/local.mk index 5ba5af94a6..0a81e0fe75 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1573,7 +1573,15 @@ dist_patch_DATA = \ %D%/packages/patches/openjdk-9-module-reproducibility.patch \ %D%/packages/patches/openjdk-9-module2-reproducibility.patch \ %D%/packages/patches/openjdk-9-module3-reproducibility.patch \ + %D%/packages/patches/openjdk-10-char-reproducibility.patch \ + %D%/packages/patches/openjdk-10-classlist-reproducibility.patch \ + %D%/packages/patches/openjdk-10-corba-reproducibility.patch \ %D%/packages/patches/openjdk-10-idlj-reproducibility.patch \ + %D%/packages/patches/openjdk-10-jar-reproducibility.patch \ + %D%/packages/patches/openjdk-10-jtask-reproducibility.patch \ + %D%/packages/patches/openjdk-10-module-reproducibility.patch \ + %D%/packages/patches/openjdk-10-module3-reproducibility.patch \ + %D%/packages/patches/openjdk-10-module4-reproducibility.patch \ %D%/packages/patches/openjdk-15-xcursor-no-dynamic.patch \ %D%/packages/patches/openmpi-mtl-priorities.patch \ %D%/packages/patches/openssh-hurd.patch \ diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 3d36849f7d..37b310141e 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1763,7 +1763,15 @@ (define-public openjdk10 (base32 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4")) (patches (search-patches - "openjdk-10-idlj-reproducibility.patch")) + "openjdk-10-module-reproducibility.patch" + "openjdk-10-module3-reproducibility.patch" + "openjdk-10-module4-reproducibility.patch" + "openjdk-10-char-reproducibility.patch" + "openjdk-10-classlist-reproducibility.patch" + "openjdk-10-corba-reproducibility.patch" + "openjdk-10-idlj-reproducibility.patch" + "openjdk-10-jar-reproducibility.patch" + "openjdk-10-jtask-reproducibility.patch")) (modules '((guix build utils))) (snippet `(begin @@ -1780,6 +1788,11 @@ (define-public openjdk10 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem" (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n")) #t)) + (add-after 'unpack 'remove-timestamping + (lambda _ + (substitute* "./src/hotspot/share/runtime/vm_version.cpp" + (("__DATE__") "") + (("__TIME__") "")))) (replace 'configure (lambda* (#:key inputs outputs #:allow-other-keys) (invoke "bash" "./configure" diff --git a/gnu/packages/patches/openjdk-10-char-reproducibility.patch b/gnu/packages/patches/openjdk-10-char-reproducibility.patch new file mode 100644 index 0000000000..a7932678af --- /dev/null +++ b/gnu/packages/patches/openjdk-10-char-reproducibility.patch @@ -0,0 +1,12 @@ +Danny +--- orig/jdk-6fa770f9f8ab/make/jdk/src/classes/build/tools/generatecharacter/GenerateCharacter.java 2022-04-13 19:24:10.211683257 +0200 ++++ jdk-6fa770f9f8ab/make/jdk/src/classes/build/tools/generatecharacter/GenerateCharacter.java 2022-04-13 22:51:50.680487330 +0200 +@@ -693,7 +693,7 @@ + PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(theOutputFileName))); + out.println(commentStart + + " This file was generated AUTOMATICALLY from a template file " + +- new java.util.Date() + commentEnd); ++ (System.getenv("SOURCE_DATE_EPOCH") == null ? new java.util.Date() : new java.util.Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")))) + commentEnd); + int marklen = commandMarker.length(); + LOOP: while(true) { + try { diff --git a/gnu/packages/patches/openjdk-10-classlist-reproducibility.patch b/gnu/packages/patches/openjdk-10-classlist-reproducibility.patch new file mode 100644 index 0000000000..e1292ba82d --- /dev/null +++ b/gnu/packages/patches/openjdk-10-classlist-reproducibility.patch @@ -0,0 +1,27 @@ +--- orig/jdk-6fa770f9f8ab/make/GenerateLinkOptData.gmk 2022-04-04 17:16:29.365930149 +0200 ++++ jdk-6fa770f9f8ab/make/GenerateLinkOptData.gmk 2022-04-04 17:16:54.954624358 +0200 +@@ -61,11 +61,12 @@ + $(call MakeDir, $(LINK_OPT_DIR)) + $(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $@)) + $(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $(JLI_TRACE_FILE))) +- $(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@ \ ++ $(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.tmp \ + -Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \ + -cp $(SUPPORT_OUTPUTDIR)/classlist.jar \ + build.tools.classlist.HelloClasslist \ + $(LOG_DEBUG) 2>&1 > $(JLI_TRACE_FILE) ++ sort $@.tmp > $@ + + # The jli trace is created by the same recipe as classlist. By declaring these + # dependencies, make will correctly rebuild both jli trace and classlist +--- orig/jdk-6fa770f9f8ab/make/gendata/Gendata-jdk.compiler.gmk 2022-04-13 19:24:10.191682716 +0200 ++++ jdk-6fa770f9f8ab/make/gendata/Gendata-jdk.compiler.gmk 2022-04-13 20:58:57.891368216 +0200 +@@ -83,6 +83,8 @@ + $(CT_MODULESOURCEPATH) \ + $(CT_MODULES) \ + >$(@D)/A/system-modules ++ # Make files reproducible ++ find $(@D) -exec $(TOUCH) -h -c -t 197001010000.01 {} \; + $(TOUCH) $@ + + # Can't generate ct.sym directly into modules libs as the SetupJarArchive macro diff --git a/gnu/packages/patches/openjdk-10-corba-reproducibility.patch b/gnu/packages/patches/openjdk-10-corba-reproducibility.patch new file mode 100644 index 0000000000..bd5ce1fd2b --- /dev/null +++ b/gnu/packages/patches/openjdk-10-corba-reproducibility.patch @@ -0,0 +1,12 @@ +Danny +--- orig/jdk-6fa770f9f8ab/make/corba/src/classes/build/tools/logutil/MC.java 2022-04-13 19:24:10.111680549 +0200 ++++ jdk-6fa770f9f8ab/make/corba/src/classes/build/tools/logutil/MC.java 2022-04-13 22:51:13.399462259 +0200 +@@ -154,7 +154,7 @@ + groupName); + pw.println("//"); + pw.printMsg("// Generated by MC.java version @, DO NOT EDIT BY HAND!", VERSION); +- pw.printMsg("// Generated from input file @ on @", inFile, new Date()); ++ pw.printMsg("// Generated from input file @ on @", inFile, System.getenv("SOURCE_DATE_EPOCH") == null ? new Date() : new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")))); + pw.println(); + } + diff --git a/gnu/packages/patches/openjdk-10-jar-reproducibility.patch b/gnu/packages/patches/openjdk-10-jar-reproducibility.patch new file mode 100644 index 0000000000..176eedfce6 --- /dev/null +++ b/gnu/packages/patches/openjdk-10-jar-reproducibility.patch @@ -0,0 +1,103 @@ +diff -ru orig/jdk-6fa770f9f8ab/make/common/JarArchive.gmk jdk-6fa770f9f8ab/make/common/JarArchive.gmk +--- orig/jdk-6fa770f9f8ab/make/common/JarArchive.gmk 2022-04-13 19:24:10.107680441 +0200 ++++ jdk-6fa770f9f8ab/make/common/JarArchive.gmk 2022-04-13 19:31:18.031271019 +0200 +@@ -251,12 +251,14 @@ + $(ECHO) "Main-Class: $$(strip $$($1_JARMAIN))" >> $$($1_MANIFEST_FILE) $$(NEWLINE)) \ + $$(if $$($1_EXTRA_MANIFEST_ATTR), \ + $(PRINTF) "$$($1_EXTRA_MANIFEST_ATTR)\n" >> $$($1_MANIFEST_FILE) $$(NEWLINE)) \ ++ $(TOUCH) -h -c -t 197001010000.00 $$($1_MANIFEST_FILE) $$(NEWLINE) \ + $(ECHO) Creating $$($1_NAME) $$(NEWLINE) \ + $$($1_JAR_CMD) $$($1_JAR_CREATE_OPTIONS) $$@ $$($1_MANIFEST_FILE) $$(NEWLINE) \ + $$($1_SCAPTURE_CONTENTS) \ + $$($1_SCAPTURE_METAINF) \ + $$($1_SUPDATE_CONTENTS) \ +- $$($1_JARINDEX) && true \ ++ $$($1_JARINDEX) && true $$(NEWLINE) \ ++ d="`mktemp -d`" && $(CP) -f $$@ "$$$$d/a.jar" && (cd "$$$$d" && unzip a.jar META-INF/MANIFEST.MF && $(TOUCH) -h -c -t 197001010000.00 META-INF && $(TOUCH) -h -c -t 197001010000.00 META-INF/MANIFEST.MF && (zip --symlinks -0 -X a.jar META-INF META-INF/MANIFEST.MF; zip --symlinks -0 -X a.jar META-INF META-INF/MANIFEST.MF)) && $(CP) -f "$$$$d/a.jar" $$@ \ + , \ + $(ECHO) Modifying $$($1_NAME) $$(NEWLINE) \ + $$($1_CAPTURE_CONTENTS) \ +diff -ru orig/jdk-6fa770f9f8ab/make/JrtfsJar.gmk jdk-6fa770f9f8ab/make/JrtfsJar.gmk +--- orig/jdk-6fa770f9f8ab/make/JrtfsJar.gmk 2022-04-13 19:24:10.091680007 +0200 ++++ jdk-6fa770f9f8ab/make/JrtfsJar.gmk 2022-04-13 19:29:30.044346222 +0200 +@@ -57,13 +57,18 @@ + # file will not be copied unless META-INF/services would also be added to the INCLUDES. + # Adding META-INF/services would include all files in that directory when only the one + # is needed, which is why this explicit copy is defined instead. +-$(eval $(call SetupCopyFiles, COPY_JIMAGE_SERVICE_PROVIDER, \ ++$(eval $(call SetupCopyFiles, COPY_JIMAGE_SERVICE_PROVIDER, \ + SRC := $(TOPDIR)/src/java.base/share/classes, \ + DEST := $(SUPPORT_OUTPUTDIR)/jrtfs_classes, \ + FILES := META-INF/services/java.nio.file.spi.FileSystemProvider)) + ++.PHONY: $(COPY_JIMAGE_SERVICE_PROVIDER)_fix ++$(COPY_JIMAGE_SERVICE_PROVIDER)_fix: $(COPY_JIMAGE_SERVICE_PROVIDER) ++ find $(SUPPORT_OUTPUTDIR)/jrtfs_classes -exec $(TOUCH) -h -c -t 197001010000.00 {} \; ++ $(TOUCH) -h -c -t 197001010000.00 $(SUPPORT_OUTPUTDIR)/java-main-manifest.mf ++ + $(eval $(call SetupJarArchive,BUILD_JRTFS_JAR, \ +- DEPENDENCIES := $(BUILD_JRTFS) $(COPY_JIMAGE_SERVICE_PROVIDER), \ ++ DEPENDENCIES := $(BUILD_JRTFS) $(COPY_JIMAGE_SERVICE_PROVIDER)_fix, \ + SRCS := $(SUPPORT_OUTPUTDIR)/jrtfs_classes, \ + JAR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/jrt-fs.jar, \ + MANIFEST := $(SUPPORT_OUTPUTDIR)/java-main-manifest.mf, \ +diff -ru orig/jdk-6fa770f9f8ab/src/jdk.jartool/share/classes/sun/tools/jar/Main.java jdk-6fa770f9f8ab/src/jdk.jartool/share/classes/sun/tools/jar/Main.java +--- orig/jdk-6fa770f9f8ab/src/jdk.jartool/share/classes/sun/tools/jar/Main.java 2022-04-13 19:24:12.555746751 +0200 ++++ jdk-6fa770f9f8ab/src/jdk.jartool/share/classes/sun/tools/jar/Main.java 2022-04-13 19:25:34.117955999 +0200 +@@ -849,12 +849,18 @@ + output(getMsg("out.added.manifest")); + } + ZipEntry e = new ZipEntry(MANIFEST_DIR); +- e.setTime(System.currentTimeMillis()); ++ if (System.getenv("SOURCE_DATE_EPOCH") != null) ++ e.setTime(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))); ++ else ++ e.setTime(System.currentTimeMillis()); + e.setSize(0); + e.setCrc(0); + zos.putNextEntry(e); + e = new ZipEntry(MANIFEST_NAME); +- e.setTime(System.currentTimeMillis()); ++ if (System.getenv("SOURCE_DATE_EPOCH") != null) ++ e.setTime(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))); ++ else ++ e.setTime(System.currentTimeMillis()); + if (flag0) { + crc32Manifest(e, manifest); + } +@@ -1021,7 +1027,10 @@ + throws IOException + { + ZipEntry e = new ZipEntry(INDEX_NAME); +- e.setTime(System.currentTimeMillis()); ++ if (System.getenv("SOURCE_DATE_EPOCH") != null) ++ e.setTime(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))); ++ else ++ e.setTime(System.currentTimeMillis()); + if (flag0) { + CRC32OutputStream os = new CRC32OutputStream(); + index.write(os); +@@ -1040,7 +1049,10 @@ + String name = mi.getKey(); + byte[] bytes = mi.getValue(); + ZipEntry e = new ZipEntry(name); +- e.setTime(System.currentTimeMillis()); ++ if (System.getenv("SOURCE_DATE_EPOCH") != null) ++ e.setTime(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))); ++ else ++ e.setTime(System.currentTimeMillis()); + if (flag0) { + crc32ModuleInfo(e, bytes); + } +@@ -1065,7 +1077,10 @@ + addMultiRelease(m); + } + ZipEntry e = new ZipEntry(MANIFEST_NAME); +- e.setTime(System.currentTimeMillis()); ++ if (System.getenv("SOURCE_DATE_EPOCH") != null) ++ e.setTime(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))); ++ else ++ e.setTime(System.currentTimeMillis()); + if (flag0) { + crc32Manifest(e, m); + } diff --git a/gnu/packages/patches/openjdk-10-jtask-reproducibility.patch b/gnu/packages/patches/openjdk-10-jtask-reproducibility.patch new file mode 100644 index 0000000000..3411ca12ae --- /dev/null +++ b/gnu/packages/patches/openjdk-10-jtask-reproducibility.patch @@ -0,0 +1,53 @@ +--- jdk-10/src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java.orig 2022-04-04 11:18:52.760626467 +0200 ++++ jdk-10/src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java 2022-04-04 12:03:40.645325687 +0200 +@@ -105,6 +105,7 @@ + import jdk.internal.module.ModuleTarget; + import jdk.internal.module.Resources; + import jdk.tools.jlink.internal.Utils; ++import java.util.TreeSet; + + import static java.util.stream.Collectors.joining; + +@@ -768,6 +769,7 @@ + void processSection(JmodOutputStream out, Section section, Path path) + throws IOException + { ++ TreeSet paths = new TreeSet<>(); + Files.walkFileTree(path, Set.of(FileVisitOption.FOLLOW_LINKS), + Integer.MAX_VALUE, new SimpleFileVisitor() { + @Override +@@ -781,20 +783,24 @@ + + if (!relPath.toString().equals(MODULE_INFO) + && !matches(relPath, excludes)) { +- try (InputStream in = Files.newInputStream(file)) { +- out.writeEntry(in, section, relPath.toString()); +- } catch (IOException x) { +- if (x.getMessage().contains("duplicate entry")) { +- warning("warn.ignore.duplicate.entry", +- relPath.toString(), section); +- return FileVisitResult.CONTINUE; +- } +- throw x; +- } ++ paths.add(file); + } + return FileVisitResult.CONTINUE; + } + }); ++ for (Path file : paths) { ++ Path relPath = path.relativize(file); ++ try (InputStream in = Files.newInputStream(file)) { ++ out.writeEntry(in, section, relPath.toString()); ++ } catch (IOException x) { ++ if (x.getMessage().contains("duplicate entry")) { ++ warning("warn.ignore.duplicate.entry", ++ relPath.toString(), section); ++ continue; ++ } ++ throw x; ++ } ++ } + } + + boolean matches(Path path, List matchers) { diff --git a/gnu/packages/patches/openjdk-10-module-reproducibility.patch b/gnu/packages/patches/openjdk-10-module-reproducibility.patch new file mode 100644 index 0000000000..165edd3b4a --- /dev/null +++ b/gnu/packages/patches/openjdk-10-module-reproducibility.patch @@ -0,0 +1,305 @@ +From a52c4ef44c0553a399a8a47e528db92e3bf51c6c Mon Sep 17 00:00:00 2001 +From: Alan Bateman +Date: Wed, 29 Apr 2020 08:38:28 +0100 +Subject: [PATCH] 8243666: ModuleHashes attribute generated for JMOD and JAR + files depends on timestamps + +Reviewed-by: mchung +--- + +--- orig/jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleHashesBuilder.java 2022-04-13 19:24:10.655695284 +0200 ++++ jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleHashesBuilder.java 2022-04-14 02:43:48.610326492 +0200 +@@ -27,9 +27,8 @@ + + import java.io.PrintStream; + import java.lang.module.Configuration; ++import java.lang.module.ModuleReference; + import java.lang.module.ResolvedModule; +-import java.net.URI; +-import java.nio.file.Path; + import java.nio.file.Paths; + import java.util.ArrayDeque; + import java.util.Collections; +@@ -39,8 +38,8 @@ + import java.util.LinkedList; + import java.util.Map; + import java.util.Set; ++import java.util.TreeMap; + import java.util.function.Consumer; +-import java.util.function.Function; + import java.util.stream.Stream; + import static java.util.stream.Collectors.*; + +@@ -101,7 +100,7 @@ + // the modules to record the hashes - it is the first matching + // module and has not been hashed during the traversal. + Set mods = new HashSet<>(); +- Map hashes = new HashMap<>(); ++ Map hashes = new TreeMap<>(); + builder.build() + .orderedNodes() + .filter(mn -> roots.contains(mn) && !mods.contains(mn)) +@@ -116,27 +115,17 @@ + mods.addAll(ns); + + if (!ns.isEmpty()) { +- Map moduleToPath = ns.stream() +- .collect(toMap(Function.identity(), this::moduleToPath)); +- hashes.put(mn, ModuleHashes.generate(moduleToPath, "SHA-256")); ++ Set mrefs = ns.stream() ++ .map(name -> configuration.findModule(name) ++ .orElseThrow(InternalError::new)) ++ .map(ResolvedModule::reference) ++ .collect(toSet()); ++ hashes.put(mn, ModuleHashes.generate(mrefs, "SHA-256")); + } + }); + return hashes; + } + +- private Path moduleToPath(String name) { +- ResolvedModule rm = configuration.findModule(name).orElseThrow( +- () -> new InternalError("Selected module " + name + " not on module path")); +- +- URI uri = rm.reference().location().get(); +- Path path = Paths.get(uri); +- String fn = path.getFileName().toString(); +- if (!fn.endsWith(".jar") && !fn.endsWith(".jmod")) { +- throw new UnsupportedOperationException(path + " is not a modular JAR or jmod file"); +- } +- return path; +- } +- + /* + * Utility class + */diff -ru orig/jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleHashes.java jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleHashes.java +--- orig/jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleHashes.java 1970-01-01 01:00:01.000000000 +0100 ++++ jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleHashes.java 2022-04-12 16:58:05.639985936 +0200 +@@ -26,17 +26,21 @@ + package jdk.internal.module; + + import java.io.IOException; ++import java.io.InputStream; + import java.io.UncheckedIOException; +-import java.nio.ByteBuffer; +-import java.nio.channels.FileChannel; +-import java.nio.file.Path; ++import java.lang.module.ModuleReader; ++import java.lang.module.ModuleReference; ++import java.nio.charset.StandardCharsets; + import java.security.MessageDigest; + import java.security.NoSuchAlgorithmException; ++import java.util.Arrays; + import java.util.Collections; + import java.util.HashMap; + import java.util.Map; + import java.util.Objects; + import java.util.Set; ++import java.util.TreeMap; ++import java.util.function.Supplier; + + /** + * The result of hashing the contents of a number of module artifacts. +@@ -60,8 +64,8 @@ + * @param algorithm the algorithm used to create the hashes + * @param nameToHash the map of module name to hash value + */ +- public ModuleHashes(String algorithm, Map nameToHash) { +- this.algorithm = algorithm; ++ ModuleHashes(String algorithm, Map nameToHash) { ++ this.algorithm = Objects.requireNonNull(algorithm); + this.nameToHash = Collections.unmodifiableMap(nameToHash); + } + +@@ -95,54 +99,125 @@ + } + + /** +- * Computes the hash for the given file with the given message digest +- * algorithm. ++ * Computes a hash from the names and content of a module. + * ++ * @param reader the module reader to access the module content ++ * @param algorithm the name of the message digest algorithm to use ++ * @return the hash ++ * @throws IllegalArgumentException if digest algorithm is not supported + * @throws UncheckedIOException if an I/O error occurs + * @throws RuntimeException if the algorithm is not available + */ +- public static byte[] computeHash(Path file, String algorithm) { ++ private static byte[] computeHash(ModuleReader reader, String algorithm) { ++ MessageDigest md; + try { +- MessageDigest md = MessageDigest.getInstance(algorithm); +- +- // Ideally we would just mmap the file but this consumes too much +- // memory when jlink is running concurrently on very large jmods +- try (FileChannel fc = FileChannel.open(file)) { +- ByteBuffer bb = ByteBuffer.allocate(32*1024); +- while (fc.read(bb) > 0) { +- bb.flip(); +- md.update(bb); +- assert bb.remaining() == 0; +- bb.clear(); +- } +- } +- +- return md.digest(); ++ md = MessageDigest.getInstance(algorithm); + } catch (NoSuchAlgorithmException e) { +- throw new RuntimeException(e); ++ throw new IllegalArgumentException(e); ++ } ++ try { ++ byte[] buf = new byte[32*1024]; ++ reader.list().sorted().forEach(rn -> { ++ md.update(rn.getBytes(StandardCharsets.UTF_8)); ++ try (InputStream in = reader.open(rn).orElseThrow(java.util.NoSuchElementException::new)) { ++ int n; ++ while ((n = in.read(buf)) > 0) { ++ md.update(buf, 0, n); ++ } ++ } catch (IOException ioe) { ++ throw new UncheckedIOException(ioe); ++ } ++ }); + } catch (IOException ioe) { + throw new UncheckedIOException(ioe); + } ++ return md.digest(); + } + + /** +- * Computes the hash for every entry in the given map, returning a +- * {@code ModuleHashes} to encapsulate the result. The map key is +- * the entry name, typically the module name. The map value is the file +- * path to the entry (module artifact). ++ * Computes a hash from the names and content of a module. + * ++ * @param supplier supplies the module reader to access the module content ++ * @param algorithm the name of the message digest algorithm to use ++ * @return the hash ++ * @throws IllegalArgumentException if digest algorithm is not supported ++ * @throws UncheckedIOException if an I/O error occurs ++ */ ++ static byte[] computeHash(Supplier supplier, String algorithm) { ++ try (ModuleReader reader = supplier.get()) { ++ return computeHash(reader, algorithm); ++ } catch (IOException ioe) { ++ throw new UncheckedIOException(ioe); ++ } ++ } ++ ++ /** ++ * Computes the hash from the names and content of a set of modules. Returns ++ * a {@code ModuleHashes} to encapsulate the result. ++ * @param mrefs the set of modules ++ * @param algorithm the name of the message digest algorithm to use + * @return ModuleHashes that encapsulates the hashes ++ * @throws IllegalArgumentException if digest algorithm is not supported ++ * @throws UncheckedIOException if an I/O error occurs + */ +- public static ModuleHashes generate(Map map, String algorithm) { ++ static ModuleHashes generate(Set mrefs, String algorithm) { + Map nameToHash = new HashMap<>(); +- for (Map.Entry entry: map.entrySet()) { +- String name = entry.getKey(); +- Path path = entry.getValue(); +- nameToHash.put(name, computeHash(path, algorithm)); ++ for (ModuleReference mref : mrefs) { ++ try (ModuleReader reader = mref.open()) { ++ byte[] hash = computeHash(reader, algorithm); ++ nameToHash.put(mref.descriptor().name(), hash); ++ } catch (IOException ioe) { ++ throw new UncheckedIOException(ioe); ++ } + } + return new ModuleHashes(algorithm, nameToHash); + } + ++ @Override ++ public int hashCode() { ++ int h = algorithm.hashCode(); ++ for (Map.Entry e : nameToHash.entrySet()) { ++ h = h * 31 + e.getKey().hashCode(); ++ h = h * 31 + Arrays.hashCode(e.getValue()); ++ } ++ return h; ++ } ++ ++ @Override ++ public boolean equals(Object obj) { ++ if (!(obj instanceof ModuleHashes)) ++ return false; ++ ModuleHashes other = (ModuleHashes) obj; ++ if (!algorithm.equals(other.algorithm) ++ || nameToHash.size() != other.nameToHash.size()) ++ return false; ++ for (Map.Entry e : nameToHash.entrySet()) { ++ String name = e.getKey(); ++ byte[] hash = e.getValue(); ++ if (!Arrays.equals(hash, other.nameToHash.get(name))) ++ return false; ++ } ++ return true; ++ } ++ ++ @Override ++ public String toString() { ++ StringBuilder sb = new StringBuilder(algorithm); ++ sb.append(" "); ++ nameToHash.entrySet() ++ .stream() ++ .sorted(Map.Entry.comparingByKey()) ++ .forEach(e -> { ++ sb.append(e.getKey()); ++ sb.append("="); ++ byte[] ba = e.getValue(); ++ for (byte b : ba) { ++ sb.append(String.format("%02x", b & 0xff)); ++ } ++ }); ++ return sb.toString(); ++ } ++ + /** + * This is used by jdk.internal.module.SystemModules class + * generated at link time. +diff -ru orig/jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java +--- orig/jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java 1970-01-01 01:00:01.000000000 +0100 ++++ jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java 2022-04-12 16:43:12.967868689 +0200 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +diff -ru orig/jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java +--- orig/jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java 1970-01-01 01:00:01.000000000 +0100 ++++ jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java 2022-04-12 16:43:12.971868797 +0200 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -95,7 +95,7 @@ + Path file) { + URI uri = file.toUri(); + Supplier supplier = () -> new JarModuleReader(file, uri); +- HashSupplier hasher = (a) -> ModuleHashes.computeHash(file, a); ++ HashSupplier hasher = (a) -> ModuleHashes.computeHash(supplier, a); + return newModule(attrs, uri, supplier, patcher, hasher); + } + +@@ -105,7 +105,7 @@ + static ModuleReference newJModModule(ModuleInfo.Attributes attrs, Path file) { + URI uri = file.toUri(); + Supplier supplier = () -> new JModModuleReader(file, uri); +- HashSupplier hasher = (a) -> ModuleHashes.computeHash(file, a); ++ HashSupplier hasher = (a) -> ModuleHashes.computeHash(supplier, a); + return newModule(attrs, uri, supplier, null, hasher); + } + diff --git a/gnu/packages/patches/openjdk-10-module3-reproducibility.patch b/gnu/packages/patches/openjdk-10-module3-reproducibility.patch new file mode 100644 index 0000000000..bc54803bea --- /dev/null +++ b/gnu/packages/patches/openjdk-10-module3-reproducibility.patch @@ -0,0 +1,34 @@ +Danny wrote. + +--- orig/jdk-3cc80be736f2/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java 1970-01-01 01:00:01.000000000 +0100 ++++ jdk-3cc80be736f2/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java 2022-04-13 17:30:37.242775977 +0200 +@@ -43,6 +43,7 @@ + import java.util.Objects; + import java.util.Optional; + import java.util.Set; ++import java.util.TreeSet; + import java.util.function.Supplier; + import java.util.stream.Collectors; + import java.util.stream.Stream; +@@ -2155,9 +2156,9 @@ + * @return The module descriptor + */ + public ModuleDescriptor build() { +- Set requires = new HashSet<>(this.requires.values()); +- Set exports = new HashSet<>(this.exports.values()); +- Set opens = new HashSet<>(this.opens.values()); ++ Set requires = new TreeSet<>(this.requires.values()); ++ Set exports = new TreeSet<>(this.exports.values()); ++ Set opens = new TreeSet<>(this.opens.values()); + + // add dependency on java.base + if (strict +@@ -2169,7 +2170,7 @@ + null)); + } + +- Set provides = new HashSet<>(this.provides.values()); ++ Set provides = new TreeSet<>(this.provides.values()); + + return new ModuleDescriptor(name, + version, diff --git a/gnu/packages/patches/openjdk-10-module4-reproducibility.patch b/gnu/packages/patches/openjdk-10-module4-reproducibility.patch new file mode 100644 index 0000000000..051c9344eb --- /dev/null +++ b/gnu/packages/patches/openjdk-10-module4-reproducibility.patch @@ -0,0 +1,14 @@ +Danny wrote it + +--- orig/jdk-6fa770f9f8ab/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java 2022-04-13 19:24:12.655749459 +0200 ++++ jdk-6fa770f9f8ab/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java 2022-04-14 01:53:23.555465018 +0200 +@@ -861,7 +861,8 @@ + */ + private void genModuleReads(ClassWriter cw, Configuration cf) { + // module name -> names of modules that it reads +- Map> map = cf.modules().stream() ++ Map> map = cf.modules().stream() ++ .sorted(java.util.Comparator.comparing(ResolvedModule::name)) + .collect(Collectors.toMap( + ResolvedModule::name, + m -> m.reads().stream() -- 2.36.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 01 09:12:52 2022 Received: (at 55751) by debbugs.gnu.org; 1 Jun 2022 13:12:52 +0000 Received: from localhost ([127.0.0.1]:50006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwO9c-0002lJ-5G for submit@debbugs.gnu.org; Wed, 01 Jun 2022 09:12:52 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:57386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwO9Y-0002l6-T6 for 55751@debbugs.gnu.org; Wed, 01 Jun 2022 09:12:51 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by albert.telenet-ops.be with bizsmtp id dpCm2700N4UW6Th06pCmfz; Wed, 01 Jun 2022 15:12:46 +0200 Message-ID: <7a65304d61319d38300eb2dafed2fa0ed60e5afe.camel@telenet.be> Subject: Re: [bug#55751] [PATCH 1/8] gnu: openjdk9: Make build reproducible. From: Maxime Devos To: dannym@scratchpost.org, 55751@debbugs.gnu.org Date: Wed, 01 Jun 2022 15:12:41 +0200 In-Reply-To: <20220601130011.9910-2-dannym@scratchpost.org> References: <20220601125741.9898-1-dannym@scratchpost.org> <20220601130011.9910-2-dannym@scratchpost.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-tpwVwVLwoExMslveDgFD" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1654089167; bh=Sms4yIFTcfwWn8Epu6hlNCygUaT0Ws6vLcvu+HJXCiM=; h=Subject:From:To:Date:In-Reply-To:References; b=OOvMB1zNEfEm9z1U3swhBDe26JEhNCGRybwwUuXZFdmjfg2uUEyvgpLj3YYOVJcw/ npJjABm6vcSOMFOPBjYxD4/9vNqT5xd9k+coyQtmZZR3z5q8V4MHcApu+9UtBfV4ZW EE55lVMPpNru6lNpBnzL0BCujvZYO1dIDqgZ7JAM2d/0dYc+u5RNur6o5+437cwDCt OqUJYhC0qqi9dFW0VEP3b2Si0ACoUqyzCzhPqi0Qk5tIti4OL6UkKVgPgkb100Wg5c trwwP8zhwvym+GliOexCFMFZNeXye9siFl4R8N3+zcR+BS3lwAeExjkNYT2nBt2vyJ onYScoOYOimTw== X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 55751 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-tpwVwVLwoExMslveDgFD Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable dannym@scratchpost.org schreef op wo 01-06-2022 om 15:00 [+0200]: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #:imported-modules > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ((guix build syscalls) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (srfi srfi-35) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ,@%gnu-build-system-modu= les) #:imported-modules is not for importing modules as in use-modules, but for copying modules. By adding (srfi srfi-35), you copy (srfi srfi-35) from the Guile against which Guix is compiled. Use #:modules instead. Greetings, Maxime; --=-tpwVwVLwoExMslveDgFD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYpdlyRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qAXAP0dqMPhw9BJyvfpoUYxOJNXN6pj Lqx1cBxfWEtpZlDEMQEAuGXwYwoQvstCSxwPnVcOI8eJZNUY3QHVEyhZ9l0tPAM= =2cP9 -----END PGP SIGNATURE----- --=-tpwVwVLwoExMslveDgFD-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 01 09:14:31 2022 Received: (at 55751) by debbugs.gnu.org; 1 Jun 2022 13:14:31 +0000 Received: from localhost ([127.0.0.1]:50012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwOBD-0002ob-FF for submit@debbugs.gnu.org; Wed, 01 Jun 2022 09:14:31 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:35596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwOBB-0002oS-Pd for 55751@debbugs.gnu.org; Wed, 01 Jun 2022 09:14:30 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by laurent.telenet-ops.be with bizsmtp id dpEU270094UW6Th01pEUAq; Wed, 01 Jun 2022 15:14:28 +0200 Message-ID: <2991291cc72e170010e11f782943675e309cae32.camel@telenet.be> Subject: Re: [bug#55751] [PATCH 1/8] gnu: openjdk9: Make build reproducible. From: Maxime Devos To: dannym@scratchpost.org, 55751@debbugs.gnu.org Date: Wed, 01 Jun 2022 15:14:28 +0200 In-Reply-To: <20220601130011.9910-2-dannym@scratchpost.org> References: <20220601125741.9898-1-dannym@scratchpost.org> <20220601130011.9910-2-dannym@scratchpost.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-kzYNPqV9h5X/rRmQoVpW" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1654089268; bh=qRwNjHymqNIAJ4bZH2miX8OdFYSfCH2lKuF506/Y2Q4=; h=Subject:From:To:Date:In-Reply-To:References; b=BZyS6E/m55BYl2FzN/lZr2B0mGDf2aeZm5rt0EhbAwMnL1H9azWtS8uXOkr5im31B Duvr/cwnl5PdZmTnXG+B9c1YURXdGqJN0x1p3rx18W3nITgIP/rcJDHqUhP/aZUGmn SD9uzVULRZVD0LrGUDYMmAKxx8Zrv0g7p1MqyA6m2C1UV2GSvyPDKtOaeDLo0E2nIl AA8U63uNC7usGd1jsQKkME3v1HBXwzPmw21mRBUfdKL8ZpVy+X5LligpRgtJeu2hNH b1YI5/hMaLBg+KEU1/C9da034S5QGgrxqKBoGlVlL78aUxeZIwuqKcmIvJ6TzA+Rvv G1dlh6/6a6Lpw== X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 55751 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-kzYNPqV9h5X/rRmQoVpW Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable dannym@scratchpost.org schreef op wo 01-06-2022 om 15:00 [+0200]: > +++ b/gnu/packages/patches/openjdk-9-module-reproducibility.patch > @@ -0,0 +1,296 @@ > +From a52c4ef44c0553a399a8a47e528db92e3bf51c6c Mon Sep 17 00:00:00 2001 > +From: Alan Bateman > +Date: Wed, 29 Apr 2020 08:38:28 +0100 > +Subject: [PATCH] 8243666: ModuleHashes attribute generated for JMOD and = JAR > + files depends on timestamps > + > +Reviewed-by: mchung IIUC, "guix lint" will want you tu put a link to upstream. Greetings, Maxime. --=-kzYNPqV9h5X/rRmQoVpW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYpdmNBccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7vLjAQDh/QsZBDDHzA3zeShpIz1MJJ2G 5Uz+qtcXVdB1c4dRgwD/QL1MSSF9LLF80fb0xVh0QYhbPPRejSEtn0FdrkYt6gs= =MBk5 -----END PGP SIGNATURE----- --=-kzYNPqV9h5X/rRmQoVpW-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 01 09:18:29 2022 Received: (at 55751) by debbugs.gnu.org; 1 Jun 2022 13:18:29 +0000 Received: from localhost ([127.0.0.1]:50029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwOF3-0002wt-3E for submit@debbugs.gnu.org; Wed, 01 Jun 2022 09:18:29 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:56138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwOF0-0002wf-1p for 55751@debbugs.gnu.org; Wed, 01 Jun 2022 09:18:28 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by xavier.telenet-ops.be with bizsmtp id dpJQ2700D4UW6Th01pJQeC; Wed, 01 Jun 2022 15:18:24 +0200 Message-ID: Subject: Re: [bug#55751] [PATCH 1/8] gnu: openjdk9: Make build reproducible. From: Maxime Devos To: dannym@scratchpost.org, 55751@debbugs.gnu.org Date: Wed, 01 Jun 2022 15:18:24 +0200 In-Reply-To: <20220601130011.9910-2-dannym@scratchpost.org> References: <20220601125741.9898-1-dannym@scratchpost.org> <20220601130011.9910-2-dannym@scratchpost.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-hdxh8qJ22y1jKcEMegOA" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1654089504; bh=HMXFR+G7DRKX6jmGF9Pr4G2qTgSPgbuf/BsUVXaS7lM=; h=Subject:From:To:Date:In-Reply-To:References; b=c76VBUL7doD/kU3HG5DfA0krwxHyohmdd/wgGcWgjcc5jjxrcZC985Zvq1ie2M93Y xGoHVtj18y+45HgP30OM7FW0F6gX5Q77SrAiw0idv2gSr7lqkGsofAPI+PDneUpCqP v2VhIQjQhTdA17WQRCCBtoDdwyd2dn05MXA6sPBenJUa2VjdyBlny2NUMVEaxaMzKi sIiaPDn6aT4DOJJoKdk/z4astN8q9QjqvaY5CruHkNnxgOIHR6UIzr45kz0njUDgrT W29vvoLCG2h0cJGPYhvl5aiEhY7h45G2wGY6N1orr6PvOAryaPNs3QoYoIC4Vxuf4D 1KHMJlmTvcdjw== X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 55751 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-hdxh8qJ22y1jKcEMegOA Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 ZGFubnltQHNjcmF0Y2hwb3N0Lm9yZyBzY2hyZWVmIG9wIHdvIDAxLTA2LTIwMjIgb20gMTU6MDAg WyswMjAwXToKPiArwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDC oMKgwqDCoMKgwqAgKGxldCAoKGNvZGUgKHN5c3RlbSogInVuemlwIiAiLS0iIHppcCkpKQo+ICvC oMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKg wqAgKHdyaXRlIGNvZGUpCj4gK8KgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKg wqDCoMKgwqDCoMKgwqDCoMKgwqDCoCAobmV3bGluZSkKPiArwqDCoMKgwqDCoMKgwqDCoMKgwqDC oMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgICh3aGVuICg+IChzdGF0dXM6 ZXhpdC12YWwgY29kZSkgMSkgOyAxIGlzIGp1c3QgYSB3YXJuaW5nCgpXaGF0J3MgdGhlIHdhcm5p bmc/ICBNYXliZSB0aGUgd2FybmluZyBjYW4gYmUgYWRkcmVzc2VkIG9yIHdlIGNvdWxkIGFzawp1 bnppcCB0byBub3QgZG8gd2FybmluZ3MgYW5kIHRoZW4gdGhpcyBjb3VsZCBzaW1wbGlmaWVkIHRv IChpbnZva2UKInVuemlwIiAuLi4pLgoKPiArwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKg wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCAocmFpc2UgKGNvbmRpdGlvbiAoJmlu dm9rZS1lcnJvcgo+ICvCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDC oMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKg wqAgKHByb2dyYW0gInVuemlwIikKPiArwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDC oMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKg wqDCoMKgwqDCoMKgIChhcmd1bWVudHMgKGxpc3QgIi0tIiB6aXApKQo+ICvCoMKgwqDCoMKgwqDC oMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKg wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAgKGV4aXQtc3RhdHVzIChzdGF0dXM6ZXhp dC12YWwgY29kZSkpCj4gK8KgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDC oMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKg wqDCoCAodGVybS1zaWduYWwgKHN0YXR1czp0ZXJtLXNpZyBjb2RlKSkKPiArwqDCoMKgwqDCoMKg wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDC oMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgIChzdG9wLXNpZ25hbCAoc3RhdHVzOnN0 b3Atc2lnIGNvZGUpKSkpKSkpKQoKVGhpcyBibG9jayBjb3VsZCB1c2UgYSBibG9jayBleHBsYWlu aW5nIHdoYXQgaXQncyBmb3IuCkxpa2V3aXNlIGZvciB0aGUgb3RoZXIgdW5kb2N1bWVudGVkIGJs b2NrIG9mIGNvZGUuCg== --=-hdxh8qJ22y1jKcEMegOA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYpdnIBccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7uR/AQC6CUjopSoGWJMdpYZ1cTsHnISm QN2DBUa/ndxGTi3gYAEAvpGjOKVH3viNm0tbgGY8ge8luCixo7kC+pnbhCJO0ws= =BDil -----END PGP SIGNATURE----- --=-hdxh8qJ22y1jKcEMegOA-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 01 09:20:37 2022 Received: (at 55751) by debbugs.gnu.org; 1 Jun 2022 13:20:37 +0000 Received: from localhost ([127.0.0.1]:50038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwOH7-00031D-Fd for submit@debbugs.gnu.org; Wed, 01 Jun 2022 09:20:37 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:49116) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwOH2-000311-JR for 55751@debbugs.gnu.org; Wed, 01 Jun 2022 09:20:36 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by andre.telenet-ops.be with bizsmtp id dpLX270094UW6Th01pLXkN; Wed, 01 Jun 2022 15:20:31 +0200 Message-ID: <045d010bee264dc8e257fb594f2791b1d6cfe80f.camel@telenet.be> Subject: Re: [bug#55751] [PATCH 0/8] Towards reproducible openjdk From: Maxime Devos To: dannym@scratchpost.org, 55751@debbugs.gnu.org Date: Wed, 01 Jun 2022 15:20:31 +0200 In-Reply-To: <20220601125741.9898-1-dannym@scratchpost.org> References: <20220601125741.9898-1-dannym@scratchpost.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1654089631; bh=8Qml+SBh52d3YfgO8q2+l3T9MHcBeyNREQzGxnCDJdw=; h=Subject:From:To:Date:In-Reply-To:References; b=M9l+UfVIH2QbZ8VoZcM7W+byDRwRQml69mo139+3Ug3Z/oa6y4pwXG2JuEVF8O8Uv SyRax1J3v0PQFTqWQc0ikkoNQzVWkuJTxr8lcxKXWF5CXCZATREXWQ3yORCUOxB9TY LXSBGVxzomr4faBnKpWsacGbT6h4YgTO9V3aqta6Noa1J9wM4OkcecbHjwGbQK1AGV lTD7Cw+f/uMgecsa2qaPw0IuSDwL1IfRP97fYMRecVT4pMRtXzQYfWhIfNU5O/tuai 05kmIZVfjIh2d4hWz4RW4mabxRfmCEMcmws2yk2OlqkzYK9jbYBrQTQehtB92Kgvx0 +ZXJLIKrX47Cg== X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 55751 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) dannym@scratchpost.org schreef op wo 01-06-2022 om 14:57 [+0200]: > From: Danny Milosavljevic > > This patchseries improves the reproducibility of openjdk. > > After it: > * openjdk9 is reproducible. > * openjdk10 has only a few non-reproducible parts. > * openjdk11 has a number of non-reproducible parts. > * openjdk12's "doc" output is still not reproducible ("Generated by javadoc" comment with timestamp in it) > * openjdk13 still has non-reproducible parts (jmod, modules, classes.jsa, src.zip) > * openjdk14 still has very few non-reproducible parts (jmod, modules, classes.jsa) > * openjdk15 still has a number of non-reproducible parts (diz files only). > * openjdk16 still has one non-reproducible part (classes*.jsa) Now we are rebuilding everything Java anyway, could this be followed by a patch removing the input labels and removing trailing #t? Greetings, Maxime. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 16:18:41 2022 Received: (at 55751) by debbugs.gnu.org; 21 Sep 2022 20:18:41 +0000 Received: from localhost ([127.0.0.1]:35325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ob6B7-0003xm-Fq for submit@debbugs.gnu.org; Wed, 21 Sep 2022 16:18:41 -0400 Received: from dd30410.kasserver.com ([85.13.145.193]:47752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ob6B5-0003xc-Cc for 55751@debbugs.gnu.org; Wed, 21 Sep 2022 16:18:39 -0400 Received: from localhost (84-115-234-55.cable.dynamic.surfer.at [84.115.234.55]) by dd30410.kasserver.com (Postfix) with ESMTPSA id B438211200AE; Wed, 21 Sep 2022 22:18:36 +0200 (CEST) Date: Wed, 21 Sep 2022 22:18:10 +0200 From: Danny Milosavljevic To: Maxime Devos Subject: Re: [bug#55751] [PATCH 1/8] gnu: openjdk9: Make build reproducible. Message-ID: <20220921221810.4b4021b7@scratchpost.org> In-Reply-To: References: <20220601125741.9898-1-dannym@scratchpost.org> <20220601130011.9910-2-dannym@scratchpost.org> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/VuJZcXnjGOAJj83VTFAf=Ud"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 55751 Cc: 55751@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --Sig_/VuJZcXnjGOAJj83VTFAf=Ud Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, On Wed, 01 Jun 2022 15:18:24 +0200 Maxime Devos wrote: > dannym@scratchpost.org schreef op wo 01-06-2022 om 15:00 [+0200]: > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 (let ((code (system* "unzip" "--" zip))) > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (write code) > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (newline) > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (when (> (status:exit-val code) 1) ; 1= is just a warning =20 >=20 > What's the warning? Maybe the warning can be addressed or we could ask > unzip to not do warnings and then this could simplified to (invoke > "unzip" ...). In jmod files, there's a weird header in front and the warning is that it's skipping that header. >=20 > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (raise (condition (&invoke= -error > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 (program "unzip") > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 (arguments (list "--" zip)) > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 (exit-status (status:exit-val code)) > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 (term-signal (status:term-sig code)) > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 (stop-signal (status:stop-sig code)))))))) =20 >=20 > This block could use a block explaining what it's for. > Likewise for the other undocumented block of code. Sure. I'll add a comment. It's basically just like "invoke" with a change in the exit-val check (1 instead of 0). --Sig_/VuJZcXnjGOAJj83VTFAf=Ud Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAmMrcYIACgkQ5xo1VCww uqW2aQf/Z3i9PU77GuI8PaN6eTtLOE0AfN4oRO88bu0dn08//5wdno3nzTezRgdx UDEefJoVr48A3sNsOYnE0mi9OoTiaH7fvGhXj6ERcXGEFXIX9xrpvhsFhrDKlln9 mhfYmZ5i9YJgC1ib97u+2J3jY2s4ZjVGR938o/aFE2OncHM0QzkGceGuVCtWDTgz jfgyoJytmMFo4KWPxBK4zwGCB36K+o5dIPr4ynzP2OWtdKM2pFoBevSqQrP71J4U GKVbqnVpnpstAFOhdt+adiHQGJOFrmCuJfmyJCf3HsilxGvuYaMaFghvvGLRw9lM WfRZc48DI8w26IJSBeDm/edeAUzPFw== =dWXq -----END PGP SIGNATURE----- --Sig_/VuJZcXnjGOAJj83VTFAf=Ud-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 31 14:09:36 2023 Received: (at 55751) by debbugs.gnu.org; 31 Jul 2023 18:09:36 +0000 Received: from localhost ([127.0.0.1]:53522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQXKp-0007K8-JI for submit@debbugs.gnu.org; Mon, 31 Jul 2023 14:09:35 -0400 Received: from dd30410.kasserver.com ([85.13.145.193]:60294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQXKn-0007Jx-1s for 55751@debbugs.gnu.org; Mon, 31 Jul 2023 14:09:34 -0400 Received: from nova.lan (84-115-230-178.cable.dynamic.surfer.at [84.115.230.178]) by dd30410.kasserver.com (Postfix) with ESMTPSA id E2B5C112069D; Mon, 31 Jul 2023 20:09:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scratchpost.org; s=kas202303142049; t=1690826971; bh=JiuFstSotVwYDmNTmdFa6YtxfVm7dVc3aL/X7V5uz1s=; h=From:To:Cc:Subject:Date:From; b=A1y46h8toteyx/WEmTMCSELJAbDdCYxS34XVP0+UopKOXgqIQGz3KgrzUCUsFY/AM 6GdIo1jZrQ6OHW/g34SioS6j33jZWH4bkvumUeuRDO050lK7ad2nBJe1AmCYrWMsQS er9LyfauAeLofuq+sEmzY3w+I9GsKMO2VA7pWFesC15S3ioipqQizTd+Jf4pJMfk7w B7NARmZ7Kd2k2ykJ39F3Ge+BtCyHbWvPefZR0NlBXco5PkgRW0L9bcC1lMA4vfPNFd gOun14r+NmskINBEVwlc+H6L8adslzYZK3FXqPhCeMEpKkalM/JfnoDs6mII0rAJLC t7e1lhKroHrdg== From: Danny Milosavljevic To: 55751@debbugs.gnu.org Subject: [PATCH v2 0/7] Towards reproducible openjdk Date: Mon, 31 Jul 2023 20:09:12 +0200 Message-Id: <20230731180919.28047-1-dannym@scratchpost.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Bar: + X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 55751 Cc: Danny Milosavljevic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) This patchseries improves the reproducibility of openjdk. After it: * openjdk9 is reproducible. * openjdk10 has only a few non-reproducible parts. * openjdk11 has a number of non-reproducible parts. * openjdk12's "doc" output is still not reproducible ("Generated by javadoc" comment with timestamp in it) * openjdk13 still has non-reproducible parts (jmod, modules, classes.jsa, src.zip) * openjdk14 still has very few non-reproducible parts (jmod, modules, classes.jsa) * openjdk15 still has a number of non-reproducible parts (diz files only). * openjdk16 still has one non-reproducible part (classes*.jsa) Danny Milosavljevic (7): gnu: openjdk9: Make build reproducible. gnu: openjdk10: Make more reproducible. gnu: openjdk11: Make more reproducible. gnu: openjdk12: Make reproducible. gnu: openjdk13: Make reproducible. gnu: openjdk14: Make reproducible. gnu: openjdk15: Make reproducible. gnu/local.mk | 16 + gnu/packages/java.scm | 151 +++++++-- .../openjdk-10-char-reproducibility.patch | 12 + ...openjdk-10-classlist-reproducibility.patch | 27 ++ .../openjdk-10-corba-reproducibility.patch | 12 + .../openjdk-10-jar-reproducibility.patch | 103 ++++++ .../openjdk-10-jtask-reproducibility.patch | 53 +++ .../openjdk-10-module-reproducibility.patch | 305 ++++++++++++++++++ .../openjdk-10-module3-reproducibility.patch | 34 ++ .../openjdk-10-module4-reproducibility.patch | 14 + ...openjdk-11-classlist-reproducibility.patch | 11 + ...openjdk-13-classlist-reproducibility.patch | 11 + .../openjdk-15-jtask-reproducibility.patch | 40 +++ .../openjdk-9-classlist-reproducibility.patch | 31 ++ .../openjdk-9-idlj-reproducibility.patch | 37 +++ .../openjdk-9-jar-reproducibility.patch | 107 ++++++ .../openjdk-9-module-reproducibility.patch | 297 +++++++++++++++++ .../openjdk-9-module2-reproducibility.patch | 125 +++++++ .../openjdk-9-module3-reproducibility.patch | 36 +++ 19 files changed, 1392 insertions(+), 30 deletions(-) create mode 100644 gnu/packages/patches/openjdk-10-char-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-classlist-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-corba-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-jar-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-jtask-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-module-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-module3-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-module4-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-11-classlist-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-13-classlist-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-15-jtask-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-9-classlist-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-9-idlj-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-9-jar-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-9-module-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-9-module2-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-9-module3-reproducibility.patch -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 31 14:09:50 2023 Received: (at 55751) by debbugs.gnu.org; 31 Jul 2023 18:09:50 +0000 Received: from localhost ([127.0.0.1]:53525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQXL3-0007KY-0Q for submit@debbugs.gnu.org; Mon, 31 Jul 2023 14:09:50 -0400 Received: from dd30410.kasserver.com ([85.13.145.193]:47610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQXKz-0007KP-RY for 55751@debbugs.gnu.org; Mon, 31 Jul 2023 14:09:47 -0400 Received: from nova.lan (84-115-230-178.cable.dynamic.surfer.at [84.115.230.178]) by dd30410.kasserver.com (Postfix) with ESMTPSA id DA00A11211F7; Mon, 31 Jul 2023 20:09:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scratchpost.org; s=kas202303142049; t=1690826972; bh=RQlx7eMJEJZbkvfyWgsqNKpZxx3MC00ox7zBzgrzp+Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k+tHX1FjZcGdqqBkKle9JIRqZQ5PX5k16/4/SqbUNko4ZVTKPrZz/yZkz99EJLYdJ 8SXHafvCEL83Sxsv1ybVFUXFdTpiVL3dediL6Un1gdEVIaX94P7HtMrjL5VBExrSW0 f1ypvmPV0RcEGybh43GH6eXO5jbI40/b8FQ/1+OGC50n50+fqqHUems9ECtY10w33M ZAOW0/xmn7YkxYvz6/p4cHjkHxqR/GLWOw5GYy0CRi1TKdMid1pn/qigKeriB+ncw2 sr4171e4bEC+KzCSHY7/Rx6xp6mYgQXkkmm1yGwnf3WbD30nu/KDbNh0eXnkhUgrEo y7YBDY1yynrMg== From: Danny Milosavljevic To: 55751@debbugs.gnu.org Subject: [PATCH v2 1/7] gnu: openjdk9: Make build reproducible. Date: Mon, 31 Jul 2023 20:09:13 +0200 Message-Id: <20230731180919.28047-2-dannym@scratchpost.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230731180919.28047-1-dannym@scratchpost.org> References: <20230731180919.28047-1-dannym@scratchpost.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Bar: ------ X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 55751 Cc: Danny Milosavljevic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/patches/openjdk-9-classlist-reproducibility.patch: New file. * gnu/packages/patches/openjdk-9-jar-reproducibility.patch: New file. * gnu/packages/patches/openjdk-9-module-reproducibility.patch: New file. * gnu/packages/patches/openjdk-9-module2-reproducibility.patch: New file. * gnu/packages/patches/openjdk-9-module3-reproducibility.patch: New file. * gnu/packages/patches/openjdk-9-idlj-reproducibility.patch: New file. * gnu/packages/java.scm (openjdk9)[source]: Add patches. [arguments]<#:phases>[strip-zip-timestamps]: Modify. [inputs]: Use new-style syntax. * gnu/local/mk (dist_patch_DATA): Add patches. --- gnu/local.mk | 6 + gnu/packages/java.scm | 88 ++++-- .../openjdk-9-classlist-reproducibility.patch | 31 ++ .../openjdk-9-idlj-reproducibility.patch | 37 +++ .../openjdk-9-jar-reproducibility.patch | 107 +++++++ .../openjdk-9-module-reproducibility.patch | 297 ++++++++++++++++++ .../openjdk-9-module2-reproducibility.patch | 125 ++++++++ .../openjdk-9-module3-reproducibility.patch | 36 +++ 8 files changed, 703 insertions(+), 24 deletions(-) create mode 100644 gnu/packages/patches/openjdk-9-classlist-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-9-idlj-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-9-jar-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-9-module-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-9-module2-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-9-module3-reproducibility.patch diff --git a/gnu/local.mk b/gnu/local.mk index 00fe7a036c..155b9e7740 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1658,6 +1658,12 @@ dist_patch_DATA = \ %D%/packages/patches/openfoam-4.1-cleanup.patch \ %D%/packages/patches/openjdk-9-pointer-comparison.patch \ %D%/packages/patches/openjdk-9-setsignalhandler.patch \ + %D%/packages/patches/openjdk-9-classlist-reproducibility.patch \ + %D%/packages/patches/openjdk-9-idlj-reproducibility.patch \ + %D%/packages/patches/openjdk-9-jar-reproducibility.patch \ + %D%/packages/patches/openjdk-9-module-reproducibility.patch \ + %D%/packages/patches/openjdk-9-module2-reproducibility.patch \ + %D%/packages/patches/openjdk-9-module3-reproducibility.patch \ %D%/packages/patches/openjdk-10-idlj-reproducibility.patch \ %D%/packages/patches/openjdk-10-pointer-comparison.patch \ %D%/packages/patches/openjdk-10-setsignalhandler.patch \ diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 5a6288581e..ad2af44229 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -865,7 +865,9 @@ (define-public openjdk9 (uri (hg-reference (url "https://hg.openjdk.org/jdk/jdk") (changeset "jdk-9+181"))) (file-name (hg-file-name name version)) - (modules '((guix build utils))) + (modules '((guix build utils) + (srfi srfi-35) + (ice-9 binary-ports))) (snippet `(begin (for-each delete-file (find-files "." ".*.(bin|exe|jar)$")))) @@ -873,6 +875,12 @@ (define-public openjdk9 (base32 "1v92nzdqx07c35x945awzir4yk0fk22vky6fpp8mq9js930sxsz0")) (patches (search-patches "openjdk-9-pointer-comparison.patch" + "openjdk-9-classlist-reproducibility.patch" + "openjdk-9-jar-reproducibility.patch" + "openjdk-9-module-reproducibility.patch" + "openjdk-9-module2-reproducibility.patch" + "openjdk-9-module3-reproducibility.patch" + "openjdk-9-idlj-reproducibility.patch" "openjdk-9-setsignalhandler.patch")))) (build-system gnu-build-system) (outputs '("out" "jdk" "doc")) @@ -995,37 +1003,69 @@ (define (icedtea-or-openjdk? path) (for-each (lambda (zip) (let ((dir (mkdtemp "zip-contents.XXXXXX"))) (with-directory-excursion dir - (invoke "unzip" zip)) + ;; This is an exact copy of the implementation + ;; of invoke, but this accepts exit code 1 + ;; as OK. + (let ((code (system* "unzip" "--" zip))) + ;; jmod files are zip files with an extra header in front. + ;; unzip will warn about that--but otherwise work. + (when (> (status:exit-val code) 1) ; 1 is just a warning + (raise + (condition + (&invoke-error + (program "unzip") + (arguments (list "--" zip)) + (exit-status (status:exit-val code)) + (term-signal (status:term-sig code)) + (stop-signal (status:stop-sig code)))))))) (delete-file zip) (for-each (lambda (file) (let ((s (lstat file))) - (unless (eq? (stat:type s) 'symlink) (format #t "reset ~a~%" file) - (utime file 0 0 0 0)))) + (utime file 1 1 0 0 + AT_SYMLINK_NOFOLLOW))) (find-files dir #:directories? #t)) (with-directory-excursion dir - (let ((files (find-files "." ".*" #:directories? #t))) - (apply invoke "zip" "-0" "-X" zip files))))) - (find-files (assoc-ref outputs "doc") ".*.zip$")) + (let ((files (cons "./META-INF/MANIFEST.MF" + (append + (find-files "./META-INF" ".*") + ;; for jmod: + (list "./classes/module-info.class") + (find-files "." ".*"))))) + (apply invoke "zip" "--symlinks" "-0" "-X" zip files) + (when (string-suffix? ".jmod" zip) + (let ((new-zip (string-append zip "n")) + (contents (call-with-input-file zip + (@ (ice-9 binary-ports) + get-bytevector-all)))) + (call-with-output-file new-zip + (lambda (output-port) + ((@ (ice-9 binary-ports) put-bytevector) + output-port + #vu8(#x4a #x4d #x01 #x00)) ; JM + ((@ (ice-9 binary-ports) put-bytevector) + output-port + contents))) + (rename-file new-zip zip))))))) + (append (find-files (string-append + (assoc-ref outputs "doc") + "/api") + "\\.zip$") + (find-files (assoc-ref outputs "doc") "src\\.zip$") + (find-files (assoc-ref outputs "jdk") "src\\.zip$") + (find-files (assoc-ref outputs "jdk") "\\.jmod$") + (find-files (assoc-ref outputs "jdk") "\\.diz$") + (find-files (assoc-ref outputs "out") "\\.diz$") + + (list (string-append (assoc-ref outputs "jdk") "/lib/jrt-fs.jar")) + (find-files (string-append (assoc-ref outputs "jdk") + "/demo") + "\\.jar$"))) #t))))) (inputs - `(("alsa-lib" ,alsa-lib) - ("cups" ,cups) - ("fontconfig" ,fontconfig) - ("freetype" ,freetype) - ("giflib" ,giflib) - ("lcms" ,lcms) - ("libelf" ,libelf) - ("libjpeg" ,libjpeg-turbo) - ("libice" ,libice) - ("libpng" ,libpng) - ("libx11" ,libx11) - ("libxcomposite" ,libxcomposite) - ("libxi" ,libxi) - ("libxinerama" ,libxinerama) - ("libxrender" ,libxrender) - ("libxt" ,libxt) - ("libxtst" ,libxtst))) + (list alsa-lib cups fontconfig freetype giflib lcms libelf libjpeg-turbo + libice libpng libx11 libxcomposite libxi libxinerama libxrender + libxt libxtst)) (native-inputs `(("icedtea-8" ,icedtea-8) ("icedtea-8:jdk" ,icedtea-8 "jdk") diff --git a/gnu/packages/patches/openjdk-9-classlist-reproducibility.patch b/gnu/packages/patches/openjdk-9-classlist-reproducibility.patch new file mode 100644 index 0000000000..d0ce7bc4d6 --- /dev/null +++ b/gnu/packages/patches/openjdk-9-classlist-reproducibility.patch @@ -0,0 +1,31 @@ +From: Danny Milosavljevic +Date: Wed, 18 Apr 2022 18:38:28 +0100 +Subject: Make classlist reproducible + +--- jdk-09/make/GenerateLinkOptData.gmk.orig 2022-04-05 10:05:35.892134188 +0200 ++++ jdk-09/make/GenerateLinkOptData.gmk 2022-04-05 10:06:07.885003056 +0200 +@@ -61,11 +61,12 @@ + $(call MakeDir, $(LINK_OPT_DIR)) + $(call LogInfo, Generating $(patsubst $(OUTPUT_ROOT)/%, %, $@)) + $(call LogInfo, Generating $(patsubst $(OUTPUT_ROOT)/%, %, $(JLI_TRACE_FILE))) +- $(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@ \ ++ $(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.tmp \ + -Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \ + -cp $(SUPPORT_OUTPUTDIR)/classlist.jar \ + build.tools.classlist.HelloClasslist \ + $(LOG_DEBUG) 2>&1 > $(JLI_TRACE_FILE) ++ sort $@.tmp >$@ + + # The jli trace is created by the same recipe as classlist. By declaring these + # dependencies, make will correctly rebuild both jli trace and classlist +--- jdk-09/langtools/make/gendata/Gendata-jdk.compiler.gmk.orig 2022-04-08 22:04:05.784424812 +0200 ++++ jdk-09/langtools/make/gendata/Gendata-jdk.compiler.gmk 2022-04-08 22:09:36.333575143 +0200 +@@ -79,6 +79,8 @@ + $(CT_MODULESOURCEPATH) \ + $(CT_MODULES) \ + >$(@D)/9/system-modules ++ # Make files reproducible ++ find $(@D) -exec $(TOUCH) -h -c -t 197001010000.01 {} \; + $(TOUCH) $@ + + # Can't generate ct.sym directly into modules libs as the SetupJarArchive macro diff --git a/gnu/packages/patches/openjdk-9-idlj-reproducibility.patch b/gnu/packages/patches/openjdk-9-idlj-reproducibility.patch new file mode 100644 index 0000000000..30dcdf2496 --- /dev/null +++ b/gnu/packages/patches/openjdk-9-idlj-reproducibility.patch @@ -0,0 +1,37 @@ +From: Danny Milosavljevic +Date: Wed, 18 Apr 2022 19:28:00 +0100 +Subject: Make IDL reproducible + +--- jdk-09/corba/src/java.corba/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java.orig 2022-04-05 02:46:26.805340292 +0200 ++++ jdk-09/corba/src/java.corba/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java 2022-04-05 02:48:23.152494213 +0200 +@@ -1146,7 +1146,7 @@ + else + formatter.setTimeZone (java.util.TimeZone.getDefault ()); + +- stream.println ("* " + formatter.format (new Date ())); ++ stream.println ("* " + formatter.format (System.getenv("SOURCE_DATE_EPOCH") == null ? new Date () : new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))))); + + // + /////////////// +--- jdk-09/corba/make/src/classes/build/tools/logutil/MC.java.orig 2022-04-05 11:09:43.824720493 +0200 ++++ jdk-09/corba/make/src/classes/build/tools/logutil/MC.java 2022-04-05 11:10:46.518435511 +0200 +@@ -154,7 +154,7 @@ + groupName); + pw.println("//"); + pw.printMsg("// Generated by MC.java version @, DO NOT EDIT BY HAND!", VERSION); +- pw.printMsg("// Generated from input file @ on @", inFile, new Date()); ++ pw.printMsg("// Generated from input file @ on @", inFile, System.getenv("SOURCE_DATE_EPOCH") == null ? new Date() : new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")))); + pw.println(); + } + +--- jdk-09/jdk/make/src/classes/build/tools/generatecharacter/GenerateCharacter.java.orig 2022-04-05 11:14:29.228526408 +0200 ++++ jdk-09/jdk/make/src/classes/build/tools/generatecharacter/GenerateCharacter.java 2022-04-05 11:15:32.658260748 +0200 +@@ -693,7 +693,7 @@ + PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(theOutputFileName))); + out.println(commentStart + + " This file was generated AUTOMATICALLY from a template file " + +- new java.util.Date() + commentEnd); ++ (System.getenv("SOURCE_DATE_EPOCH") == null ? new java.util.Date() : new java.util.Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")))) + commentEnd); + int marklen = commandMarker.length(); + LOOP: while(true) { + try { diff --git a/gnu/packages/patches/openjdk-9-jar-reproducibility.patch b/gnu/packages/patches/openjdk-9-jar-reproducibility.patch new file mode 100644 index 0000000000..130eacd867 --- /dev/null +++ b/gnu/packages/patches/openjdk-9-jar-reproducibility.patch @@ -0,0 +1,107 @@ +From: Danny Milosavljevic +Date: Wed, 18 Apr 2022 20:10:01 +0100 +Subject: Make JARs reproducible + +--- jdk-09/make/common/JarArchive.gmk.orig 2022-04-08 21:56:04.075111687 +0200 ++++ jdk-09/make/common/JarArchive.gmk 2022-04-11 00:49:16.809140388 +0200 +@@ -249,12 +249,16 @@ + $(ECHO) "Main-Class: $$(strip $$($1_JARMAIN))" >> $$($1_MANIFEST_FILE) $$(NEWLINE)) \ + $$(if $$($1_EXTRA_MANIFEST_ATTR), \ + $(PRINTF) "$$($1_EXTRA_MANIFEST_ATTR)\n" >> $$($1_MANIFEST_FILE) $$(NEWLINE)) \ +- $(ECHO) Creating $$($1_NAME) $$(NEWLINE) \ ++ $(TOUCH) -h -c -t 197001010000.00 $$($1_MANIFEST_FILE) $$(NEWLINE) \ ++ $(ECHO) XCreating $$($1_NAME) $(JAR) $$($1_JAR_CREATE_OPTIONS) $$@ $$($1_MANIFEST_FILE) $$(NEWLINE) \ + $(JAR) $$($1_JAR_CREATE_OPTIONS) $$@ $$($1_MANIFEST_FILE) $$(NEWLINE) \ + $$($1_SCAPTURE_CONTENTS) \ + $$($1_SCAPTURE_METAINF) \ + $$($1_SUPDATE_CONTENTS) \ +- $$($1_JARINDEX) && true \ ++ $$($1_JARINDEX) && true $$(NEWLINE) \ ++ $(ECHO) Kreppel2 $$@ $$(NEWLINE) \ ++ unzip -v $$@ $$(NEWLINE) \ ++ d="`mktemp -d`" && $(CP) -f $$@ "$$$$d/a.jar" && (cd "$$$$d" && unzip a.jar META-INF/MANIFEST.MF && $(TOUCH) -h -c -t 197001010000.00 META-INF && $(TOUCH) -h -c -t 197001010000.00 META-INF/MANIFEST.MF && (zip --symlinks -0 -X a.jar META-INF META-INF/MANIFEST.MF; zip --symlinks -0 -X a.jar META-INF META-INF/MANIFEST.MF)) && $(CP) -f "$$$$d/a.jar" $$@ \ + , \ + $(ECHO) Modifying $$($1_NAME) $$(NEWLINE) \ + $$($1_CAPTURE_CONTENTS) \ +--- jdk-09/make/JrtfsJar.gmk.orig 2022-04-10 13:48:57.385120008 +0200 ++++ jdk-09/make/JrtfsJar.gmk 2022-04-10 13:58:04.688158538 +0200 +@@ -57,13 +57,18 @@ + # file will not be copied unless META-INF/services would also be added to the INCLUDES. + # Adding META-INF/services would include all files in that directory when only the one + # is needed, which is why this explicit copy is defined instead. +-$(eval $(call SetupCopyFiles, COPY_JIMAGE_SERVICE_PROVIDER, \ ++$(eval $(call SetupCopyFiles, COPY_JIMAGE_SERVICE_PROVIDER1, \ + SRC := $(JDK_TOPDIR)/src/java.base/share/classes, \ + DEST := $(SUPPORT_OUTPUTDIR)/jrtfs_classes, \ + FILES := META-INF/services/java.nio.file.spi.FileSystemProvider)) + ++.PHONY: jrtfsfixtimestamps47 ++jrtfsfixtimestamps47: $(COPY_JIMAGE_SERVICE_PROVIDER1) ++ find $(SUPPORT_OUTPUTDIR)/jrtfs_classes -exec $(TOUCH) -h -c -t 197001010000.00 {} \; ++ $(TOUCH) -h -c -t 197001010000.00 $(SUPPORT_OUTPUTDIR)/java-main-manifest.mf ++ + $(eval $(call SetupJarArchive,BUILD_JRTFS_JAR, \ +- DEPENDENCIES := $(BUILD_JRTFS) $(COPY_JIMAGE_SERVICE_PROVIDER), \ ++ DEPENDENCIES := $(BUILD_JRTFS) jrtfsfixtimestamps47, \ + SRCS := $(SUPPORT_OUTPUTDIR)/jrtfs_classes, \ + JAR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/jrt-fs.jar, \ + MANIFEST := $(SUPPORT_OUTPUTDIR)/java-main-manifest.mf, \ +--- jdk-09/jdk/src/jdk.jartool/share/classes/sun/tools/jar/Main.java.orig 2022-04-10 02:05:50.983247794 +0200 ++++ jdk-09/jdk/src/jdk.jartool/share/classes/sun/tools/jar/Main.java 2022-04-10 02:13:01.638960337 +0200 +@@ -850,12 +850,18 @@ + output(getMsg("out.added.manifest")); + } + ZipEntry e = new ZipEntry(MANIFEST_DIR); +- e.setTime(System.currentTimeMillis()); ++ if (System.getenv("SOURCE_DATE_EPOCH") != null) ++ e.setTime(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))); ++ else ++ e.setTime(System.currentTimeMillis()); + e.setSize(0); + e.setCrc(0); + zos.putNextEntry(e); + e = new ZipEntry(MANIFEST_NAME); +- e.setTime(System.currentTimeMillis()); ++ if (System.getenv("SOURCE_DATE_EPOCH") != null) ++ e.setTime(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))); ++ else ++ e.setTime(System.currentTimeMillis()); + if (flag0) { + crc32Manifest(e, manifest); + } +@@ -1022,7 +1028,10 @@ + throws IOException + { + ZipEntry e = new ZipEntry(INDEX_NAME); +- e.setTime(System.currentTimeMillis()); ++ if (System.getenv("SOURCE_DATE_EPOCH") != null) ++ e.setTime(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))); ++ else ++ e.setTime(System.currentTimeMillis()); + if (flag0) { + CRC32OutputStream os = new CRC32OutputStream(); + index.write(os); +@@ -1041,7 +1050,10 @@ + String name = mi.getKey(); + byte[] bytes = mi.getValue(); + ZipEntry e = new ZipEntry(name); +- e.setTime(System.currentTimeMillis()); ++ if (System.getenv("SOURCE_DATE_EPOCH") != null) ++ e.setTime(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))); ++ else ++ e.setTime(System.currentTimeMillis()); + if (flag0) { + crc32ModuleInfo(e, bytes); + } +@@ -1066,7 +1078,10 @@ + addMultiRelease(m); + } + ZipEntry e = new ZipEntry(MANIFEST_NAME); +- e.setTime(System.currentTimeMillis()); ++ if (System.getenv("SOURCE_DATE_EPOCH") != null) ++ e.setTime(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))); ++ else ++ e.setTime(System.currentTimeMillis()); + if (flag0) { + crc32Manifest(e, m); + } diff --git a/gnu/packages/patches/openjdk-9-module-reproducibility.patch b/gnu/packages/patches/openjdk-9-module-reproducibility.patch new file mode 100644 index 0000000000..320bb7806a --- /dev/null +++ b/gnu/packages/patches/openjdk-9-module-reproducibility.patch @@ -0,0 +1,297 @@ +From a52c4ef44c0553a399a8a47e528db92e3bf51c6c Mon Sep 17 00:00:00 2001 +From: Alan Bateman +Date: Wed, 29 Apr 2020 08:38:28 +0100 +Subject: [PATCH] 8243666: ModuleHashes attribute generated for JMOD and JAR + files depends on timestamps +See: https://bugs.openjdk.org/browse/JDK-8243666 + +Reviewed-by: mchung +--- + +diff -ru orig/jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleHashesBuilder.java jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleHashesBuilder.java +--- orig/jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleHashesBuilder.java 1970-01-01 01:00:01.000000000 +0100 ++++ jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleHashesBuilder.java 2022-04-12 16:47:15.690423653 +0200 +@@ -27,9 +27,8 @@ + + import java.io.PrintStream; + import java.lang.module.Configuration; ++import java.lang.module.ModuleReference; + import java.lang.module.ResolvedModule; +-import java.net.URI; +-import java.nio.file.Path; + import java.nio.file.Paths; + import java.util.ArrayDeque; + import java.util.Collections; +@@ -40,7 +39,6 @@ + import java.util.Map; + import java.util.Set; + import java.util.function.Consumer; +-import java.util.function.Function; + import java.util.stream.Stream; + import static java.util.stream.Collectors.*; + +@@ -116,27 +114,17 @@ + mods.addAll(ns); + + if (!ns.isEmpty()) { +- Map moduleToPath = ns.stream() +- .collect(toMap(Function.identity(), this::moduleToPath)); +- hashes.put(mn, ModuleHashes.generate(moduleToPath, "SHA-256")); ++ Set mrefs = ns.stream() ++ .map(name -> configuration.findModule(name) ++ .orElseThrow(InternalError::new)) ++ .map(ResolvedModule::reference) ++ .collect(toSet()); ++ hashes.put(mn, ModuleHashes.generate(mrefs, "SHA-256")); + } + }); + return hashes; + } + +- private Path moduleToPath(String name) { +- ResolvedModule rm = configuration.findModule(name).orElseThrow( +- () -> new InternalError("Selected module " + name + " not on module path")); +- +- URI uri = rm.reference().location().get(); +- Path path = Paths.get(uri); +- String fn = path.getFileName().toString(); +- if (!fn.endsWith(".jar") && !fn.endsWith(".jmod")) { +- throw new UnsupportedOperationException(path + " is not a modular JAR or jmod file"); +- } +- return path; +- } +- + /* + * Utility class + */ +diff -ru orig/jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleHashes.java jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleHashes.java +--- orig/jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleHashes.java 1970-01-01 01:00:01.000000000 +0100 ++++ jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleHashes.java 2022-04-12 16:58:05.639985936 +0200 +@@ -26,17 +26,21 @@ + package jdk.internal.module; + + import java.io.IOException; ++import java.io.InputStream; + import java.io.UncheckedIOException; +-import java.nio.ByteBuffer; +-import java.nio.channels.FileChannel; +-import java.nio.file.Path; ++import java.lang.module.ModuleReader; ++import java.lang.module.ModuleReference; ++import java.nio.charset.StandardCharsets; + import java.security.MessageDigest; + import java.security.NoSuchAlgorithmException; ++import java.util.Arrays; + import java.util.Collections; + import java.util.HashMap; + import java.util.Map; + import java.util.Objects; + import java.util.Set; ++import java.util.TreeMap; ++import java.util.function.Supplier; + + /** + * The result of hashing the contents of a number of module artifacts. +@@ -60,8 +64,8 @@ + * @param algorithm the algorithm used to create the hashes + * @param nameToHash the map of module name to hash value + */ +- public ModuleHashes(String algorithm, Map nameToHash) { +- this.algorithm = algorithm; ++ ModuleHashes(String algorithm, Map nameToHash) { ++ this.algorithm = Objects.requireNonNull(algorithm); + this.nameToHash = Collections.unmodifiableMap(nameToHash); + } + +@@ -95,54 +99,125 @@ + } + + /** +- * Computes the hash for the given file with the given message digest +- * algorithm. ++ * Computes a hash from the names and content of a module. + * ++ * @param reader the module reader to access the module content ++ * @param algorithm the name of the message digest algorithm to use ++ * @return the hash ++ * @throws IllegalArgumentException if digest algorithm is not supported + * @throws UncheckedIOException if an I/O error occurs + * @throws RuntimeException if the algorithm is not available + */ +- public static byte[] computeHash(Path file, String algorithm) { ++ private static byte[] computeHash(ModuleReader reader, String algorithm) { ++ MessageDigest md; + try { +- MessageDigest md = MessageDigest.getInstance(algorithm); +- +- // Ideally we would just mmap the file but this consumes too much +- // memory when jlink is running concurrently on very large jmods +- try (FileChannel fc = FileChannel.open(file)) { +- ByteBuffer bb = ByteBuffer.allocate(32*1024); +- while (fc.read(bb) > 0) { +- bb.flip(); +- md.update(bb); +- assert bb.remaining() == 0; +- bb.clear(); +- } +- } +- +- return md.digest(); ++ md = MessageDigest.getInstance(algorithm); + } catch (NoSuchAlgorithmException e) { +- throw new RuntimeException(e); ++ throw new IllegalArgumentException(e); ++ } ++ try { ++ byte[] buf = new byte[32*1024]; ++ reader.list().sorted().forEach(rn -> { ++ md.update(rn.getBytes(StandardCharsets.UTF_8)); ++ try (InputStream in = reader.open(rn).orElseThrow(java.util.NoSuchElementException::new)) { ++ int n; ++ while ((n = in.read(buf)) > 0) { ++ md.update(buf, 0, n); ++ } ++ } catch (IOException ioe) { ++ throw new UncheckedIOException(ioe); ++ } ++ }); + } catch (IOException ioe) { + throw new UncheckedIOException(ioe); + } ++ return md.digest(); + } + + /** +- * Computes the hash for every entry in the given map, returning a +- * {@code ModuleHashes} to encapsulate the result. The map key is +- * the entry name, typically the module name. The map value is the file +- * path to the entry (module artifact). ++ * Computes a hash from the names and content of a module. + * ++ * @param supplier supplies the module reader to access the module content ++ * @param algorithm the name of the message digest algorithm to use ++ * @return the hash ++ * @throws IllegalArgumentException if digest algorithm is not supported ++ * @throws UncheckedIOException if an I/O error occurs ++ */ ++ static byte[] computeHash(Supplier supplier, String algorithm) { ++ try (ModuleReader reader = supplier.get()) { ++ return computeHash(reader, algorithm); ++ } catch (IOException ioe) { ++ throw new UncheckedIOException(ioe); ++ } ++ } ++ ++ /** ++ * Computes the hash from the names and content of a set of modules. Returns ++ * a {@code ModuleHashes} to encapsulate the result. ++ * @param mrefs the set of modules ++ * @param algorithm the name of the message digest algorithm to use + * @return ModuleHashes that encapsulates the hashes ++ * @throws IllegalArgumentException if digest algorithm is not supported ++ * @throws UncheckedIOException if an I/O error occurs + */ +- public static ModuleHashes generate(Map map, String algorithm) { ++ static ModuleHashes generate(Set mrefs, String algorithm) { + Map nameToHash = new HashMap<>(); +- for (Map.Entry entry: map.entrySet()) { +- String name = entry.getKey(); +- Path path = entry.getValue(); +- nameToHash.put(name, computeHash(path, algorithm)); ++ for (ModuleReference mref : mrefs) { ++ try (ModuleReader reader = mref.open()) { ++ byte[] hash = computeHash(reader, algorithm); ++ nameToHash.put(mref.descriptor().name(), hash); ++ } catch (IOException ioe) { ++ throw new UncheckedIOException(ioe); ++ } + } + return new ModuleHashes(algorithm, nameToHash); + } + ++ @Override ++ public int hashCode() { ++ int h = algorithm.hashCode(); ++ for (Map.Entry e : nameToHash.entrySet()) { ++ h = h * 31 + e.getKey().hashCode(); ++ h = h * 31 + Arrays.hashCode(e.getValue()); ++ } ++ return h; ++ } ++ ++ @Override ++ public boolean equals(Object obj) { ++ if (!(obj instanceof ModuleHashes)) ++ return false; ++ ModuleHashes other = (ModuleHashes) obj; ++ if (!algorithm.equals(other.algorithm) ++ || nameToHash.size() != other.nameToHash.size()) ++ return false; ++ for (Map.Entry e : nameToHash.entrySet()) { ++ String name = e.getKey(); ++ byte[] hash = e.getValue(); ++ if (!Arrays.equals(hash, other.nameToHash.get(name))) ++ return false; ++ } ++ return true; ++ } ++ ++ @Override ++ public String toString() { ++ StringBuilder sb = new StringBuilder(algorithm); ++ sb.append(" "); ++ nameToHash.entrySet() ++ .stream() ++ .sorted(Map.Entry.comparingByKey()) ++ .forEach(e -> { ++ sb.append(e.getKey()); ++ sb.append("="); ++ byte[] ba = e.getValue(); ++ for (byte b : ba) { ++ sb.append(String.format("%02x", b & 0xff)); ++ } ++ }); ++ return sb.toString(); ++ } ++ + /** + * This is used by jdk.internal.module.SystemModules class + * generated at link time. +diff -ru orig/jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java +--- orig/jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java 1970-01-01 01:00:01.000000000 +0100 ++++ jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java 2022-04-12 16:43:12.967868689 +0200 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +diff -ru orig/jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java +--- orig/jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java 1970-01-01 01:00:01.000000000 +0100 ++++ jdk-3cc80be736f2/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java 2022-04-12 16:43:12.971868797 +0200 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -95,7 +95,7 @@ + Path file) { + URI uri = file.toUri(); + Supplier supplier = () -> new JarModuleReader(file, uri); +- HashSupplier hasher = (a) -> ModuleHashes.computeHash(file, a); ++ HashSupplier hasher = (a) -> ModuleHashes.computeHash(supplier, a); + return newModule(attrs, uri, supplier, patcher, hasher); + } + +@@ -105,7 +105,7 @@ + static ModuleReference newJModModule(ModuleInfo.Attributes attrs, Path file) { + URI uri = file.toUri(); + Supplier supplier = () -> new JModModuleReader(file, uri); +- HashSupplier hasher = (a) -> ModuleHashes.computeHash(file, a); ++ HashSupplier hasher = (a) -> ModuleHashes.computeHash(supplier, a); + return newModule(attrs, uri, supplier, null, hasher); + } + diff --git a/gnu/packages/patches/openjdk-9-module2-reproducibility.patch b/gnu/packages/patches/openjdk-9-module2-reproducibility.patch new file mode 100644 index 0000000000..f167d94dc8 --- /dev/null +++ b/gnu/packages/patches/openjdk-9-module2-reproducibility.patch @@ -0,0 +1,125 @@ +Backport from openjdk 10 + +--- orig/jdk-3cc80be736f2/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ModuleSorter.java 1970-01-01 01:00:01.000000000 +0100 ++++ jdk-3cc80be736f2/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ModuleSorter.java 2022-04-12 20:48:04.474353305 +0200 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -30,13 +30,16 @@ + import jdk.tools.jlink.plugin.ResourcePoolModuleView; + + import java.lang.module.ModuleDescriptor; ++import java.lang.module.ModuleDescriptor.Requires; + import java.lang.module.ModuleDescriptor.Requires.Modifier; + + import java.nio.ByteBuffer; +-import java.util.Deque; ++import java.util.ArrayList; ++import java.util.Comparator; + import java.util.HashMap; + import java.util.HashSet; +-import java.util.LinkedList; ++import java.util.LinkedHashSet; ++import java.util.List; + import java.util.Map; + import java.util.Set; + import java.util.stream.Stream; +@@ -45,9 +48,8 @@ + * Helper class to sort modules in topological order + */ + public final class ModuleSorter { +- private final Deque nodes = new LinkedList<>(); +- private final Map> edges = new HashMap<>(); +- private final Deque result = new LinkedList<>(); ++ private final Map> graph = new HashMap<>(); ++ private final List result = new ArrayList<>(); + + private final ResourcePoolModuleView moduleView; + +@@ -69,11 +71,17 @@ + + private ModuleSorter addModule(ResourcePoolModule module) { + addNode(module); +- readModuleDescriptor(module).requires().forEach(req -> { ++ // the module graph will be traversed in a stable order for ++ // the topological sort. So add the dependences in the module name order ++ readModuleDescriptor(module).requires() ++ .stream() ++ .sorted(Comparator.comparing(Requires::name)) ++ .forEach(req -> ++ { + ResourcePoolModule dep = moduleView.findModule(req.name()).orElse(null); + if (dep != null) { + addNode(dep); +- edges.get(module.name()).add(dep); ++ graph.get(module).add(dep); + } else if (!req.modifiers().contains(Modifier.STATIC)) { + throw new PluginException(req.name() + " not found"); + } +@@ -82,22 +90,23 @@ + } + + private void addNode(ResourcePoolModule module) { +- nodes.add(module); +- edges.computeIfAbsent(module.name(), _n -> new HashSet<>()); ++ graph.computeIfAbsent(module, _n -> new LinkedHashSet<>()); + } + ++ /* ++ * The module graph will be traversed in a stable order ++ * (traversing the modules and their dependences in alphabetical order) ++ * so that it will produce the same result of a given module graph. ++ */ + private synchronized void build() { +- if (!result.isEmpty() || nodes.isEmpty()) ++ if (!result.isEmpty() || graph.isEmpty()) + return; + +- Deque visited = new LinkedList<>(); +- Deque done = new LinkedList<>(); +- ResourcePoolModule node; +- while ((node = nodes.poll()) != null) { +- if (!visited.contains(node)) { +- visit(node, visited, done); +- } +- } ++ Set visited = new HashSet<>(); ++ Set done = new HashSet<>(); ++ graph.keySet().stream() ++ .sorted(Comparator.comparing(ResourcePoolModule::name)) ++ .forEach(node -> visit(node, visited, done)); + } + + public Stream sorted() { +@@ -106,19 +115,21 @@ + } + + private void visit(ResourcePoolModule node, +- Deque visited, +- Deque done) { ++ Set visited, ++ Set done) { + if (visited.contains(node)) { + if (!done.contains(node)) { + throw new IllegalArgumentException("Cyclic detected: " + +- node + " " + edges.get(node.name())); ++ node + " " + graph.get(node)); + } + return; + } ++ ++ // traverse the dependences of the given module which are ++ // also sorted in alphabetical order + visited.add(node); +- edges.get(node.name()) +- .forEach(x -> visit(x, visited, done)); ++ graph.get(node).forEach(x -> visit(x, visited, done)); + done.add(node); +- result.addLast(node); ++ result.add(node); + } + } diff --git a/gnu/packages/patches/openjdk-9-module3-reproducibility.patch b/gnu/packages/patches/openjdk-9-module3-reproducibility.patch new file mode 100644 index 0000000000..9db54f5531 --- /dev/null +++ b/gnu/packages/patches/openjdk-9-module3-reproducibility.patch @@ -0,0 +1,36 @@ +From: Danny Milosavljevic +Date: Wed, 18 Apr 2022 21:50:00 +0100 +Subject: Make module descriptor reproducible + +--- orig/jdk-3cc80be736f2/jdk/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java 1970-01-01 01:00:01.000000000 +0100 ++++ jdk-3cc80be736f2/jdk/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java 2022-04-13 17:30:37.242775977 +0200 +@@ -43,6 +43,7 @@ + import java.util.Objects; + import java.util.Optional; + import java.util.Set; ++import java.util.TreeSet; + import java.util.function.Supplier; + import java.util.stream.Collectors; + import java.util.stream.Stream; +@@ -2155,9 +2156,9 @@ + * @return The module descriptor + */ + public ModuleDescriptor build() { +- Set requires = new HashSet<>(this.requires.values()); +- Set exports = new HashSet<>(this.exports.values()); +- Set opens = new HashSet<>(this.opens.values()); ++ Set requires = new TreeSet<>(this.requires.values()); ++ Set exports = new TreeSet<>(this.exports.values()); ++ Set opens = new TreeSet<>(this.opens.values()); + + // add dependency on java.base + if (strict +@@ -2169,7 +2170,7 @@ + null)); + } + +- Set provides = new HashSet<>(this.provides.values()); ++ Set provides = new TreeSet<>(this.provides.values()); + + return new ModuleDescriptor(name, + version, -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 31 14:10:05 2023 Received: (at 55751) by debbugs.gnu.org; 31 Jul 2023 18:10:05 +0000 Received: from localhost ([127.0.0.1]:53528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQXLF-0007L0-Qm for submit@debbugs.gnu.org; Mon, 31 Jul 2023 14:10:05 -0400 Received: from dd30410.kasserver.com ([85.13.145.193]:52248) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQXLC-0007Kq-Gv for 55751@debbugs.gnu.org; Mon, 31 Jul 2023 14:10:00 -0400 Received: from nova.lan (84-115-230-178.cable.dynamic.surfer.at [84.115.230.178]) by dd30410.kasserver.com (Postfix) with ESMTPSA id 1575B1121431; Mon, 31 Jul 2023 20:09:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scratchpost.org; s=kas202303142049; t=1690826973; bh=/g5E37m2u4I7VMx22zFKMelRnFKt21NaLRCrf4KJNCU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J60068VEjkj2DqvLrUw3/C1Yo5wog0F+p4tNv2Dky2UyD9kDelenkI8VsbagSbhCh sdBuzNdc0szcdVdfjAl/TLj91p+sqE5OGdPejTuWlNWlrktkwp/kJmBRzF8H/e1PdF ry2leO/P9y9AjBJ4CUlcSz50IbTjGTi8qZCT+YDtXRqVoD4j8Cank6whRn4ovSCzsE C1WH8duRVlLriEV6qzjae92NhfCXKBqpPcEYZmJM7Xk1SmxJyJ8OsWyzw2CdtbrqpG Is94lvKVV869sNGzlYge/RseGTP3ltvZCpNhdF6ShVC1xJKQ1qLkb5a9xh9S8qBvAA Yx+cXNeJYqiCQ== From: Danny Milosavljevic To: 55751@debbugs.gnu.org Subject: [PATCH v2 2/7] gnu: openjdk10: Make more reproducible. Date: Mon, 31 Jul 2023 20:09:14 +0200 Message-Id: <20230731180919.28047-3-dannym@scratchpost.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230731180919.28047-1-dannym@scratchpost.org> References: <20230731180919.28047-1-dannym@scratchpost.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Bar: ------ X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 55751 Cc: Danny Milosavljevic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/patches/openjdk-10-char-reproducibility.patch: New file. * gnu/packages/patches/openjdk-10-classlist-reproducibility.patch: New file. * gnu/packages/patches/openjdk-10-corba-reproducibility.patch: New file. * gnu/packages/patches/openjdk-10-jar-reproducibility.patch: New file. * gnu/packages/patches/openjdk-10-jtask-reproducibility.patch: New file. * gnu/packages/patches/openjdk-10-module-reproducibility.patch: New file. * gnu/packages/patches/openjdk-10-module3-reproducibility.patch: New file. * gnu/packages/patches/openjdk-10-module4-reproducibility.patch: New file. * gnu/packages/java.scm (openjdk10)[source]: Add patches. [arguments]<#:phases>[remove-timestamping]: New phase. * gnu/local.mk (dist_patch_DATA): Add patches. --- gnu/local.mk | 8 + gnu/packages/java.scm | 13 + .../openjdk-10-char-reproducibility.patch | 12 + ...openjdk-10-classlist-reproducibility.patch | 27 ++ .../openjdk-10-corba-reproducibility.patch | 12 + .../openjdk-10-jar-reproducibility.patch | 103 ++++++ .../openjdk-10-jtask-reproducibility.patch | 53 +++ .../openjdk-10-module-reproducibility.patch | 305 ++++++++++++++++++ .../openjdk-10-module3-reproducibility.patch | 34 ++ .../openjdk-10-module4-reproducibility.patch | 14 + 10 files changed, 581 insertions(+) create mode 100644 gnu/packages/patches/openjdk-10-char-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-classlist-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-corba-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-jar-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-jtask-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-module-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-module3-reproducibility.patch create mode 100644 gnu/packages/patches/openjdk-10-module4-reproducibility.patch diff --git a/gnu/local.mk b/gnu/local.mk index 155b9e7740..791e5a85aa 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1664,7 +1664,15 @@ dist_patch_DATA = \ %D%/packages/patches/openjdk-9-module-reproducibility.patch \ %D%/packages/patches/openjdk-9-module2-reproducibility.patch \ %D%/packages/patches/openjdk-9-module3-reproducibility.patch \ + %D%/packages/patches/openjdk-10-char-reproducibility.patch \ + %D%/packages/patches/openjdk-10-classlist-reproducibility.patch \ + %D%/packages/patches/openjdk-10-corba-reproducibility.patch \ %D%/packages/patches/openjdk-10-idlj-reproducibility.patch \ + %D%/packages/patches/openjdk-10-jar-reproducibility.patch \ + %D%/packages/patches/openjdk-10-jtask-reproducibility.patch \ + %D%/packages/patches/openjdk-10-module-reproducibility.patch \ + %D%/packages/patches/openjdk-10-module3-reproducibility.patch \ + %D%/packages/patches/openjdk-10-module4-reproducibility.patch \ %D%/packages/patches/openjdk-10-pointer-comparison.patch \ %D%/packages/patches/openjdk-10-setsignalhandler.patch \ %D%/packages/patches/openjdk-15-xcursor-no-dynamic.patch \ diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index ad2af44229..14e9b1f653 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1098,7 +1098,15 @@ (define-public openjdk10 (base32 "0i47ar8lxzjrkkiwbzybfxs473390h4jq9ahm3xqdvy5zpchxy3y")) (patches (search-patches + "openjdk-10-char-reproducibility.patch" + "openjdk-10-classlist-reproducibility.patch" + "openjdk-10-corba-reproducibility.patch" "openjdk-10-idlj-reproducibility.patch" + "openjdk-10-module-reproducibility.patch" + "openjdk-10-module3-reproducibility.patch" + "openjdk-10-module4-reproducibility.patch" + "openjdk-10-jar-reproducibility.patch" + "openjdk-10-jtask-reproducibility.patch" "openjdk-10-pointer-comparison.patch" "openjdk-10-setsignalhandler.patch")))) (arguments @@ -1112,6 +1120,11 @@ (define-public openjdk10 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem" (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n")) #t)) + (add-after 'unpack 'remove-timestamping + (lambda _ + (substitute* "./src/hotspot/share/runtime/vm_version.cpp" + (("__DATE__") "") + (("__TIME__") "")))) (replace 'configure (lambda* (#:key inputs outputs #:allow-other-keys) (invoke "bash" "./configure" diff --git a/gnu/packages/patches/openjdk-10-char-reproducibility.patch b/gnu/packages/patches/openjdk-10-char-reproducibility.patch new file mode 100644 index 0000000000..a7932678af --- /dev/null +++ b/gnu/packages/patches/openjdk-10-char-reproducibility.patch @@ -0,0 +1,12 @@ +Danny +--- orig/jdk-6fa770f9f8ab/make/jdk/src/classes/build/tools/generatecharacter/GenerateCharacter.java 2022-04-13 19:24:10.211683257 +0200 ++++ jdk-6fa770f9f8ab/make/jdk/src/classes/build/tools/generatecharacter/GenerateCharacter.java 2022-04-13 22:51:50.680487330 +0200 +@@ -693,7 +693,7 @@ + PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(theOutputFileName))); + out.println(commentStart + + " This file was generated AUTOMATICALLY from a template file " + +- new java.util.Date() + commentEnd); ++ (System.getenv("SOURCE_DATE_EPOCH") == null ? new java.util.Date() : new java.util.Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")))) + commentEnd); + int marklen = commandMarker.length(); + LOOP: while(true) { + try { diff --git a/gnu/packages/patches/openjdk-10-classlist-reproducibility.patch b/gnu/packages/patches/openjdk-10-classlist-reproducibility.patch new file mode 100644 index 0000000000..e1292ba82d --- /dev/null +++ b/gnu/packages/patches/openjdk-10-classlist-reproducibility.patch @@ -0,0 +1,27 @@ +--- orig/jdk-6fa770f9f8ab/make/GenerateLinkOptData.gmk 2022-04-04 17:16:29.365930149 +0200 ++++ jdk-6fa770f9f8ab/make/GenerateLinkOptData.gmk 2022-04-04 17:16:54.954624358 +0200 +@@ -61,11 +61,12 @@ + $(call MakeDir, $(LINK_OPT_DIR)) + $(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $@)) + $(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $(JLI_TRACE_FILE))) +- $(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@ \ ++ $(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.tmp \ + -Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \ + -cp $(SUPPORT_OUTPUTDIR)/classlist.jar \ + build.tools.classlist.HelloClasslist \ + $(LOG_DEBUG) 2>&1 > $(JLI_TRACE_FILE) ++ sort $@.tmp > $@ + + # The jli trace is created by the same recipe as classlist. By declaring these + # dependencies, make will correctly rebuild both jli trace and classlist +--- orig/jdk-6fa770f9f8ab/make/gendata/Gendata-jdk.compiler.gmk 2022-04-13 19:24:10.191682716 +0200 ++++ jdk-6fa770f9f8ab/make/gendata/Gendata-jdk.compiler.gmk 2022-04-13 20:58:57.891368216 +0200 +@@ -83,6 +83,8 @@ + $(CT_MODULESOURCEPATH) \ + $(CT_MODULES) \ + >$(@D)/A/system-modules ++ # Make files reproducible ++ find $(@D) -exec $(TOUCH) -h -c -t 197001010000.01 {} \; + $(TOUCH) $@ + + # Can't generate ct.sym directly into modules libs as the SetupJarArchive macro diff --git a/gnu/packages/patches/openjdk-10-corba-reproducibility.patch b/gnu/packages/patches/openjdk-10-corba-reproducibility.patch new file mode 100644 index 0000000000..bd5ce1fd2b --- /dev/null +++ b/gnu/packages/patches/openjdk-10-corba-reproducibility.patch @@ -0,0 +1,12 @@ +Danny +--- orig/jdk-6fa770f9f8ab/make/corba/src/classes/build/tools/logutil/MC.java 2022-04-13 19:24:10.111680549 +0200 ++++ jdk-6fa770f9f8ab/make/corba/src/classes/build/tools/logutil/MC.java 2022-04-13 22:51:13.399462259 +0200 +@@ -154,7 +154,7 @@ + groupName); + pw.println("//"); + pw.printMsg("// Generated by MC.java version @, DO NOT EDIT BY HAND!", VERSION); +- pw.printMsg("// Generated from input file @ on @", inFile, new Date()); ++ pw.printMsg("// Generated from input file @ on @", inFile, System.getenv("SOURCE_DATE_EPOCH") == null ? new Date() : new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")))); + pw.println(); + } + diff --git a/gnu/packages/patches/openjdk-10-jar-reproducibility.patch b/gnu/packages/patches/openjdk-10-jar-reproducibility.patch new file mode 100644 index 0000000000..176eedfce6 --- /dev/null +++ b/gnu/packages/patches/openjdk-10-jar-reproducibility.patch @@ -0,0 +1,103 @@ +diff -ru orig/jdk-6fa770f9f8ab/make/common/JarArchive.gmk jdk-6fa770f9f8ab/make/common/JarArchive.gmk +--- orig/jdk-6fa770f9f8ab/make/common/JarArchive.gmk 2022-04-13 19:24:10.107680441 +0200 ++++ jdk-6fa770f9f8ab/make/common/JarArchive.gmk 2022-04-13 19:31:18.031271019 +0200 +@@ -251,12 +251,14 @@ + $(ECHO) "Main-Class: $$(strip $$($1_JARMAIN))" >> $$($1_MANIFEST_FILE) $$(NEWLINE)) \ + $$(if $$($1_EXTRA_MANIFEST_ATTR), \ + $(PRINTF) "$$($1_EXTRA_MANIFEST_ATTR)\n" >> $$($1_MANIFEST_FILE) $$(NEWLINE)) \ ++ $(TOUCH) -h -c -t 197001010000.00 $$($1_MANIFEST_FILE) $$(NEWLINE) \ + $(ECHO) Creating $$($1_NAME) $$(NEWLINE) \ + $$($1_JAR_CMD) $$($1_JAR_CREATE_OPTIONS) $$@ $$($1_MANIFEST_FILE) $$(NEWLINE) \ + $$($1_SCAPTURE_CONTENTS) \ + $$($1_SCAPTURE_METAINF) \ + $$($1_SUPDATE_CONTENTS) \ +- $$($1_JARINDEX) && true \ ++ $$($1_JARINDEX) && true $$(NEWLINE) \ ++ d="`mktemp -d`" && $(CP) -f $$@ "$$$$d/a.jar" && (cd "$$$$d" && unzip a.jar META-INF/MANIFEST.MF && $(TOUCH) -h -c -t 197001010000.00 META-INF && $(TOUCH) -h -c -t 197001010000.00 META-INF/MANIFEST.MF && (zip --symlinks -0 -X a.jar META-INF META-INF/MANIFEST.MF; zip --symlinks -0 -X a.jar META-INF META-INF/MANIFEST.MF)) && $(CP) -f "$$$$d/a.jar" $$@ \ + , \ + $(ECHO) Modifying $$($1_NAME) $$(NEWLINE) \ + $$($1_CAPTURE_CONTENTS) \ +diff -ru orig/jdk-6fa770f9f8ab/make/JrtfsJar.gmk jdk-6fa770f9f8ab/make/JrtfsJar.gmk +--- orig/jdk-6fa770f9f8ab/make/JrtfsJar.gmk 2022-04-13 19:24:10.091680007 +0200 ++++ jdk-6fa770f9f8ab/make/JrtfsJar.gmk 2022-04-13 19:29:30.044346222 +0200 +@@ -57,13 +57,18 @@ + # file will not be copied unless META-INF/services would also be added to the INCLUDES. + # Adding META-INF/services would include all files in that directory when only the one + # is needed, which is why this explicit copy is defined instead. +-$(eval $(call SetupCopyFiles, COPY_JIMAGE_SERVICE_PROVIDER, \ ++$(eval $(call SetupCopyFiles, COPY_JIMAGE_SERVICE_PROVIDER, \ + SRC := $(TOPDIR)/src/java.base/share/classes, \ + DEST := $(SUPPORT_OUTPUTDIR)/jrtfs_classes, \ + FILES := META-INF/services/java.nio.file.spi.FileSystemProvider)) + ++.PHONY: $(COPY_JIMAGE_SERVICE_PROVIDER)_fix ++$(COPY_JIMAGE_SERVICE_PROVIDER)_fix: $(COPY_JIMAGE_SERVICE_PROVIDER) ++ find $(SUPPORT_OUTPUTDIR)/jrtfs_classes -exec $(TOUCH) -h -c -t 197001010000.00 {} \; ++ $(TOUCH) -h -c -t 197001010000.00 $(SUPPORT_OUTPUTDIR)/java-main-manifest.mf ++ + $(eval $(call SetupJarArchive,BUILD_JRTFS_JAR, \ +- DEPENDENCIES := $(BUILD_JRTFS) $(COPY_JIMAGE_SERVICE_PROVIDER), \ ++ DEPENDENCIES := $(BUILD_JRTFS) $(COPY_JIMAGE_SERVICE_PROVIDER)_fix, \ + SRCS := $(SUPPORT_OUTPUTDIR)/jrtfs_classes, \ + JAR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/jrt-fs.jar, \ + MANIFEST := $(SUPPORT_OUTPUTDIR)/java-main-manifest.mf, \ +diff -ru orig/jdk-6fa770f9f8ab/src/jdk.jartool/share/classes/sun/tools/jar/Main.java jdk-6fa770f9f8ab/src/jdk.jartool/share/classes/sun/tools/jar/Main.java +--- orig/jdk-6fa770f9f8ab/src/jdk.jartool/share/classes/sun/tools/jar/Main.java 2022-04-13 19:24:12.555746751 +0200 ++++ jdk-6fa770f9f8ab/src/jdk.jartool/share/classes/sun/tools/jar/Main.java 2022-04-13 19:25:34.117955999 +0200 +@@ -849,12 +849,18 @@ + output(getMsg("out.added.manifest")); + } + ZipEntry e = new ZipEntry(MANIFEST_DIR); +- e.setTime(System.currentTimeMillis()); ++ if (System.getenv("SOURCE_DATE_EPOCH") != null) ++ e.setTime(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))); ++ else ++ e.setTime(System.currentTimeMillis()); + e.setSize(0); + e.setCrc(0); + zos.putNextEntry(e); + e = new ZipEntry(MANIFEST_NAME); +- e.setTime(System.currentTimeMillis()); ++ if (System.getenv("SOURCE_DATE_EPOCH") != null) ++ e.setTime(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))); ++ else ++ e.setTime(System.currentTimeMillis()); + if (flag0) { + crc32Manifest(e, manifest); + } +@@ -1021,7 +1027,10 @@ + throws IOException + { + ZipEntry e = new ZipEntry(INDEX_NAME); +- e.setTime(System.currentTimeMillis()); ++ if (System.getenv("SOURCE_DATE_EPOCH") != null) ++ e.setTime(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))); ++ else ++ e.setTime(System.currentTimeMillis()); + if (flag0) { + CRC32OutputStream os = new CRC32OutputStream(); + index.write(os); +@@ -1040,7 +1049,10 @@ + String name = mi.getKey(); + byte[] bytes = mi.getValue(); + ZipEntry e = new ZipEntry(name); +- e.setTime(System.currentTimeMillis()); ++ if (System.getenv("SOURCE_DATE_EPOCH") != null) ++ e.setTime(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))); ++ else ++ e.setTime(System.currentTimeMillis()); + if (flag0) { + crc32ModuleInfo(e, bytes); + } +@@ -1065,7 +1077,10 @@ + addMultiRelease(m); + } + ZipEntry e = new ZipEntry(MANIFEST_NAME); +- e.setTime(System.currentTimeMillis()); ++ if (System.getenv("SOURCE_DATE_EPOCH") != null) ++ e.setTime(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))); ++ else ++ e.setTime(System.currentTimeMillis()); + if (flag0) { + crc32Manifest(e, m); + } diff --git a/gnu/packages/patches/openjdk-10-jtask-reproducibility.patch b/gnu/packages/patches/openjdk-10-jtask-reproducibility.patch new file mode 100644 index 0000000000..3411ca12ae --- /dev/null +++ b/gnu/packages/patches/openjdk-10-jtask-reproducibility.patch @@ -0,0 +1,53 @@ +--- jdk-10/src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java.orig 2022-04-04 11:18:52.760626467 +0200 ++++ jdk-10/src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java 2022-04-04 12:03:40.645325687 +0200 +@@ -105,6 +105,7 @@ + import jdk.internal.module.ModuleTarget; + import jdk.internal.module.Resources; + import jdk.tools.jlink.internal.Utils; ++import java.util.TreeSet; + + import static java.util.stream.Collectors.joining; + +@@ -768,6 +769,7 @@ + void processSection(JmodOutputStream out, Section section, Path path) + throws IOException + { ++ TreeSet paths = new TreeSet<>(); + Files.walkFileTree(path, Set.of(FileVisitOption.FOLLOW_LINKS), + Integer.MAX_VALUE, new SimpleFileVisitor() { + @Override +@@ -781,20 +783,24 @@ + + if (!relPath.toString().equals(MODULE_INFO) + && !matches(relPath, excludes)) { +- try (InputStream in = Files.newInputStream(file)) { +- out.writeEntry(in, section, relPath.toString()); +- } catch (IOException x) { +- if (x.getMessage().contains("duplicate entry")) { +- warning("warn.ignore.duplicate.entry", +- relPath.toString(), section); +- return FileVisitResult.CONTINUE; +- } +- throw x; +- } ++ paths.add(file); + } + return FileVisitResult.CONTINUE; + } + }); ++ for (Path file : paths) { ++ Path relPath = path.relativize(file); ++ try (InputStream in = Files.newInputStream(file)) { ++ out.writeEntry(in, section, relPath.toString()); ++ } catch (IOException x) { ++ if (x.getMessage().contains("duplicate entry")) { ++ warning("warn.ignore.duplicate.entry", ++ relPath.toString(), section); ++ continue; ++ } ++ throw x; ++ } ++ } + } + + boolean matches(Path path, List matchers) { diff --git a/gnu/packages/patches/openjdk-10-module-reproducibility.patch b/gnu/packages/patches/openjdk-10-module-reproducibility.patch new file mode 100644 index 0000000000..165edd3b4a --- /dev/null +++ b/gnu/packages/patches/openjdk-10-module-reproducibility.patch @@ -0,0 +1,305 @@ +From a52c4ef44c0553a399a8a47e528db92e3bf51c6c Mon Sep 17 00:00:00 2001 +From: Alan Bateman +Date: Wed, 29 Apr 2020 08:38:28 +0100 +Subject: [PATCH] 8243666: ModuleHashes attribute generated for JMOD and JAR + files depends on timestamps + +Reviewed-by: mchung +--- + +--- orig/jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleHashesBuilder.java 2022-04-13 19:24:10.655695284 +0200 ++++ jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleHashesBuilder.java 2022-04-14 02:43:48.610326492 +0200 +@@ -27,9 +27,8 @@ + + import java.io.PrintStream; + import java.lang.module.Configuration; ++import java.lang.module.ModuleReference; + import java.lang.module.ResolvedModule; +-import java.net.URI; +-import java.nio.file.Path; + import java.nio.file.Paths; + import java.util.ArrayDeque; + import java.util.Collections; +@@ -39,8 +38,8 @@ + import java.util.LinkedList; + import java.util.Map; + import java.util.Set; ++import java.util.TreeMap; + import java.util.function.Consumer; +-import java.util.function.Function; + import java.util.stream.Stream; + import static java.util.stream.Collectors.*; + +@@ -101,7 +100,7 @@ + // the modules to record the hashes - it is the first matching + // module and has not been hashed during the traversal. + Set mods = new HashSet<>(); +- Map hashes = new HashMap<>(); ++ Map hashes = new TreeMap<>(); + builder.build() + .orderedNodes() + .filter(mn -> roots.contains(mn) && !mods.contains(mn)) +@@ -116,27 +115,17 @@ + mods.addAll(ns); + + if (!ns.isEmpty()) { +- Map moduleToPath = ns.stream() +- .collect(toMap(Function.identity(), this::moduleToPath)); +- hashes.put(mn, ModuleHashes.generate(moduleToPath, "SHA-256")); ++ Set mrefs = ns.stream() ++ .map(name -> configuration.findModule(name) ++ .orElseThrow(InternalError::new)) ++ .map(ResolvedModule::reference) ++ .collect(toSet()); ++ hashes.put(mn, ModuleHashes.generate(mrefs, "SHA-256")); + } + }); + return hashes; + } + +- private Path moduleToPath(String name) { +- ResolvedModule rm = configuration.findModule(name).orElseThrow( +- () -> new InternalError("Selected module " + name + " not on module path")); +- +- URI uri = rm.reference().location().get(); +- Path path = Paths.get(uri); +- String fn = path.getFileName().toString(); +- if (!fn.endsWith(".jar") && !fn.endsWith(".jmod")) { +- throw new UnsupportedOperationException(path + " is not a modular JAR or jmod file"); +- } +- return path; +- } +- + /* + * Utility class + */diff -ru orig/jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleHashes.java jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleHashes.java +--- orig/jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleHashes.java 1970-01-01 01:00:01.000000000 +0100 ++++ jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleHashes.java 2022-04-12 16:58:05.639985936 +0200 +@@ -26,17 +26,21 @@ + package jdk.internal.module; + + import java.io.IOException; ++import java.io.InputStream; + import java.io.UncheckedIOException; +-import java.nio.ByteBuffer; +-import java.nio.channels.FileChannel; +-import java.nio.file.Path; ++import java.lang.module.ModuleReader; ++import java.lang.module.ModuleReference; ++import java.nio.charset.StandardCharsets; + import java.security.MessageDigest; + import java.security.NoSuchAlgorithmException; ++import java.util.Arrays; + import java.util.Collections; + import java.util.HashMap; + import java.util.Map; + import java.util.Objects; + import java.util.Set; ++import java.util.TreeMap; ++import java.util.function.Supplier; + + /** + * The result of hashing the contents of a number of module artifacts. +@@ -60,8 +64,8 @@ + * @param algorithm the algorithm used to create the hashes + * @param nameToHash the map of module name to hash value + */ +- public ModuleHashes(String algorithm, Map nameToHash) { +- this.algorithm = algorithm; ++ ModuleHashes(String algorithm, Map nameToHash) { ++ this.algorithm = Objects.requireNonNull(algorithm); + this.nameToHash = Collections.unmodifiableMap(nameToHash); + } + +@@ -95,54 +99,125 @@ + } + + /** +- * Computes the hash for the given file with the given message digest +- * algorithm. ++ * Computes a hash from the names and content of a module. + * ++ * @param reader the module reader to access the module content ++ * @param algorithm the name of the message digest algorithm to use ++ * @return the hash ++ * @throws IllegalArgumentException if digest algorithm is not supported + * @throws UncheckedIOException if an I/O error occurs + * @throws RuntimeException if the algorithm is not available + */ +- public static byte[] computeHash(Path file, String algorithm) { ++ private static byte[] computeHash(ModuleReader reader, String algorithm) { ++ MessageDigest md; + try { +- MessageDigest md = MessageDigest.getInstance(algorithm); +- +- // Ideally we would just mmap the file but this consumes too much +- // memory when jlink is running concurrently on very large jmods +- try (FileChannel fc = FileChannel.open(file)) { +- ByteBuffer bb = ByteBuffer.allocate(32*1024); +- while (fc.read(bb) > 0) { +- bb.flip(); +- md.update(bb); +- assert bb.remaining() == 0; +- bb.clear(); +- } +- } +- +- return md.digest(); ++ md = MessageDigest.getInstance(algorithm); + } catch (NoSuchAlgorithmException e) { +- throw new RuntimeException(e); ++ throw new IllegalArgumentException(e); ++ } ++ try { ++ byte[] buf = new byte[32*1024]; ++ reader.list().sorted().forEach(rn -> { ++ md.update(rn.getBytes(StandardCharsets.UTF_8)); ++ try (InputStream in = reader.open(rn).orElseThrow(java.util.NoSuchElementException::new)) { ++ int n; ++ while ((n = in.read(buf)) > 0) { ++ md.update(buf, 0, n); ++ } ++ } catch (IOException ioe) { ++ throw new UncheckedIOException(ioe); ++ } ++ }); + } catch (IOException ioe) { + throw new UncheckedIOException(ioe); + } ++ return md.digest(); + } + + /** +- * Computes the hash for every entry in the given map, returning a +- * {@code ModuleHashes} to encapsulate the result. The map key is +- * the entry name, typically the module name. The map value is the file +- * path to the entry (module artifact). ++ * Computes a hash from the names and content of a module. + * ++ * @param supplier supplies the module reader to access the module content ++ * @param algorithm the name of the message digest algorithm to use ++ * @return the hash ++ * @throws IllegalArgumentException if digest algorithm is not supported ++ * @throws UncheckedIOException if an I/O error occurs ++ */ ++ static byte[] computeHash(Supplier supplier, String algorithm) { ++ try (ModuleReader reader = supplier.get()) { ++ return computeHash(reader, algorithm); ++ } catch (IOException ioe) { ++ throw new UncheckedIOException(ioe); ++ } ++ } ++ ++ /** ++ * Computes the hash from the names and content of a set of modules. Returns ++ * a {@code ModuleHashes} to encapsulate the result. ++ * @param mrefs the set of modules ++ * @param algorithm the name of the message digest algorithm to use + * @return ModuleHashes that encapsulates the hashes ++ * @throws IllegalArgumentException if digest algorithm is not supported ++ * @throws UncheckedIOException if an I/O error occurs + */ +- public static ModuleHashes generate(Map map, String algorithm) { ++ static ModuleHashes generate(Set mrefs, String algorithm) { + Map nameToHash = new HashMap<>(); +- for (Map.Entry entry: map.entrySet()) { +- String name = entry.getKey(); +- Path path = entry.getValue(); +- nameToHash.put(name, computeHash(path, algorithm)); ++ for (ModuleReference mref : mrefs) { ++ try (ModuleReader reader = mref.open()) { ++ byte[] hash = computeHash(reader, algorithm); ++ nameToHash.put(mref.descriptor().name(), hash); ++ } catch (IOException ioe) { ++ throw new UncheckedIOException(ioe); ++ } + } + return new ModuleHashes(algorithm, nameToHash); + } + ++ @Override ++ public int hashCode() { ++ int h = algorithm.hashCode(); ++ for (Map.Entry e : nameToHash.entrySet()) { ++ h = h * 31 + e.getKey().hashCode(); ++ h = h * 31 + Arrays.hashCode(e.getValue()); ++ } ++ return h; ++ } ++ ++ @Override ++ public boolean equals(Object obj) { ++ if (!(obj instanceof ModuleHashes)) ++ return false; ++ ModuleHashes other = (ModuleHashes) obj; ++ if (!algorithm.equals(other.algorithm) ++ || nameToHash.size() != other.nameToHash.size()) ++ return false; ++ for (Map.Entry e : nameToHash.entrySet()) { ++ String name = e.getKey(); ++ byte[] hash = e.getValue(); ++ if (!Arrays.equals(hash, other.nameToHash.get(name))) ++ return false; ++ } ++ return true; ++ } ++ ++ @Override ++ public String toString() { ++ StringBuilder sb = new StringBuilder(algorithm); ++ sb.append(" "); ++ nameToHash.entrySet() ++ .stream() ++ .sorted(Map.Entry.comparingByKey()) ++ .forEach(e -> { ++ sb.append(e.getKey()); ++ sb.append("="); ++ byte[] ba = e.getValue(); ++ for (byte b : ba) { ++ sb.append(String.format("%02x", b & 0xff)); ++ } ++ }); ++ return sb.toString(); ++ } ++ + /** + * This is used by jdk.internal.module.SystemModules class + * generated at link time. +diff -ru orig/jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java +--- orig/jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java 1970-01-01 01:00:01.000000000 +0100 ++++ jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java 2022-04-12 16:43:12.967868689 +0200 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +diff -ru orig/jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java +--- orig/jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java 1970-01-01 01:00:01.000000000 +0100 ++++ jdk-3cc80be736f2/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java 2022-04-12 16:43:12.971868797 +0200 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -95,7 +95,7 @@ + Path file) { + URI uri = file.toUri(); + Supplier supplier = () -> new JarModuleReader(file, uri); +- HashSupplier hasher = (a) -> ModuleHashes.computeHash(file, a); ++ HashSupplier hasher = (a) -> ModuleHashes.computeHash(supplier, a); + return newModule(attrs, uri, supplier, patcher, hasher); + } + +@@ -105,7 +105,7 @@ + static ModuleReference newJModModule(ModuleInfo.Attributes attrs, Path file) { + URI uri = file.toUri(); + Supplier supplier = () -> new JModModuleReader(file, uri); +- HashSupplier hasher = (a) -> ModuleHashes.computeHash(file, a); ++ HashSupplier hasher = (a) -> ModuleHashes.computeHash(supplier, a); + return newModule(attrs, uri, supplier, null, hasher); + } + diff --git a/gnu/packages/patches/openjdk-10-module3-reproducibility.patch b/gnu/packages/patches/openjdk-10-module3-reproducibility.patch new file mode 100644 index 0000000000..bc54803bea --- /dev/null +++ b/gnu/packages/patches/openjdk-10-module3-reproducibility.patch @@ -0,0 +1,34 @@ +Danny wrote. + +--- orig/jdk-3cc80be736f2/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java 1970-01-01 01:00:01.000000000 +0100 ++++ jdk-3cc80be736f2/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java 2022-04-13 17:30:37.242775977 +0200 +@@ -43,6 +43,7 @@ + import java.util.Objects; + import java.util.Optional; + import java.util.Set; ++import java.util.TreeSet; + import java.util.function.Supplier; + import java.util.stream.Collectors; + import java.util.stream.Stream; +@@ -2155,9 +2156,9 @@ + * @return The module descriptor + */ + public ModuleDescriptor build() { +- Set requires = new HashSet<>(this.requires.values()); +- Set exports = new HashSet<>(this.exports.values()); +- Set opens = new HashSet<>(this.opens.values()); ++ Set requires = new TreeSet<>(this.requires.values()); ++ Set exports = new TreeSet<>(this.exports.values()); ++ Set opens = new TreeSet<>(this.opens.values()); + + // add dependency on java.base + if (strict +@@ -2169,7 +2170,7 @@ + null)); + } + +- Set provides = new HashSet<>(this.provides.values()); ++ Set provides = new TreeSet<>(this.provides.values()); + + return new ModuleDescriptor(name, + version, diff --git a/gnu/packages/patches/openjdk-10-module4-reproducibility.patch b/gnu/packages/patches/openjdk-10-module4-reproducibility.patch new file mode 100644 index 0000000000..051c9344eb --- /dev/null +++ b/gnu/packages/patches/openjdk-10-module4-reproducibility.patch @@ -0,0 +1,14 @@ +Danny wrote it + +--- orig/jdk-6fa770f9f8ab/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java 2022-04-13 19:24:12.655749459 +0200 ++++ jdk-6fa770f9f8ab/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java 2022-04-14 01:53:23.555465018 +0200 +@@ -861,7 +861,8 @@ + */ + private void genModuleReads(ClassWriter cw, Configuration cf) { + // module name -> names of modules that it reads +- Map> map = cf.modules().stream() ++ Map> map = cf.modules().stream() ++ .sorted(java.util.Comparator.comparing(ResolvedModule::name)) + .collect(Collectors.toMap( + ResolvedModule::name, + m -> m.reads().stream() -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 31 14:10:15 2023 Received: (at 55751) by debbugs.gnu.org; 31 Jul 2023 18:10:15 +0000 Received: from localhost ([127.0.0.1]:53533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQXLT-0007M5-95 for submit@debbugs.gnu.org; Mon, 31 Jul 2023 14:10:15 -0400 Received: from dd30410.kasserver.com ([85.13.145.193]:40306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQXLR-0007Lu-1W for 55751@debbugs.gnu.org; Mon, 31 Jul 2023 14:10:13 -0400 Received: from nova.lan (84-115-230-178.cable.dynamic.surfer.at [84.115.230.178]) by dd30410.kasserver.com (Postfix) with ESMTPSA id 39A781121EBB; Mon, 31 Jul 2023 20:09:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scratchpost.org; s=kas202303142049; t=1690826974; bh=auUGEAs/CoTxZ3B8XMXeE97DyNRq16tMWEkUIB5zvL0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vHSWPGW9KhWb3XlMxdAcHbFjj6UO+I3Vig0r88mi/pY8flhD3D9nysp7ybZUEcndu e+QkqSjjyVBacyLv/ONg5Y7mwgMo48BW7OMdRbMgJqHva6P+5qQeYLjyfD93DeS08p qszuszBu/DHG8SJ67lkLazqWsMxe6D0IbrN8CU+Ura9b9c45Zlvjn5aV2SdtLdRr9A Zs/IMlDz47fd+E/gLiI+YIdrrUA773Tk7j2qQ5gR7LRlp3QP/QUGJfwo0E8buNuurh vxL8XD0lNHDXLGmH8ahcahAWDzX3euU307pXrn+BidKQnbdFs9kcz/TtcQJgBzNeUW 7dmjcmdK/l8iA== From: Danny Milosavljevic To: 55751@debbugs.gnu.org Subject: [PATCH v2 3/7] gnu: openjdk11: Make more reproducible. Date: Mon, 31 Jul 2023 20:09:15 +0200 Message-Id: <20230731180919.28047-4-dannym@scratchpost.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230731180919.28047-1-dannym@scratchpost.org> References: <20230731180919.28047-1-dannym@scratchpost.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Bar: --- X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 55751 Cc: Danny Milosavljevic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/java.scm (openjdk11)[source]: Add patches. [arguments]<#:phases>[remove-timestamping]: Add phase. * gnu/packages/patches/openjdk-11-classlist-reproducibility.patch: New file. * gnu/local.mk (dist_patch_DATA): Add patches. --- gnu/local.mk | 1 + gnu/packages/java.scm | 21 ++++++++++++++++++- ...openjdk-11-classlist-reproducibility.patch | 11 ++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/openjdk-11-classlist-reproducibility.patch diff --git a/gnu/local.mk b/gnu/local.mk index 791e5a85aa..715e958248 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1675,6 +1675,7 @@ dist_patch_DATA = \ %D%/packages/patches/openjdk-10-module4-reproducibility.patch \ %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-15-xcursor-no-dynamic.patch \ %D%/packages/patches/openmpi-mtl-priorities.patch \ %D%/packages/patches/openmw-assume-nonconst-SIGSTKSZ.patch \ diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 14e9b1f653..9ffd0dce7e 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1172,7 +1172,17 @@ (define-public openjdk11 "1prvqy0ysz0999wrhsrbz6vrknpqfihl9l74l16ph93g89dqi5ia")) (modules '((guix build utils))) (snippet - '(for-each delete-file (find-files "." "\\.(bin|exe|jar)$"))))) + '(for-each delete-file (find-files "." "\\.(bin|exe|jar)$"))) + (patches + (search-patches ;"openjdk-10-module-reproducibility.patch" + "openjdk-10-module3-reproducibility.patch" + "openjdk-10-module4-reproducibility.patch" + "openjdk-10-char-reproducibility.patch" + "openjdk-11-classlist-reproducibility.patch" + ;"openjdk-10-corba-reproducibility.patch" + ;"openjdk-10-idlj-reproducibility.patch" + "openjdk-10-jar-reproducibility.patch" + "openjdk-10-jtask-reproducibility.patch")))) (build-system gnu-build-system) (outputs '("out" "jdk" "doc")) (arguments @@ -1205,6 +1215,10 @@ (define-public openjdk11 "--with-libjpeg=system" "--with-libpng=system" "--with-version-pre=" + ;; should be set by SOURCE_DATE_EPOCH handler, but + ;; isn't being set. So manually do it. + "--with-hotspot-build-time=1970-01-01T00:00:01" + "--enable-reproducible-build" ; to be sure ;; Allow the build system to locate the system freetype. (string-append "--with-freetype-include=" #$(this-package-input "freetype") "/include") @@ -1218,6 +1232,11 @@ (define-public openjdk11 ;; this exact first line. (substitute* "make/data/blockedcertsconverter/blocked.certs.pem" (("^#!.*") "#! java BlockedCertsConverter SHA-256\n")))) + (add-after 'unpack 'remove-timestamping + (lambda _ + (substitute* "src/hotspot/share/runtime/abstract_vm_version.cpp" + (("__DATE__") "") + (("__TIME__") "")))) (add-after 'unpack 'patch-jni-libs ;; Hardcode dynamically loaded libraries. (lambda _ diff --git a/gnu/packages/patches/openjdk-11-classlist-reproducibility.patch b/gnu/packages/patches/openjdk-11-classlist-reproducibility.patch new file mode 100644 index 0000000000..2ac7c2b664 --- /dev/null +++ b/gnu/packages/patches/openjdk-11-classlist-reproducibility.patch @@ -0,0 +1,11 @@ +--- jdk-11.0.13-ga/make/GenerateLinkOptData.gmk.orig 2022-04-04 17:18:56.801929954 +0200 ++++ jdk-11.0.13-ga/make/GenerateLinkOptData.gmk 2022-04-04 17:19:14.962422622 +0200 +@@ -66,7 +66,7 @@ + -cp $(SUPPORT_OUTPUTDIR)/classlist.jar \ + build.tools.classlist.HelloClasslist \ + $(LOG_DEBUG) 2>&1 > $(JLI_TRACE_FILE) +- $(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 -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 31 14:10:25 2023 Received: (at 55751) by debbugs.gnu.org; 31 Jul 2023 18:10:26 +0000 Received: from localhost ([127.0.0.1]:53536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQXLd-0007MT-Mf for submit@debbugs.gnu.org; Mon, 31 Jul 2023 14:10:25 -0400 Received: from dd30410.kasserver.com ([85.13.145.193]:38548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQXLc-0007ML-8U for 55751@debbugs.gnu.org; Mon, 31 Jul 2023 14:10:24 -0400 Received: from nova.lan (84-115-230-178.cable.dynamic.surfer.at [84.115.230.178]) by dd30410.kasserver.com (Postfix) with ESMTPSA id 20DDB112069D; Mon, 31 Jul 2023 20:09:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scratchpost.org; s=kas202303142049; t=1690826975; bh=+9y2cA1Illc20YyUUQ5N1QgKahq7Y4Kkj614Bi8UyfA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jru+NGQZxHt+Rr3Mv5V+UrZQBO2od739fvUt+oBry5l1vp3qIx6EP4N5cOUr2BdrG U0b4ukRtCJxgi7SuTmJU9+ciXd9jM1wjC2VnHzTnVhAlKT83ZDOFjhQXjpmAHNxhEq 6Su+VPGzX6FoyTZa/7QEndO++VbUX/lYV7R7WZ8QlegIPGp/oDWGv5YKGu8vrOxQKP F6xhFvTOfdhfCk7pSdLAlduvo4eeMnfIguAKptNBDgJXftrZL8LiZmkRD+Fv6ZO/Ap n7XDBPOkH4vmrgjC+MIWdk0+NJipDEvjzG2mYmyuGiC3PLaV1gp/P7uCcZ9u+qvHS0 T2q0HTyglSl4A== From: Danny Milosavljevic To: 55751@debbugs.gnu.org Subject: [PATCH v2 4/7] gnu: openjdk12: Make reproducible. Date: Mon, 31 Jul 2023 20:09:16 +0200 Message-Id: <20230731180919.28047-5-dannym@scratchpost.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230731180919.28047-1-dannym@scratchpost.org> References: <20230731180919.28047-1-dannym@scratchpost.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Bar: -- X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 55751 Cc: Danny Milosavljevic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/java.scm (openjdk12)[arguments]<#:phases>[remove-timestamping]: Modify phase. --- gnu/packages/java.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 9ffd0dce7e..66dcc5023e 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1510,6 +1510,11 @@ (define-public openjdk12 (substitute-keyword-arguments (package-arguments openjdk11) ((#:phases phases) #~(modify-phases #$phases + (replace 'remove-timestamping + (lambda _ + (substitute* "src/hotspot/share/runtime/vm_version.cpp" + (("__DATE__") "") + (("__TIME__") "")))) (replace 'fix-java-shebangs (lambda _ ;; 'blocked' was renamed to 'blacklisted' in this version for -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 31 14:10:36 2023 Received: (at 55751) by debbugs.gnu.org; 31 Jul 2023 18:10:36 +0000 Received: from localhost ([127.0.0.1]:53539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQXLn-0007Mu-Vg for submit@debbugs.gnu.org; Mon, 31 Jul 2023 14:10:36 -0400 Received: from dd30410.kasserver.com ([85.13.145.193]:42172) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQXLm-0007Mm-Jj for 55751@debbugs.gnu.org; Mon, 31 Jul 2023 14:10:35 -0400 Received: from nova.lan (84-115-230-178.cable.dynamic.surfer.at [84.115.230.178]) by dd30410.kasserver.com (Postfix) with ESMTPSA id 1C4AA1121EC3; Mon, 31 Jul 2023 20:09:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scratchpost.org; s=kas202303142049; t=1690826976; bh=rg6+DT4KE/2u9YjeSnIS9Kw0bB0tFGVqRqifpG80kv0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o+dG3WYlRUP6JJE9FCQ+YZje7OOa2y0NuFrl384Wtm3338dvAmRJrhWSnbYt86uwv rga8b+ae4oQkEUuQWunPR5BbnSzyBbk1pBZpBDna5lOnrWAaIVcnXhbFm8GsQf1qVf fYj1vTTLVPoop0LaIdtG/2Cem29CRu6cjxJ0gmBr5dPMVyhMKoSNV152QzoXpGunIg W9hOwtsWjRwgPYHZgbMl/Sdf2B8PjkLWWA87um+zb5y/Cy+DmkBZoYT4BV+zafdl8F hgV9Nbupb4+L57IszXwSy/d1wes0IAGFW2koDXwETcjdsFvQz0LegeN9Li29+y89Rv 8TubJNZYZoDrQ== From: Danny Milosavljevic To: 55751@debbugs.gnu.org Subject: [PATCH v2 5/7] gnu: openjdk13: Make reproducible. Date: Mon, 31 Jul 2023 20:09:17 +0200 Message-Id: <20230731180919.28047-6-dannym@scratchpost.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230731180919.28047-1-dannym@scratchpost.org> References: <20230731180919.28047-1-dannym@scratchpost.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Bar: -- X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 55751 Cc: Danny Milosavljevic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * 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. --- gnu/local.mk | 1 + gnu/packages/java.scm | 17 ++++++++++++++--- .../openjdk-13-classlist-reproducibility.patch | 11 +++++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/openjdk-13-classlist-reproducibility.patch diff --git a/gnu/local.mk b/gnu/local.mk index 715e958248..7956b57669 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1676,6 +1676,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/openmpi-mtl-priorities.patch \ %D%/packages/patches/openmw-assume-nonconst-SIGSTKSZ.patch \ diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 66dcc5023e..d7cad12bf1 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1527,9 +1527,20 @@ (define-public openjdk12 (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 -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 31 14:10:47 2023 Received: (at 55751) by debbugs.gnu.org; 31 Jul 2023 18:10:47 +0000 Received: from localhost ([127.0.0.1]:53542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQXLz-0007NK-Cr for submit@debbugs.gnu.org; Mon, 31 Jul 2023 14:10:47 -0400 Received: from dd30410.kasserver.com ([85.13.145.193]:43644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQXLx-0007N9-TP for 55751@debbugs.gnu.org; Mon, 31 Jul 2023 14:10:46 -0400 Received: from nova.lan (84-115-230-178.cable.dynamic.surfer.at [84.115.230.178]) by dd30410.kasserver.com (Postfix) with ESMTPSA id 1A0961121EDF; Mon, 31 Jul 2023 20:09:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scratchpost.org; s=kas202303142049; t=1690826977; bh=jNiIhpdn07+SV6eCgQqG61feQ1puYk4IeXVdBRJhfP8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hnASkYJA+EcDZR2uOCKAeVzmWby2f9hXT6bjMMxDW0XNwWZgQ6p9eaXqCqj/syYKP CC/6vnJsF0odCQWRSXGmmESNXdwLWOGFnLESUP9Si3JSSKngqHNdX/UrUpuTkhISp/ 8cfniidApOhzH3AQdZKMQbFEzoRNwl2Q6DfFkOJlz2u3K+eUb4ssK1BMZii7MiMc4B 1uFTxX91BwQHznfzibq4+1MspMDt8iWt0mQvyN4oYnFMKyFJGIEB5701YQPoLYL9ze xBgP4xilbZqA1UFgToeUq9ipRQ/4W2ZQautVAoWeegUwSALvGqJ1K7YaBRdmbMBi9p c8M0Fn46xURJg== From: Danny Milosavljevic To: 55751@debbugs.gnu.org Subject: [PATCH v2 6/7] gnu: openjdk14: Make reproducible. Date: Mon, 31 Jul 2023 20:09:18 +0200 Message-Id: <20230731180919.28047-7-dannym@scratchpost.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230731180919.28047-1-dannym@scratchpost.org> References: <20230731180919.28047-1-dannym@scratchpost.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Bar: ++ X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 55751 Cc: Danny Milosavljevic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/java.scm (openjdk14)[source]: Add patches. --- gnu/packages/java.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index d7cad12bf1..d4176f1375 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1555,7 +1555,9 @@ (define-public openjdk14 (substitute* "make/autoconf/basics.m4" (("if help") "if command -v")) (for-each delete-file (find-files "." "\\.(bin|exe|jar)$")))) - (patches (search-patches "openjdk-10-setsignalhandler.patch")))))) + (patches (search-patches "openjdk-10-setsignalhandler.patch" + "openjdk-10-jtask-reproducibility.patch" + "openjdk-13-classlist-reproducibility.patch")))))) (define-public openjdk15 (make-openjdk -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 31 14:10:59 2023 Received: (at 55751) by debbugs.gnu.org; 31 Jul 2023 18:10:59 +0000 Received: from localhost ([127.0.0.1]:53545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQXMA-0007Nj-Mx for submit@debbugs.gnu.org; Mon, 31 Jul 2023 14:10:59 -0400 Received: from dd30410.kasserver.com ([85.13.145.193]:37388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQXM8-0007Na-ST for 55751@debbugs.gnu.org; Mon, 31 Jul 2023 14:10:57 -0400 Received: from nova.lan (84-115-230-178.cable.dynamic.surfer.at [84.115.230.178]) by dd30410.kasserver.com (Postfix) with ESMTPSA id 0F2321121EE1; Mon, 31 Jul 2023 20:09:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scratchpost.org; s=kas202303142049; t=1690826978; bh=BCOKc0pAtC6VY1VKsP7mzZqouuazDrfXIDQJDMQmo9Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K7e687XxIUm4+oxvqYjaZznz+zL0a6m0UX9L3AJj/P71Rhc1+8DqMKfP65XIV6jsG HT8uPlTtSro00Dy3CNDmTN8u7XmvT7bVMOhJIvS04kuEVzQ814HI/R9C6jCcc5tcS0 HAt6jE/oGIvcEa0ZiuCZ5b7UNlvhRdQgiUV1MbMy+hnmknpJNiWI1HvBK1JEeWD1wQ H1EPsqBLUJI3akYoA/mD9XV71bkiWiOvGJpAhhUfRFCUkyHeb4FT01f2BzQnBqn4pN TF0reZ7yiS9vIH5zjkT//VDg04rYjGFaGbAuJsCf6K38wwiV0Ik6GO0qT2B3Aj2VBV /Ypzm9MGESIBw== From: Danny Milosavljevic To: 55751@debbugs.gnu.org Subject: [PATCH v2 7/7] gnu: openjdk15: Make reproducible. Date: Mon, 31 Jul 2023 20:09:19 +0200 Message-Id: <20230731180919.28047-8-dannym@scratchpost.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230731180919.28047-1-dannym@scratchpost.org> References: <20230731180919.28047-1-dannym@scratchpost.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Bar: -- X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 55751 Cc: Danny Milosavljevic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/java.scm (openjdk15)[source]: Add patch. --- gnu/packages/java.scm | 3 +- .../openjdk-15-jtask-reproducibility.patch | 40 +++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/openjdk-15-jtask-reproducibility.patch diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index d4176f1375..a8aaedb8af 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1568,7 +1568,8 @@ (define-public openjdk15 (modules '()) (snippet #f) (patches - (search-patches "openjdk-15-xcursor-no-dynamic.patch")))) + (search-patches "openjdk-15-jtask-reproducibility.patch" + "openjdk-15-xcursor-no-dynamic.patch")))) (inputs (modify-inputs (package-inputs base) (append libxcursor))) ;for our patch to work diff --git a/gnu/packages/patches/openjdk-15-jtask-reproducibility.patch b/gnu/packages/patches/openjdk-15-jtask-reproducibility.patch new file mode 100644 index 0000000000..2052983ade --- /dev/null +++ b/gnu/packages/patches/openjdk-15-jtask-reproducibility.patch @@ -0,0 +1,40 @@ +--- 22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java.orig 2022-04-04 10:57:40.346312924 +0200 ++++ 22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java 2022-04-04 11:01:38.480751902 +0200 +@@ -82,6 +82,7 @@ + import jdk.internal.module.ModuleTarget; + import jdk.internal.module.Resources; + import jdk.tools.jlink.internal.Utils; ++import java.util.TreeSet; + + import static java.util.stream.Collectors.joining; + +@@ -750,6 +751,7 @@ + void processSection(JmodOutputStream out, Section section, Path path) + throws IOException + { ++ TreeSet paths = new TreeSet<>(); + Files.walkFileTree(path, Set.of(FileVisitOption.FOLLOW_LINKS), + Integer.MAX_VALUE, new SimpleFileVisitor() { + @Override +@@ -765,14 +767,18 @@ + if (out.contains(section, name)) { + warning("warn.ignore.duplicate.entry", name, section); + } else { +- try (InputStream in = Files.newInputStream(file)) { +- out.writeEntry(in, section, name); +- } ++ paths.add(file); + } + } + return FileVisitResult.CONTINUE; + } + }); ++ ++ for (Path file : paths) { ++ try (InputStream in = Files.newInputStream(file)) { ++ out.writeEntry(in, section, path.relativize(file).toString()); ++ } ++ } + } + + boolean matches(Path path, List matchers) { -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 21 00:22:58 2024 Received: (at 55751) by debbugs.gnu.org; 21 Jan 2024 05:22:58 +0000 Received: from localhost ([127.0.0.1]:36382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRQIM-000231-32 for submit@debbugs.gnu.org; Sun, 21 Jan 2024 00:22:58 -0500 Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]:44205) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRQIK-00022k-4q for 55751@debbugs.gnu.org; Sun, 21 Jan 2024 00:22:57 -0500 Received: by mail-qk1-x731.google.com with SMTP id af79cd13be357-7831be84f4eso186492085a.0 for <55751@debbugs.gnu.org>; Sat, 20 Jan 2024 21:22:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705814567; x=1706419367; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=jpqEr7KabMtf7WcoagOcSUcZEpq4rvcOspmT0wUX310=; b=eyLKJ/Us6m7wbPruGvRHwFJUBeT+B5NOyua9PGqkyos7+VQ/tz2YvEzNIFWP+9CHpt UQzaxVx9i60DIFXEPDziL4RLFX2JZH2HPne6I0Fcdxdjs6yjkRHTOQXVm+cvdGE03VjO BHPV3BAqSwubA//w510lg0P3GFjrFJg2kxrnmq76libGqq3Aw0ZglvmFuv/GDaMdv1uj K9qf1VrKcktiaydfWbBrMtDJT77XKmXoKXiIyOfFuuGyNHxfznVPjnmUD6mDo6RHcW3L DRCOC+Q7Gs1jMQmB0EDO185VTBEc0gbsl2HeSid61Us/9t8/d/9WxWmMqFwljadlEnOg aIvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705814567; x=1706419367; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jpqEr7KabMtf7WcoagOcSUcZEpq4rvcOspmT0wUX310=; b=Vx29YFvboBcwltnDQV/RPZbXoQMEqWMeOaAgQxvLBFcDKyxPod1jm3A2SPQOjfiuCM A0WFeXBh6oL9W9WKBBJbJdm2XzqEf3MMEFc6VdJp9Lwm0hbjJsjAPR+vOQcNvY/xr+fx GInNA3R7YfB7B/udx+IEWrO2CVh5DMNL9pErz9KoGJqUWp8LTT7X+dQ4Na21tioDEJMG z4jTaRV3MeJI+prZhA6B9wqJEkyrB1lMbuyc3Kgt1MgzVUrKODP2KfTKZ/9CSn4BIYjx DiOzlkLjpOBUmZa7krMDCR/mfUoCT98k0kK/EVDlQjHjl3TsY9E+FzlNAUg9W45d16ds xckg== X-Gm-Message-State: AOJu0YxZWwAuO66Iw6O0r+nhrS6dG9r10OjgN85e4hMIDVw+MJDcjHjz C9k/t0dvjKzwu7f6W6t6eBk0Yu4GFrIFJXH+ftp7c7fgVjt7zdWM46b2gf3SoKo= X-Google-Smtp-Source: AGHT+IEqxl6WSGAwIXL8LRi7ne012cM6Xvv4+5WmaU3HMCmKejvuMl1iVmbrdHC7g6LtgJ4gg7u/8w== X-Received: by 2002:a05:6214:1d22:b0:67f:4c04:66f8 with SMTP id f2-20020a0562141d2200b0067f4c0466f8mr3421836qvd.103.1705814566740; Sat, 20 Jan 2024 21:22:46 -0800 (PST) Received: from hurd (dsl-10-128-232.b2b2c.ca. [72.10.128.232]) by smtp.gmail.com with ESMTPSA id or29-20020a056214469d00b00681034fbc9esm53207qvb.94.2024.01.20.21.22.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jan 2024 21:22:46 -0800 (PST) From: Maxim Cournoyer To: Danny Milosavljevic Subject: Re: [bug#55751] [PATCH v2 7/7] gnu: openjdk15: Make reproducible. In-Reply-To: <20230731180919.28047-8-dannym@scratchpost.org> (Danny Milosavljevic's message of "Mon, 31 Jul 2023 20:09:19 +0200") References: <20230731180919.28047-1-dannym@scratchpost.org> <20230731180919.28047-8-dannym@scratchpost.org> Date: Sun, 21 Jan 2024 00:22:44 -0500 Message-ID: <87zfwz9s63.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 55751 Cc: 55751@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello! Danny Milosavljevic writes: > * gnu/packages/java.scm (openjdk15)[source]: Add patch. > --- > gnu/packages/java.scm | 3 +- > .../openjdk-15-jtask-reproducibility.patch | 40 +++++++++++++++++++ > 2 files changed, 42 insertions(+), 1 deletion(-) > create mode 100644 gnu/packages/patches/openjdk-15-jtask-reproducibility.patch I've queued your work for core-updates. Thank you! -- Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 24 14:39:26 2024 Received: (at 55751-done) by debbugs.gnu.org; 24 Oct 2024 18:39:26 +0000 Received: from localhost ([127.0.0.1]:36164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t42k2-0001rJ-5J for submit@debbugs.gnu.org; Thu, 24 Oct 2024 14:39:26 -0400 Received: from cascadia.aikidev.net ([173.255.214.101]:57440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t42jy-0001r2-Kc for 55751-done@debbugs.gnu.org; Thu, 24 Oct 2024 14:39:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=reproducible-builds.org; s=1.vagrant; t=1729795095; bh=xq4ANk+0mr2GMkksHWn2FL+LXbR6SI/dva72+8UpYhA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=EiCML+Ys3k8I5XSnUPkcmo1DtibnhLwR3RKjoW65bsoUuWAGRLIictOnMfYdf9C3k k8wm1hD0nUUf0UwBhuQvAZpJNUcD72KY6l8dNlU2egkcKLkwZ3np8AcuyI85KdkJXF uQIBNHqigF9z/TaNacKBrn6wbnAElduHARCaY0rF/H+AoFXRaKJj832X9PBTe1My2i nz2mhPz/96ZDyM0oEFZpSSMpvmAgYvQnUS2QX9u4/RjYjwvlXGOCkdF7SXq4ZS/adQ hPxuHxpetBy29QVCyTiH75iZMs4v1tWfCNpAhHfvu3Yu/1d0WLqa+UKxDYbjsvO1VP K7YrxPlUPLgeg== Received: from localhost (unknown [IPv6:2600:3c01:e000:21:7:77:0:50]) by cascadia.aikidev.net (Postfix) with ESMTPSA id 3B6E9233B; Thu, 24 Oct 2024 11:38:15 -0700 (PDT) From: Vagrant Cascadian To: Maxim Cournoyer , Danny Milosavljevic Subject: Re: [bug#55751] [PATCH v2 7/7] gnu: openjdk15: Make reproducible. In-Reply-To: <87zfwz9s63.fsf@gmail.com> References: <20230731180919.28047-1-dannym@scratchpost.org> <20230731180919.28047-8-dannym@scratchpost.org> <87zfwz9s63.fsf@gmail.com> Date: Thu, 24 Oct 2024 11:38:09 -0700 Message-ID: <8734kl9wj2.fsf@wireframe> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 55751-done Cc: 55751-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain On 2024-01-21, Maxim Cournoyer wrote: > Danny Milosavljevic writes: > >> * gnu/packages/java.scm (openjdk15)[source]: Add patch. >> --- >> gnu/packages/java.scm | 3 +- >> .../openjdk-15-jtask-reproducibility.patch | 40 +++++++++++++++++++ >> 2 files changed, 42 insertions(+), 1 deletion(-) >> create mode 100644 gnu/packages/patches/openjdk-15-jtask-reproducibility.patch > > I've queued your work for core-updates. Thank you! This series appears to be present in guix master as: 3c8ca6b26bee110c4bcfbc6aaa7d4805b1915fc8 gnu: openjdk15: Make reproducible. dbce2fc28728721c0ac81929799d55deae6b0ab5 gnu: openjdk14: Make reproducible. 5996fb5b0c7ce7ca6b1552308199effa66cbcf6a gnu: openjdk13: Make reproducible. d109a7322c0597b4f265df93061886984fca9037 gnu: openjdk12: Make reproducible. edf8fc9a485298e9bdb3793221c75d0a4a18177d gnu: openjdk11: Make more reproducible. 48ea1a2b3b8bc4c8b2247972401ab5a6f7f4ecc7 gnu: openjdk10: Make more reproducible. 2f1daa35746c896cd59882383c236ee97a3cbad7 gnu: openjdk9: Make build reproducible. Marking as done! live well, vagrant --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZxqUEQAKCRDcUY/If5cW ql4CAQDnYwNUY+8oJHgoQEoirmn0Mc3wRXX+mMtOP+yarlyyAwD+PV8TBBLw3nFV fg8DFEo57ht01dwGWWH4SkUU0DtL+wI= =1bj/ -----END PGP SIGNATURE----- --=-=-=-- From unknown Tue Aug 19 07:14:12 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 22 Nov 2024 12:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator