a29604
%bcond_without junit5
a29604
%bcond_without osgi
a29604
a29604
Name:           objectweb-asm
a29604
Version:        7.3.1
e8dfee
Release:        3%{?dist}
a29604
Summary:        Java bytecode manipulation and analysis framework
a29604
License:        BSD
a29604
URL:            http://asm.ow2.org/
a29604
BuildArch:      noarch
a29604
a29604
# ./generate-tarball.sh
a29604
Source0:        %{name}-%{version}.tar.gz
a29604
Source1:        parent.pom
a29604
Source2:        https://repo1.maven.org/maven2/org/ow2/asm/asm/%{version}/asm-%{version}.pom
a29604
Source3:        https://repo1.maven.org/maven2/org/ow2/asm/asm-analysis/%{version}/asm-analysis-%{version}.pom
a29604
Source4:        https://repo1.maven.org/maven2/org/ow2/asm/asm-commons/%{version}/asm-commons-%{version}.pom
a29604
Source5:        https://repo1.maven.org/maven2/org/ow2/asm/asm-test/%{version}/asm-test-%{version}.pom
a29604
Source6:        https://repo1.maven.org/maven2/org/ow2/asm/asm-tree/%{version}/asm-tree-%{version}.pom
a29604
Source7:        https://repo1.maven.org/maven2/org/ow2/asm/asm-util/%{version}/asm-util-%{version}.pom
a29604
# We still want to create an "all" uberjar, so this is a custom pom to generate it
a29604
# TODO: Fix other packages to no longer depend on "asm-all" so we can drop this
a29604
Source8:        asm-all.pom
a29604
# The source contains binary jars that cannot be verified for licensing and could be proprietary
a29604
Source9:       generate-tarball.sh
a29604
a29604
# Revert upstream change https://gitlab.ow2.org/asm/asm/-/commit/2a58bc9bcf2ea6eee03e973d1df4cf9312573c9d
a29604
# To restore some deprecations that were deleted and broke the API
a29604
Patch0: 0001-Revert-upstream-change-2a58bc9.patch
a29604
a29604
BuildRequires:  maven-local
a29604
BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
a29604
BuildRequires:  mvn(org.apache.maven.plugins:maven-shade-plugin)
a29604
BuildRequires:  mvn(org.ow2:ow2:pom:)
a29604
%if %{with junit5}
a29604
BuildRequires:  mvn(org.codehaus.janino:janino)
a29604
BuildRequires:  mvn(org.junit.jupiter:junit-jupiter-api)
a29604
BuildRequires:  mvn(org.junit.jupiter:junit-jupiter-engine)
a29604
BuildRequires:  mvn(org.junit.jupiter:junit-jupiter-params)
a29604
BuildRequires:  mvn(org.apache.maven.surefire:surefire-junit-platform)
a29604
%endif
a29604
a29604
%if %{with osgi}
a29604
# asm-all needs to be in pluginpath for BND.  If this self-dependency
a29604
# becomes a problem then ASM core will have to be build from source
a29604
# with javac before main maven build, just like bnd-module-plugin
a29604
BuildRequires:  objectweb-asm >= 6
a29604
%endif
a29604
a29604
# Explicit javapackages-tools requires since asm-processor script uses
a29604
# /usr/share/java-utils/java-functions
a29604
Requires:       javapackages-tools
a29604
a29604
%description
a29604
ASM is an all purpose Java bytecode manipulation and analysis
a29604
framework.  It can be used to modify existing classes or dynamically
a29604
generate classes, directly in binary form.  Provided common
a29604
transformations and analysis algorithms allow to easily assemble
a29604
custom complex transformations and code analysis tools.
a29604
a29604
%package        javadoc
a29604
Summary:        API documentation for %{name}
a29604
a29604
%description    javadoc
a29604
This package provides %{summary}.
a29604
a29604
%prep
a29604
%setup -q
a29604
a29604
%patch0 -p1
a29604
a29604
# A custom parent pom to aggregate the build
a29604
cp -p %{SOURCE1} pom.xml
a29604
a29604
%if %{without junit5}
a29604
%pom_disable_module asm-test
a29604
%endif
a29604
a29604
# Insert poms into modules
a29604
for pom in asm asm-analysis asm-commons asm-test asm-tree asm-util; do
a29604
  cp -p $RPM_SOURCE_DIR/${pom}-%{version}.pom $pom/pom.xml
a29604
  # Fix junit5 configuration
