From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1CD291584AD for ; Tue, 15 Apr 2025 10:35:20 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 080F833BED4 for ; Tue, 15 Apr 2025 10:35:20 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 0C2621104B0; Tue, 15 Apr 2025 10:35:19 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id F2B481104B0 for ; Tue, 15 Apr 2025 10:35:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A002E33BED4 for ; Tue, 15 Apr 2025 10:35:18 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0A4F21862 for ; Tue, 15 Apr 2025 10:35:17 +0000 (UTC) From: "Florian Schmaus" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Florian Schmaus" Message-ID: <1744713293.314e6c223bc95dcc30f857b13a17332d9b759b79.flow@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/protobuf-java/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-java/protobuf-java/protobuf-java-4.30.2.ebuild X-VCS-Directories: dev-java/protobuf-java/ X-VCS-Committer: flow X-VCS-Committer-Name: Florian Schmaus X-VCS-Revision: 314e6c223bc95dcc30f857b13a17332d9b759b79 X-VCS-Branch: master Date: Tue, 15 Apr 2025 10:35:17 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 45ad8ed2-ef86-4e0b-8170-a03acd05438c X-Archives-Hash: ee6e53a63cb25cb1ebd26cc81cb69f72 commit: 314e6c223bc95dcc30f857b13a17332d9b759b79 Author: Florian Schmaus gentoo org> AuthorDate: Tue Apr 15 09:44:26 2025 +0000 Commit: Florian Schmaus gentoo org> CommitDate: Tue Apr 15 10:34:53 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=314e6c22 dev-java/protobuf-java: update SRC_URI and fix src_test The protobuf packages use a shared distfile. However, some packages use github's release artifacts, e.g., https://github.com/protocolbuffers/protobuf/releases/download/v30.2/protobuf-30.2.tar.gz while protobuf-java used github's archive artifacts, e.g., https://github.com/protocolbuffers/protobuf/archive/v${MY_PV}.tar.gz This can cause a distfile mismatch. If the user has protobuf-30.2.tar.gz from releases in its DISTDIR and then tries to emerge protobuf-java. Fix this by switching protobuf-java's SRC_URI to the release artifacts. Furthermore, fix src_test. The JAVA_TEST_RUN_ONLY array would contain fully qualified Java class names prefixed by two dots. For example '..com.example.FooTest' instead of 'com.example.FooTest'. This is caused by invoking 'find' with ./* instead of *, and the JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//\//.}" substitution. Fix this by adjusting the 'find' invocation. Furthermore, move a 'rm' from src_test to src_prepare, where it belongs. Having 'rm' in src_test makes it harder to re-execute subsequent ebuild phases using the 'ebuild' command, e.g., "ebuild protobuf-java-4.30.2.ebuild test", as the 'rm' would fail because the file no longer exists. Also zap CodedInputStreamTest as it requires the TestParameterInjector library, which is currently not available in ::gentoo. It seems like the ebuild's src_test could never have succeeded so far. Finally, drop unused protobuf_ABSL_PROVIDER=package cmake argument and fix this QA warning. This option is replaced with upstream's protobuf_LOCAL_DEPENDENCIES_ONLY=ON to prevent automatic dep fetching. Signed-off-by: Florian Schmaus gentoo.org> dev-java/protobuf-java/protobuf-java-4.30.2.ebuild | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/dev-java/protobuf-java/protobuf-java-4.30.2.ebuild b/dev-java/protobuf-java/protobuf-java-4.30.2.ebuild index d6c978e01de4..23bafe370339 100644 --- a/dev-java/protobuf-java/protobuf-java-4.30.2.ebuild +++ b/dev-java/protobuf-java/protobuf-java-4.30.2.ebuild @@ -21,7 +21,7 @@ MY_PV="$(ver_cut 2-3)" MY_PV="${MY_PV/_rc/-rc}" TV="1.4.4" SRC_URI=" - https://github.com/protocolbuffers/protobuf/archive/v${MY_PV}.tar.gz -> protobuf-${MY_PV}.tar.gz + https://github.com/protocolbuffers/protobuf/releases/download/v${MY_PV}/protobuf-${MY_PV}.tar.gz test? ( https://repo1.maven.org/maven2/com/google/truth/truth/${TV}/truth-${TV}.jar ) @@ -97,12 +97,19 @@ src_prepare() { # Split the file in two parts, one for each run-protoc call awk '/--java_out/{x="test-sources-build-"++i;}{print > x;}' \ java/core/generate-test-sources-build.xml || die + + # Requires TestParameterInjector library, currently not available in Gentoo. + rm java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java || die + + # java/core/src/test/java/editions_unittest/TestDelimited.java:2867: + # error: package editions_unittest.MessageImport does not exist + rm java/core/src/test/java/com/google/protobuf/TextFormatTest.java || die } src_configure() { local mycmakeargs=( -Dprotobuf_BUILD_TESTS=OFF - -Dprotobuf_ABSL_PROVIDER=package + -Dprotobuf_LOCAL_DEPENDENCIES_ONLY=ON ) if ! use system-protoc; then cmake_src_configure @@ -136,21 +143,17 @@ src_test() { run-protoc @test-sources-build-2 \ || die "run-protoc test-sources-build-2 failed" - # java/core/src/test/java/editions_unittest/TestDelimited.java:2867: - # error: package editions_unittest.MessageImport does not exist - rm java/core/src/test/java/com/google/protobuf/TextFormatTest.java || die - einfo "Running tests" # Invalid test class 'map_test.MapInitializationOrderTest': # 1. Test class should have exactly one public constructor # Invalid test class 'protobuf_unittest.CachedFieldSizeTest': # 1. Test class should have exactly one public constructor pushd "${JAVA_TEST_SRC_DIR}" >/dev/null || die - local JAVA_TEST_RUN_ONLY=$(find ./* \ + local JAVA_TEST_RUN_ONLY=$(find * \ -path "**/*Test.java" \ ! -path "**/Abstract*Test.java" \ ! -name "MapInitializationOrderTest.java" \ - ! -path '*protobuf_unittest/CachedFieldSizeTest.java' + ! -name CachedFieldSizeTest.java ) popd >/dev/null || die JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//.java}"