From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uIe9LVtw+mODBgAAbAwnHQ (envelope-from ) for ; Sat, 25 Feb 2023 21:32:27 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id +BUuLVtw+mOJOgEA9RJhRA (envelope-from ) for ; Sat, 25 Feb 2023 21:32:27 +0100 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 5AF932008E for ; Sat, 25 Feb 2023 21:32:27 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pW1DB-0005nh-Js; Sat, 25 Feb 2023 15:32:05 -0500 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 1pW1D9-0005mZ-L7 for guix-patches@gnu.org; Sat, 25 Feb 2023 15:32:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pW1D9-00016Z-CY for guix-patches@gnu.org; Sat, 25 Feb 2023 15:32:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pW1D9-0004U6-8w for guix-patches@gnu.org; Sat, 25 Feb 2023 15:32:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61794] [PATCH 05/18] gnu: java-guava: Update to 31.1. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 20:32:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61794 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61794@debbugs.gnu.org Received: via spool by 61794-submit@debbugs.gnu.org id=B61794.167735706717059 (code B ref 61794); Sat, 25 Feb 2023 20:32:03 +0000 Received: (at 61794) by debbugs.gnu.org; 25 Feb 2023 20:31:07 +0000 Received: from localhost ([127.0.0.1]:41660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pW1CD-0004Qi-Fl for submit@debbugs.gnu.org; Sat, 25 Feb 2023 15:31:06 -0500 Received: from lepiller.eu ([89.234.186.109]:46240) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pW1C8-0004Om-0B for 61794@debbugs.gnu.org; Sat, 25 Feb 2023 15:31:00 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 875d57fa for <61794@debbugs.gnu.org>; Sat, 25 Feb 2023 20:30:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=dkim; bh=CKO9lmABUobMJj70XeiWOGHqQ U9sZICQkLJwC60+aEo=; b=ED4xHwuKiBdSA5TSHp5KfsYdzRutFDoDeoOOxVKlp Ksk40Gixc2GrT4zBemCh7l7E1nUlYn3it4OgYGpcIW1oaV20be0wS2k6a1H66GTE Ozt7uIegOEPTTeir/KYtcc1SknMXC+2rwz/dKLa9jqykxOShzwtx4lBw1h29uSzc 0BSDi0uxkD+DD2OU356w0TP8CpaJe7Y/F1L4r5Z1h8y9jNTvt8edaZbfr73rgoHy z3kKCQ0nNzIoBCHgF8sBOAKnbOA+GCRrLTvpEwiS/hdwBtocMnJ4mV365w0NUtKP EwbWpv1Ozzh/ebZJOBhLfwtnEraspF7D6hEiZKJ6/gFMw== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id b6b319fe (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <61794@debbugs.gnu.org>; Sat, 25 Feb 2023 20:30:54 +0000 (UTC) From: Julien Lepiller Date: Sat, 25 Feb 2023 21:30:29 +0100 Message-Id: <67cbc476d00ec8fd7385846c88850208a1316a50.1677357041.git.julien@lepiller.eu> X-Mailer: git-send-email 2.38.1 In-Reply-To: <8c21fa41d1a4bc4665a074eee3b960a99455459e.1677357041.git.julien@lepiller.eu> References: <8c21fa41d1a4bc4665a074eee3b960a99455459e.1677357041.git.julien@lepiller.eu> 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lepiller.eu header.s=dkim header.b=ED4xHwuK; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677357147; a=rsa-sha256; cv=none; b=ZLX4lVJdVBJscwC2jQQ2OfXn9Z9km8RG6c8+Xmn48HCTngBYufA9pr34GXhvruEwZn8Te3 3XEssAkDw6M7IZcupd+ZCmikLBFGauvdrjSv0EMKDM+UUr782kBc5150FgU153+8SM7wUr j9l4F1i1YkXzwBKHRZTiIAl7yJ7kIewnG6Muu6jO27Gz9dAImvNV+slKu7F7MrgAB/M+eL /eO3a4SUKb1oP/DQ1OJziuQCY1ONYNG9kNkN///jvjlezpI64OMQZhxL+nKHlp2cGyeXRg 8bvbUWhSPl2fAlPzcBRH/VnOoR6HUhRqtaBBAjK0rYryhjhWgMHgHsVZn26UYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677357147; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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:dkim-signature; bh=b5v+GKWfWpOznpsEflz+EjVtXAGCdJ1mVmVbOgzZZTg=; b=neOUOex2hey4xUbSj7sLm+7f5kH5RwpIQ3TKm8L9vEVxe6GgPP8UW/iieQ3nwQ7Xzu4Kmu 94XDicCNk8wqT2trz5fopt52jXrz/7iJMPc+u8OKFtqPhNVJ5MmxrpKEibiBPK6CySPhGl fMV8ZeHhDODKw1agLwY6UVWr9J97gfqpjgHdIF1af1GVJCJJ4a4M6YksihGTtfjPySCfwG viKey3TykC3qA822p0hFM0EowHCYcgRcANaSXkDtXciN26C5O5LnCOA8veP5hdy8iLGjIz z4ydKBD5j2VJ9hwTFD4wJiOvPt2QDk+BabcHDfLlwIitUeyWKfBxlW5zlUqNmQ== X-Migadu-Queue-Id: 5AF932008E X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lepiller.eu header.s=dkim header.b=ED4xHwuK; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none) X-Migadu-Spam-Score: -0.58 X-Spam-Score: -0.58 X-TUID: fJuPPOG7Jo2p * gnu/packages/patches/java-guava-remove-annotation-deps.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/java.scm (java-guava): Update to 31.1. [source]: Use patch. (java-guava-futures-failureaccess): New variable. * gnu/packages/bioinformatics.scm (java-picard, java-picard-2.10.3): Fix for newer guava. * gnu/packages/maven.scm (maven): Add java-guava-futures-failureaccess. --- gnu/local.mk | 1 + gnu/packages/bioinformatics.scm | 8 ++++ gnu/packages/java.scm | 43 +++++++++++++------ gnu/packages/maven.scm | 4 +- .../java-guava-remove-annotation-deps.patch | 37 ++++++++++++++++ 5 files changed, 78 insertions(+), 15 deletions(-) create mode 100644 gnu/packages/patches/java-guava-remove-annotation-deps.patch diff --git a/gnu/local.mk b/gnu/local.mk index 63ec92ebef..019e3de794 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1361,6 +1361,7 @@ dist_patch_DATA = \ %D%/packages/patches/java-apache-ivy-port-to-latest-bouncycastle.patch \ %D%/packages/patches/java-commons-collections-fix-java8.patch \ %D%/packages/patches/java-commons-lang-fix-dependency.patch \ + %D%/packages/patches/java-guava-remove-annotation-deps.patch \ %D%/packages/patches/java-jeromq-fix-tests.patch \ %D%/packages/patches/java-openjfx-build-jdk_version.patch \ %D%/packages/patches/java-powermock-fix-java-files.patch \ diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index b5d132749f..a24c89ac6d 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -5014,6 +5014,10 @@ (define-public java-picard (modify-phases %standard-phases ;; FIXME: this phase fails with "duplicate entry: htsjdk/samtools/AbstractBAMFileIndex$1.class" (delete 'generate-jar-indices) + (add-after 'unpack 'fix-guava + (lambda _ + (substitute* "src/java/picard/cmdline/CommandLineParser.java" + (("CharMatcher.ASCII") "CharMatcher.ascii()")))) (add-after 'unpack 'use-our-htsjdk (lambda* (#:key inputs #:allow-other-keys) (substitute* "build.xml" @@ -5073,6 +5077,10 @@ (define-public java-picard-2.10.3 (delete 'generate-jar-indices) (add-after 'unpack 'remove-useless-build.xml (lambda _ (delete-file "build.xml") #t)) + (add-after 'unpack 'fix-guava + (lambda _ + (substitute* "src/main/java/picard/cmdline/CommandLineParser.java" + (("CharMatcher.ASCII") "CharMatcher.ascii()")))) ;; This is necessary to ensure that htsjdk is found when using ;; picard.jar as an executable. (add-before 'build 'edit-classpath-in-manifest diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index fbd8b50872..4d57ba4f79 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -5904,8 +5904,7 @@ (define java-error-prone-parent-pom (define-public java-guava (package (name "java-guava") - ;; This is the last release of Guava that can be built with Java 7. - (version "20.0") + (version "31.1") (source (origin (method git-fetch) (uri (git-reference @@ -5914,7 +5913,9 @@ (define-public java-guava (file-name (git-file-name name version)) (sha256 (base32 - "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp")))) + "0sv1w5cnids9ad3l7qhrh3dh1wdqwc946iinsxryafr25wg5z1lp")) + (patches + (search-patches "java-guava-remove-annotation-deps.patch")))) (build-system ant-build-system) (arguments `(#:tests? #f ; no tests included @@ -5928,27 +5929,26 @@ (define-public java-guava ;; Remove annotations to avoid extra dependencies: ;; * "j2objc" annotations are used when converting Java to ;; Objective C; - ;; * "errorprone" annotations catch common Java mistakes at - ;; compile time; ;; * "IgnoreJRERequirement" is used for Android. + ;; * "Nullable" is used to catch NPE at build time. (substitute* (find-files "." "\\.java$") (("import com.google.j2objc.*") "") - (("import com.google.errorprone.annotation.*") "") - (("import org.codehaus.mojo.animal_sniffer.*") "") - (("@CanIgnoreReturnValue") "") - (("@LazyInit") "") + (("import org.checkerframework.checker.*") "") + (("@ReflectionSupport.*") "") (("@WeakOuter") "") (("@RetainedWith") "") (("@Weak") "") - (("@ForOverride") "") (("@J2ObjCIncompatible") "") - (("@IgnoreJRERequirement") ""))) - #t)) + (("@IgnoreJRERequirement") "") + (("@Nullable") ""))))) + ;; This is required by guava, but this is just an empty stub + (add-before 'install 'install-listenablefuture-stub + (install-pom-file "futures/listenablefuture9999/pom.xml")) (replace 'install (install-from-pom "guava/pom.xml"))))) (inputs - (list java-jsr305)) + (list java-error-prone-annotations java-jsr305)) (propagated-inputs - (list java-guava-parent-pom)) + (list java-guava-futures-failureaccess java-guava-parent-pom)) (home-page "https://github.com/google/guava") (synopsis "Google core libraries for Java") (description "Guava is a set of core libraries that includes new @@ -5958,6 +5958,21 @@ (define-public java-guava more!") (license license:asl2.0))) +(define-public java-guava-futures-failureaccess + (package + (inherit java-guava) + (name "java-guava-futures-failureaccess") + (arguments + `(#:tests? #f; no tests + #:jar-name "guava-futures-failureaccess.jar" + #:source-dir "futures/failureaccess/src" + #:phases + (modify-phases %standard-phases + (replace 'install + (install-from-pom "futures/failureaccess/pom.xml"))))) + (propagated-inputs + `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7))))) + (define java-guava-parent-pom (package (inherit java-guava) diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm index f941bf0dd0..3ab8b6dffc 100644 --- a/gnu/packages/maven.scm +++ b/gnu/packages/maven.scm @@ -2170,7 +2170,8 @@ (define-public maven "java-javax-inject" "java-plexus-component-annotations" "java-plexus-utils" "java-plexus-interpolation" "java-plexus-sec-dispatcher" "java-plexus-cipher" "java-guava" - "java-jansi" "java-jsr250" "java-cdi-api" "java-commons-cli" + "java-guava-futures-failureaccess" "java-jansi" + "java-jsr250" "java-cdi-api" "java-commons-cli" "java-commons-io" "java-commons-lang3" "java-slf4j-api")))) (substitute* "apache-maven/src/bin/mvn" (("cygwin=false;") @@ -2239,6 +2240,7 @@ (define-public maven java-plexus-sec-dispatcher java-plexus-cipher java-guava + java-guava-futures-failureaccess java-jansi java-jsr250 java-cdi-api diff --git a/gnu/packages/patches/java-guava-remove-annotation-deps.patch b/gnu/packages/patches/java-guava-remove-annotation-deps.patch new file mode 100644 index 0000000000..6f038b1ba4 --- /dev/null +++ b/gnu/packages/patches/java-guava-remove-annotation-deps.patch @@ -0,0 +1,37 @@ +From 41d216ca7993991d32a077d0650ccfad8a846942 Mon Sep 17 00:00:00 2001 +From: Julien Lepiller +Date: Sat, 25 Feb 2023 10:02:11 +0100 +Subject: [PATCH] Remove annotation dependencies + +This is used to prevent a failure when guix creates the Maven directory +structure and fails to find these dependencies. +--- + guava/pom.xml | 12 ------------ + 1 file changed, 12 deletions(-) + +diff --git a/guava/pom.xml b/guava/pom.xml +index 81a2005..5237047 100644 +--- a/guava/pom.xml ++++ b/guava/pom.xml +@@ -31,18 +31,6 @@ + com.google.code.findbugs + jsr305 + +- +- org.checkerframework +- checker-qual +- +- +- com.google.errorprone +- error_prone_annotations +- +- +- com.google.j2objc +- j2objc-annotations +- + + + +-- +2.38.1 + -- 2.38.1