a29604
%if %{with junit5}
a29604
  %pom_add_dep org.junit.jupiter:junit-jupiter-engine:5.1.0:test $pom
a29604
  %pom_add_plugin org.apache.maven.plugins:maven-surefire-plugin:2.22.0 $pom
a29604
%endif
a29604
%if %{with osgi}
a29604
  if [ "$pom" != "asm-test" ] ; then
a29604
    # Make into OSGi bundles
a29604
    bsn="org.objectweb.${pom//-/.}"
a29604
    %pom_xpath_inject pom:project "<packaging>bundle</packaging>" $pom
a29604
    %pom_add_plugin org.apache.felix:maven-bundle-plugin:3.5.0 $pom \
a29604
"   <extensions>true</extensions>
a29604
    <configuration>
a29604
      <instructions>
a29604
        <Bundle-SymbolicName>$bsn</Bundle-SymbolicName>
a29604
        <Bundle-RequiredExecutionEnvironment>JavaSE-1.8</Bundle-RequiredExecutionEnvironment>
a29604
        <_removeheaders>Bnd-LastModified,Build-By,Created-By,Include-Resource,Require-Capability,Tool</_removeheaders>
a29604
        <_pluginpath>$(pwd)/tools/bnd-module-plugin/bnd-module-plugin.jar, $(find-jar objectweb-asm/asm-all)</_pluginpath>
a29604
        <_plugin>org.objectweb.asm.tools.ModuleInfoBndPlugin;</_plugin>
a29604
      </instructions>
a29604
    </configuration>"
a29604
  fi
a29604
%endif
a29604
done
a29604
a29604
# Disable tests that use unlicensed class files
a29604
sed -i -e '/testToByteArray_computeMaxs_largeSubroutines/i@org.junit.jupiter.api.Disabled("missing class file")' \
a29604
  asm/src/test/java/org/objectweb/asm/ClassWriterTest.java
a29604
sed -i -e '/testAnalyze_mergeWithJsrReachableFromTwoDifferentPaths/i@org.junit.jupiter.api.Disabled("missing class file")' \
a29604
  asm-analysis/src/test/java/org/objectweb/asm/tree/analysis/AnalyzerWithBasicInterpreterTest.java
a29604
sed -i -e '/testAllMethods_issue317586()/i@org.junit.jupiter.api.Disabled("missing class file")' \
a29604
  asm-commons/src/test/java/org/objectweb/asm/commons/LocalVariablesSorterTest.java
a29604
a29604
# Remove failing test SerialVersionUidAdderTest due to missing class files
a29604
rm asm-commons/src/test/java/org/objectweb/asm/commons/SerialVersionUidAdderTest.java
a29604
a29604
# Insert asm-all pom
a29604
mkdir -p asm-all
a29604
sed 's/@VERSION@/%{version}/g' %{SOURCE8} > asm-all/pom.xml
a29604
a29604
# Remove invalid self-dependency
a29604
%pom_remove_dep org.ow2.asm:asm-test asm-test
a29604
a29604
# Compat aliases
a29604
%mvn_alias :asm-all org.ow2.asm:asm-debug-all
a29604
a29604
# No need to ship the custom parent pom
a29604
%mvn_package :asm-aggregator __noinstall
a29604
# Don't ship the test framework to avoid runtime dep on junit
a29604
%mvn_package :asm-test __noinstall
a29604
a29604
%build
a29604
# Must compile bnd plugin first, which is used to generate Java 9 module-info.class files
a29604
pushd tools/bnd-module-plugin
a29604
javac -sourcepath ../../asm/src/main/java/ -cp $(build-classpath aqute-bnd) $(find -name *.java)
a29604
jar cf bnd-module-plugin.jar -C src/main/java org
a29604
popd
a29604
a29604
%if %{with junit5}
a29604
%mvn_build -- -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8
a29604
%else
a29604
%mvn_build -f -- -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8
a29604
%endif
a29604
a29604
%install
a29604
%mvn_install
a29604
a29604
%jpackage_script org.objectweb.asm.xml.Processor "" "" %{name}/asm:%{name}/asm-attrs:%{name}/asm-util %{name}-processor true
a29604
a29604
%files -f .mfiles
a29604
%license LICENSE.txt
a29604
%{_bindir}/%{name}-processor
a29604
a29604
%files javadoc -f .mfiles-javadoc
a29604
%license LICENSE.txt
a29604
a29604
%changelog
e8dfee
* Sat Jul 11 2020 Jiri Vanek <jvanek@redhat.com> - 7.3.1-3
e8dfee
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
e8dfee
a29604
* Wed May 06 2020 Mat Booth <mat.booth@redhat.com> - 7.3.1-2
a29604
- Revert an upstream change to prevent breaking API change
a29604
a29604
* Thu Feb 27 2020 Jayashree Huttanagoudat <jhuttana@redhat.com> - 7.3.1-1
a29604
- Upgraded to upstream version 7.3.1.
a29604
a29604
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7.0-4
a29604
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
a29604
a29604
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.0-3
a29604
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
a29604
a29604
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.0-2
a29604
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
a29604
a29604
* Wed Nov 21 2018 Severin Gehwolf <sgehwolf@redhat.com> - 7.0-1
a29604
- Update to latest upstream 7.0 release.
a29604
- Removes package asm-xml (deprecated since 6.1).
a29604
a29604
* Tue Sep 11 2018 Mat Booth <mat.booth@redhat.com> - 6.2.1-1
a29604
- Update to latest upstream release
a29604
- Fix test suite execution
a29604
a29604
* Fri Aug 03 2018 Michael Simacek <msimacek@redhat.com> - 6.2-5
a29604
- Repack the tarball without binaries
a29604
a29604
* Wed Aug 01 2018 Severin Gehwolf <sgehwolf@redhat.com> - 6.2-4
a29604
- Explicitly require javapackages-tools for asm-processor script
a29604
  which uses java-functions.
