Update to latest upstream 4.0.15 release

This commit is contained in:
Severin Gehwolf 2021-05-31 14:01:23 +02:00
parent 72e64cb57e
commit 41c4232f87
5 changed files with 36 additions and 30 deletions

1
.gitignore vendored
View File

@ -10,3 +10,4 @@
/4.0.3.tar.gz
/4.0.4.tar.gz
/4.0.5.tar.gz
/4.0.15.tar.gz

View File

@ -14,12 +14,12 @@
%global bindir %{homedir}/bin
Name: byteman
Version: 4.0.11
Release: 4%{?dist}
Version: 4.0.15
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.15.tar.gz https://github.com/bytemanproject/byteman/archive/4.0.15.tar.gz
Source0: https://github.com/bytemanproject/byteman/archive/%{version}.tar.gz
BuildArch: noarch
@ -48,15 +48,15 @@ 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-17
# 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,6 +131,7 @@ 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
@ -146,7 +147,7 @@ export JAVA_HOME=/usr/lib/jvm/java-11-openjdk
# (fixed in 3.1.0, fedora has 3.0.1):
# See https://issues.apache.org/jira/browse/MJAVADOC-555
# https://bugs.openjdk.java.net/browse/JDK-8212233
%mvn_build --xmvn-javadoc
%mvn_build -f --xmvn-javadoc
%install
%mvn_install
@ -213,6 +214,10 @@ ln -s %{_javadir}/byteman/byteman.jar $RPM_BUILD_ROOT%{homedir}/lib/byteman.jar
%{homedir}/lib/byteman-dtest.jar
%changelog
* Mon May 31 2021 Severin Gehwolf <sgehwolf@redhat.com> - 4.0.15-1
- Update to latest upstream 4.0.15 release.
- Drop tests_pom_xml.patch now included upstream.
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.11-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (4.0.11.tar.gz) = 05e82df5e6747934c3b80932534118c25571482c4dd0f0be0468a683e6185ca4ae039f7bdabc0151067c2c61cf450b19636c50840ae6749df461dc0a1f305f69
SHA512 (4.0.15.tar.gz) = 318c467de0703e2acf725ef657bca03ac6bafb2ebc6822500f4804ff309369bde494e4cf17049d6a44a8819a0bc664968f00dc36ae6573dca9e6974c2b61e21f

22
testng7_port.patch Normal file
View File

@ -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;

View File

@ -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 @@
<includes>
<include>org/jboss/byteman/tests/bugfixes/TestTraceOpenAndWrite.class</include>
</includes>
- <argLine>-javaagent:${project.build.directory}/byteman-${project.version}.jar=script:${project.build.testOutputDirectory}/scripts/bugfixes/TestTraceOpenAndWrite.btm</argLine>
+ <argLine>-javaagent:${project.build.directory}/../../byteman/target/byteman-${project.version}.jar=script:${project.build.directory}/../../agent/src/test/resources/scripts/bugfixes/TestTraceOpenAndWrite.btm</argLine>
</configuration>
</execution>
<!-- dynamic rule submission
@@ -2184,7 +2184,7 @@
<includes>
<include>org/jboss/byteman/tests/bugfixes/TestTraceOpenAndWrite.class</include>
</includes>
- <argLine>-Dorg.jboss.byteman.compile.to.bytecode -javaagent:${project.build.directory}/byteman-${project.version}.jar=script:${project.build.testOutputDirectory}/scripts/bugfixes/TestTraceOpenAndWrite.btm</argLine>
+ <argLine>-Dorg.jboss.byteman.compile.to.bytecode -javaagent:${project.build.directory}/../../byteman/target/byteman-${project.version}.jar=script:${project.build.directory}/../../agent/src/test/resources/scripts/bugfixes/TestTraceOpenAndWrite.btm</argLine>
</configuration>
</execution>
<execution>