From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id aOQODkRjl2IlHgEAbAwnHQ (envelope-from ) for ; Wed, 01 Jun 2022 15:01:56 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id EAsKDURjl2IXIAAAG6o9tA (envelope-from ) for ; Wed, 01 Jun 2022 15:01:56 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5D7001090F for ; Wed, 1 Jun 2022 15:01:55 +0200 (CEST) Received: from localhost ([::1]:42156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwNyw-0003nM-SN for larch@yhetil.org; Wed, 01 Jun 2022 09:01:50 -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 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654088515; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=wpWx5/xs1CqncGRCD4m+konpxhdAm6uTImAfVLApEAQ=; b=CdTL6nBdvlhICIBkT1aRG3D331iu8N9C3/g21zEZAIf80Tpw+jRsyVvq8iXWCfXGtZXO7n 3P/BQneT/qMwnW6SVOIug6k4EYYVkwcApFr99GG8vi3uAXlxclomcwOiyK+5MzJ5pjEbbJ 5012d74qRSiLGR3IukDyoJxMvD8aSD4FGMp40oE45X/aPGAmkZ0ZEFvU2VYHFh+Pq+VJkG BXFVrIRdY3zZh5qe1Osyhy1M4Q/uHy0G4XEDtcVrah25CTSsV72Iw0xpcZTRvjAvNab4VB t7q/HnbsF3b34okJc0IwEfzDYe8XTWES+xkHy3yVjk11yzBz9lXwNtKdBq+mng== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654088515; a=rsa-sha256; cv=none; b=tddaDjjWLc5f4rUR16jdCd1Z6KN1HgBt4JQV3ZePBtBzqRbAD4cfd17kLWxVvYalxkObIE KObsXdYgEsyzPgCJrT18pgChX+HSUV0h4W5zzHcyJljingXr+pgFjVMD3BkXlRXsejRPlc W1vbZvphyt7JcHdkshz64aXSl1x31up5EGlsgu25kCGYuXexmKQpj6dZzZKv6QxIek9gBG 7ovL3jW1v2uXWYMpwHEDc2EnKEoVBdNjUcvtpHtrvwShHRNd0rQCFIj22hKEwC16tFEUBr XjM2bFFn0rIFPkhkITmUS26U39CR+6RgKRpXcPpY8sgiePU2OSpmEL6etxnA2Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -0.13 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 5D7001090F X-Spam-Score: -0.13 X-Migadu-Scanner: scn1.migadu.com X-TUID: pQumPBd/Dkbe 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