a29604
a29604
* Wed Aug 01 2018 Severin Gehwolf <sgehwolf@redhat.com> - 6.2-3
a29604
- Allow conditionally building without OSGi
a29604
  metadata.
a29604
a29604
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.2-2
a29604
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
a29604
a29604
* Mon Jul 02 2018 Michael Simacek <msimacek@redhat.com> - 6.2-1
a29604
- Update to upstream version 6.2
a29604
a29604
* Sat Jun 30 2018 Mikolaj Izdebski <mizdebsk@redhat.com> - 6.1.1-4
a29604
- Relax versioned self-build-requirement a bit
a29604
a29604
* Fri Jun 29 2018 Mikolaj Izdebski <mizdebsk@redhat.com> - 6.1.1-3
a29604
- Add objectweb-asm to BND pluginpath
a29604
a29604
* Thu Jun 28 2018 Mikolaj Izdebski <mizdebsk@redhat.com> - 6.1.1-2
a29604
- Allow conditionally building without junit5
a29604
a29604
* Wed Apr 25 2018 Mat Booth <mat.booth@redhat.com> - 6.1.1-1
a29604
- Update to latest upstream relase for Java 10 support
a29604
- Switch to maven build
a29604
- Now executing test suites
a29604
a29604
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.0-2
a29604
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
a29604
a29604
* Mon Sep 25 2017 Michael Simacek <msimacek@redhat.com> - 6.0-1
a29604
- Update to upstream version 6.0
a29604
a29604
* Tue Sep 12 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 6.0-0.2.beta
a29604
- Fix invalid OSGi metadata
a29604
- Resolves: rhbz#1490817
a29604
a29604
* Mon Sep 11 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 6.0-0.1.beta
a29604
- Update to upstream version 6.0 beta
a29604
a29604
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.1-8
a29604
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
a29604
a29604
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.1-7
a29604
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
a29604
a29604
* Mon Oct 10 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.1-6
a29604
- Use OSGi API JARs to run BND classpath, instead of Eclipse
a29604
a29604
* Sat Sep 24 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.1-5
a29604
- Update to current packaging guidelines
a29604
- Remove obsoletes and provides for objectweb-asm4
a29604
a29604
* Wed Jun 15 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.1-4
a29604
- Add missing build-requires
a29604
a29604
* Wed Jun  1 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.1-3
a29604
- Avoid calling XMvn from build-classpath
a29604
a29604
* Tue May 31 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.1-2
a29604
- Add missing JARs to BND classpath
a29604
a29604
* Thu Mar 24 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.1-1
a29604
- Update to upstream version 5.1
a29604
a29604
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.4-2
a29604
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
a29604
a29604
* Thu Aug 06 2015 Michael Simacek <msimacek@redhat.com> - 5.0.4-1
a29604
- Update to upstream version 5.0.4
a29604
a29604
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0.3-2
a29604
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
a29604
a29604
* Sun Jul 20 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.0.3-1
a29604
- Update to upstream version 5.0.3
a29604
a29604
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0.2-2
a29604
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
a29604
a29604
* Mon May  5 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.0.2-1
a29604
- Update to upstream version 5.0.2
a29604
a29604
* Mon Apr 14 2014 Mat Booth <mat.booth@redhat.com> - 5.0.1-2
a29604
- SCL-ize package.
a29604
- Fix bogus dates in changelog.
a29604
a29604
* Mon Mar 24 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.0.1-1
a29604
- Update to upstream version 5.0.1
a29604
a29604
* Wed Mar 19 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.0-0.3.beta
a29604
- Enable asm-debug-all module
a29604
a29604
* Mon Jan 20 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.0-0.2.beta
a29604
- Remove Eclipse Orbit alias
a29604
a29604
* Tue Dec  3 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.0-0.1.beta
a29604
- Update to 5.0 beta
a29604
a29604
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:3.3.1-8
a29604
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
a29604
a29604
* Wed Mar  6 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:3.3.1-7
a29604
- Make jetty orbit depmap point to asm-all jar
a29604
- Resolves: rhbz#917625
a29604
a29604
* Mon Mar  4 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:3.3.1-6
a29604
- Add depmap for org.eclipse.jetty.orbit
a29604
- Resolves: rhbz#917625
a29604
a29604
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:3.3.1-5
a29604
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
a29604
a29604
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:3.3.1-4
a29604
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
a29604
a29604
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:3.3.1-3
a29604
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
a29604
a29604
* Fri Sep 16 2011 Alexander Kurtakov <akurtako@redhat.com> 0:3.3.1-2
a29604
- Use poms produced by the build not foreign ones.
a29604
- Adpat to current guidelines.
a29604
a29604
* Mon Apr 04 2011 Chris Aniszczyk <zx@redhat.com> 0:3.3.1
a29604
- Upgrade to 3.3.1
a29604
a29604
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:3.2-3
a29604
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
a29604
a29604
* Tue Jul 13 2010 Orion Poplawski <orion@cora.nwra.com>  0:3.2.1-2
a29604
- Change depmap parent id to asm (bug #606659)
a29604
a29604
* Thu Apr 15 2010 Fernando Nasser <fnasser@redhat.com> 0:3.2.1
a29604
- Upgrade to 3.2
a29604
a29604
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:3.1-7.1
a29604
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
a29604
a29604
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:3.1-6.1
a29604
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
a29604
a29604
* Thu Oct 23 2008 David Walluck <dwalluck@redhat.com> 0:3.1-5.1
a29604
- build for Fedora
a29604
a29604
* Thu Oct 23 2008 David Walluck <dwalluck@redhat.com> 0:3.1-5
a29604
- add OSGi manifest (Alexander Kurtakov)
a29604
a29604
* Mon Oct 20 2008 David Walluck <dwalluck@redhat.com> 0:3.1-4
a29604
- remove Class-Path from MANIFEST.MF
a29604
- add unversioned javadoc symlink
a29604
- remove javadoc scriptlets
a29604
- fix directory ownership
a29604
- remove build requirement on dos2unix
a29604
a29604
* Fri Feb 08 2008 Ralph Apel <r.apel@r-apel.de> - 0:3.1-3jpp
a29604
- Add poms and depmap frags with groupId of org.objectweb.asm !
a29604
- Add asm-all.jar 
a29604
- Add -javadoc Requires post and postun
a29604
- Restore Vendor, Distribution
a29604
a29604
* Thu Nov 22 2007 Fernando Nasser <fnasser@redhat.com> - 0:3.1-2jpp
a29604
- Fix EOL of txt files
a29604
- Add dependency on jaxp 
a29604
a29604
* Thu Nov 22 2007 Fernando Nasser <fnasser@redhat.com> - 0:3.1-1jpp
a29604
- Upgrade to 3.1
a29604
a29604
* Wed Aug 22 2007 Fernando Nasser <fnasser@redhat.com> - 0:3.0-1jpp
a29604
- Upgrade to 3.0
a29604
- Rename to include objectweb- prefix as requested by ObjectWeb
a29604
a29604
* Thu Jan 05 2006 Fernando Nasser <fnasser@redhat.com> - 0:2.1-2jpp
a29604
- First JPP 1.7 build
a29604
a29604
* Thu Oct 06 2005 Ralph Apel <r.apel at r-apel.de> 0:2.1-1jpp
a29604
- Upgrade to 2.1
a29604
a29604
* Fri Mar 11 2005 Sebastiano Vigna <vigna at acm.org> 0:2.0.RC1-1jpp
a29604
- First release of the 2.0 line.