From patchwork Mon Jul 31 18:09:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danny Milosavljevic X-Patchwork-Id: 52437 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 6764227BBE9; Mon, 31 Jul 2023 19:11:19 +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.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS 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 237F227BBE2 for ; Mon, 31 Jul 2023 19:11:18 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qQXMQ-0003sl-Gt; Mon, 31 Jul 2023 14:11:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qQXMH-0003r5-4z for guix-patches@gnu.org; Mon, 31 Jul 2023 14:11:07 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qQXMG-00044f-SV for guix-patches@gnu.org; Mon, 31 Jul 2023 14:11:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qQXMG-0007Oc-O7 for guix-patches@gnu.org; Mon, 31 Jul 2023 14:11:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55751] [PATCH v2 7/7] gnu: openjdk15: Make reproducible. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 Jul 2023 18:11:04 +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.169082705928383 (code B ref 55751); Mon, 31 Jul 2023 18:11:04 +0000 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 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 X-Spamd-Bar: -- 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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) {