From 62c47ed53f3a0a63352a3a735b2a3fe5ecb5e50e Mon Sep 17 00:00:00 2001 From: "Volkmar W. Pogatzki" Date: Mon, 16 Oct 2023 19:18:58 +0200 Subject: dev-java/felix-framework: verify-sig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Volkmar W. Pogatzki Signed-off-by: Miroslav Ć ulc --- dev-java/felix-framework/Manifest | 3 +- .../felix-framework-7.0.5-r1.ebuild | 102 -------------------- .../felix-framework-7.0.5-r2.ebuild | 106 +++++++++++++++++++++ 3 files changed, 108 insertions(+), 103 deletions(-) delete mode 100644 dev-java/felix-framework/felix-framework-7.0.5-r1.ebuild create mode 100644 dev-java/felix-framework/felix-framework-7.0.5-r2.ebuild (limited to 'dev-java') diff --git a/dev-java/felix-framework/Manifest b/dev-java/felix-framework/Manifest index 7c129e4b6fc7..61ae21b93439 100644 --- a/dev-java/felix-framework/Manifest +++ b/dev-java/felix-framework/Manifest @@ -1 +1,2 @@ -DIST felix-framework-7.0.5.tar.gz 505118 BLAKE2B 3652d46dfb4c9c5b43b159450b81ad896483fb2df40165d7e7b8bbd718c8e3297163065474bd10f3858ff7fc2646134ed470e34ede8eeb5efc05cec75f1a7aec SHA512 58fa96500fed827c348a47ac8672aeb4e5b94bfd681c4cde610b3a453fd2abfe2d631742281a192c76718ee83fc4c30980a5179926ff3bc7b8ea649ef07f34a3 +DIST org.apache.felix.framework-7.0.5-source-release.tar.gz 505118 BLAKE2B 3652d46dfb4c9c5b43b159450b81ad896483fb2df40165d7e7b8bbd718c8e3297163065474bd10f3858ff7fc2646134ed470e34ede8eeb5efc05cec75f1a7aec SHA512 58fa96500fed827c348a47ac8672aeb4e5b94bfd681c4cde610b3a453fd2abfe2d631742281a192c76718ee83fc4c30980a5179926ff3bc7b8ea649ef07f34a3 +DIST org.apache.felix.framework-7.0.5-source-release.tar.gz.asc 195 BLAKE2B 94d0afbb7f20119a3f75927e75dc10420caab1c6ce2c3cc5b2b8600a2fd6af4c9217df565cd922bd0017ec6ac54113cc2a894b60249978c87c61c7961d258dda SHA512 2b22f242b5d3ff6c38457908e801dc95abeca6c6427fe8eab4badae171692f9b8de6edf091dca78cc43c3a467a56aa85895cabdfa7eaa92faf6cb090e9fae8fa diff --git a/dev-java/felix-framework/felix-framework-7.0.5-r1.ebuild b/dev-java/felix-framework/felix-framework-7.0.5-r1.ebuild deleted file mode 100644 index 8a8d9e25d1ed..000000000000 --- a/dev-java/felix-framework/felix-framework-7.0.5-r1.ebuild +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -JAVA_PKG_IUSE="doc source test" -MAVEN_ID="org.apache.felix:org.apache.felix.framework:7.0.5" -JAVA_TESTING_FRAMEWORKS="junit-4" - -inherit java-pkg-2 java-pkg-simple - -DESCRIPTION="Implementation of the OSGi R8 core framework specification" -HOMEPAGE="https://felix.apache.org/documentation/subprojects/apache-felix-framework.html" -SRC_URI="mirror://apache/felix/org.apache.${PN//-/.}-${PV}-source-release.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/org.apache.felix.framework-${PV}" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="amd64 ~arm arm64 ppc64 x86" - -# Common dependencies -# POM: pom.xml -# org.codehaus.mojo:animal-sniffer-annotations:1.9 -> >=dev-java/animal-sniffer-annotations-1.15:0 - -CP_DEPEND="dev-java/animal-sniffer-annotations:0" - -# Compile dependencies -# POM: pom.xml -# org.apache.felix:org.apache.felix.resolver:2.0.4 -> >=dev-java/felix-resolver-2.0.4:0 -# org.osgi:org.osgi.annotation:6.0.0 -> !!!artifactId-not-found!!! -# POM: pom.xml -# test? junit:junit:4.12 -> >=dev-java/junit-4.13.2:4 -# test? org.easymock:easymock:2.5.2 -> >=dev-java/easymock-2.5.2:2.5 -# test? org.mockito:mockito-all:1.10.19 -> !!!artifactId-not-found!!! -# test? org.ow2.asm:asm-all:5.2 -> !!!artifactId-not-found!!! - -DEPEND=" - >=virtual/jdk-11:* - ${CP_DEPEND} - dev-java/osgi-annotation:0 - dev-java/felix-resolver:0 - test? ( - dev-java/asm:9 - dev-java/easymock:2.5 - dev-java/mockito:0 - ) -" - -RDEPEND=" - >=virtual/jre-1.8:* - ${CP_DEPEND}" - -JAVA_CLASSPATH_EXTRA="felix-resolver,osgi-annotation" -JAVA_SRC_DIR="src/main/java" -JAVA_RESOURCE_DIRS="src/main/resources" - -JAVA_TEST_GENTOO_CLASSPATH="asm-9,junit-4,easymock-2.5,mockito" -JAVA_TEST_SRC_DIR="src/test/java" - -src_prepare() { - java-pkg-2_src_prepare - # 58,91 pom.xml - cat > src/main/java/module-info.java <<-EOF - $( sed -n '//,/<\/moduleInfoSource/p' pom.xml \ - | grep -v moduleInfoSource ) - EOF - - sed -e 's/{dollar}//g' -i src/main/resources/default.properties || die - - sed -e "s:\${pom.version}:${PV}:" \ - -i src/main/resources/org/apache/felix/framework/Felix.properties || die - - # bundling some classes from felix-resolver according to 99,132 pom.xml - # if we don't bundle compilation would fail with: - # src/main/java/module-info.java:23: error: package is empty or does not exist: org.osgi.service.resolver - cd src/main/resources || die - jar xvf "$(java-pkg_getjar --build-only felix-resolver felix-resolver.jar)" \ - org/{apache/felix,osgi/service}/resolver/ || die -} - -src_compile() { - java-pkg-simple_src_compile - - # according to pom.xml, line 129 - # grep the line between and from pom.xml - local add_opens="$(sed -n '//,/<\/Add-opens/p' pom.xml \ - | grep -v Add-opens | tr -s '[:space:]')" || die - echo "Add-opens:${add_opens}" > "${T}/Add-opens-to-MANIFEST.MF" \ - || die "Add-opens-to-MANIFEST.MF failed" - jar ufmv ${JAVA_JAR_FILENAME} "${T}/Add-opens-to-MANIFEST.MF" \ - || die "updating MANIFEST.MF failed" -} - -src_test() { - # java.base does not "opens java.lang" to unnamed module - # adding it to MANIFEST.MF would not fix the test failures. - local vm_version="$(java-config -g PROVIDES_VERSION)" - if ver_test "${vm_version}" -ge 17; then - JAVA_TEST_EXTRA_ARGS+=( --add-opens=java.base/java.lang=ALL-UNNAMED ) - fi - java-pkg-simple_src_test -} diff --git a/dev-java/felix-framework/felix-framework-7.0.5-r2.ebuild b/dev-java/felix-framework/felix-framework-7.0.5-r2.ebuild new file mode 100644 index 000000000000..ddb1eee0510a --- /dev/null +++ b/dev-java/felix-framework/felix-framework-7.0.5-r2.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc source test" +MAVEN_ID="org.apache.felix:org.apache.felix.framework:7.0.5" +JAVA_TESTING_FRAMEWORKS="junit-4" + +inherit java-pkg-2 java-pkg-simple verify-sig + +DESCRIPTION="Implementation of the OSGi R8 core framework specification" +HOMEPAGE="https://felix.apache.org/documentation/subprojects/apache-felix-framework.html" +SRC_URI="mirror://apache/felix/org.apache.${PN//-/.}-${PV}-source-release.tar.gz + verify-sig? ( https://downloads.apache.org/felix/org.apache.${PN//-/.}-${PV}-source-release.tar.gz.asc )" +S="${WORKDIR}/org.apache.felix.framework-${PV}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 ~arm arm64 ppc64 x86" + +# Common dependencies +# POM: pom.xml +# org.codehaus.mojo:animal-sniffer-annotations:1.9 -> >=dev-java/animal-sniffer-annotations-1.15:0 + +CP_DEPEND="dev-java/animal-sniffer-annotations:0" + +# Compile dependencies +# POM: pom.xml +# org.apache.felix:org.apache.felix.resolver:2.0.4 -> >=dev-java/felix-resolver-2.0.4:0 +# org.osgi:org.osgi.annotation:6.0.0 -> !!!artifactId-not-found!!! +# POM: pom.xml +# test? junit:junit:4.12 -> >=dev-java/junit-4.13.2:4 +# test? org.easymock:easymock:2.5.2 -> >=dev-java/easymock-2.5.2:2.5 +# test? org.mockito:mockito-all:1.10.19 -> !!!artifactId-not-found!!! +# test? org.ow2.asm:asm-all:5.2 -> !!!artifactId-not-found!!! + +DEPEND=" + >=virtual/jdk-11:* + ${CP_DEPEND} + dev-java/osgi-annotation:0 + dev-java/felix-resolver:0 + test? ( + dev-java/asm:9 + dev-java/easymock:2.5 + dev-java/mockito:0 + ) +" + +RDEPEND=" + >=virtual/jre-1.8:* + ${CP_DEPEND}" + +DEPEND="verify-sig? ( sec-keys/openpgp-keys-apache-felix )" +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/felix.apache.org.asc" + +JAVA_CLASSPATH_EXTRA="felix-resolver,osgi-annotation" +JAVA_SRC_DIR="src/main/java" +JAVA_RESOURCE_DIRS="src/main/resources" + +JAVA_TEST_GENTOO_CLASSPATH="asm-9,junit-4,easymock-2.5,mockito" +JAVA_TEST_SRC_DIR="src/test/java" + +src_prepare() { + java-pkg-2_src_prepare + # 58,91 pom.xml + cat > src/main/java/module-info.java <<-EOF + $( sed -n '//,/<\/moduleInfoSource/p' pom.xml \ + | grep -v moduleInfoSource ) + EOF + + sed -e 's/{dollar}//g' -i src/main/resources/default.properties || die + + sed -e "s:\${pom.version}:${PV}:" \ + -i src/main/resources/org/apache/felix/framework/Felix.properties || die + + # bundling some classes from felix-resolver according to 99,132 pom.xml + # if we don't bundle compilation would fail with: + # src/main/java/module-info.java:23: error: package is empty or does not exist: org.osgi.service.resolver + cd src/main/resources || die + jar xvf "$(java-pkg_getjar --build-only felix-resolver felix-resolver.jar)" \ + org/{apache/felix,osgi/service}/resolver/ || die +} + +src_compile() { + java-pkg-simple_src_compile + + # according to pom.xml, line 129 + # grep the line between and from pom.xml + local add_opens="$(sed -n '//,/<\/Add-opens/p' pom.xml \ + | grep -v Add-opens | tr -s '[:space:]')" || die + echo "Add-opens:${add_opens}" > "${T}/Add-opens-to-MANIFEST.MF" \ + || die "Add-opens-to-MANIFEST.MF failed" + jar ufmv ${JAVA_JAR_FILENAME} "${T}/Add-opens-to-MANIFEST.MF" \ + || die "updating MANIFEST.MF failed" +} + +src_test() { + # java.base does not "opens java.lang" to unnamed module + # adding it to MANIFEST.MF would not fix the test failures. + local vm_version="$(java-config -g PROVIDES_VERSION)" + if ver_test "${vm_version}" -ge 17; then + JAVA_TEST_EXTRA_ARGS+=( --add-opens=java.base/java.lang=ALL-UNNAMED ) + fi + java-pkg-simple_src_test +} -- cgit v1.2.3-65-gdbad