#1 Upgraded to latest upstream version 4.0.11
Merged 2 years ago by jerboaa. Opened 2 years ago by jhuttana.
rpms/ jhuttana/byteman master  into  master

file modified
+12 -3
@@ -14,12 +14,12 @@ 

  %global bindir %{homedir}/bin

  

  Name:             byteman

- Version:          4.0.5

- Release:          5%{?dist}

+ Version:          4.0.11

+ Release:          1%{?dist}

  Summary:          Java agent-based bytecode injection tool

  License:          LGPLv2+

  URL:              http://www.jboss.org/byteman

- # wget -O 4.0.5.tar.gz https://github.com/bytemanproject/byteman/archive/4.0.5.tar.gz

+ # wget -O 4.0.11.tar.gz https://github.com/bytemanproject/byteman/archive/4.0.11.tar.gz

  Source0:          https://github.com/bytemanproject/byteman/archive/%{version}.tar.gz

  

  BuildArch:        noarch
@@ -37,11 +37,13 @@ 

  BuildRequires:    maven-surefire-plugin

  BuildRequires:    maven-surefire-provider-testng

  BuildRequires:    maven-surefire-provider-junit

+ BuildRequires:    maven-surefire-provider-junit5

  BuildRequires:    maven-verifier-plugin

  BuildRequires:    maven-dependency-plugin

  BuildRequires:    java_cup

  BuildRequires:    objectweb-asm

  BuildRequires:    junit

+ BuildRequires:    junit5

  BuildRequires:    testng

  # JBoss modules byteman plugin requires it

  BuildRequires:    mvn(org.jboss.modules:jboss-modules)
@@ -54,6 +56,7 @@ 

  

  # Related pieces removed via pom_xpath_remove macros

  Patch1:           remove_submit_integration_test_verification.patch

+ Patch2:           tests_pom_xml.patch

  

  %description

  Byteman is a tool which simplifies tracing and testing of Java programs.
@@ -106,6 +109,7 @@ 

  %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

  %patch1 -p2

+ %patch2 -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
@@ -209,6 +213,11 @@ 

  %{homedir}/lib/byteman-dtest.jar

  

  %changelog

+ * Tue Mar 03 2020 Jayashree Huttanagoudar <jhuttana@redhat.com> - 4.0.11-1

+ - Upgrated to latest upstream version 4.0.11

+ - Added a patch to fix rpm build issue caused due to misconfiguration in upstream

+ - Added required additional plugins required for build

+ 

  * Tue Jan 28 2020 Severin Gehwolf <sgehwolf@redhat.com> - 4.0.5-5

  - Drop not needed BR jarjar. Fixes FTBFS.

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (4.0.5.tar.gz) = 2a9bd3d19ccfe2208c791422fc7bb89c2c322779c5ce4b917b50a9ec131ed23ca78f374e6e3c457774a06934446019a92ad4aea6402757ab6a82e8d6dd3afae7

+ SHA512 (4.0.11.tar.gz) = 05e82df5e6747934c3b80932534118c25571482c4dd0f0be0468a683e6185ca4ae039f7bdabc0151067c2c61cf450b19636c50840ae6749df461dc0a1f305f69

file added
+22
@@ -0,0 +1,22 @@ 

+ 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>

Along with ususal changes a patch is added to fix a test failure caused due to a misconfiguration in tests/pom.xml.

Again. Release: 1 here. Then update changelog to reflect it. I.e. .... @redhat.com> - 4.0.11-1

Referenced scratch build fails with:

