Sync from SUSE:SLFO:Main byte-buddy revision c751e6ecffdf38908266c56b4f8dcdfd

This commit is contained in:
Adrian Schröter 2024-05-31 15:23:25 +02:00
commit ae948e8f1e
5 changed files with 445 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1,100 @@
From 68366dbea6762d338aaefa6d80caaf5abb05555a Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Thu, 23 Feb 2023 13:59:25 +0100
Subject: [PATCH 1/2] Avoid bundling asm
---
byte-buddy/pom.xml | 56 +++++++++-------------------------------------
1 file changed, 11 insertions(+), 45 deletions(-)
diff --git a/byte-buddy/pom.xml b/byte-buddy/pom.xml
index 3a2c52000b..5372965676 100644
--- a/byte-buddy/pom.xml
+++ b/byte-buddy/pom.xml
@@ -26,8 +26,6 @@
-->
<properties>
- <shade.source>org.objectweb.asm</shade.source>
- <shade.target>net.bytebuddy.jar.asm</shade.target>
<packages.list.external>
net.bytebuddy,
net.bytebuddy.agent.builder,
@@ -62,10 +60,7 @@
net.bytebuddy.utility,
net.bytebuddy.utility.nullability,
net.bytebuddy.utility.privilege,
- net.bytebuddy.utility.visitor,
- ${shade.target},
- ${shade.target}.signature,
- ${shade.target}.commons
+ net.bytebuddy.utility.visitor
</packages.list.external>
<packages.list.internal>
net.bytebuddy.utility.dispatcher
@@ -83,6 +78,16 @@
<groupId>${project.groupId}</groupId>
<artifactId>byte-buddy-dep</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm</artifactId>
+ <version>${version.asm}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm-commons</artifactId>
+ <version>${version.asm}</version>
+ </dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
@@ -254,45 +259,6 @@
<createDependencyReducedPom>true</createDependencyReducedPom>
<createSourcesJar>${bytebuddy.extras}</createSourcesJar>
<shadeSourcesContent>true</shadeSourcesContent>
- <relocations>
- <relocation>
- <pattern>${shade.source}</pattern>
- <shadedPattern>${shade.target}</shadedPattern>
- </relocation>
- </relocations>
- <filters>
- <filter>
- <artifact>net.bytebuddy:byte-buddy-dep:*</artifact>
- <excludes>
- <exclude>META-INF/MANIFEST.MF</exclude>
- <exclude>META-INF/maven/**</exclude>
- </excludes>
- </filter>
- <filter>
- <artifact>org.ow2.asm:*</artifact>
- <excludes>
- <exclude>META-INF/MANIFEST.MF</exclude>
- <exclude>**/module-info.class</exclude>
- <exclude>**/LICENSE</exclude>
- <exclude>**/NOTICE</exclude>
- </excludes>
- </filter>
- <filter>
- <artifact>org.ow2.asm:asm-commons</artifact>
- <includes>
- <include>org/objectweb/asm/commons/AnnotationRemapper.**</include>
- <include>org/objectweb/asm/commons/ClassRemapper.**</include>
- <include>org/objectweb/asm/commons/FieldRemapper.**</include>
- <include>org/objectweb/asm/commons/MethodRemapper.**</include>
- <include>org/objectweb/asm/commons/ModuleHashesAttribute.**</include>
- <include>org/objectweb/asm/commons/ModuleRemapper.**</include>
- <include>org/objectweb/asm/commons/RecordComponentRemapper.**</include>
- <include>org/objectweb/asm/commons/Remapper.**</include>
- <include>org/objectweb/asm/commons/SignatureRemapper.**</include>
- <include>org/objectweb/asm/commons/SimpleRemapper.**</include>
- </includes>
- </filter>
- </filters>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>net.bytebuddy.build.Plugin$Engine$Default</mainClass>
--
2.45.1

BIN
byte-buddy-1.14.16.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

181
byte-buddy.changes Normal file
View File

