From 6dad0fff5d8e7963a057f90dee80f45422138988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Mon, 19 Feb 2024 15:52:19 +0100 Subject: [PATCH] Sync from SUSE:ALP:Source:Standard:1.0 xbean revision ed86c87faa860fc7190b0321e5469178 --- .gitattributes | 23 ++++ 0002-Unbundle-ASM.patch | 42 +++++++ ...endency-on-log4j-and-commons-logging.patch | 35 ++++++ xbean-4.20-source-release.zip | 3 + xbean-build.tar.xz | 3 + xbean.changes | 91 ++++++++++++++ xbean.spec | 119 ++++++++++++++++++ 7 files changed, 316 insertions(+) create mode 100644 .gitattributes create mode 100644 0002-Unbundle-ASM.patch create mode 100644 0003-Remove-dependency-on-log4j-and-commons-logging.patch create mode 100644 xbean-4.20-source-release.zip create mode 100644 xbean-build.tar.xz create mode 100644 xbean.changes create mode 100644 xbean.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/0002-Unbundle-ASM.patch b/0002-Unbundle-ASM.patch new file mode 100644 index 0000000..eb40658 --- /dev/null +++ b/0002-Unbundle-ASM.patch @@ -0,0 +1,42 @@ +From 4f7a61dcd47ed0dee2d78e31e2dd50b88ab42f25 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Thu, 12 Dec 2019 08:51:57 +0100 +Subject: [PATCH 2/3] Unbundle ASM + +--- + .../xbean/recipe/XbeanAsmParameterNameLoader.java | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java b/xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java +index 20b646c..9e96775 100644 +--- a/xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java ++++ b/xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java +@@ -17,11 +17,11 @@ + */ + package org.apache.xbean.recipe; + +-import org.apache.xbean.asm9.ClassReader; +-import org.apache.xbean.asm9.ClassVisitor; +-import org.apache.xbean.asm9.Label; +-import org.apache.xbean.asm9.MethodVisitor; +-import org.apache.xbean.asm9.Type; ++import org.objectweb.asm.ClassReader; ++import org.objectweb.asm.ClassVisitor; ++import org.objectweb.asm.Label; ++import org.objectweb.asm.MethodVisitor; ++import org.objectweb.asm.Type; + + import java.io.IOException; + import java.io.InputStream; +@@ -36,7 +36,7 @@ import java.util.List; + import java.util.Map; + import java.util.WeakHashMap; + +-import static org.apache.xbean.asm9.shade.commons.AsmConstants.ASM_VERSION; ++import static org.apache.xbean.asm9.original.commons.AsmConstants.ASM_VERSION; + + /** + * Implementation of ParameterNameLoader that uses ASM to read the parameter names from the local variable table in the +-- +2.29.2 + diff --git a/0003-Remove-dependency-on-log4j-and-commons-logging.patch b/0003-Remove-dependency-on-log4j-and-commons-logging.patch new file mode 100644 index 0000000..b1846ee --- /dev/null +++ b/0003-Remove-dependency-on-log4j-and-commons-logging.patch @@ -0,0 +1,35 @@ +From 28e37850d8343f44f82e3138c772dd65d1d0ff2f Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Thu, 12 Dec 2019 08:52:26 +0100 +Subject: [PATCH 3/3] Remove dependency on log4j and commons-logging + +--- + .../xbean/propertyeditor/PropertyEditorRegistry.java | 12 ------------ + 1 file changed, 12 deletions(-) + +diff --git a/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/PropertyEditorRegistry.java b/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/PropertyEditorRegistry.java +index e7e17edd..be302861 100644 +--- a/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/PropertyEditorRegistry.java ++++ b/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/PropertyEditorRegistry.java +@@ -84,18 +84,6 @@ public class PropertyEditorRegistry implements Closeable { + register(new VectorEditor()); + register(new WeakHashMapEditor()); + +- try { +- register(new Log4jConverter()); +- } catch (final Throwable e) { +- // no-op +- } +- +- try { +- register(new CommonsLoggingConverter()); +- } catch (final Throwable e) { +- // no-op +- } +- + return this; + } + +-- +2.21.0 + diff --git a/xbean-4.20-source-release.zip b/xbean-4.20-source-release.zip new file mode 100644 index 0000000..a470d40 --- /dev/null +++ b/xbean-4.20-source-release.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3789adec66e88a99502cc0b9e0ede174e32521ada59522bf2c5cb5090292533f +size 1053017 diff --git a/xbean-build.tar.xz b/xbean-build.tar.xz new file mode 100644 index 0000000..7d50745 --- /dev/null +++ b/xbean-build.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:79125050845de38b636f40068fdd0ed47a2b5362e76eb3cc477d81f7ae772ec7 +size 2368 diff --git a/xbean.changes b/xbean.changes new file mode 100644 index 0000000..70c2dcc --- /dev/null +++ b/xbean.changes @@ -0,0 +1,91 @@ +------------------------------------------------------------------- +Wed Oct 25 14:55:09 UTC 2023 - Fridrich Strba + +- Build with source/target 8 to fix build with jdk 21 + +------------------------------------------------------------------- +Mon Mar 7 09:46:33 UTC 2022 - Fridrich Strba + +- Upgrade to version 4.20 + * Bugs + + XBEAN-298: FileArchive can lead to NPE + + XBEAN-326: NullpointerException in BundleAssignableClassFinder + + XBEAN-327: ASM9 bundle + + XBEAN-328: Upgrade to asm 9.0 + + XBEAN-329: trunk does not build due to unused import + + XBEAN-330: Wrong OSGi manifests in xbean-asm9-shaded + + XBEAN-331: Upgrade to asm 9.1 + * Improvements + + XBEAN-301: Add Automatic-Module-Name to xbean manifest + + XBEAN-303: asm shade NOTICE file shouldnt exist + + XBEAN-306: MultiJar release support enhancements + + XBEAN-309: Support Constructors and Static Factory Methods + in xbean-reflect + + XBEAN-310: Provide a PropertyEditorRegistry + + XBEAN-312: Ensure multi-jar are not scanned twice + + XBEAN-318: xbean-finder should log the class name on errors + + XBEAN-319: Enable xbean-finder to not store classes without + annotations + + XBEAN-320: Enable xbean-finder to not track some annotations + + XBEAN-322: Upgrade to ASM 7.2 + * New Features + + XBEAN-305: Asm 6.1.1 upgrade + + XBEAN-313: Create asm7 bundle + * Tasks + + XBEAN-296: upgrade to asm 6 + + XBEAN-302: Upgrade to asm 6.1 + + XBEAN-308: ASM 6.2 upgrade + + XBEAN-311: ASM 6.2.1 + + XBEAN-314: ASM 7.0 upgrade + + XBEAN-316: Upgrade ASM to 7.1 + + XBEAN-321: Upgrade to asm 7.2-beta + + XBEAN-323: Upgrade ASM to 7.3.1 + + XBEAN-325: Upgrade to asm 8 +- Removed patch: + * 0003-Port-to-QDox-2.0.patch + + not needed in modules that we build +- Changed patch: + * 0001-Unshade-ASM.patch -> 0002-Unbundle-ASM.patch + + Different ASM version and code structure +- Added patch: + * 0003-Remove-dependency-on-log4j-and-commons-logging.patch + + Remove unnecessary dependency on log4j and commons-logging + +------------------------------------------------------------------- +Tue Feb 22 18:53:19 UTC 2022 - Fridrich Strba + +- Do not build against the log4j12 packages, use the new reload4j + +------------------------------------------------------------------- +Mon Jan 27 06:29:59 UTC 2020 - Fridrich Strba + +- On supported platforms, avoid building with OpenJ9, in order to + prevent build cycles + +------------------------------------------------------------------- +Sat Oct 5 17:00:13 UTC 2019 - Fridrich Strba + +- Remove references to parent from all pom files +- Avoid version-less dependencies + +------------------------------------------------------------------- +Tue Oct 1 11:33:05 UTC 2019 - Fridrich Strba + +- Build against the new log4j12 compat package + +------------------------------------------------------------------- +Thu Apr 4 11:35:11 UTC 2019 - Fridrich Strba + +- Do not require optional dependencies + +------------------------------------------------------------------- +Thu Feb 7 10:21:20 UTC 2019 - Jan Engelhardt + +- Trim future goals from description. +- Avoid double-shipping documentation. + +------------------------------------------------------------------- +Thu Oct 25 19:27:30 UTC 2018 - Fridrich Strba + +- Initial packaging of xbean version 4.5 +- Spec file inspired by Fedora rpm package diff --git a/xbean.spec b/xbean.spec new file mode 100644 index 0000000..198ed5f --- /dev/null +++ b/xbean.spec @@ -0,0 +1,119 @@ +# +# spec file for package xbean +# +# Copyright (c) 2023 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: xbean +Version: 4.20 +Release: 0 +Summary: Java plugin based web server +License: Apache-2.0 +Group: Development/Libraries/Java +URL: https://geronimo.apache.org/xbean/ +Source0: https://repo1.maven.org/maven2/org/apache/%{name}/%{name}/%{version}/%{name}-%{version}-source-release.zip +Source1: %{name}-build.tar.xz +Patch2: 0002-Unbundle-ASM.patch +Patch3: 0003-Remove-dependency-on-log4j-and-commons-logging.patch +BuildRequires: ant +BuildRequires: fdupes +BuildRequires: java-devel >= 1.8 +BuildRequires: javapackages-local >= 6 +BuildRequires: objectweb-asm >= 9 +BuildRequires: slf4j +BuildRequires: unzip +BuildArch: noarch + +%description +XBean is a plugin-based server analogous to Eclipse being a +plugin-based IDE. XBean is able to discover, download and install +server plugins from an Internet-based repository. Support for +multiple IoC systems, support for running with no IoC system, JMX +without JMX code, lifecycle and class loader management, and a Spring +integration is included. + +%package javadoc +Summary: API documentation for %{name} +Group: Documentation/HTML + +%description javadoc +This package provides API documentation for xbean. + +%prep +%setup -q -a1 +%patch2 -p1 +%patch3 -p1 + +cp xbean-asm-util/src/main/java/org/apache/xbean/asm9/original/commons/AsmConstants.java xbean-reflect/src/main/java/org/apache/xbean/recipe/ + +%pom_disable_module xbean-classloader +%pom_disable_module xbean-classpath +%pom_disable_module xbean-bundleutils +%pom_disable_module xbean-asm9-shaded +%pom_disable_module xbean-finder-shaded +%pom_disable_module xbean-naming +%pom_disable_module xbean-blueprint +%pom_disable_module xbean-spring +%pom_disable_module xbean-telnet +%pom_disable_module maven-xbean-plugin + +%pom_remove_dep :commons-logging-api xbean-reflect +%pom_remove_dep :log4j xbean-reflect +%pom_remove_dep :xbean-asm9-shaded xbean-reflect +find -name CommonsLoggingConverter.java -delete +find -name Log4jConverter.java -delete + +# Plugins useful for upstream only +%pom_remove_plugin :apache-rat-plugin +%pom_remove_plugin :maven-source-plugin + +%pom_remove_dep :xbean-bundleutils xbean-finder +%pom_remove_dep org.osgi:org.osgi.core xbean-finder +rm -r xbean-finder/src/main/java/org/apache/xbean/finder{,/archive}/Bundle* + +%build +mkdir -p lib +build-jar-repository -s lib objectweb-asm slf4j +%{ant} package javadoc + +%install +# jars +install -dm 755 %{buildroot}%{_javadir}/%{name} +for i in xbean-asm-util xbean-finder xbean-reflect; do + install -m 0644 ${i}/target/${i}-%{version}.jar %{buildroot}%{_javadir}/%{name}/${i}.jar +done + +# poms +install -dm 755 %{buildroot}%{_mavenpomdir}/%{name} +for i in xbean-asm-util xbean-finder xbean-reflect; do + %{mvn_install_pom} ${i}/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/${i}.pom + %add_maven_depmap %{name}/${i}.pom %{name}/${i}.jar +done + +# javadoc +install -dm 755 %{buildroot}/%{_javadocdir}/%{name} +for i in xbean-asm-util xbean-finder xbean-reflect; do + cp -r ${i}/target/site/apidocs %{buildroot}/%{_javadocdir}/%{name}/${i} +done +%fdupes -s %{buildroot}/%{_javadocdir}/%{name} + +%files -f .mfiles +%license LICENSE +%doc NOTICE + +%files javadoc +%{_javadocdir}/%{name} + +%changelog