From fd53ab7756bdf36436959a80d9b780b815b463a8 Mon Sep 17 00:00:00 2001 From: Severin Gehwolf Date: Wed, 11 Jul 2018 10:32:11 +0200 Subject: [PATCH 1/2] 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 --- .gitignore | 1 + byteman.spec | 75 ++++++++++++++++++++++++++++++++++++++++++++++------ sources | 2 +- 3 files changed, 69 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index c6f0cb2..a40962f 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /byteman-3.0.6/ /4.0.2.tar.gz /4.0.3.tar.gz +/4.0.4.tar.gz diff --git a/byteman.spec b/byteman.spec index 334b5af..56e74e5 100644 --- a/byteman.spec +++ b/byteman.spec @@ -1,16 +1,25 @@ -%global javacup_or_asm java_cup:java_cup|org.ow2.asm:asm-all -%global __requires_exclude ^.*mvn\\(%{javacup_or_asm}\\)$ +# 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: 4.0.3 -Release: 2%{?dist} +Version: 4.0.4 +Release: 1%{?dist} Summary: Java agent-based bytecode injection tool License: LGPLv2+ URL: http://www.jboss.org/byteman -# wget -O 4.0.3.tar.gz https://github.com/bytemanproject/byteman/archive/4.0.3.tar.gz +# wget -O 4.0.4.tar.gz https://github.com/bytemanproject/byteman/archive/4.0.4.tar.gz Source0: https://github.com/bytemanproject/byteman/archive/%{version}.tar.gz BuildArch: noarch @@ -38,8 +47,11 @@ BuildRequires: testng # JBoss modules byteman plugin requires it BuildRequires: mvn(org.jboss.modules:jboss-modules) -Provides: bundled(objectweb-asm) = 6.1.1 +Provides: bundled(objectweb-asm) = 6.2 Provides: bundled(java_cup) = 1:0.11b-8 +# 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 @@ -67,6 +79,21 @@ 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 -n byteman-%{version} @@ -103,8 +130,12 @@ sed -i "s|java-cup|java_cup|" tests/pom.xml %pom_remove_plugin -r :maven-javadoc-plugin %pom_xpath_remove 'pom:execution[pom:id="make-javadoc-assembly"]' byteman -# Put maven plugin into a separate package +# Put byteman-rulecheck-maven-plugin into a separate package %mvn_package ":byteman-rulecheck-maven-plugin" rulecheck-maven-plugin +# 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 export JAVA_HOME=/usr/lib/jvm/java-10-openjdk @@ -141,10 +172,21 @@ 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 -f .mfiles -%{homedir}/* +%{homedir}/lib/byteman.jar +%{homedir}/lib/byteman-install.jar +%{homedir}/lib/byteman-sample.jar +%{homedir}/lib/byteman-submit.jar +%{homedir}/contrib/* +%{bindir}/* %{_bindir}/* %doc README %license docs/copyright.txt @@ -155,7 +197,24 @@ ln -s %{_javadir}/byteman/byteman.jar $RPM_BUILD_ROOT%{homedir}/lib/byteman.jar %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 +* Tue Jul 10 2018 Severin Gehwolf - 4.0.4-1 +- Update to latest upstream 4.0.4 release. +- Split junit-dependent packages into sub-packages: + byteman-dtest, byteman-bmunit +- Fix automatically generated requirements: + - ASM is BR-only and bundled. + - java-headless >= 1:1.9 would get generated, but byteman 4.x + runs on JDK 8 too (would even work for JDK 6) + * Thu Jul 05 2018 Severin Gehwolf - 4.0.3-2 - Don't use maven-javadoc-plugin. Use XMvn instead. diff --git a/sources b/sources index dca51e6..812b9a2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (4.0.3.tar.gz) = 9d8692e3464fde26cd28bbc6a268d8e9125104c792a577f13183159fb3d42cc9bdc5c157c42f67735c882dcdd24f6b9e3251c18761097ba4534eb0c075d87709 +SHA512 (4.0.4.tar.gz) = 1d6b45dfa535a6c2a4615db679c1dcc51cfd84923ac2c1ba97716572af2baece0b39119aff7b3266e9d1838dc8b47f678b7efc5bbaf9500329728e982dd7774c From 3fd932c9d0aee807c476c99ce97e88f24adf95c9 Mon Sep 17 00:00:00 2001 From: Severin Gehwolf Date: Wed, 21 Nov 2018 20:06:58 +0100 Subject: [PATCH 2/2] Update to latest upstream 4.0.5 release. --- .gitignore | 1 + byteman.spec | 13 ++++++++----- sources | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index a40962f..8b2baed 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /4.0.2.tar.gz /4.0.3.tar.gz /4.0.4.tar.gz +/4.0.5.tar.gz diff --git a/byteman.spec b/byteman.spec index 56e74e5..7f3add7 100644 --- a/byteman.spec +++ b/byteman.spec @@ -14,18 +14,18 @@ %global bindir %{homedir}/bin Name: byteman -Version: 4.0.4 +Version: 4.0.5 Release: 1%{?dist} Summary: Java agent-based bytecode injection tool License: LGPLv2+ URL: http://www.jboss.org/byteman -# wget -O 4.0.4.tar.gz https://github.com/bytemanproject/byteman/archive/4.0.4.tar.gz +# wget -O 4.0.5.tar.gz https://github.com/bytemanproject/byteman/archive/4.0.5.tar.gz Source0: https://github.com/bytemanproject/byteman/archive/%{version}.tar.gz BuildArch: noarch # Byteman 4.x requires JDK 9+ to build. Require JDK 10 explicitly. -BuildRequires: java-10-openjdk-devel +BuildRequires: java-11-openjdk-devel BuildRequires: maven-local BuildRequires: maven-shade-plugin BuildRequires: maven-source-plugin @@ -47,7 +47,7 @@ BuildRequires: testng # JBoss modules byteman plugin requires it BuildRequires: mvn(org.jboss.modules:jboss-modules) -Provides: bundled(objectweb-asm) = 6.2 +Provides: bundled(objectweb-asm) = 7.0 Provides: bundled(java_cup) = 1:0.11b-8 # We are filtering java-headless >= 1:1.9 requirement. Add # JDK 8 requirement here explicitly which shouldn't match the filter. @@ -138,7 +138,7 @@ sed -i "s|java-cup|java_cup|" tests/pom.xml %mvn_package ":byteman-dtest" dtest %build -export JAVA_HOME=/usr/lib/jvm/java-10-openjdk +export JAVA_HOME=/usr/lib/jvm/java-11-openjdk %mvn_build %install @@ -206,6 +206,9 @@ ln -s %{_javadir}/byteman/byteman.jar $RPM_BUILD_ROOT%{homedir}/lib/byteman.jar %{homedir}/lib/byteman-dtest.jar %changelog +* Wed Nov 21 2018 Severin Gehwolf - 4.0.5-1 +- Update to latest upstream 4.0.5 release. + * Tue Jul 10 2018 Severin Gehwolf - 4.0.4-1 - Update to latest upstream 4.0.4 release. - Split junit-dependent packages into sub-packages: diff --git a/sources b/sources index 812b9a2..a32d102 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (4.0.4.tar.gz) = 1d6b45dfa535a6c2a4615db679c1dcc51cfd84923ac2c1ba97716572af2baece0b39119aff7b3266e9d1838dc8b47f678b7efc5bbaf9500329728e982dd7774c +SHA512 (4.0.5.tar.gz) = 2a9bd3d19ccfe2208c791422fc7bb89c2c322779c5ce4b917b50a9ec131ed23ca78f374e6e3c457774a06934446019a92ad4aea6402757ab6a82e8d6dd3afae7