@ -0,0 +1,181 @@
-------------------------------------------------------------------
Thu May 23 05:28:12 UTC 2024 - Anton Shvetz <shvetz.anton@gmail.com>
- Update to v1.14.16
* Changes of v1.14.16
+ Update ASM and introduce support for Java 23.
-------------------------------------------------------------------
Tue May 21 10:58:11 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Upgrade to v1.14.15
* Changes of v1.14.15
+ Allow attaching from root on J9.
* Changes of v1.14.14
+ Adjust type validation to accept additional names that are
legal in the class file format.
+ Fix dynamic attach on Windows when a service user is active.
+ Avoid failure when using Android's strict mode.
- Removed patch:
* 0002-Remove-dependencies.patch
+ not needed since we have jna packaged
-------------------------------------------------------------------
Thu Apr 18 11:25:23 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Split the whole package into sub-packages
- Added patch:
* 0001-Avoid-bundling-asm.patch
+ Do not bundle asm, but use external artifact
* 0002-Remove-dependencies.patch
+ Remove optional dependency on jna
-------------------------------------------------------------------
Thu Mar 28 20:38:55 UTC 2024 - Anton Shvetz <shvetz.anton@gmail.com>
- Update to v1.14.13
* Changes of v1.14.13
+ Avoid resolving type variables when generic type processing
is disabled.
+ Improve error message for Byte Buddy agent external attach.
+ Fix build for modular jars when using later version than Java
8.
-------------------------------------------------------------------
Sat Feb 17 15:42:45 UTC 2024 - Anton Shvetz <shvetz.anton@gmail.com>
- Update to v1.14.12
* Changes of v1.14.12
+ Pin proxy class file version to avoid implicit changes when
using Graal native image.
+ Add support for Java 23.
+ Add missing @MaybeNull annotation.
-------------------------------------------------------------------
Thu Dec 21 00:16:33 UTC 2023 - Anton Shvetz <shvetz.anton@gmail.com>
- Update to v1.14.11
* Changes of v1.14.11
+ Adjusts Gradle plugin to support Gradle 8.4 without warnings.
+ Avoid blurry exception on build plugin for fail fast.
-------------------------------------------------------------------
Wed Dec 20 23:21:57 UTC 2023 - Anton Shvetz <shvetz.anton@gmail.com>
- Update to v1.14.10
* Changes of v1.14.10
+ Add lazy facade to default TypePool in AgentBuilder to avoid
parsing of types ignored by name.
+ Avoid module info classes in Android plugin.
-------------------------------------------------------------------
Tue Oct 17 05:32:59 UTC 2023 - Anton Shvetz <shvetz.anton@gmail.com>
- Update to v1.14.9
* Changes of v1.14.9
+ Update ASM to version 9.6
+ Support Android plugin to support APG version 7.4
-------------------------------------------------------------------
Wed Sep 27 05:14:22 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Remove dependency on findbugs
- Do not produce bootstrap package
-------------------------------------------------------------------
Thu Sep 14 23:17:38 UTC 2023 - Anton Shvetz <shvetz.anton@gmail.com>
- Update to v1.14.8
* Changes of v1.14.8
+ Correctly read versions from class file that would use both
bytes.
+ Fix Byte Buddy Gradle plugin for Gradle 8.3+.
+ Correct field and static method access on subtypes in
MemberSubstitution.
+ Support APK 7.4+ versions in Byte Buddy Gradle for Android
plugin.
- Reproducible builds: use SOURCE_DATE_EPOCH for timestamp
-------------------------------------------------------------------
Thu Aug 31 07:35:26 UTC 2023 - Anton Shvetz <shvetz.anton@gmail.com>
- Update to v1.14.7
* Changes of v1.14.7
+ Correctly read minor version from class file.
+ Catch type resolution errors when applying Plugin.Engine.
-------------------------------------------------------------------
Tue Aug 15 03:26:43 UTC 2023 - Anton Shvetz <shvetz.anton@gmail.com>
- Update to v1.14.6
* Changes of v1.14.6
+ Add PatchMode.SUBSTITUTE and
ResettableClassFileTransformer.Substitutable for in-order
patching.
+ Allow for explicit specification og differential matcher when
patching an AgentBuilder.
+ Add platform loader to locator for build plugins.
+ Correctly resolve accessors for fields with capitalized first
letter.
+ Make jars for Android read-only as newer versions require it.
-------------------------------------------------------------------
Sat Jun 10 08:06:59 UTC 2023 - Anton Shvetz <shvetz.anton@gmail.com>
- Update to v1.14.5
* Changes of v1.14.5
+ Avoid use of location if agent argument separator is
contained.
+ Allow failure of member substitution if no element is
separated.
+ Allow retry in case of parallel class injection.
-------------------------------------------------------------------
Fri May 5 07:43:46 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Do not bootstrap using downloaded binaries, but build the
minimal bootstrap package from sources
-------------------------------------------------------------------
Thu Apr 13 16:47:24 UTC 2023 - Anton Shvetz <shvetz.anton@gmail.com>
- Update to v1.14.4
* Changes of v1.14.4
+ Include instrumented type and auxiliary types in TypePool
that is passed to TypeWriter.
-------------------------------------------------------------------
Mon Apr 3 12:37:18 UTC 2023 - Anton Shvetz <shvetz.anton@gmail.com>
- Remove patch:
* 00-asm5.patch - not needed due to update of objectweb-asm
-------------------------------------------------------------------
Sun Apr 2 18:09:26 UTC 2023 - Anton Shvetz <shvetz.anton@gmail.com>
- Update to v1.14.3
* Changes of v1.14.3
+ Make MethodGraph.Compiler failsafe when processing incomplete
methods.
+ Update ASM.
-------------------------------------------------------------------
Mon Mar 20 13:10:06 UTC 2023 - Anton Shvetz <shvetz.anton@gmail.com>
- Update to v1.14.2
* Changes of v1.14.2
+ Fix offset mapping for local variable array remapping in
Advice.
+ Add possibility to specify an index for skipOn and repeatOn
which resolves the checked value from a returned array.
* Changes of 1.14.1
+ Add extended scope for Maven Byte Buddy plugin to include all
non-test-dependencies.
-------------------------------------------------------------------
Wed Mar 8 04:33:02 UTC 2023 - Anton Shvetz <shvetz.anton@gmail.com>
- Initial packaging with v1.14.0
- Add patch:
* 00-asm5.patch
~ asm5 does not support the Opcodes.V20 constant

