commit ca28fb51b109e4ff7f5ce5ec528cdb4cab80a588 Author: Adrian Schröter Date: Mon Oct 14 14:13:19 2024 +0200 Sync from SUSE:ALP:Source:Standard:1.0 felix-bundlerepository revision 6ec4cc2ec564e95f2d02e7ca07f9fb9f 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/0001-Unbundle-libraries.patch b/0001-Unbundle-libraries.patch new file mode 100644 index 0000000..a356c90 --- /dev/null +++ b/0001-Unbundle-libraries.patch @@ -0,0 +1,53 @@ +From 0dbf23a1e17d88b06bd6a7b39d686f1efe6179a6 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Mon, 30 Apr 2012 20:25:01 +0200 +Subject: [PATCH 1/2] Unbundle libraries + +--- + pom.xml | 16 ++++------------ + 1 file changed, 4 insertions(+), 12 deletions(-) + +diff --git a/pom.xml b/pom.xml +index 745b6f7..a111f55 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -69,13 +69,6 @@ + net.sf.kxml + kxml2 + 2.3.0 +- true +- +- +- xmlpull +- xmlpull +- +- + + + org.osgi +@@ -123,18 +116,16 @@ + org.osgi.service.repository, + org.apache.felix.bundlerepository;version="2.1" + +- +- org.kxml2.io, +- org.xmlpull.v1, +- org.apache.felix.bundlerepository.impl.*, +- org.apache.felix.utils.* +- + + + + !javax.xml.parsers, + !org.xml.sax, ++ org.kxml2.io;resolution=mandatory, ++ org.xmlpull.v1;resolution=mandatory, ++ org.apache.felix.utils.*;resolution=mandatory, ++ org.apache.felix.bundlerepository.impl.*;resolution:=mandatory, + org.osgi.service.repository;resolution:=mandatory;version="[1.0,1.1)", + org.osgi.service.log;resolution:=optional, + org.osgi.service.obr;resolution:=optional, +-- +2.9.3 + diff --git a/0002-Compatibility-with-osgi-r6.patch b/0002-Compatibility-with-osgi-r6.patch new file mode 100644 index 0000000..6f81b5c --- /dev/null +++ b/0002-Compatibility-with-osgi-r6.patch @@ -0,0 +1,45 @@ +From 6c8fc9626ef548192849fe8a4dc12f188614027b Mon Sep 17 00:00:00 2001 +From: Michael Simacek +Date: Fri, 18 Nov 2016 16:04:38 +0100 +Subject: [PATCH 2/2] Compatibility with osgi r6 + +--- + .../felix/bundlerepository/impl/OSGiRepositoryImpl.java | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/src/main/java/org/apache/felix/bundlerepository/impl/OSGiRepositoryImpl.java b/src/main/java/org/apache/felix/bundlerepository/impl/OSGiRepositoryImpl.java +index 38d9cab..9e523e0 100644 +--- a/src/main/java/org/apache/felix/bundlerepository/impl/OSGiRepositoryImpl.java ++++ b/src/main/java/org/apache/felix/bundlerepository/impl/OSGiRepositoryImpl.java +@@ -42,7 +42,11 @@ import org.osgi.resource.Capability; + import org.osgi.resource.Namespace; + import org.osgi.resource.Requirement; + import org.osgi.service.repository.ContentNamespace; ++import org.osgi.service.repository.ExpressionCombiner; + import org.osgi.service.repository.Repository; ++import org.osgi.service.repository.RequirementBuilder; ++import org.osgi.service.repository.RequirementExpression; ++import org.osgi.util.promise.Promise; + + class OSGiRepositoryImpl implements Repository + { +@@ -179,4 +183,16 @@ class OSGiRepositoryImpl implements Repository + } + return sb.toString(); + } ++ ++ public Promise> findProviders(RequirementExpression re) { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public ExpressionCombiner getExpressionCombiner() { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public RequirementBuilder newRequirementBuilder(String string) { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } + } +-- +2.9.3 + diff --git a/felix-bundlerepository.changes b/felix-bundlerepository.changes new file mode 100644 index 0000000..434c477 --- /dev/null +++ b/felix-bundlerepository.changes @@ -0,0 +1,9 @@ +------------------------------------------------------------------- +Fri Mar 18 15:00:55 UTC 2022 - Fridrich Strba + +- Intial packaging of felix-bundlerepository 2.0.10 +- Added patches: + * 0001-Unbundle-libraries.patch + + Use system jars instead of bundling them in a fat jar + * 0002-Compatibility-with-osgi-r6.patch + + Allow building with newer osgi-core/osgi-compendium diff --git a/felix-bundlerepository.spec b/felix-bundlerepository.spec new file mode 100644 index 0000000..1ff1565 --- /dev/null +++ b/felix-bundlerepository.spec @@ -0,0 +1,110 @@ +# +# spec file for package felix-bundlerepository +# +# Copyright (c) 2022 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/ +# + + +%global bundle org.apache.felix.bundlerepository +Name: felix-bundlerepository +Version: 2.0.10 +Release: 0 +Summary: Bundle repository service +License: Apache-2.0 AND MIT +URL: https://felix.apache.org/documentation/subprojects/apache-felix-osgi-bundle-repository.html +Source0: https://archive.apache.org/dist/felix/%{bundle}-%{version}-source-release.tar.gz +Source1: %{bundle}-build.xml +Patch1: 0001-Unbundle-libraries.patch +Patch2: 0002-Compatibility-with-osgi-r6.patch +BuildRequires: ant +BuildRequires: fdupes +BuildRequires: felix-gogo-runtime +BuildRequires: felix-osgi-obr +BuildRequires: felix-shell +BuildRequires: felix-utils +BuildRequires: javapackages-local +BuildRequires: kxml +BuildRequires: osgi-compendium +BuildRequires: osgi-core +BuildRequires: xpp3 +Requires: mvn(net.sf.kxml:kxml2) +Requires: mvn(org.apache.felix:org.apache.felix.utils) +Requires: mvn(org.osgi:osgi.cmpn) +Requires: mvn(org.osgi:osgi.core) +Requires: mvn(xpp3:xpp3) +BuildArch: noarch + +%description +Bundle repository service + +%package javadoc +Summary: API documentation for %{name} + +%description javadoc +This package contains the API documentation for %{name}. + +%prep +%setup -q -n %{bundle}-%{version} +cp %{SOURCE1} build.xml +%patch1 -p1 +%patch2 -p1 + +%pom_remove_plugin :maven-source-plugin + +# Unbundle xpp3 +%pom_add_dep "xpp3:xpp3:1.1.3.4.O" pom.xml + +# Make felix utils mandatory dep +%pom_xpath_remove "pom:dependency[pom:artifactId[text()='org.apache.felix.utils']]/pom:optional" + +%pom_change_dep :easymock :::test + +# Removing and adding is necessary (order matters) +%pom_remove_dep :org.osgi.core +%pom_add_dep org.osgi:osgi.core +%pom_remove_dep :org.osgi.compendium +%pom_add_dep org.osgi:osgi.cmpn + +%pom_remove_parent +%pom_xpath_inject pom:project "org.apache.felix" + +%build +mkdir -p lib +build-jar-repository -s lib osgi-core osgi-compendium xpp3 kxml felix +%{ant} package javadoc + +%install +# jar +install -d -m 755 %{buildroot}%{_javadir}/felix +install -m 644 target/%{bundle}-%{version}.jar %{buildroot}%{_javadir}/felix/%{bundle}.jar + +# pom +install -d -m 755 %{buildroot}%{_mavenpomdir}/felix +install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/felix/%{bundle}.pom +%add_maven_depmap felix/%{bundle}.pom felix/%{bundle}.jar + +# javadoc +install -d -m 755 %{buildroot}%{_javadocdir}/%{name} +cp -r target/site/apidocs/* %{buildroot}/%{_javadocdir}/%{name} +%fdupes -s %{buildroot}%{_javadocdir} + +%files -f .mfiles +%license LICENSE LICENSE.kxml2 NOTICE +%doc DEPENDENCIES + +%files javadoc +%{_javadocdir}/%{name} +%license LICENSE LICENSE.kxml2 NOTICE + +%changelog diff --git a/org.apache.felix.bundlerepository-2.0.10-source-release.tar.gz b/org.apache.felix.bundlerepository-2.0.10-source-release.tar.gz new file mode 100644 index 0000000..f6050ad --- /dev/null +++ b/org.apache.felix.bundlerepository-2.0.10-source-release.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65b384165c46bc19d7f59ea77830bdfbbf6cd16ba7b15fe8845c2e0e196cf7ca +size 199836 diff --git a/org.apache.felix.bundlerepository-build.xml b/org.apache.felix.bundlerepository-build.xml new file mode 100644 index 0000000..c4b9ca3 --- /dev/null +++ b/org.apache.felix.bundlerepository-build.xml @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +