diff --git a/.gitignore b/.gitignore index 8b2baed..b773097 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /4.0.3.tar.gz /4.0.4.tar.gz /4.0.5.tar.gz +/4.0.16.tar.gz diff --git a/byteman.spec b/byteman.spec index e3d79d2..e7e8624 100644 --- a/byteman.spec +++ b/byteman.spec @@ -14,12 +14,12 @@ %global bindir %{homedir}/bin Name: byteman -Version: 4.0.11 -Release: 5%{?dist} +Version: 4.0.16 +Release: 1%{?dist} Summary: Java agent-based bytecode injection tool License: LGPLv2+ URL: http://www.jboss.org/byteman -# wget -O 4.0.11.tar.gz https://github.com/bytemanproject/byteman/archive/4.0.11.tar.gz +# wget -O 4.0.16.tar.gz https://github.com/bytemanproject/byteman/archive/4.0.16.tar.gz Source0: https://github.com/bytemanproject/byteman/archive/%{version}.tar.gz BuildArch: noarch @@ -45,18 +45,16 @@ BuildRequires: objectweb-asm BuildRequires: junit BuildRequires: junit5 BuildRequires: testng -# JBoss modules byteman plugin requires it -BuildRequires: mvn(org.jboss.modules:jboss-modules) -Provides: bundled(objectweb-asm) = 7.0 -Provides: bundled(java_cup) = 1:0.11b-8 +Provides: bundled(objectweb-asm) = 9.1 +Provides: bundled(java_cup) = 1:0.11b-19 # We are filtering java-headless >= 1:1.9 requirement. Add # JDK 8 requirement here explicitly which shouldn't match the filter. Requires: java-headless >= 1:1.8 # Related pieces removed via pom_xpath_remove macros Patch1: remove_submit_integration_test_verification.patch -Patch2: tests_pom_xml.patch +Patch2: testng7_port.patch %description Byteman is a tool which simplifies tracing and testing of Java programs. @@ -131,10 +129,14 @@ sed -i "s|java-cup|java_cup|" tests/pom.xml # Don't use javadoc plugin, use XMvn for javadocs %pom_remove_plugin -r :maven-javadoc-plugin +%pom_remove_dep 'org.apache.maven:maven-project' contrib/rulecheck-maven-plugin %pom_xpath_remove 'pom:execution[pom:id="make-javadoc-assembly"]' byteman # Put byteman-rulecheck-maven-plugin into a separate package %mvn_package ":byteman-rulecheck-maven-plugin" rulecheck-maven-plugin + +# CNFE being thrown without this for bmunit5 in rawhide and with tests enabled +%pom_add_dep "org.apache.commons:commons-lang3" contrib/bmunit5 # Put byteman-bmunit/byteman-dtest into a separate packages since they # runtime require junit %mvn_package ":byteman-bmunit" bmunit @@ -213,6 +215,10 @@ ln -s %{_javadir}/byteman/byteman.jar $RPM_BUILD_ROOT%{homedir}/lib/byteman.jar %{homedir}/lib/byteman-dtest.jar %changelog +* Fri Jun 18 2021 Severin Gehwolf - 4.0.16-1 +- Update to latest upstream 4.0.16 release for JDK 17 support. +- Drop not-needed jboss-modules BR. + * Thu Apr 15 2021 Mohan Boddu - 4.0.11-5 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 diff --git a/sources b/sources index 3e309e2..4f2eee1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (4.0.11.tar.gz) = 05e82df5e6747934c3b80932534118c25571482c4dd0f0be0468a683e6185ca4ae039f7bdabc0151067c2c61cf450b19636c50840ae6749df461dc0a1f305f69 +SHA512 (4.0.16.tar.gz) = e0ec3932b698d07e0543988a944ccdf36533147e056218e0cc92d0ed9695dfaa5066482f493607b16732fcf3c6f5107eefdd7930f6877b747cb21bfecdb737dd diff --git a/testng7_port.patch b/testng7_port.patch new file mode 100644 index 0000000..16e43e9 --- /dev/null +++ b/testng7_port.patch @@ -0,0 +1,22 @@ +diff --git a/byteman-4.0.15/contrib/bmunit/src/org/jboss/byteman/contrib/bmunit/BMNGListener.java b/byteman-4.0.15/contrib/bmunit/src/org/jboss/byteman/contrib/bmunit/BMNGListener.java +index 2f784bc..9e4fec9 100644 +--- a/byteman-4.0.15/contrib/bmunit/src/org/jboss/byteman/contrib/bmunit/BMNGListener.java ++++ b/byteman-4.0.15/contrib/bmunit/src/org/jboss/byteman/contrib/bmunit/BMNGListener.java +@@ -61,7 +61,7 @@ public class BMNGListener extends BMNGAbstractRunner implements IInvokedMethodLi + } + + public void beforeInvocation(IInvokedMethod method, ITestResult testResult) { +- Method javaMethod = method.getTestMethod().getMethod(); ++ Method javaMethod = method.getTestMethod().getConstructorOrMethod().getMethod(); + Class clazz = javaMethod.getDeclaringClass(); + if (!checkBMNGListener(clazz)) { + return; +@@ -81,7 +81,7 @@ public class BMNGListener extends BMNGAbstractRunner implements IInvokedMethodLi + } + + public void afterInvocation(IInvokedMethod method, ITestResult testResult) { +- Method javaMethod = method.getTestMethod().getMethod(); ++ Method javaMethod = method.getTestMethod().getConstructorOrMethod().getMethod(); + Class clazz = javaMethod.getDeclaringClass(); + if (!checkBMNGListener(clazz)) { + return; diff --git a/tests_pom_xml.patch b/tests_pom_xml.patch deleted file mode 100644 index 4b76997..0000000 --- a/tests_pom_xml.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/byteman-4.0.11/tests/pom.xml b/byteman-4.0.11/tests/pom.xml -index 60e4e1a..1a2abed 100644 ---- a/byteman-4.0.11/tests/pom.xml -+++ b/byteman-4.0.11/tests/pom.xml -@@ -1166,7 +1166,7 @@ - - org/jboss/byteman/tests/bugfixes/TestTraceOpenAndWrite.class - -- -javaagent:${project.build.directory}/byteman-${project.version}.jar=script:${project.build.testOutputDirectory}/scripts/bugfixes/TestTraceOpenAndWrite.btm -+ -javaagent:${project.build.directory}/../../byteman/target/byteman-${project.version}.jar=script:${project.build.directory}/../../agent/src/test/resources/scripts/bugfixes/TestTraceOpenAndWrite.btm - - -