diff --git a/.gitignore b/.gitignore index 6211337..e9c8456 100644 --- a/.gitignore +++ b/.gitignore @@ -85,3 +85,33 @@ /asm-test-9.3.pom /asm-tree-9.3.pom /asm-util-9.3.pom +/asm-9.4.pom +/asm-analysis-9.4.pom +/asm-commons-9.4.pom +/asm-test-9.4.pom +/asm-tree-9.4.pom +/asm-util-9.4.pom +/asm-9.5.pom +/asm-analysis-9.5.pom +/asm-commons-9.5.pom +/asm-test-9.5.pom +/asm-tree-9.5.pom +/asm-util-9.5.pom +/asm-9.6.pom +/asm-analysis-9.6.pom +/asm-commons-9.6.pom +/asm-test-9.6.pom +/asm-tree-9.6.pom +/asm-util-9.6.pom +/asm-9.7.pom +/asm-analysis-9.7.pom +/asm-commons-9.7.pom +/asm-test-9.7.pom +/asm-tree-9.7.pom +/asm-util-9.7.pom +/asm-9.7.1.pom +/asm-analysis-9.7.1.pom +/asm-commons-9.7.1.pom +/asm-test-9.7.1.pom +/asm-tree-9.7.1.pom +/asm-util-9.7.1.pom diff --git a/0001-Add-support-of-Java-25.patch b/0001-Add-support-of-Java-25.patch new file mode 100644 index 0000000..fda2675 --- /dev/null +++ b/0001-Add-support-of-Java-25.patch @@ -0,0 +1,64 @@ +From 756ccf40723d9ba68872252810f3dbb2b186be0c Mon Sep 17 00:00:00 2001 +From: forax +Date: Tue, 10 Dec 2024 11:11:49 +0100 +Subject: [PATCH] Add support of Java 25 + +--- + asm-util/src/main/java/org/objectweb/asm/util/ASMifier.java | 1 + + asm/src/main/java/org/objectweb/asm/ClassReader.java | 2 +- + asm/src/main/java/org/objectweb/asm/Opcodes.java | 1 + + asm/src/test/java/org/objectweb/asm/ConstantsTest.java | 1 + + 4 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/asm-util/src/main/java/org/objectweb/asm/util/ASMifier.java b/asm-util/src/main/java/org/objectweb/asm/util/ASMifier.java +index 4ede9201..9ce9f1c6 100644 +--- a/asm-util/src/main/java/org/objectweb/asm/util/ASMifier.java ++++ b/asm-util/src/main/java/org/objectweb/asm/util/ASMifier.java +@@ -114,6 +114,7 @@ public class ASMifier extends Printer { + classVersions.put(Opcodes.V22, "V22"); + classVersions.put(Opcodes.V23, "V23"); + classVersions.put(Opcodes.V24, "V24"); ++ classVersions.put(Opcodes.V25, "V25"); + CLASS_VERSIONS = Collections.unmodifiableMap(classVersions); + } + +diff --git a/asm/src/main/java/org/objectweb/asm/ClassReader.java b/asm/src/main/java/org/objectweb/asm/ClassReader.java +index 33b2a300..5f66ed2b 100644 +--- a/asm/src/main/java/org/objectweb/asm/ClassReader.java ++++ b/asm/src/main/java/org/objectweb/asm/ClassReader.java +@@ -195,7 +195,7 @@ public class ClassReader { + this.b = classFileBuffer; + // Check the class' major_version. This field is after the magic and minor_version fields, which + // use 4 and 2 bytes respectively. +- if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V24) { ++ if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V25) { + throw new IllegalArgumentException( + "Unsupported class file major version " + readShort(classFileOffset + 6)); + } +diff --git a/asm/src/main/java/org/objectweb/asm/Opcodes.java b/asm/src/main/java/org/objectweb/asm/Opcodes.java +index 9aa8a3b0..4ed95869 100644 +--- a/asm/src/main/java/org/objectweb/asm/Opcodes.java ++++ b/asm/src/main/java/org/objectweb/asm/Opcodes.java +@@ -290,6 +290,7 @@ public interface Opcodes { + int V22 = 0 << 16 | 66; + int V23 = 0 << 16 | 67; + int V24 = 0 << 16 | 68; ++ int V25 = 0 << 16 | 69; + + /** + * Version flag indicating that the class is using 'preview' features. +diff --git a/asm/src/test/java/org/objectweb/asm/ConstantsTest.java b/asm/src/test/java/org/objectweb/asm/ConstantsTest.java +index e7af1d04..543ba044 100644 +--- a/asm/src/test/java/org/objectweb/asm/ConstantsTest.java ++++ b/asm/src/test/java/org/objectweb/asm/ConstantsTest.java +@@ -257,6 +257,7 @@ class ConstantsTest { + case "V22": + case "V23": + case "V24": ++ case "V25": + return ConstantType.CLASS_VERSION; + case "ACC_PUBLIC": + case "ACC_PRIVATE": +-- +2.48.1 + diff --git a/0001-Generate-the-module-info-classes-without-Bnd.-Delete.patch b/0001-Generate-the-module-info-classes-without-Bnd.-Delete.patch deleted file mode 100644 index 8d4a837..0000000 --- a/0001-Generate-the-module-info-classes-without-Bnd.-Delete.patch +++ /dev/null @@ -1,614 +0,0 @@ -From 5921eb2a141f0dcc83c6a5d7dcd5035a30c5edfc Mon Sep 17 00:00:00 2001 -From: Eric Bruneton -Date: Sun, 31 Jul 2022 12:21:41 +0000 -Subject: [PATCH] Generate the module info classes without Bnd. Delete the Bnd - plugin. - ---- - .../asm/tools/ModuleInfoBndPlugin.java | 99 ------ - .../org/objectweb/asm/tools/Retrofitter.java | 336 +++++++++++++----- - 4 files changed, 267 insertions(+), 206 deletions(-) - delete mode 100644 tools/bnd-module-plugin/src/main/java/org/objectweb/asm/tools/ModuleInfoBndPlugin.java - -diff --git a/tools/bnd-module-plugin/src/main/java/org/objectweb/asm/tools/ModuleInfoBndPlugin.java b/tools/bnd-module-plugin/src/main/java/org/objectweb/asm/tools/ModuleInfoBndPlugin.java -deleted file mode 100644 -index ee91bdc1..00000000 ---- a/tools/bnd-module-plugin/src/main/java/org/objectweb/asm/tools/ModuleInfoBndPlugin.java -+++ /dev/null -@@ -1,99 +0,0 @@ --// ASM: a very small and fast Java bytecode manipulation framework --// Copyright (c) 2000-2011 INRIA, France Telecom --// All rights reserved. --// --// Redistribution and use in source and binary forms, with or without --// modification, are permitted provided that the following conditions --// are met: --// 1. Redistributions of source code must retain the above copyright --// notice, this list of conditions and the following disclaimer. --// 2. Redistributions in binary form must reproduce the above copyright --// notice, this list of conditions and the following disclaimer in the --// documentation and/or other materials provided with the distribution. --// 3. Neither the name of the copyright holders nor the names of its --// contributors may be used to endorse or promote products derived from --// this software without specific prior written permission. --// --// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" --// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE --// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE --// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE --// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR --// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF --// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS --// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN --// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) --// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF --// THE POSSIBILITY OF SUCH DAMAGE. --package org.objectweb.asm.tools; -- --import aQute.bnd.header.Attrs; --import aQute.bnd.header.Parameters; --import aQute.bnd.osgi.Analyzer; --import aQute.bnd.osgi.Constants; --import aQute.bnd.osgi.EmbeddedResource; --import aQute.bnd.service.AnalyzerPlugin; --import org.objectweb.asm.ClassWriter; --import org.objectweb.asm.ModuleVisitor; --import org.objectweb.asm.Opcodes; -- --/** -- * An biz.aQute.bnd plugin to generate a module-info class from the name, version, requires and -- * export properties of the bundle. -- * -- * @author Remi Forax -- */ --public class ModuleInfoBndPlugin implements AnalyzerPlugin { -- private static final String MODULE_NAME = "Module-Name"; -- private static final String MODULE_VERSION = "Module-Version"; -- private static final String MODULE_REQUIRES = "Module-Requires"; -- private static final String MODULE_EXPORTS = "Module-Exports"; -- -- @Override -- public boolean analyzeJar(final Analyzer analyzer) throws Exception { -- ClassWriter classWriter = new ClassWriter(0); -- classWriter.visit(Opcodes.V9, Opcodes.ACC_MODULE, "module-info", null, null, null); -- String moduleName = -- analyzer.getProperty(MODULE_NAME, analyzer.getProperty(Constants.BUNDLE_SYMBOLICNAME)); -- String moduleVersion = -- analyzer.getProperty(MODULE_VERSION, analyzer.getProperty(Constants.BUNDLE_VERSION)); -- ModuleVisitor moduleVisitor = -- classWriter.visitModule(moduleName, Opcodes.ACC_OPEN, moduleVersion); -- -- String requireModules = analyzer.getProperty(MODULE_REQUIRES); -- if (requireModules != null) { -- Parameters requireParams = analyzer.parseHeader(requireModules); -- for (String requireName : requireParams.keySet()) { -- Attrs attrs = requireParams.get(requireName); -- boolean isTransitive = attrs.containsKey("transitive"); -- boolean isStatic = attrs.containsKey("static"); -- moduleVisitor.visitRequire( -- requireName, -- (isTransitive ? Opcodes.ACC_TRANSITIVE : 0) | (isStatic ? Opcodes.ACC_STATIC_PHASE : 0), -- null); -- } -- } -- moduleVisitor.visitRequire("java.base", Opcodes.ACC_MANDATED, null); -- -- String exportPackages = -- analyzer.getProperty(MODULE_EXPORTS, analyzer.getProperty(Constants.EXPORT_PACKAGE)); -- if (exportPackages != null) { -- Parameters exportParams = analyzer.parseHeader(exportPackages); -- for (String packageName : exportParams.keySet()) { -- if (packageName.endsWith("*")) { -- throw new IllegalStateException("Unsupported wildcard packages " + packageName); -- } -- moduleVisitor.visitExport(packageName.replace('.', '/'), 0); -- } -- } -- moduleVisitor.visitEnd(); -- classWriter.visitEnd(); -- -- analyzer -- .getJar() -- .putResource( -- "module-info.class", -- new EmbeddedResource(classWriter.toByteArray(), System.currentTimeMillis())); -- return false; -- } --} -diff --git a/tools/retrofitter/src/main/java/org/objectweb/asm/tools/Retrofitter.java b/tools/retrofitter/src/main/java/org/objectweb/asm/tools/Retrofitter.java -index 2d017ed2..b3d51e63 100644 ---- a/tools/retrofitter/src/main/java/org/objectweb/asm/tools/Retrofitter.java -+++ b/tools/retrofitter/src/main/java/org/objectweb/asm/tools/Retrofitter.java -@@ -27,22 +27,33 @@ - // THE POSSIBILITY OF SUCH DAMAGE. - package org.objectweb.asm.tools; - -+import static java.lang.String.format; -+import static java.util.stream.Collectors.toSet; -+ - import java.io.BufferedReader; - import java.io.File; - import java.io.IOException; - import java.io.InputStream; - import java.io.InputStreamReader; - import java.io.LineNumberReader; --import java.io.OutputStream; -+import java.lang.module.ModuleDescriptor; - import java.nio.file.Files; -+import java.nio.file.Path; -+import java.util.ArrayList; - import java.util.HashMap; - import java.util.HashSet; -+import java.util.List; -+import java.util.Set; -+import java.util.stream.Stream; - import java.util.zip.GZIPInputStream; - import org.objectweb.asm.ClassReader; - import org.objectweb.asm.ClassVisitor; - import org.objectweb.asm.ClassWriter; -+import org.objectweb.asm.FieldVisitor; - import org.objectweb.asm.Handle; -+import org.objectweb.asm.Label; - import org.objectweb.asm.MethodVisitor; -+import org.objectweb.asm.ModuleVisitor; - import org.objectweb.asm.Opcodes; - import org.objectweb.asm.Type; - -@@ -57,6 +68,12 @@ import org.objectweb.asm.Type; - */ - public class Retrofitter { - -+ /** The name of the module-info file. */ -+ private static final String MODULE_INFO = "module-info.class"; -+ -+ /** The name of the java.base module. */ -+ private static final String JAVA_BASE_MODULE = "java.base"; -+ - /** - * The fields and methods of the JDK 1.5 API. Each string has the form - * "<owner><name><descriptor>". -@@ -68,12 +85,158 @@ public class Retrofitter { - */ - private final HashMap jdkHierarchy = new HashMap<>(); - -+ /** The internal names of the packages exported by the retrofitted classes. */ -+ private final HashSet exports = new HashSet<>(); -+ -+ /** The internal names of the packages imported by the retrofitted classes. */ -+ private final HashSet imports = new HashSet<>(); -+ -+ /** -+ * Transforms the class files in the given directory, in place, in order to make them compatible -+ * with the JDK 1.5. Also generates a module-info class in this directory, with the given module -+ * version. -+ * -+ * @param args a directory containing compiled classes and the ASM release version. -+ * @throws IOException if a file can't be read or written. -+ */ -+ public static void main(final String[] args) throws IOException { -+ if (args.length == 2) { -+ new Retrofitter().retrofit(new File(args[0]), args[1]); -+ } else { -+ System.err.println("Usage: Retrofitter "); // NOPMD -+ } -+ } -+ -+ /** -+ * Transforms the class files in the given directory, in place, in order to make them compatible -+ * with the JDK 1.5. Also generates a module-info class in this directory, with the given module -+ * version. -+ * -+ * @param classesDir a directory containing compiled classes. -+ * @param version the module-info version. -+ * @throws IOException if a file can't be read or written. -+ */ -+ public void retrofit(final File classesDir, final String version) throws IOException { -+ for (File classFile : getAllClasses(classesDir, new ArrayList())) { -+ ClassReader classReader = new ClassReader(Files.newInputStream(classFile.toPath())); -+ ClassWriter classWriter = new ClassWriter(0); -+ classReader.accept(new ClassRetrofitter(classWriter), ClassReader.SKIP_FRAMES); -+ Files.write(classFile.toPath(), classWriter.toByteArray()); -+ } -+ generateModuleInfoClass(classesDir, version); -+ } -+ - /** -- * Constructs a new {@link Retrofitter}. -+ * Verify that the class files in the given directory only use JDK 1.5 APIs, and that a -+ * module-info class is present with the expected content. - * -- * @throws IOException if the JDK API description file can't be read. -+ * @param classesDir a directory containing compiled classes. -+ * @param expectedVersion the expected module-info version. -+ * @param expectedExports the expected module-info exported packages. -+ * @param expectedRequires the expected module-info required modules. -+ * @throws IOException if a file can't be read. -+ * @throws IllegalArgumentException if the module-info class does not have the expected content. - */ -- public Retrofitter() throws IOException { -+ public void verify( -+ final File classesDir, -+ final String expectedVersion, -+ final List expectedExports, -+ final List expectedRequires) -+ throws IOException { -+ if (jdkApi.isEmpty()) { -+ readJdkApi(); -+ } -+ for (File classFile : getAllClasses(classesDir, new ArrayList())) { -+ if (!classFile.getName().equals(MODULE_INFO)) { -+ new ClassReader(Files.newInputStream(classFile.toPath())).accept(new ClassVerifier(), 0); -+ } -+ } -+ verifyModuleInfoClass( -+ classesDir, -+ expectedVersion, -+ new HashSet(expectedExports), -+ Stream.concat(expectedRequires.stream(), Stream.of(JAVA_BASE_MODULE)).collect(toSet())); -+ } -+ -+ private List getAllClasses(final File file, final List allClasses) -+ throws IOException { -+ if (file.isDirectory()) { -+ File[] children = file.listFiles(); -+ if (children == null) { -+ throw new IOException("Unable to read files of " + file); -+ } -+ for (File child : children) { -+ getAllClasses(child, allClasses); -+ } -+ } else if (file.getName().endsWith(".class")) { -+ allClasses.add(file); -+ } -+ return allClasses; -+ } -+ -+ private void generateModuleInfoClass(final File dstDir, final String version) throws IOException { -+ ClassWriter classWriter = new ClassWriter(0); -+ classWriter.visit(Opcodes.V9, Opcodes.ACC_MODULE, "module-info", null, null, null); -+ ArrayList moduleNames = new ArrayList<>(); -+ for (String exportName : exports) { -+ if (isAsmModule(exportName)) { -+ moduleNames.add(exportName); -+ } -+ } -+ if (moduleNames.size() != 1) { -+ throw new IllegalArgumentException("Module name can't be infered from classes"); -+ } -+ ModuleVisitor moduleVisitor = -+ classWriter.visitModule(moduleNames.get(0), Opcodes.ACC_OPEN, version); -+ -+ for (String importName : imports) { -+ if (isAsmModule(importName) && !exports.contains(importName)) { -+ moduleVisitor.visitRequire(importName.replace('/', '.'), Opcodes.ACC_TRANSITIVE, null); -+ } -+ } -+ moduleVisitor.visitRequire(JAVA_BASE_MODULE, Opcodes.ACC_MANDATED, null); -+ -+ for (String exportName : exports) { -+ moduleVisitor.visitExport(exportName, 0); -+ } -+ moduleVisitor.visitEnd(); -+ classWriter.visitEnd(); -+ Files.write(Path.of(dstDir.getAbsolutePath(), MODULE_INFO), classWriter.toByteArray()); -+ } -+ -+ private void verifyModuleInfoClass( -+ final File dstDir, -+ final String expectedVersion, -+ final Set expectedExports, -+ final Set expectedRequires) -+ throws IOException { -+ ModuleDescriptor module = -+ ModuleDescriptor.read(Files.newInputStream(Path.of(dstDir.getAbsolutePath(), MODULE_INFO))); -+ String version = module.version().map(ModuleDescriptor.Version::toString).orElse(""); -+ if (!version.equals(expectedVersion)) { -+ throw new IllegalArgumentException( -+ format("Wrong module-info version '%s' (expected '%s')", version, expectedVersion)); -+ } -+ Set exports = -+ module.exports().stream().map(ModuleDescriptor.Exports::source).collect(toSet()); -+ if (!exports.equals(expectedExports)) { -+ throw new IllegalArgumentException( -+ format("Wrong module-info exports %s (expected %s)", exports, expectedExports)); -+ } -+ Set requires = -+ module.requires().stream().map(ModuleDescriptor.Requires::name).collect(toSet()); -+ if (!requires.equals(expectedRequires)) { -+ throw new IllegalArgumentException( -+ format("Wrong module-info requires %s (expected %s)", requires, expectedRequires)); -+ } -+ } -+ -+ private static boolean isAsmModule(final String packageName) { -+ return packageName.startsWith("org/objectweb/asm") -+ && !packageName.equals("org/objectweb/asm/signature"); -+ } -+ -+ private void readJdkApi() throws IOException { - try (InputStream inputStream = - new GZIPInputStream( - Retrofitter.class.getClassLoader().getResourceAsStream("jdk1.5.0.12.txt.gz")); -@@ -97,56 +260,8 @@ public class Retrofitter { - } - } - -- /** -- * Transforms the source class file, or if it is a directory, its files (recursively), in place, -- * in order to make them compatible with the JDK 1.5. -- * -- * @param src source file or directory. -- * @throws IOException if the source files can't be read or written. -- */ -- public void retrofit(final File src) throws IOException { -- retrofit(src, null); -- } -- -- /** -- * Transforms the source class file, or if it is a directory, its files (recursively), either in -- * place or into the destination file or directory, in order to make them compatible with the JDK -- * 1.5. -- * -- * @param src source file or directory. -- * @param dst optional destination file or directory. -- * @throws IOException if the source or destination file can't be read or written. -- */ -- public void retrofit(final File src, final File dst) throws IOException { -- if (src.isDirectory()) { -- File[] files = src.listFiles(); -- if (files == null) { -- throw new IOException("Unable to read files of " + src); -- } -- for (File file : files) { -- retrofit(file, dst == null ? null : new File(dst, file.getName())); -- } -- } else if (src.getName().endsWith(".class")) { -- if (dst == null || !dst.exists() || dst.lastModified() < src.lastModified()) { -- ClassReader classReader = new ClassReader(Files.newInputStream(src.toPath())); -- ClassWriter classWriter = new ClassWriter(0); -- ClassVerifier classVerifier = new ClassVerifier(classWriter); -- ClassRetrofitter classRetrofitter = new ClassRetrofitter(classVerifier); -- classReader.accept(classRetrofitter, ClassReader.SKIP_FRAMES); -- -- if (dst != null && !dst.getParentFile().exists() && !dst.getParentFile().mkdirs()) { -- throw new IOException("Cannot create directory " + dst.getParentFile()); -- } -- try (OutputStream outputStream = -- Files.newOutputStream((dst == null ? src : dst).toPath())) { -- outputStream.write(classWriter.toByteArray()); -- } -- } -- } -- } -- - /** A ClassVisitor that retrofits classes to 1.5 version. */ -- static class ClassRetrofitter extends ClassVisitor { -+ class ClassRetrofitter extends ClassVisitor { - - public ClassRetrofitter(final ClassVisitor classVisitor) { - super(/* latest api =*/ Opcodes.ASM8, classVisitor); -@@ -160,9 +275,21 @@ public class Retrofitter { - final String signature, - final String superName, - final String[] interfaces) { -+ addPackageReferences(Type.getObjectType(name), /* export = */ true); - super.visit(Opcodes.V1_5, access, name, signature, superName, interfaces); - } - -+ @Override -+ public FieldVisitor visitField( -+ final int access, -+ final String name, -+ final String descriptor, -+ final String signature, -+ final Object value) { -+ addPackageReferences(Type.getType(descriptor), /* export = */ false); -+ return super.visitField(access, name, descriptor, signature, value); -+ } -+ - @Override - public MethodVisitor visitMethod( - final int access, -@@ -170,9 +297,17 @@ public class Retrofitter { - final String descriptor, - final String signature, - final String[] exceptions) { -+ addPackageReferences(Type.getType(descriptor), /* export = */ false); - return new MethodVisitor( - api, super.visitMethod(access, name, descriptor, signature, exceptions)) { - -+ @Override -+ public void visitFieldInsn( -+ final int opcode, final String owner, final String name, final String descriptor) { -+ addPackageReferences(Type.getType(descriptor), /* export = */ false); -+ super.visitFieldInsn(opcode, owner, name, descriptor); -+ } -+ - @Override - public void visitMethodInsn( - final int opcode, -@@ -180,6 +315,7 @@ public class Retrofitter { - final String name, - final String descriptor, - final boolean isInterface) { -+ addPackageReferences(Type.getType(descriptor), /* export = */ false); - // Remove the addSuppressed() method calls generated for try-with-resources statements. - // This method is not defined in JDK1.5. - if (owner.equals("java/lang/Throwable") -@@ -190,8 +326,52 @@ public class Retrofitter { - super.visitMethodInsn(opcode, owner, name, descriptor, isInterface); - } - } -+ -+ @Override -+ public void visitTypeInsn(final int opcode, final String type) { -+ addPackageReferences(Type.getObjectType(type), /* export = */ false); -+ super.visitTypeInsn(opcode, type); -+ } -+ -+ @Override -+ public void visitMultiANewArrayInsn(final String descriptor, final int numDimensions) { -+ addPackageReferences(Type.getType(descriptor), /* export = */ false); -+ super.visitMultiANewArrayInsn(descriptor, numDimensions); -+ } -+ -+ @Override -+ public void visitTryCatchBlock( -+ final Label start, final Label end, final Label handler, final String type) { -+ if (type != null) { -+ addPackageReferences(Type.getObjectType(type), /* export = */ false); -+ } -+ super.visitTryCatchBlock(start, end, handler, type); -+ } - }; - } -+ -+ private void addPackageReferences(final Type type, final boolean export) { -+ switch (type.getSort()) { -+ case Type.ARRAY: -+ addPackageReferences(type.getElementType(), export); -+ break; -+ case Type.METHOD: -+ for (Type argumentType : type.getArgumentTypes()) { -+ addPackageReferences(argumentType, export); -+ } -+ addPackageReferences(type.getReturnType(), export); -+ break; -+ case Type.OBJECT: -+ String internalName = type.getInternalName(); -+ int lastSlashIndex = internalName.lastIndexOf('/'); -+ if (lastSlashIndex != -1) { -+ (export ? exports : imports).add(internalName.substring(0, lastSlashIndex)); -+ } -+ break; -+ default: -+ break; -+ } -+ } - } - - /** -@@ -199,18 +379,18 @@ public class Retrofitter { - */ - class ClassVerifier extends ClassVisitor { - -- /** The name of the visited class. */ -+ /** The internal name of the visited class. */ - String className; - - /** The name of the currently visited method. */ - String currentMethodName; - -- public ClassVerifier(final ClassVisitor classVisitor) { -+ public ClassVerifier() { - // Make sure use we don't use Java 9 or higher classfile features. - // We also want to make sure we don't use Java 6, 7 or 8 classfile - // features (invokedynamic), but this can't be done in the same way. - // Instead, we use manual checks below. -- super(Opcodes.ASM4, classVisitor); -+ super(Opcodes.ASM4, null); - } - - @Override -@@ -222,10 +402,9 @@ public class Retrofitter { - final String superName, - final String[] interfaces) { - if ((version & 0xFFFF) > Opcodes.V1_5) { -- throw new IllegalArgumentException("ERROR: " + name + " version is newer than 1.5"); -+ throw new IllegalArgumentException(format("ERROR: %d version is newer than 1.5", version)); - } - className = name; -- super.visit(version, access, name, signature, superName, interfaces); - } - - @Override -@@ -243,7 +422,6 @@ public class Retrofitter { - public void visitFieldInsn( - final int opcode, final String owner, final String name, final String descriptor) { - check(owner, name); -- super.visitFieldInsn(opcode, owner, name, descriptor); - } - - @Override -@@ -254,7 +432,6 @@ public class Retrofitter { - final String descriptor, - final boolean isInterface) { - check(owner, name + descriptor); -- super.visitMethodInsn(opcode, owner, name, descriptor, isInterface); - } - - @Override -@@ -263,21 +440,16 @@ public class Retrofitter { - int sort = ((Type) value).getSort(); - if (sort == Type.METHOD) { - throw new IllegalArgumentException( -- "ERROR: ldc with a MethodType called in " -- + className -- + ' ' -- + currentMethodName -- + " is not available in JDK 1.5"); -+ format( -+ "ERROR: ldc with a MethodType called in %s %s is not available in JDK 1.5", -+ className, currentMethodName)); - } - } else if (value instanceof Handle) { - throw new IllegalArgumentException( -- "ERROR: ldc with a MethodHandle called in " -- + className -- + ' ' -- + currentMethodName -- + " is not available in JDK 1.5"); -+ format( -+ "ERROR: ldc with a MethodHandle called in %s %s is not available in JDK 1.5", -+ className, currentMethodName)); - } -- super.visitLdcInsn(value); - } - - @Override -@@ -287,11 +459,9 @@ public class Retrofitter { - final Handle bootstrapMethodHandle, - final Object... bootstrapMethodArguments) { - throw new IllegalArgumentException( -- "ERROR: invokedynamic called in " -- + className -- + ' ' -- + currentMethodName -- + " is not available in JDK 1.5"); -+ format( -+ "ERROR: invokedynamic called in %s %s is not available in JDK 1.5", -+ className, currentMethodName)); - } - }; - } -@@ -302,7 +472,7 @@ public class Retrofitter { - * @param owner A class name. - * @param member A field name or a method name and descriptor. - */ -- void check(final String owner, final String member) { -+ private void check(final String owner, final String member) { - if (owner.startsWith("java/")) { - String currentOwner = owner; - while (currentOwner != null) { -@@ -312,15 +482,9 @@ public class Retrofitter { - currentOwner = jdkHierarchy.get(currentOwner); - } - throw new IllegalArgumentException( -- "ERROR: " -- + owner -- + ' ' -- + member -- + " called in " -- + className -- + ' ' -- + currentMethodName -- + " is not defined in the JDK 1.5 API"); -+ format( -+ "ERROR: %s %s called in %s %s is not defined in the JDK 1.5 API", -+ owner, member, className, currentMethodName)); - } - } - } --- -2.37.1 - diff --git a/0002-Replace-slash-for-dot-in-generated-module-infos.patch b/0002-Replace-slash-for-dot-in-generated-module-infos.patch deleted file mode 100644 index 3b7faba..0000000 --- a/0002-Replace-slash-for-dot-in-generated-module-infos.patch +++ /dev/null @@ -1,27 +0,0 @@ -From b4a0366b3c17fcc0d8187cffbcdd2e1bd61ab0fb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Mari=C3=A1n=20Kon=C4=8Dek?= -Date: Fri, 2 Sep 2022 09:41:23 +0200 -Subject: [PATCH] Replace slash for dot in generated module infos - -Forwarded: no - ---- - .../src/main/java/org/objectweb/asm/tools/Retrofitter.java | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/retrofitter/src/main/java/org/objectweb/asm/tools/Retrofitter.java b/tools/retrofitter/src/main/java/org/objectweb/asm/tools/Retrofitter.java -index b3d51e63..43002cea 100644 ---- a/tools/retrofitter/src/main/java/org/objectweb/asm/tools/Retrofitter.java -+++ b/tools/retrofitter/src/main/java/org/objectweb/asm/tools/Retrofitter.java -@@ -187,7 +187,7 @@ public class Retrofitter { - throw new IllegalArgumentException("Module name can't be infered from classes"); - } - ModuleVisitor moduleVisitor = -- classWriter.visitModule(moduleNames.get(0), Opcodes.ACC_OPEN, version); -+ classWriter.visitModule(moduleNames.get(0).replace('/', '.'), Opcodes.ACC_OPEN, version); - - for (String importName : imports) { - if (isAsmModule(importName) && !exports.contains(importName)) { --- -2.37.2 - diff --git a/parent.pom b/aggregator.pom similarity index 84% rename from parent.pom rename to aggregator.pom index 83012ff..f267e26 100644 --- a/parent.pom +++ b/aggregator.pom @@ -3,10 +3,9 @@ xsi:schemaLocation='http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd'> 4.0.0 - org.ow2.asm - asm-aggregator - - + org.fedoraproject.xmvn.objectweb-asm + aggregator + any pom @@ -25,6 +24,10 @@ + org.apache.maven.plugins maven-antrun-plugin diff --git a/changelog b/changelog new file mode 100644 index 0000000..2f5cd2a --- /dev/null +++ b/changelog @@ -0,0 +1,309 @@ +* Thu Jul 18 2024 Fedora Release Engineering - 9.6-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Tue Feb 27 2024 Jiri Vanek - 9.6-5 +- Rebuilt for java-21-openjdk as system jdk + +* Fri Feb 23 2024 Jiri Vanek - 9.6-4 +- bump of release for for java-21-openjdk as system jdk + +* Thu Jan 25 2024 Fedora Release Engineering - 9.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 9.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Dec 11 2023 Marian Koncek - 9.6-1 +- Update to upstream version 9.6 + +* Fri Sep 01 2023 Mikolaj Izdebski - 9.5-3 +- Convert License tag to SPDX format + +* Thu Jul 20 2023 Fedora Release Engineering - 9.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Mon Jun 05 2023 Marian Koncek - 9.5-1 +- Update to upstream version 9.5 + +* Thu Feb 23 2023 Marian Koncek - 9.4-1 +- Update to upstream version 9.4 + +* Thu Jan 19 2023 Fedora Release Engineering - 9.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Sep 02 2022 Marian Koncek - 9.3-4 +- Fix wrong generated module infos + +* Mon Aug 29 2022 Marian Koncek - 9.3-3 +- Generate module-info without bnd-plugin +- Resolves: rhbz#2106272 + +* Fri Jul 22 2022 Fedora Release Engineering - 9.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon May 09 2022 Mikolaj Izdebski - 9.3-1 +- Update to upstream version 9.3 + +* Sat Feb 05 2022 Jiri Vanek - 9.2-3 +- Rebuilt for java-17-openjdk as system jdk + +* Thu Jan 20 2022 Fedora Release Engineering - 9.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Tue Nov 02 2021 Mikolaj Izdebski - 9.2-1 +- Update to upstream version 9.2 + +* Thu Jul 22 2021 Fedora Release Engineering - 9.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon May 17 2021 Mikolaj Izdebski - 9.1-2 +- Bootstrap build +- Non-bootstrap build + +* Fri May 14 2021 Marian Koncek - 9.1-1 +- Update to upstream version 9.1 + +* Fri Feb 19 2021 Mat Booth - 9.1-1 +- Update to latest upstream release + +* Tue Jan 26 2021 Fedora Release Engineering - 8.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Fri Sep 25 2020 Marian Koncek - 9.0-1 +- Update to upstream version 9.0 + +* Fri Aug 14 2020 Jerry James - 8.0.1-1 +- Version 8.0.1 +- Add 0002-Catch-CompileException-in-test.patch to fix compilation of a test +- Make generate-tarball.sh actually compress the tarball + +* Tue Jul 28 2020 Fedora Release Engineering - 7.3.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sat Jul 11 2020 Jiri Vanek - 7.3.1-3 +- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 + +* Mon Jun 22 2020 Marian Koncek - 8.0.1-1 +- Update to upstream version 8.0.1 + +* Wed May 06 2020 Mat Booth - 7.3.1-2 +- Revert an upstream change to prevent breaking API change + +* Thu Feb 27 2020 Jayashree Huttanagoudat - 7.3.1-1 +- Upgraded to upstream version 7.3.1. + +* Wed Jan 29 2020 Fedora Release Engineering - 7.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Jan 21 2020 Marian Koncek - 7.3.1-1 +- Update to upstream version 7.3.1 + +* Tue Nov 05 2019 Mikolaj Izdebski - 7.2-2 +- Mass rebuild for javapackages-tools 201902 + +* Thu Oct 17 2019 Marian Koncek - 7.2-1 +- Update to upstream version 7.2 + +* Thu Jul 25 2019 Fedora Release Engineering - 7.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri May 24 2019 Mikolaj Izdebski - 7.1-2 +- Mass rebuild for javapackages-tools 201901 + +* Mon May 06 2019 Severin Gehwolf - 7.1-1 +- Update to latest upstream 7.1 release. + +* Fri Feb 01 2019 Fedora Release Engineering - 7.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Nov 21 2018 Severin Gehwolf - 7.0-1 +- Update to latest upstream 7.0 release. +- Removes package asm-xml (deprecated since 6.1). + +* Tue Sep 11 2018 Mat Booth - 6.2.1-1 +- Update to latest upstream release +- Fix test suite execution + +* Fri Aug 03 2018 Michael Simacek - 6.2-5 +- Repack the tarball without binaries + +* Wed Aug 01 2018 Severin Gehwolf - 6.2-4 +- Explicitly require javapackages-tools for asm-processor script + which uses java-functions. + +* Wed Aug 01 2018 Severin Gehwolf - 6.2-3 +- Allow conditionally building without OSGi + metadata. + +* Fri Jul 13 2018 Fedora Release Engineering - 6.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon Jul 02 2018 Michael Simacek - 6.2-1 +- Update to upstream version 6.2 + +* Sat Jun 30 2018 Mikolaj Izdebski - 6.1.1-4 +- Relax versioned self-build-requirement a bit + +* Fri Jun 29 2018 Mikolaj Izdebski - 6.1.1-3 +- Add objectweb-asm to BND pluginpath + +* Thu Jun 28 2018 Mikolaj Izdebski - 6.1.1-2 +- Allow conditionally building without junit5 + +* Wed Apr 25 2018 Mat Booth - 6.1.1-1 +- Update to latest upstream relase for Java 10 support +- Switch to maven build +- Now executing test suites + +* Thu Feb 08 2018 Fedora Release Engineering - 6.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Mon Sep 25 2017 Michael Simacek - 6.0-1 +- Update to upstream version 6.0 + +* Tue Sep 12 2017 Mikolaj Izdebski - 6.0-0.2.beta +- Fix invalid OSGi metadata +- Resolves: rhbz#1490817 + +* Mon Sep 11 2017 Mikolaj Izdebski - 6.0-0.1.beta +- Update to upstream version 6.0 beta + +* Thu Jul 27 2017 Fedora Release Engineering - 5.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 5.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Oct 10 2016 Mikolaj Izdebski - 5.1-6 +- Use OSGi API JARs to run BND classpath, instead of Eclipse + +* Sat Sep 24 2016 Mikolaj Izdebski - 5.1-5 +- Update to current packaging guidelines +- Remove obsoletes and provides for objectweb-asm4 + +* Wed Jun 15 2016 Mikolaj Izdebski - 5.1-4 +- Add missing build-requires + +* Wed Jun 1 2016 Mikolaj Izdebski - 5.1-3 +- Avoid calling XMvn from build-classpath + +* Tue May 31 2016 Mikolaj Izdebski - 5.1-2 +- Add missing JARs to BND classpath + +* Thu Mar 24 2016 Mikolaj Izdebski - 5.1-1 +- Update to upstream version 5.1 + +* Thu Feb 04 2016 Fedora Release Engineering - 5.0.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Aug 06 2015 Michael Simacek - 5.0.4-1 +- Update to upstream version 5.0.4 + +* Wed Jun 17 2015 Fedora Release Engineering - 5.0.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sun Jul 20 2014 Mikolaj Izdebski - 5.0.3-1 +- Update to upstream version 5.0.3 + +* Sat Jun 07 2014 Fedora Release Engineering - 5.0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon May 5 2014 Mikolaj Izdebski - 5.0.2-1 +- Update to upstream version 5.0.2 + +* Mon Apr 14 2014 Mat Booth - 5.0.1-2 +- SCL-ize package. +- Fix bogus dates in changelog. + +* Mon Mar 24 2014 Mikolaj Izdebski - 5.0.1-1 +- Update to upstream version 5.0.1 + +* Wed Mar 19 2014 Mikolaj Izdebski - 5.0-0.3.beta +- Enable asm-debug-all module + +* Mon Jan 20 2014 Mikolaj Izdebski - 5.0-0.2.beta +- Remove Eclipse Orbit alias + +* Tue Dec 3 2013 Mikolaj Izdebski - 5.0-0.1.beta +- Update to 5.0 beta + +* Sat Aug 03 2013 Fedora Release Engineering - 0:3.3.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Mar 6 2013 Mikolaj Izdebski - 0:3.3.1-7 +- Make jetty orbit depmap point to asm-all jar +- Resolves: rhbz#917625 + +* Mon Mar 4 2013 Mikolaj Izdebski - 0:3.3.1-6 +- Add depmap for org.eclipse.jetty.orbit +- Resolves: rhbz#917625 + +* Thu Feb 14 2013 Fedora Release Engineering - 0:3.3.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Fri Jul 20 2012 Fedora Release Engineering - 0:3.3.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 0:3.3.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Fri Sep 16 2011 Alexander Kurtakov 0:3.3.1-2 +- Use poms produced by the build not foreign ones. +- Adpat to current guidelines. + +* Mon Apr 04 2011 Chris Aniszczyk 0:3.3.1 +- Upgrade to 3.3.1 + +* Tue Feb 08 2011 Fedora Release Engineering - 0:3.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Jul 13 2010 Orion Poplawski 0:3.2.1-2 +- Change depmap parent id to asm (bug #606659) + +* Thu Apr 15 2010 Fernando Nasser 0:3.2.1 +- Upgrade to 3.2 + +* Sat Jul 25 2009 Fedora Release Engineering - 0:3.1-7.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Fedora Release Engineering - 0:3.1-6.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Thu Oct 23 2008 David Walluck 0:3.1-5.1 +- build for Fedora + +* Thu Oct 23 2008 David Walluck 0:3.1-5 +- add OSGi manifest (Alexander Kurtakov) + +* Mon Oct 20 2008 David Walluck 0:3.1-4 +- remove Class-Path from MANIFEST.MF +- add unversioned javadoc symlink +- remove javadoc scriptlets +- fix directory ownership +- remove build requirement on dos2unix + +* Fri Feb 08 2008 Ralph Apel - 0:3.1-3jpp +- Add poms and depmap frags with groupId of org.objectweb.asm ! +- Add asm-all.jar +- Add -javadoc Requires post and postun +- Restore Vendor, Distribution + +* Thu Nov 22 2007 Fernando Nasser - 0:3.1-2jpp +- Fix EOL of txt files +- Add dependency on jaxp + +* Thu Nov 22 2007 Fernando Nasser - 0:3.1-1jpp +- Upgrade to 3.1 + +* Wed Aug 22 2007 Fernando Nasser - 0:3.0-1jpp +- Upgrade to 3.0 +- Rename to include objectweb- prefix as requested by ObjectWeb + +* Thu Jan 05 2006 Fernando Nasser - 0:2.1-2jpp +- First JPP 1.7 build + +* Thu Oct 06 2005 Ralph Apel 0:2.1-1jpp +- Upgrade to 2.1 + +* Fri Mar 11 2005 Sebastiano Vigna 0:2.0.RC1-1jpp +- First release of the 2.0 line. diff --git a/objectweb-asm.spec b/objectweb-asm.spec index 4fdf808..27e6805 100644 --- a/objectweb-asm.spec +++ b/objectweb-asm.spec @@ -1,17 +1,17 @@ %bcond_with bootstrap Name: objectweb-asm -Version: 9.3 -Release: 5%{?dist} +Version: 9.7.1 +Release: %autorelease Summary: Java bytecode manipulation and analysis framework -License: BSD +License: BSD-3-Clause URL: https://asm.ow2.org/ BuildArch: noarch ExclusiveArch: %{java_arches} noarch # ./generate-tarball.sh Source0: %{name}-%{version}.tar.gz -Source1: parent.pom +Source1: aggregator.pom Source2: https://repo1.maven.org/maven2/org/ow2/asm/asm/%{version}/asm-%{version}.pom Source3: https://repo1.maven.org/maven2/org/ow2/asm/asm-analysis/%{version}/asm-analysis-%{version}.pom Source4: https://repo1.maven.org/maven2/org/ow2/asm/asm-commons/%{version}/asm-commons-%{version}.pom @@ -22,27 +22,17 @@ Source7: https://repo1.maven.org/maven2/org/ow2/asm/asm-util/%{version}/a Source9: generate-tarball.sh Source10: tools-retrofitter.pom -# This patch makes it possible to generate module-info.class files without -# needing to use bnd-maven-plugin during the build. The replacement is an added -# main method that has to be invoked manually. -# Patch already applied in upstream master -# https://gitlab.ow2.org/asm/asm/-/commit/5921eb2a141f0dcc83c6a5d7dcd5035a30c5edfc -Patch1: 0001-Generate-the-module-info-classes-without-Bnd.-Delete.patch - -# Attempted fix for: https://gitlab.ow2.org/asm/asm/-/issues/317983 -Patch2: 0002-Replace-slash-for-dot-in-generated-module-infos.patch +Patch: 0001-Add-support-of-Java-25.patch %if %{with bootstrap} BuildRequires: javapackages-bootstrap %else -BuildRequires: maven-local +BuildRequires: maven-local-openjdk25 BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) BuildRequires: mvn(org.ow2.asm:asm) %endif - -# Explicit javapackages-tools requires since asm-processor script uses -# /usr/share/java-utils/java-functions -Requires: javapackages-tools +# TODO Remove in Fedora 46 +Obsoletes: %{name}-javadoc < 9.7.1-9 %description ASM is an all purpose Java bytecode manipulation and analysis @@ -51,330 +41,38 @@ generate classes, directly in binary form. Provided common transformations and analysis algorithms allow to easily assemble custom complex transformations and code analysis tools. -%package javadoc -Summary: API documentation for %{name} - -%description javadoc -This package provides %{summary}. - %prep -%setup -q +%autosetup -p1 -C -%patch1 -p1 -%patch2 -p1 - -# A custom parent pom to aggregate the build +# A custom pom to aggregate the build cp -p %{SOURCE1} pom.xml -%pom_xpath_set pom:project/pom:version %{version} cp -p %{SOURCE10} tools/retrofitter/pom.xml # Insert poms into modules for pom in asm asm-analysis asm-commons asm-test asm-tree asm-util; do cp -p ${RPM_SOURCE_DIR}/${pom}-%{version}.pom ${pom}/pom.xml - %pom_add_dep org.ow2.asm:tools-retrofitter::provided ${pom} + %pom_add_dep org.fedoraproject.xmvn.objectweb-asm:tools-retrofitter::provided ${pom} %pom_add_plugin org.apache.maven.plugins:maven-antrun-plugin ${pom} - %pom_set_parent org.ow2.asm:asm-aggregator:%{version} ${pom} + %pom_set_parent org.fedoraproject.xmvn.objectweb-asm:aggregator:any ${pom} %pom_xpath_inject pom:parent '..' ${pom} done +# Don't ship poms used for build only +%mvn_package :aggregator __noinstall +%mvn_package :tools-retrofitter __noinstall + # Don't ship the test framework to avoid runtime dep on junit %mvn_package :asm-test __noinstall -%mvn_package :tools-retrofitter __noinstall - %build -%mvn_build -f -- -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8 +%mvn_build -j -f -- -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8 %install %mvn_install -%jpackage_script org.objectweb.asm.xml.Processor "" "" %{name}/asm:%{name}/asm-attrs:%{name}/asm-util %{name}-processor true - %files -f .mfiles %license LICENSE.txt -%{_bindir}/%{name}-processor - -%files javadoc -f .mfiles-javadoc -%license LICENSE.txt %changelog -* Thu Jan 19 2023 Fedora Release Engineering - 9.3-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Fri Sep 02 2022 Marian Koncek - 9.3-4 -- Fix wrong generated module infos - -* Mon Aug 29 2022 Marian Koncek - 9.3-3 -- Generate module-info without bnd-plugin -- Resolves: rhbz#2106272 - -* Fri Jul 22 2022 Fedora Release Engineering - 9.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Mon May 09 2022 Mikolaj Izdebski - 9.3-1 -- Update to upstream version 9.3 - -* Sat Feb 05 2022 Jiri Vanek - 9.2-3 -- Rebuilt for java-17-openjdk as system jdk - -* Thu Jan 20 2022 Fedora Release Engineering - 9.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Tue Nov 02 2021 Mikolaj Izdebski - 9.2-1 -- Update to upstream version 9.2 - -* Thu Jul 22 2021 Fedora Release Engineering - 9.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Mon May 17 2021 Mikolaj Izdebski - 9.1-2 -- Bootstrap build -- Non-bootstrap build - -* Fri May 14 2021 Marian Koncek - 9.1-1 -- Update to upstream version 9.1 - -* Fri Feb 19 2021 Mat Booth - 9.1-1 -- Update to latest upstream release - -* Tue Jan 26 2021 Fedora Release Engineering - 8.0.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Fri Sep 25 2020 Marian Koncek - 9.0-1 -- Update to upstream version 9.0 - -* Fri Aug 14 2020 Jerry James - 8.0.1-1 -- Version 8.0.1 -- Add 0002-Catch-CompileException-in-test.patch to fix compilation of a test -- Make generate-tarball.sh actually compress the tarball - -* Tue Jul 28 2020 Fedora Release Engineering - 7.3.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Sat Jul 11 2020 Jiri Vanek - 7.3.1-3 -- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 - -* Mon Jun 22 2020 Marian Koncek - 8.0.1-1 -- Update to upstream version 8.0.1 - -* Wed May 06 2020 Mat Booth - 7.3.1-2 -- Revert an upstream change to prevent breaking API change - -* Thu Feb 27 2020 Jayashree Huttanagoudat - 7.3.1-1 -- Upgraded to upstream version 7.3.1. - -* Wed Jan 29 2020 Fedora Release Engineering - 7.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Tue Jan 21 2020 Marian Koncek - 7.3.1-1 -- Update to upstream version 7.3.1 - -* Tue Nov 05 2019 Mikolaj Izdebski - 7.2-2 -- Mass rebuild for javapackages-tools 201902 - -* Thu Oct 17 2019 Marian Koncek - 7.2-1 -- Update to upstream version 7.2 - -* Thu Jul 25 2019 Fedora Release Engineering - 7.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri May 24 2019 Mikolaj Izdebski - 7.1-2 -- Mass rebuild for javapackages-tools 201901 - -* Mon May 06 2019 Severin Gehwolf - 7.1-1 -- Update to latest upstream 7.1 release. - -* Fri Feb 01 2019 Fedora Release Engineering - 7.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Wed Nov 21 2018 Severin Gehwolf - 7.0-1 -- Update to latest upstream 7.0 release. -- Removes package asm-xml (deprecated since 6.1). - -* Tue Sep 11 2018 Mat Booth - 6.2.1-1 -- Update to latest upstream release -- Fix test suite execution - -* Fri Aug 03 2018 Michael Simacek - 6.2-5 -- Repack the tarball without binaries - -* Wed Aug 01 2018 Severin Gehwolf - 6.2-4 -- Explicitly require javapackages-tools for asm-processor script - which uses java-functions. - -* Wed Aug 01 2018 Severin Gehwolf - 6.2-3 -- Allow conditionally building without OSGi - metadata. - -* Fri Jul 13 2018 Fedora Release Engineering - 6.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Mon Jul 02 2018 Michael Simacek - 6.2-1 -- Update to upstream version 6.2 - -* Sat Jun 30 2018 Mikolaj Izdebski - 6.1.1-4 -- Relax versioned self-build-requirement a bit - -* Fri Jun 29 2018 Mikolaj Izdebski - 6.1.1-3 -- Add objectweb-asm to BND pluginpath - -* Thu Jun 28 2018 Mikolaj Izdebski - 6.1.1-2 -- Allow conditionally building without junit5 - -* Wed Apr 25 2018 Mat Booth - 6.1.1-1 -- Update to latest upstream relase for Java 10 support -- Switch to maven build -- Now executing test suites - -* Thu Feb 08 2018 Fedora Release Engineering - 6.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Mon Sep 25 2017 Michael Simacek - 6.0-1 -- Update to upstream version 6.0 - -* Tue Sep 12 2017 Mikolaj Izdebski - 6.0-0.2.beta -- Fix invalid OSGi metadata -- Resolves: rhbz#1490817 - -* Mon Sep 11 2017 Mikolaj Izdebski - 6.0-0.1.beta -- Update to upstream version 6.0 beta - -* Thu Jul 27 2017 Fedora Release Engineering - 5.1-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Sat Feb 11 2017 Fedora Release Engineering - 5.1-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Mon Oct 10 2016 Mikolaj Izdebski - 5.1-6 -- Use OSGi API JARs to run BND classpath, instead of Eclipse - -* Sat Sep 24 2016 Mikolaj Izdebski - 5.1-5 -- Update to current packaging guidelines -- Remove obsoletes and provides for objectweb-asm4 - -* Wed Jun 15 2016 Mikolaj Izdebski - 5.1-4 -- Add missing build-requires - -* Wed Jun 1 2016 Mikolaj Izdebski - 5.1-3 -- Avoid calling XMvn from build-classpath - -* Tue May 31 2016 Mikolaj Izdebski - 5.1-2 -- Add missing JARs to BND classpath - -* Thu Mar 24 2016 Mikolaj Izdebski - 5.1-1 -- Update to upstream version 5.1 - -* Thu Feb 04 2016 Fedora Release Engineering - 5.0.4-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Thu Aug 06 2015 Michael Simacek - 5.0.4-1 -- Update to upstream version 5.0.4 - -* Wed Jun 17 2015 Fedora Release Engineering - 5.0.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Sun Jul 20 2014 Mikolaj Izdebski - 5.0.3-1 -- Update to upstream version 5.0.3 - -* Sat Jun 07 2014 Fedora Release Engineering - 5.0.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Mon May 5 2014 Mikolaj Izdebski - 5.0.2-1 -- Update to upstream version 5.0.2 - -* Mon Apr 14 2014 Mat Booth - 5.0.1-2 -- SCL-ize package. -- Fix bogus dates in changelog. - -* Mon Mar 24 2014 Mikolaj Izdebski - 5.0.1-1 -- Update to upstream version 5.0.1 - -* Wed Mar 19 2014 Mikolaj Izdebski - 5.0-0.3.beta -- Enable asm-debug-all module - -* Mon Jan 20 2014 Mikolaj Izdebski - 5.0-0.2.beta -- Remove Eclipse Orbit alias - -* Tue Dec 3 2013 Mikolaj Izdebski - 5.0-0.1.beta -- Update to 5.0 beta - -* Sat Aug 03 2013 Fedora Release Engineering - 0:3.3.1-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Wed Mar 6 2013 Mikolaj Izdebski - 0:3.3.1-7 -- Make jetty orbit depmap point to asm-all jar -- Resolves: rhbz#917625 - -* Mon Mar 4 2013 Mikolaj Izdebski - 0:3.3.1-6 -- Add depmap for org.eclipse.jetty.orbit -- Resolves: rhbz#917625 - -* Thu Feb 14 2013 Fedora Release Engineering - 0:3.3.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Fri Jul 20 2012 Fedora Release Engineering - 0:3.3.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Fri Jan 13 2012 Fedora Release Engineering - 0:3.3.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Fri Sep 16 2011 Alexander Kurtakov 0:3.3.1-2 -- Use poms produced by the build not foreign ones. -- Adpat to current guidelines. - -* Mon Apr 04 2011 Chris Aniszczyk 0:3.3.1 -- Upgrade to 3.3.1 - -* Tue Feb 08 2011 Fedora Release Engineering - 0:3.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Tue Jul 13 2010 Orion Poplawski 0:3.2.1-2 -- Change depmap parent id to asm (bug #606659) - -* Thu Apr 15 2010 Fernando Nasser 0:3.2.1 -- Upgrade to 3.2 - -* Sat Jul 25 2009 Fedora Release Engineering - 0:3.1-7.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Feb 25 2009 Fedora Release Engineering - 0:3.1-6.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Thu Oct 23 2008 David Walluck 0:3.1-5.1 -- build for Fedora - -* Thu Oct 23 2008 David Walluck 0:3.1-5 -- add OSGi manifest (Alexander Kurtakov) - -* Mon Oct 20 2008 David Walluck 0:3.1-4 -- remove Class-Path from MANIFEST.MF -- add unversioned javadoc symlink -- remove javadoc scriptlets -- fix directory ownership -- remove build requirement on dos2unix - -* Fri Feb 08 2008 Ralph Apel - 0:3.1-3jpp -- Add poms and depmap frags with groupId of org.objectweb.asm ! -- Add asm-all.jar -- Add -javadoc Requires post and postun -- Restore Vendor, Distribution - -* Thu Nov 22 2007 Fernando Nasser - 0:3.1-2jpp -- Fix EOL of txt files -- Add dependency on jaxp - -* Thu Nov 22 2007 Fernando Nasser - 0:3.1-1jpp -- Upgrade to 3.1 - -* Wed Aug 22 2007 Fernando Nasser - 0:3.0-1jpp -- Upgrade to 3.0 -- Rename to include objectweb- prefix as requested by ObjectWeb - -* Thu Jan 05 2006 Fernando Nasser - 0:2.1-2jpp -- First JPP 1.7 build - -* Thu Oct 06 2005 Ralph Apel 0:2.1-1jpp -- Upgrade to 2.1 - -* Fri Mar 11 2005 Sebastiano Vigna 0:2.0.RC1-1jpp -- First release of the 2.0 line. +%autochangelog diff --git a/plans/javapackages.fmf b/plans/javapackages.fmf index 8f6c9cb..ae17c0c 100644 --- a/plans/javapackages.fmf +++ b/plans/javapackages.fmf @@ -1,7 +1,7 @@ summary: Run javapackages-specific tests discover: how: fmf - url: https://src.fedoraproject.org/tests/javapackages - ref: f37 + url: https://gitlab.com/redhat/centos-stream/tests/javapackages.git + ref: f43 execute: how: tmt diff --git a/sources b/sources index e89e1c4..e1a2064 100644 --- a/sources +++ b/sources @@ -1,7 +1,7 @@ -SHA512 (objectweb-asm-9.3.tar.gz) = ec23e717f17789fee264a6a08b3d52c2ec46d39270b38e0804ea18f1abebdddc738c7ff788d2ab348af8345b41c827021dec4e843b18ede04965eac77697e72b -SHA512 (asm-9.3.pom) = a354aaa4a45f6e6c3d24e28b8a9e4490bd0a5e43a33a45dd712daefaab33a65f45cd9ae11d57e38c45082053efbe03e6ab7d5c3882d50f1e6a5d6984f477ce86 -SHA512 (asm-analysis-9.3.pom) = e32fd3696ac4770f109a4abaf38e56cb4c8ad4f5131f8d24ff54505798279593c602402363c18b580f5453717a35fc7820fbe18e3b34ed780aa0c7025087d8cd -SHA512 (asm-commons-9.3.pom) = 1446c1528e07110c5a5894365c5c84063d264ec833532d894e3238bdb027f98a72398bc763fb89785a6f757e1d195f2934505ab63f75eb4538532fbed1ef0af9 -SHA512 (asm-test-9.3.pom) = 6c99662ac0701653dc76619e651ed3969c20ccd92a3f61eda9f785cceae446e6a4cf74e67f90835125719ce220d0639887f3047525c697203f3804e27dae8ff0 -SHA512 (asm-tree-9.3.pom) = f066513d4dba672edc85e9b457d827c16d55a321cb02f4f5faf6e02f59594c44fe3eae23006e6a7310151ff88ea53e654e27fdced6b0af85dcb24ab276279ca2 -SHA512 (asm-util-9.3.pom) = 283675d07165cd635d0417eed078be18aae09ec8960e370d5d56b5b7845d74e150330f21e4610c0c4ca391843d7dd21bcd341604763924f102d65875df8ff927 +SHA512 (objectweb-asm-9.7.1.tar.gz) = 201c490ac71196b1a47a73d7311a22efca833c92377d02d9071cabc2429032aaa7eb636dfbf8182b71af60830d65792dd8f0b423208fcaba78a800228717aee5 +SHA512 (asm-9.7.1.pom) = 9d69abaf9c15b97d37484246c951acc55d4a944496ab47079dc600b3cd90353090b4a3579f1f7eb2e6d778e6900a5e1427f1690a4459253f3b9270c01713f54d +SHA512 (asm-analysis-9.7.1.pom) = 860702b32e5034109beee7cfb9269e33a55fe50ee3ef8c7fe6c71d9916b2be8865991aab64618f9e03be88879bb410e07db74cf91bd7364956cd34d0fbf9231b +SHA512 (asm-commons-9.7.1.pom) = d4bd178cfde200ed04915e581dd1e7009b1960ef40c86e9c22d88ef141d4a32c7e6131ee2e48f92eba45d523006799c8be53312dc50c67ed7b8bb8b90175e480 +SHA512 (asm-test-9.7.1.pom) = e36d8f602a9e9e24547af4f8b0aa0a57f79123c7075ae4085d80e93d3b8ea63730f59e85ee81a4dff45b8749ded0c1ab787620bb5c9820460761fde9578b8868 +SHA512 (asm-tree-9.7.1.pom) = f66d75d0897916d0e3a7ffe4dedd2ca4a363cba0430cc464a358e71be19e8413ba9f26b313f6eb7c0fcc631487e5a420f7bcf6af63c07e3d9880e8adc83922b7 +SHA512 (asm-util-9.7.1.pom) = 6a67ceafce03eb0582dd1addf79ff69cf2a94824f860161cd9b5c808580fd28ce2deb4e25b2b977a70da86732d20de1e895005c824e49d6148637c2211374ff4 diff --git a/tools-retrofitter.pom b/tools-retrofitter.pom index 5e24dda..bd1f813 100644 --- a/tools-retrofitter.pom +++ b/tools-retrofitter.pom @@ -3,10 +3,9 @@ xsi:schemaLocation='http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd'> 4.0.0 - org.ow2.asm + org.fedoraproject.xmvn.objectweb-asm tools-retrofitter any - jar