From patchwork Wed Jun 1 13:00:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danny Milosavljevic X-Patchwork-Id: 39697 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BA4E127BBE9; Wed, 1 Jun 2022 14:02:25 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1F2D727BBEA for ; Wed, 1 Jun 2022 14:02:25 +0100 (BST) Received: from localhost ([::1]:42156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwNzU-0003nM-9J for patchwork@mira.cbaines.net; Wed, 01 Jun 2022 09:02:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwNyC-0003hT-UA for guix-patches@gnu.org; Wed, 01 Jun 2022 09:01:11 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56084) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nwNyB-0003wn-42 for guix-patches@gnu.org; Wed, 01 Jun 2022 09:01:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nwNyB-0002Oe-3R for guix-patches@gnu.org; Wed, 01 Jun 2022 09:01:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55751] [PATCH 3/8] gnu: openjdk11: Make more reproducible. Resent-From: dannym@scratchpost.org Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 01 Jun 2022 13:01:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55751 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55751@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 55751-submit@debbugs.gnu.org id=B55751.16540884479127 (code B ref 55751); Wed, 01 Jun 2022 13:01:03 +0000 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 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 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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