diff --git a/.gitignore b/.gitignore index ee9f857..f45b3a8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,28 @@ /.build-*.log /*.src.rpm /noarch -/asm-* /archive.tar.gz -/parent.pom +/asm-6.2.pom +/asm-analysis-6.2.pom +/asm-commons-6.2.pom +/asm-test-6.2.pom +/asm-tree-6.2.pom +/asm-util-6.2.pom +/asm-xml-6.2.pom +/objectweb-asm-6.2.tar.gz +/objectweb-asm-6.2.1.tar.gz +/asm-6.2.1.pom +/asm-analysis-6.2.1.pom +/asm-commons-6.2.1.pom +/asm-test-6.2.1.pom +/asm-tree-6.2.1.pom +/asm-util-6.2.1.pom +/asm-xml-6.2.1.pom +/objectweb-asm-7.0.tar.gz +/objectweb-asm-7.0/ +/asm-7.0.pom +/asm-analysis-7.0.pom +/asm-commons-7.0.pom +/asm-test-7.0.pom +/asm-tree-7.0.pom +/asm-util-7.0.pom diff --git a/asm-all.pom b/asm-all.pom new file mode 100644 index 0000000..230058b --- /dev/null +++ b/asm-all.pom @@ -0,0 +1,57 @@ + + + 4.0.0 + + org.ow2 + ow2 + 1.5 + + org.ow2.asm + asm-all + @VERSION@ + + + org.ow2.asm + asm + @VERSION@ + + + org.ow2.asm + asm-analysis + @VERSION@ + + + org.ow2.asm + asm-commons + @VERSION@ + + + org.ow2.asm + asm-tree + @VERSION@ + + + org.ow2.asm + asm-tree + @VERSION@ + + + + + + org.apache.maven.plugins + maven-shade-plugin + 3.1.1 + + + package + + shade + + + + + + + diff --git a/generate-tarball.sh b/generate-tarball.sh new file mode 100755 index 0000000..255d107 --- /dev/null +++ b/generate-tarball.sh @@ -0,0 +1,28 @@ +#!/bin/bash +set -e + +name=objectweb-asm +version="$(sed -n 's/Version:\s*//p' *.spec)" +gittag="ASM_${version//./_}" + +# RETRIEVE +wget "https://gitlab.ow2.org/asm/asm/repository/${gittag}/archive.tar.gz#/${name}-${version}.tar.gz" -O "${name}-${version}.orig.tar.gz" + +rm -rf tarball-tmp +mkdir tarball-tmp +cd tarball-tmp +tar xf "../${name}-${version}.orig.tar.gz" + +# Rename dir not to contain commit +mv asm-${gittag}-* ${name}-${version} + +# CLEAN TARBALL +# Remove all jar files +find -name '*.jar' -delete +# Remove all class files except those in asm-test, which are shipped alongside appropriately licensed source +find */asm{,-analysis,-commons} -name '*.class' -delete +rm -r */gradle + +tar cf "../${name}-${version}.tar.gz" * +cd .. +rm -r tarball-tmp "${name}-${version}.orig.tar.gz" diff --git a/objectweb-asm.spec b/objectweb-asm.spec index 1497f40..ebb1b34 100644 --- a/objectweb-asm.spec +++ b/objectweb-asm.spec @@ -1,16 +1,22 @@ -%global gittag ASM_6_1_1 - %bcond_without junit5 +%bcond_without osgi + +%if %{fedora} < 29 + %global surefire_platform_coords org.junit.platform:junit-platform-surefire-provider +%else + %global surefire_platform_coords org.apache.maven.surefire:surefire-junit-platform +%endif Name: objectweb-asm -Version: 6.1.1 -Release: 4%{?dist} +Version: 7.0 +Release: 2%{?dist} Summary: Java bytecode manipulation and analysis framework License: BSD URL: http://asm.ow2.org/ BuildArch: noarch -Source0: https://gitlab.ow2.org/asm/asm/repository/%{gittag}/archive.tar.gz +# ./generate-tarball.sh +Source0: %{name}-%{version}.tar.gz Source1: parent.pom Source2: http://repo1.maven.org/maven2/org/ow2/asm/asm/%{version}/asm-%{version}.pom Source3: http://repo1.maven.org/maven2/org/ow2/asm/asm-analysis/%{version}/asm-analysis-%{version}.pom @@ -18,10 +24,11 @@ Source4: http://repo1.maven.org/maven2/org/ow2/asm/asm-commons/%{version} Source5: http://repo1.maven.org/maven2/org/ow2/asm/asm-test/%{version}/asm-test-%{version}.pom Source6: http://repo1.maven.org/maven2/org/ow2/asm/asm-tree/%{version}/asm-tree-%{version}.pom Source7: http://repo1.maven.org/maven2/org/ow2/asm/asm-util/%{version}/asm-util-%{version}.pom -Source8: http://repo1.maven.org/maven2/org/ow2/asm/asm-xml/%{version}/asm-xml-%{version}.pom # We still want to create an "all" uberjar, so this is a custom pom to generate it # TODO: Fix other packages to no longer depend on "asm-all" so we can drop this -Source9: asm-all-%{version}.pom +Source8: asm-all.pom +# The source contains binary jars that cannot be verified for licensing and could be proprietary +Source9: generate-tarball.sh BuildRequires: maven-local BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) @@ -32,13 +39,19 @@ BuildRequires: mvn(org.codehaus.janino:janino) BuildRequires: mvn(org.junit.jupiter:junit-jupiter-api) BuildRequires: mvn(org.junit.jupiter:junit-jupiter-engine) BuildRequires: mvn(org.junit.jupiter:junit-jupiter-params) -BuildRequires: mvn(org.junit.platform:junit-platform-surefire-provider) +BuildRequires: mvn(%{surefire_platform_coords}) %endif +%if %{with osgi} # asm-all needs to be in pluginpath for BND. If this self-dependency # becomes a problem then ASM core will have to be build from source # with javac before main maven build, just like bnd-module-plugin BuildRequires: objectweb-asm >= 6 +%endif + +# Explicit javapackages-tools requires since asm-processor script uses +# /usr/share/java-utils/java-functions +Requires: javapackages-tools %description ASM is an all purpose Java bytecode manipulation and analysis @@ -54,10 +67,7 @@ Summary: API documentation for %{name} This package provides %{summary}. %prep -%setup -q -n asm-%{gittag}-11b3cabce9b90706cf91a47dd15215c667f8055b - -find -name *.jar -delete -rm -rf gradle/ +%setup -q # A custom parent pom to aggregate the build cp -p %{SOURCE1} pom.xml @@ -67,20 +77,14 @@ cp -p %{SOURCE1} pom.xml %endif # Insert poms into modules -for pom in asm asm-analysis asm-commons asm-test asm-tree asm-util asm-xml; do +for pom in asm asm-analysis asm-commons asm-test asm-tree asm-util; do cp -p $RPM_SOURCE_DIR/${pom}-%{version}.pom $pom/pom.xml # Fix junit5 configuration %if %{with junit5} %pom_add_dep org.junit.jupiter:junit-jupiter-engine:5.1.0:test $pom - %pom_add_plugin org.apache.maven.plugins:maven-surefire-plugin:2.21.0 $pom \ -" - - org.junit.platform - junit-platform-surefire-provider - 1.2.0-RC1 - - " + %pom_add_plugin org.apache.maven.plugins:maven-surefire-plugin:2.22.0 $pom %endif +%if %{with osgi} if [ "$pom" != "asm-test" ] ; then # Make into OSGi bundles bsn="org.objectweb.${pom//-/.}" @@ -97,11 +101,34 @@ for pom in asm asm-analysis asm-commons asm-test asm-tree asm-util asm-xml; do " fi +%endif done +%if %{fedora} < 29 + # Remove tests which fail + rm asm/src/test/java/org/objectweb/asm/ClassWriterComputeMaxsTest.java + rm asm-tree/src/test/java/org/objectweb/asm/tree/InsnListTest.java + rm asm-analysis/src/test/java/org/objectweb/asm/tree/analysis/SimpleVerifierTest.java + rm asm-analysis/src/test/java/org/objectweb/asm/tree/analysis/BasicInterpreterTest.java + rm asm-analysis/src/test/java/org/objectweb/asm/tree/analysis/AnalyzerTest.java + rm asm-util/src/test/java/org/objectweb/asm/util/CheckMethodAdapterTest.java + rm asm-util/src/test/java/org/objectweb/asm/util/CheckClassAdapterTest.java + rm asm-util/src/test/java/org/objectweb/asm/util/CheckModuleAdapterTest.java + rm asm-commons/src/test/java/org/objectweb/asm/commons/JsrInlinerAdapterTest.java + rm asm-commons/src/test/java/org/objectweb/asm/commons/LocalVariablesSorterTest.java +%else + # Disable tests that use unlicensed class files + sed -i -e '/testReadAndWriteWithComputeMaxsAndLargeSubroutines/i@org.junit.jupiter.api.Disabled("missing class file")' \ + asm/src/test/java/org/objectweb/asm/ClassWriterTest.java + sed -i -e '/testMergeWithJsrReachableFromTwoDifferentPaths/i@org.junit.jupiter.api.Disabled("missing class file")' \ + asm-analysis/src/test/java/org/objectweb/asm/tree/analysis/BasicInterpreterTest.java + sed -i -e '/testSortLocalVariablesAndInstantiate()/i@org.junit.jupiter.api.Disabled("missing class file")' \ + asm-commons/src/test/java/org/objectweb/asm/commons/LocalVariablesSorterTest.java +%endif + # Insert asm-all pom mkdir -p asm-all -cp -p %{SOURCE9} asm-all/pom.xml +sed 's/@VERSION@/%{version}/g' %{SOURCE8} > asm-all/pom.xml # Remove invalid self-dependency %pom_remove_dep org.ow2.asm:asm-test asm-test @@ -130,7 +157,7 @@ popd %install %mvn_install -%jpackage_script org.objectweb.asm.xml.Processor "" "" %{name}/asm:%{name}/asm-attrs:%{name}/asm-util:%{name}/asm-xml %{name}-processor true +%jpackage_script org.objectweb.asm.xml.Processor "" "" %{name}/asm:%{name}/asm-attrs:%{name}/asm-util %{name}-processor true %files -f .mfiles %license LICENSE.txt @@ -140,6 +167,31 @@ popd %license LICENSE.txt %changelog +* Wed Nov 21 2018 Severin Gehwolf - 7.0-2 +- Use F28 provider for surefire junit. + +* Wed Nov 21 2018 Severin Gehwolf - 7.0-1 +- Update to latest upstream 7.0 release. +- Removes package asm-xml (deprecated since 6.1). + +* Tue Sep 11 2018 Mat Booth - 6.2.1-1 +- Update to latest upstream release +- Fix test suite execution + +* Fri Aug 03 2018 Michael Simacek - 6.2-5 +- Repack the tarball without binaries + +* Wed Aug 01 2018 Severin Gehwolf - 6.2-4 +- Explicitly require javapackages-tools for asm-processor script + which uses java-functions. + +* Wed Aug 01 2018 Severin Gehwolf - 6.2-3 +- Allow conditionally building without OSGi + metadata. + +* Thu Jul 05 2018 Severin Gehwolf - 6.2-1 +- Update to latest upstream release: 6.2 + * Sat Jun 30 2018 Mikolaj Izdebski - 6.1.1-4 - Relax versioned self-build-requirement a bit diff --git a/parent.pom b/parent.pom new file mode 100644 index 0000000..8cfbb70 --- /dev/null +++ b/parent.pom @@ -0,0 +1,21 @@ + + + 4.0.0 + + org.ow2.asm + asm-aggregator + 1 + + pom + + + asm + asm-analysis + asm-commons + asm-test + asm-tree + asm-util + asm-all + + diff --git a/sources b/sources index bc5fe57..10d3c96 100644 --- a/sources +++ b/sources @@ -1,10 +1,7 @@ -SHA512 (archive.tar.gz) = 9719f97dc953d20473bc161557e2e254e9455654229858af13af5fe6582a39a96c77dd52ee342bc79157e8e8e87ef48188185a0ebe28f4bb6ecb7f0cb3923f7b -SHA512 (asm-6.1.1.pom) = 4485086ec55d29fdcd96f0c1d6cf517ef3237a87552c68d6bdf59f5ae50cd93ba9706eeb5f43bafcc1289e32e152cd845aee44a2316fd060d0501cf3141840b7 -SHA512 (asm-all-6.1.1.pom) = 90df1a63b5e2a2b2b40f17cbc0303072e96d168c6cccd1bcb986f9b900b370fa191d857c694e20449d42d4b9d575f5c5153fceb09405f472257bc6733388e917 -SHA512 (asm-analysis-6.1.1.pom) = 213bfae989c64f807bb00856a262c7ad507eb9188653e688319f3c862f1362aa5ffffd18cb1ed712c7cb3bd3095b924fbfba06ed54c2e67920d6251b307c86d0 -SHA512 (asm-commons-6.1.1.pom) = 742b17e77b93c04bae33987fd4ab0a3bf889277ae46331b0b8fc3e67c360e0a11406e02e8ca6d3350542557a7c0f6b78057f15866fd3250b7dffe81999a29ae2 -SHA512 (asm-test-6.1.1.pom) = 2ff4b770eb6e14eddd13b7fa41c3b8d684c5f22f4d08c215e42a7f3a51c846b66e90603040376a56c6b9dbd09f7bf49beca826062145d0613319087b860614c7 -SHA512 (asm-tree-6.1.1.pom) = c02053d0279b7f43f7838a9540806bd597391ee5af7babb2a77d7764e0e255dad3eb6da83203480c1cabc06a2014fb196e97f2f34e90442f9516c19874fd1153 -SHA512 (asm-util-6.1.1.pom) = 2ceac588f3aa34e2531dcc3dac8614ce0c9131e7ba226f2f9b5766f80c4f7ad5dfd9806c9379789d7ac38d4e91543c4936f61f1dacd3f0815cc8abed9d6edf8e -SHA512 (asm-xml-6.1.1.pom) = a0796711334d3f29ba8a3743e87c13f3c0c5e2491f6718ee08cfb45bd7f873699e79daf6845437f8c58abf8b6d273fde56328ae5e53797df3c22309629d36c41 -SHA512 (parent.pom) = 0e0ed1e893e604ebfa863b046b1189a424ebb68032026b7402894e66f36376c8a748f2e4c08e96be6fee21eab3dc79203b805b61b422d3ab9158a4a1a78d2bb6 +SHA512 (objectweb-asm-7.0.tar.gz) = 696935563bffad143653f9cde722fcb16e93271c95918731a8eb08a15b783985848c42ba74a65990489638132fbae3fdf7892889545abb548834f10db3f27ed4 +SHA512 (asm-7.0.pom) = a7a2060b33710202034e1f025a687a40ec97232213bf21a8aeb70e23d8b2200a0f7c33697d0adaf942c1ac2852d7b5a4032a43132a89b5692fa68a26ce32c77e +SHA512 (asm-analysis-7.0.pom) = b2ad03aedcd027e02d493bfb39ad454ad1f969f420af9a27531ca2650b9720375e3f65657820bd5e4b3095625cd9e5c30543a2be14abb9f04b9928514cfdcb99 +SHA512 (asm-commons-7.0.pom) = a092e8dbb0ae7417c3a245ba022485b84432fbb7c072ea1100f60266346cc94e9d4176c25f981c3e05a86e0e0c8348ae6ea0856cf29ead310946fa982bd70ec4 +SHA512 (asm-test-7.0.pom) = 34f8fe64d4db1f6e2e07dc8e39d00aecb072f8c260b094047cd9c7aa6754927a95ea9cde51494d6d3dbda427fb3b1d8583f92f9ad034925d5eba2745253cbb88 +SHA512 (asm-tree-7.0.pom) = e88f0d20160061e9b6eba203a80d50471deb53ece26c256388d06a8026a455c0463c2cc9463c427e88797bd075ddaa8e9f1594fe2f0939997677c629e86f6cca +SHA512 (asm-util-7.0.pom) = c2b8ef7eb326b76b7fca816ec21da04d69426f2c04028b127a1b517a6b23ae92985d6328d37c80b84a5c3e8b503df7623504c761b382f31dce6b80ae4d193302