138
byte-buddy.spec Normal file
View File

@ -0,0 +1,138 @@
#
# spec file for package byte-buddy
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: byte-buddy
Version: 1.14.16
Release: 0
Summary: Runtime code generation for the Java virtual machine
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://bytebuddy.net/
Source0: https://github.com/raphw/%{name}/archive/refs/tags/%{name}-%{version}.tar.gz
Patch0: 0001-Avoid-bundling-asm.patch
BuildRequires: fdupes
BuildRequires: jurand
BuildRequires: maven-local
BuildRequires: mvn(codes.rafael.modulemaker:modulemaker-maven-plugin)
BuildRequires: mvn(com.google.code.findbugs:jsr305)
BuildRequires: mvn(net.java.dev.jna:jna)
BuildRequires: mvn(net.java.dev.jna:jna-platform)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations)
BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin)
BuildRequires: mvn(org.apache.maven:maven-core)
BuildRequires: mvn(org.apache.maven:maven-plugin-api)
BuildRequires: mvn(org.eclipse.aether:aether-api)
BuildRequires: mvn(org.eclipse.aether:aether-util)
BuildRequires: mvn(org.ow2.asm:asm) >= 9.7
BuildRequires: mvn(org.ow2.asm:asm-commons)
BuildRequires: mvn(org.sonatype.plexus:plexus-build-api)
BuildArch: noarch
%description
Byte Buddy is a code generation and manipulation library for creating and
modifying Java classes during the runtime of a Java application and without the
help of a compiler. Other than the code generation utilities that ship with the
Java Class Library, Byte Buddy allows the creation of arbitrary classes and is
not limited to implementing interfaces for the creation of runtime proxies.
Furthermore, Byte Buddy offers a convenient API for changing classes either
manually, using a Java agent or during a build.
%package agent
Summary: Byte Buddy Java agent
Group: Development/Libraries/Java
%description agent
The Byte Buddy Java agent allows to access the JVM's HotSwap feature.
%package maven-plugin
Summary: Byte Buddy Maven plugin
Group: Development/Libraries/Java
%description maven-plugin
A plugin for post-processing class files via Byte Buddy in a Maven build.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
API documentation for %{name}.
%prep
%setup -q -n %{name}-%{name}-%{version}
%patch -P 0 -p1
# Don't ship android or benchmark modules
%pom_disable_module byte-buddy-android
%pom_disable_module byte-buddy-android-test
%pom_disable_module byte-buddy-benchmark
# Don't ship gradle plugin
%pom_disable_module byte-buddy-gradle-plugin
# Remove check plugins unneeded by RPM builds
%pom_remove_plugin :jacoco-maven-plugin
%pom_remove_plugin :license-maven-plugin
%pom_remove_plugin :pitest-maven
%pom_remove_plugin :coveralls-maven-plugin
%pom_remove_plugin :spotbugs-maven-plugin
%pom_remove_plugin :jitwatch-jarscan-maven-plugin
%pom_remove_plugin :maven-release-plugin
%pom_remove_plugin :nexus-staging-maven-plugin
# Avoid circular dependency
%pom_remove_plugin :byte-buddy-maven-plugin byte-buddy-dep
# Not interested in shading sources (causes NPE on old versions of shade plugin)
%pom_xpath_set "pom:createSourcesJar" "false" byte-buddy
# Drop build dep on findbugs annotations, used only by the above check plugins
%pom_remove_dep -r :findbugs-annotations
%{java_remove_annotations} byte-buddy-agent byte-buddy-dep byte-buddy-maven-plugin -n SuppressFBWarnings
%pom_remove_dep org.ow2.asm:asm-deprecated
%pom_remove_plugin -r :maven-shade-plugin
%{mvn_package} :byte-buddy-parent __noinstall
%build
%{mvn_build} -f -s -- \
-Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ) \
-Dsource=8
%install
%mvn_install
%if %{without bootstrap}
%fdupes -s %{buildroot}%{_javadocdir}
%endif
%files -f .mfiles-%{name} -f .mfiles-%{name}-dep
%doc README.md release-notes.md
%license LICENSE NOTICE
%files agent -f .mfiles-%{name}-agent
%license LICENSE NOTICE
%files maven-plugin -f .mfiles-%{name}-maven-plugin
%files javadoc -f .mfiles-javadoc
%license LICENSE NOTICE
%changelog