[ERROR] Failed to execute goal on project byteman-bmunit5: Could not resolve dependencies for project org.jboss.byteman:byteman-bmunit5:jar:4.0.11: The following artifacts could not be resolved: org.junit.jupiter:junit-jupiter-api:jar:5.4.0, org.junit.jupiter:junit-jupiter-params:jar:5.4.0, org.junit.jupiter:junit-jupiter-engine:jar:5.4.0: Cannot access central (https://repo.maven.apache.org/maven2) in offline mode and the artifact org.junit.jupiter:junit-jupiter-api:jar:5.4.0 has not been downloaded from it before. -> [Help 1]

Appears to be a missing BR on junit5?

@jhuttana There are a few comments which still need addressing.

rebased onto c9e6d09

2 years ago

Referenced scratch build fails with:
[ERROR] Failed to execute goal on project byteman-bmunit5: Could not resolve dependencies for project org.jboss.byteman:byteman-bmunit5:jar:4.0.11: The following artifacts could not be resolved: org.junit.jupiter:junit-jupiter-api:jar:5.4.0, org.junit.jupiter:junit-jupiter-params:jar:5.4.0, org.junit.jupiter:junit-jupiter-engine:jar:5.4.0: Cannot access central (https://repo.maven.apache.org/maven2) in offline mode and the artifact org.junit.jupiter:junit-jupiter-api:jar:5.4.0 has not been downloaded from it before. -> [Help 1]

Appears to be a missing BR on junit5?

In my workarea it builds fine. Not sure how scratch build is hitting this issue :(

Again. Release: 1 here. Then update changelog to reflect it. I.e. .... @redhat.com> - 4.0.11-1

Addressed this comment now.

Referenced scratch build fails with:
[ERROR] Failed to execute goal on project byteman-bmunit5: Could not resolve dependencies for project org.jboss.byteman:byteman-bmunit5:jar:4.0.11: The following artifacts could not be resolved: org.junit.jupiter:junit-jupiter-api:jar:5.4.0, org.junit.jupiter:junit-jupiter-params:jar:5.4.0, org.junit.jupiter:junit-jupiter-engine:jar:5.4.0: Cannot access central (https://repo.maven.apache.org/maven2) in offline mode and the artifact org.junit.jupiter:junit-jupiter-api:jar:5.4.0 has not been downloaded from it before. -> [Help 1]
Appears to be a missing BR on junit5?

In my workarea it builds fine. Not sure how scratch build is hitting this issue :(

Please build in a local mock environment with the 7.3.1 objectweb-asm package installed.

Some hints:

fedpkg clone byteman
cd byteman
# Add changes in this PR
fedpkg mockbuild --no-clean-all

This gives you a mock with config fedora-rawhide-x86_64 (in all likelihood). Mock root is in /var/lib/mock/fedora-rawhide-x86_64/root (which is a chroot tree). See man mock or mock --help for more info.

In order to install newer, not-yet-pushed, objectweb-asm 7.3.1 into that chroot use:

mock -r fedora-rawhide-x86_64 --install <objectweb-asm-rpm>
# then in the byteman repo
fedpkg srpm
mock -r --no-clean --no-cleanup-after --rebuild <srpm-from-prev-step>

This should reproduce the issue I've described above. Koji uses mocks to build and is not comparable to your "workspace". It sets up fresh mock chroots for every build. No clean flags are important as otherwise a --rebuild cleans the chroot.

@jhuttana

What's more, once you've also built byteman for rawhide, try to use the newly built byteman package to instrument some java code compiled with JDK 14. java-latest-openjdk package should be JDK 14. It installs into /usr/lib/jvm/java-14-openjdk (the java-latest-openjdk-devel package). Best to do this in a mock --root fedora-rawhide-x86_64 --shell env. A basic byteman tutorial will be enough.

rebased onto 7858d63

2 years ago

Referenced scratch build fails with:
[ERROR] Failed to execute goal on project byteman-bmunit5: Could not resolve dependencies for project org.jboss.byteman:byteman-bmunit5:jar:4.0.11: The following artifacts could not be resolved: org.junit.jupiter:junit-jupiter-api:jar:5.4.0, org.junit.jupiter:junit-jupiter-params:jar:5.4.0, org.junit.jupiter:junit-jupiter-engine:jar:5.4.0: Cannot access central (https://repo.maven.apache.org/maven2) in offline mode and the artifact org.junit.jupiter:junit-jupiter-api:jar:5.4.0 has not been downloaded from it before. -> [Help 1]
Appears to be a missing BR on junit5?
In my workarea it builds fine. Not sure how scratch build is hitting this issue :(

Please build in a local mock environment with the 7.3.1 objectweb-asm package installed.
Some hints:
fedpkg clone byteman
cd byteman

Add changes in this PR

fedpkg mockbuild --no-clean-all

This gives you a mock with config fedora-rawhide-x86_64 (in all likelihood). Mock root is in /var/lib/mock/fedora-rawhide-x86_64/root (which is a chroot tree). See man mock or mock --help for more info.
In order to install newer, not-yet-pushed, objectweb-asm 7.3.1 into that chroot use:
mock -r fedora-rawhide-x86_64 --install <objectweb-asm-rpm>

then in the byteman repo

fedpkg srpm
mock -r --no-clean --no-cleanup-after --rebuild <srpm-from-prev-step>

This should reproduce the issue I've described above. Koji uses mocks to build and is not comparable to your "workspace". It sets up fresh mock chroots for every build. No clean flags are important as otherwise a --rebuild cleans the chroot.

@jerboaa Thanks for providing me the hits to reproduce the issue.
I have fixed the spec file to add required BR. I have verified the build in local mock environment after this fix and it is successful.

Please review and provide your comments :)

@jhuttana
What's more, once you've also built byteman for rawhide, try to use the newly built byteman package to instrument some java code compiled with JDK 14. java-latest-openjdk package should be JDK 14. It installs into /usr/lib/jvm/java-14-openjdk (the java-latest-openjdk-devel package). Best to do this in a mock --root fedora-rawhide-x86_64 --shell env. A basic byteman tutorial will be enough.

Verified the built byteman package to instrument a small java program and it worked as expected.
Verified for both JDK11 and JDK14

@jhuttana This looks good to me, except for the email in the commit message. It's currently jhuttana@localhost.localdomain. Please fix.

rebased onto 2a0f245

2 years ago

@jhuttana This looks good to me, except for the email in the commit message. It's currently jhuttana@localhost.localdomain. Please fix.

Thank you severin! I have fixed the email in commit.

Pull-Request has been merged by jerboaa

2 years ago