Compare commits

..

62 commits

Author SHA1 Message Date
Jiri Vanek
94e270c296 disabled tests
there are test failures
2025-10-23 15:14:36 +02:00
Jiri Vanek
b5f673c7a9 Updated to byteman 4.0.26 2025-10-23 15:14:16 +02:00
Jiri Vanek
06500df428 Rebuilt for java-25-openjdk as preffered jdk
https://fedoraproject.org/wiki/Changes/Java25AndNoMoreSystemJdk
Note, that since f43, you should be always explicit on what jdk to use.
This commit should do exactly that.
2025-07-28 18:52:02 +02:00
Fedora Release Engineering
deba8e880a Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 17:59:45 +00:00
Fedora Release Engineering
8bbeb56cb9 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 13:06:24 +00:00
Miroslav Suchý
2855e11b06 convert license to SPDX
This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4
2024-08-28 08:21:42 +02:00
Yaakov Selkowitz
6c08144b03 Update maven-bundle-plugin dependency
The old name is no longer provided in F41:

https://src.fedoraproject.org/rpms/maven-bundle-plugin/c/643886ac37b175e21f2d75bef9d9e2b73cb9a87e
2024-08-14 22:16:07 -04:00
Fedora Release Engineering
b7f1e8915c Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-17 18:46:58 +00:00
Software Management Team
2e38dd3794 Eliminate use of obsolete %patchN syntax (#2283636) 2024-05-30 12:46:46 +02:00
Yaakov Selkowitz
d7d705eeb0 Really rebuild with java-21-openjdk as system jdk 2024-03-03 17:22:08 -05:00
Jiri Vanek
38941e11e6 Rebuilt for java-21-openjdk as system jdk
https://fedoraproject.org/wiki/Changes/Java21
2024-02-27 15:03:50 +01:00
Fedora Release Engineering
c6ae02595f Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-23 01:01:50 +00:00
Fedora Release Engineering
fa7896e252 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 14:52:54 +00:00
Yaakov Selkowitz
8d1e10f3a0 Build with Java 17
Presumably the explicit java-11-openjdk requirement dates back to when
1.8.0 was the default.  11 was the default version since Fedora 33 and
RHEL 9, 17 is now the default since Fedora 36 and RHEL 10, and older
versions are unwanted in RHEL 10.  Java 17 does not supports 1.6 as
source/target, but at this point nobody should be using anything earlier
than 1.8, which is now the default of maven-compiler-plugin.
2023-07-19 11:55:14 -04:00
Fedora Release Engineering
1984302803 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 15:06:57 +00:00
Fedora Release Engineering
623a06f450 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-18 23:20:25 +00:00
Severin Gehwolf
5d17506955 Rebuild with latest maven-verifier-plugin 2022-08-10 14:16:59 +02:00
Fedora Release Engineering
6531f346ad Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-20 22:25:23 +00:00
Jiri
039f22b98f Rebuilt for Drop i686 JDKs
https://fedoraproject.org/wiki/Changes/Drop_i686_JDKs
2022-07-08 14:40:13 +02:00
Jiri
a08c0f1b43 Rebuilt for java-17-openjdk as system jdk
https://fedoraproject.org/wiki/Changes/Java17
2022-02-05 19:50:11 +01:00
Fedora Release Engineering
d6e61ba4c0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-19 22:44:45 +00:00
Fedora Release Engineering
251d6ae684 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 19:00:54 +00:00
Fedora Release Engineering
62b1a76cae - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 14:03:39 +00:00
Severin Gehwolf
dba8b68295 Add basic smoke tests 2021-06-29 15:04:38 +02:00
Severin Gehwolf
37337b27c0 Update to latest 4.0.16 release 2021-06-18 15:02:23 +02:00
Severin Gehwolf
37790c4096 Fix CNFE for bmunit5 plugin tests 2021-05-31 18:52:33 +02:00
Severin Gehwolf
ec344a7c3e Re-enable tests run during the build 2021-05-31 14:57:13 +02:00
Severin Gehwolf
41c4232f87 Update to latest upstream 4.0.15 release 2021-05-31 14:49:24 +02:00
Fedora Release Engineering
72e64cb57e - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 01:31:26 +00:00
Fedora Release Engineering
ac24e97244 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-27 13:31:48 +00:00
Jiri
a626ffc4e9 Rebuilt for JDK-11 2020-07-10 17:01:58 +02:00
Jayashree Huttanagoudar
2a0f245e82 Upgraded to latest upstream version 4.0.11 2020-04-07 10:28:18 +05:30
Severin Gehwolf
7328eeb7ee Remove jarjar BR which is not needed
Fixes FTBFS.
2020-01-28 18:29:04 +01:00
Fedora Release Engineering
337efe8a9e - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-28 13:28:21 +00:00
Fedora Release Engineering
7e2daf708c - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-24 19:44:30 +00:00
Severin Gehwolf
d145b9e4af Use XMvn javadoc so as to fix FTBFS 2019-05-06 16:55:51 +02:00
Fedora Release Engineering
f74fa51067 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-01-31 15:04:50 +00:00
Severin Gehwolf
6393d2ea80 Update to latest upstream 4.0.5 release. 2018-11-23 11:16:12 +01:00
Fedora Release Engineering
86377359cb - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-12 21:27:12 +00:00
Severin Gehwolf
d197d727fe Update to upstream 4.0.4 release.
- Split subpackages requiring junit at runtime:
  byteman-dtest, byteman-bmunit
- Fix filtering of asm requirements. They
  shouldn't be there since asm gets bundled.
- java-headless >= 1:1.9 would get generated, but byteman 4.x
  runs on JDK 6+. Require >= JDK 8
- Properly install structure for jboss-modules-plugin to work:
  bminstall -m
2018-07-11 15:49:29 +02:00
Severin Gehwolf
bfb4d668ca Use Xmvn for javadoc generation. 2018-07-05 17:06:28 +02:00
Severin Gehwolf
b16bdaa1c6 Update to latest upstream 4.0.3 release. 2018-07-03 11:11:41 +02:00
Severin Gehwolf
29eb35a278 Update to latest upstream 4.0.2 release. 2018-04-27 18:18:58 +02:00
Fedora Release Engineering
91c43203c2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-07 04:21:02 +00:00
Fedora Release Engineering
03bb780e93 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-26 04:22:11 +00:00
Fedora Release Engineering
917db4201d - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-10 07:09:51 +00:00
Severin Gehwolf
5fc4f52d3d Fix FTBFS.
- Add BRs maven-plugin-bundle, maven-source-plugin,
  maven-plugin-plugin
- Resolves: RHBZ#1402998
2016-12-09 10:41:17 +01:00
Severin Gehwolf
1ad9b32583 Update to latest 3.0.6 release. 2016-06-14 11:35:51 +02:00
Severin Gehwolf
75b8babcf2 Some packaging improvements.
- Remove generated requires on bundled libs.
- Split maven rulecheck plugin into separate package
- Run some tests during build
2016-03-14 14:39:44 +01:00
Severin Gehwolf
ebba2b99f2 Update to latest upstream 3.0.4 release. 2016-02-18 16:36:36 +01:00
Dennis Gilmore
1d1c3a5da9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-03 17:19:12 +00:00
gil
016d0f4e34 Fix FTBFS rhbz#1239392
Signed-off-by: Mikolaj Izdebski <mizdebsk@redhat.com>
2015-08-06 15:04:23 +02:00
Dennis Gilmore
4478207ff1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-17 02:11:54 +00:00
Michal Srb
ef86e6d64e Fix FTBFS
- Rebuild to generate new metadata
2015-02-27 13:43:45 +01:00
Dennis Gilmore
1a621474b1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-06 22:46:34 -05:00
Marek Goldmann
a5b854cefb Rebuilding for objectweb-asm update, RHBZ#1083570 2014-04-18 08:39:59 +02:00
Michael Simacek
69ae543bb3 Use Requires: java-headless rebuild (#1067528)
Signed-off-by: Michael Simacek <msimacek@redhat.com>
Signed-off-by: Mikolaj Izdebski <mizdebsk@redhat.com>
2014-03-28 21:08:51 +01:00
Marek Goldmann
07c3ffe556 Upstream release 2.1.4.1 2014-02-14 14:11:16 +01:00
Dennis Gilmore
a93d595249 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild 2013-08-02 23:10:15 -05:00
Marek Goldmann
6a95492dd6 Upstream release 2.1.2 2013-07-04 13:57:33 +02:00
Mikolaj Izdebski
51d4ec3a1c Remove tools.jar from dependencyManagement 2013-06-05 18:27:55 +02:00
Marek Goldmann
d8d67daa70 New guidelines 2013-06-05 09:03:19 +02:00
7 changed files with 354 additions and 101 deletions

13
.gitignore vendored
View file

@ -1,2 +1,15 @@
/byteman-1.5.2-full-clean.tar.gz
/byteman-2.0.4.tar.xz
/2.1.2.tar.gz
/373601b4e608ea622b2fec947824b99cd0edb124.tar.gz
/3.0.4.tar.gz
/byteman-3.0.4/
/3.0.6.tar.gz
/byteman-3.0.6/
/4.0.2.tar.gz
/4.0.3.tar.gz
/4.0.4.tar.gz
/4.0.5.tar.gz
/4.0.15.tar.gz
/4.0.16.tar.gz
/4.0.26.tar.gz

View file

@ -1,45 +1,62 @@
# Note to the interested reader:
# fedpkg mockbuild --without tests
# will make mvn_build macro skip tests.
# See: https://github.com/fedora-java/javapackages/issues/62
%global javacup_or_asm java_cup:java_cup|org\\.ow2\\.asm:asm.*
# Don't have generated mvn()-style requires for java_cup or asm
%global mvn_javacup_or_asm_matcher .*mvn\\(%{javacup_or_asm}\\)
# Don't have generated requires for java-headless >= 1:1.9
%global java_headless_matcher java-headless >= 1:(1\\.9|9)
%global __requires_exclude ^%{mvn_javacup_or_asm_matcher}|%{java_headless_matcher}$
%global homedir %{_datadir}/%{name}
%global bindir %{homedir}/bin
Name: byteman
Version: 2.0.4
Release: 3%{?dist}
Version: 4.0.26
Release: 1%{?dist}
Summary: Java agent-based bytecode injection tool
Group: Development/Libraries
License: LGPLv2+
# Automatically converted from old format: LGPLv2+ - review is highly recommended.
License: LicenseRef-Callaway-LGPLv2+
URL: http://www.jboss.org/byteman
# git clone git://github.com/bytemanproject/byteman.git
# cd byteman/ && git archive --format=tar --prefix=byteman-2.0.4/ 2.0.4 | xz > byteman-2.0.4.tar.xz
Source0: byteman-%{version}.tar.xz
# 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
ExclusiveArch: %{java_arches} noarch
BuildRequires: jpackage-utils
BuildRequires: javapackages-tools
BuildRequires: java-devel
BuildRequires: maven-local
# Byteman 4.x requires JDK 9+ to build. Require JDK 10 explicitly.
BuildRequires: java-25-devel >= 1:11
BuildRequires: maven-local-openjdk25
BuildRequires: maven-shade-plugin
BuildRequires: maven-source-plugin
BuildRequires: maven-plugin-plugin
BuildRequires: maven-bundle-plugin
BuildRequires: maven-assembly-plugin
BuildRequires: maven-failsafe-plugin
BuildRequires: maven-jar-plugin
BuildRequires: maven-surefire-plugin
BuildRequires: maven-surefire-provider-testng
BuildRequires: maven-surefire-provider-junit4
BuildRequires: maven-surefire-provider-junit
BuildRequires: maven-surefire-provider-junit5
BuildRequires: maven-verifier-plugin
BuildRequires: maven-dependency-plugin
BuildRequires: java_cup
BuildRequires: jarjar
BuildRequires: objectweb-asm
BuildRequires: junit4
BuildRequires: junit
BuildRequires: junit5
BuildRequires: testng
Requires: jpackage-utils
Requires: java-devel
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-25-headless >= 1:1.8
# Bundling
#BuildRequires: java_cup = 1:0.11a-12
#BuildRequires: objectweb-asm = 0:3.3.1-7
Provides: bundled(java_cup) = 1:0.11a-12
Provides: bundled(objectweb-asm) = 0:3.3.1-7
# Related pieces removed via pom_xpath_remove macros
Patch1: remove_submit_integration_test_verification.patch
Patch2: testng7_port.patch
%description
Byteman is a tool which simplifies tracing and testing of Java programs.
@ -53,27 +70,97 @@ repackage or redeploy your application. In fact you can remove injected
code and reinstall different code while the application continues to execute.
%package javadoc
Summary: Javadocs for %{name}
Group: Documentation
Requires: jpackage-utils
Summary: Javadoc for %{name}
%description javadoc
This package contains the API documentation for %{name}.
%package rulecheck-maven-plugin
Summary: Maven plugin for checking Byteman rules.
%description rulecheck-maven-plugin
This package contains the Byteman rule check maven plugin.
%package bmunit
Summary: TestNG and JUnit integration for Byteman.
%description bmunit
The Byteman bmunit jar provides integration of Byteman into
TestNG and JUnit tests.
%package dtest
Summary: Remote byteman instrumented testing.
%description dtest
The Byteman dtest jar supports instrumentation of test code executed on
remote server hosts and validation of assertions describing the expected
operation of the instrumented methods.
%prep
%setup -q
%setup -q -n byteman-%{version}
# Fix the gid:aid for java_cup
sed -i "s|net.sf.squirrel-sql.thirdparty-non-maven|java_cup|" agent/pom.xml
sed -i "s|java-cup|java_cup|" agent/pom.xml
sed -i "s|net.sf.squirrel-sql.thirdparty-non-maven|java_cup|" tests/pom.xml
sed -i "s|java-cup|java_cup|" tests/pom.xml
# Remove Submit integration test invocations (agent)
%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-failsafe-plugin']/pom:executions/pom:execution[pom:id='submit.TestSubmit']" agent
%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-failsafe-plugin']/pom:executions/pom:execution[pom:id='submit.TestSubmit.compiled']" agent
%patch -P1 -p2
%patch -P2 -p2
# Remove Submit integration test invocations (tests)
%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-failsafe-plugin']/pom:executions/pom:execution[pom:id='submit.TestSubmit']" tests
%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-failsafe-plugin']/pom:executions/pom:execution[pom:id='submit.TestSubmit.compiled']" tests
# Remove scope=system and systemPath for com.sun:tools
%pom_xpath_remove "pom:profiles/pom:profile/pom:dependencies/pom:dependency[pom:artifactId='tools']/pom:scope" install
%pom_xpath_remove "pom:profiles/pom:profile/pom:dependencies/pom:dependency[pom:artifactId='tools']/pom:systemPath" install
%pom_xpath_remove "pom:profiles/pom:profile/pom:dependencies/pom:dependency[pom:artifactId='tools']/pom:scope" contrib/bmunit
%pom_xpath_remove "pom:profiles/pom:profile/pom:dependencies/pom:dependency[pom:artifactId='tools']/pom:systemPath" contrib/bmunit
# Some tests fail intermittently during builds. Disable them.
%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-surefire-plugin']/pom:executions" contrib/bmunit
%pom_xpath_set "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-surefire-plugin']/pom:configuration" '<skip>true</skip>' contrib/bmunit
# source/target 1.6 is not supported by 17; default is now 1.8
%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:configuration/pom:source" pom.xml
%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:configuration/pom:target" pom.xml
# Don't build download, docs modules
%pom_disable_module download
# Don't use javadoc plugin, use XMvn for javadocs
%pom_remove_plugin -r :maven-javadoc-plugin
%pom_remove_plugin -r :central-publishing-maven-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
%mvn_package ":byteman-dtest" dtest
%build
%mvn_build
export JAVA_HOME=/usr/lib/jvm/java-openjdk
# Use --xmvn-javadoc so as to avoid maven-javadoc-plugin issue
# (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 -f
%install
%mvn_install
install -d -m 755 $RPM_BUILD_ROOT%{_bindir}
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
install -d -m 755 $RPM_BUILD_ROOT%{homedir}
install -d -m 755 $RPM_BUILD_ROOT%{homedir}/lib
@ -97,84 +184,42 @@ done
chmod 755 $RPM_BUILD_ROOT%{_bindir}/*
for m in install sample submit; do
# JAR
install -pm 644 ${m}/target/%{name}-${m}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-${m}.jar
# POM
install -pm 644 ${m}/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-%{name}-${m}.pom
# DEPMAP
%add_maven_depmap JPP.%{name}-%{name}-${m}.pom %{name}/%{name}-${m}.jar
done
# Contrib
for m in bmunit dtest; do
# JAR
install -pm 644 contrib/${m}/target/%{name}-${m}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-${m}.jar
# POM
install -pm 644 contrib/${m}/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-%{name}-${m}.pom
# DEPMAP
%add_maven_depmap JPP.%{name}-%{name}-${m}.pom %{name}/%{name}-${m}.jar
done
# JAR
install -pm 644 agent/target/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}.jar
# POM
install -pm 644 agent/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-%{name}.pom
# DEPMAP
%add_maven_depmap JPP.%{name}-%{name}.pom %{name}/%{name}.jar
# APIDOCS
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -rp target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
for m in bmunit dtest install sample submit; do
ln -s %{_javadir}/byteman/byteman-${m}.jar $RPM_BUILD_ROOT%{homedir}/lib/byteman-${m}.jar
done
# Create contrib/jboss-module-system structure since bminstall expects it
# for the -m option.
install -d -m 755 $RPM_BUILD_ROOT%{homedir}/contrib
install -d -m 755 $RPM_BUILD_ROOT%{homedir}/contrib/jboss-modules-system
ln -s %{_javadir}/byteman/byteman-jboss-modules-plugin.jar $RPM_BUILD_ROOT%{homedir}/contrib/jboss-modules-system/byteman-jboss-modules-plugin.jar
ln -s %{_javadir}/byteman/byteman.jar $RPM_BUILD_ROOT%{homedir}/lib/byteman.jar
%files
%{_mavenpomdir}/*
%{_mavendepmapfragdir}/*
%{homedir}/*
%files -f .mfiles
%{homedir}/lib/byteman.jar
%{homedir}/lib/byteman-install.jar
%{homedir}/lib/byteman-sample.jar
%{homedir}/lib/byteman-submit.jar
%{homedir}/contrib/*
%{bindir}/*
%{_bindir}/*
%{_javadir}/*
%doc README docs/ProgrammersGuide.pdf docs/copyright.txt
%doc README
%license docs/copyright.txt
%files javadoc
%{_javadocdir}/%{name}
%doc docs/copyright.txt
%files javadoc -f .mfiles-javadoc
%license docs/copyright.txt
%files rulecheck-maven-plugin -f .mfiles-rulecheck-maven-plugin
%license docs/copyright.txt
%files bmunit -f .mfiles-bmunit
%license docs/copyright.txt
%{homedir}/lib/byteman-bmunit.jar
%files dtest -f .mfiles-dtest
%license docs/copyright.txt
%{homedir}/lib/byteman-dtest.jar
%changelog
* Thu Apr 25 2013 Marek Goldmann <mgoldman@redhat.com> - 2.0.4-3
- Fixes to the launch scripts
* Wed Apr 24 2013 Marek Goldmann <mgoldman@redhat.com> - 2.0.4-2
- Added bmsubmit, bminstall and bmjava scripts, RHBZ#951560
* Thu Feb 21 2013 Marek Goldmann <mgoldman@redhat.com> - 2.0.4-1
- Upstream release 2.0.4
- Switched to Maven
- Bundling java_cup and objectweb-asm (fpc#226)
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Sep 20 2011 Marek Goldmann <mgoldman@redhat.com> 1.5.2-3
- Removed binary files from src.rpm
* Mon Sep 19 2011 Marek Goldmann <mgoldman@redhat.com> 1.5.2-2
- Cleaned spec file
* Wed Jul 27 2011 Marek Goldmann <mgoldman@redhat.com> 1.5.2-1
- Upstream release: 1.5.2
* Thu Jul 21 2011 Marek Goldmann <mgoldman@redhat.com> 1.5.1-1
- Initial packaging
%autochangelog

View file

@ -0,0 +1,14 @@
diff --git a/byteman-4.0.2/agent/verification.xml b/byteman-4.0.2/agent/verification.xml
index f530cfe..52ece06 100644
--- a/byteman-4.0.2/agent/verification.xml
+++ b/byteman-4.0.2/agent/verification.xml
@@ -171,9 +171,5 @@
<location>target/failsafe-reports/org.jboss.byteman.tests.misc.TestThrowBinding.txt</location>
<exists/>
</file>
- <file>
- <location>target/failsafe-reports/org.jboss.byteman.tests.submit.TestSubmit.txt</location>
- <exists/>
- </file>
</files>
</verifications>

View file

@ -1 +1 @@
75bf4c1694817939f2f6f1e7d9df8a37 byteman-2.0.4.tar.xz
SHA512 (4.0.26.tar.gz) = 06c8bf688d237d8dbac1e4558a8e2916f1212d2746d81a64e8bc44f9074f5b1c205bb98ac3a8e835f0c8b225df665e40c93c8b60ff5ff77f6ce8272c25679d76

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;

147
tests/smoke/test-smoke.sh Normal file
View file

@ -0,0 +1,147 @@
#!/bin/bash
#
set -e
##############################################################
#
# Test 1: bmjava
#
##############################################################
test1_dir=$(mktemp -d)
pushd $test1_dir
#####
## The Java program under test (via bmjava)
#####
cat > HelloWait.java <<EOF1
public class HelloWait {
public static class FooBar {
public void doSomething(String arg) {
System.out.println("Hello " + arg);
}
}
public static void main(String[] args) {
FooBar fooBar = new FooBar();
fooBar.doSomething("World!");
}
}
EOF1
javac -g HelloWait.java
#####
## The byteman rule (used via bmjava)
#####
cat > trace1.btm <<EOF2
RULE trace doSomething entry
CLASS HelloWait\$FooBar
METHOD doSomething(java.lang.String)
AT ENTRY
IF true
DO
traceln("argument was: " + \$1);
\$1 = "bar";
ENDRULE
EOF2
bmjava -p 5555 -h 127.0.0.1 -l trace1.btm HelloWait > out1.log
grep -q "argument was: World!" out1.log
grep -q "Hello bar" out1.log
output=$(tail -n1 out1.log)
if [ ! "${output}_" == "Hello bar_" ]; then
echo Test FAILED!
exit 1
fi
echo Test 1 PASSED!
popd
rm -rf $test1_dir
##############################################################
#
# Test 2: bminstall + bmsubmit
#
##############################################################
test2_dir=$(mktemp -d)
pushd $test2_dir
#####
## The Java program under test
#####
cat > HelloWait.java <<EOF3
public class HelloWait {
public static class FooBar {
public void doSomething(String arg) {
System.out.println("Hello " + arg);
}
}
public static void main(String[] args) {
FooBar fooBar = new FooBar();
try {
while (true) {
fooBar.doSomething("World!");
Thread.sleep(300);
}
} catch (InterruptedException e) {
// ignore
}
}
}
EOF3
javac -g HelloWait.java
java HelloWait > out2.log 2>&1 &
pid_of_java=$$
echo "Forked java process with pid $pid_of_java"
sleep 2
#####
## The byteman rule(s) (used via bmsubmit)
#####
cat > change_arg.btm <<EOF4
RULE change doSomething arg
CLASS HelloWait\$FooBar
METHOD doSomething(java.lang.String)
AT ENTRY
IF true
DO
\$1 = "THERE!";
ENDRULE
EOF4
cat > throw_excptn.btm <<EOF5
RULE throw exception when leaving doSomething
CLASS HelloWait\$FooBar
METHOD doSomething(java.lang.String)
AT EXIT
IF true
DO
THROW new RuntimeException("Boom!")
ENDRULE
EOF5
# Install the agent
bminstall -p 5555 -h 127.0.0.1 HelloWait
# Install the change arg rule
bmsubmit -p 5555 -h 127.0.0.1 -l change_arg.btm
sleep 2
# Unload the change arg rule
bmsubmit -p 5555 -h 127.0.0.1 -u change_arg.btm
# Install the exception throwing rule
bmsubmit -p 5555 -h 127.0.0.1 -l throw_excptn.btm
sleep 1
# Verify the log
head -n10 out2.log | grep -q "Hello World!"
hello_th_count=$(grep "Hello THERE!" out2.log | wc -l)
if [ $hello_th_count -lt 1 ]; then
echo "Test 2 FAILED!"
exit 1
fi
grep -q "Boom!" out2.log
grep -q "RuntimeException" out2.log
echo Test 2 PASSED!
popd
rm -rf $test2_dir

12
tests/tests.yml Normal file
View file

@ -0,0 +1,12 @@
---
- hosts: localhost
roles:
- role: standard-test-beakerlib
tags:
- classic
required_packages:
- byteman
- java-11-openjdk-devel
tests:
- smoke/test-smoke.sh