From ebad38b19cd490b4c9fd898d300321ad9160c74a3c8a26afbc5a2cd3f44d2436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 3 May 2024 12:26:29 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main felix-bundlerepository revision 6ec4cc2ec564e95f2d02e7ca07f9fb9f --- .gitattributes | 23 +++ 0001-Unbundle-libraries.patch | 53 +++++++ 0002-Compatibility-with-osgi-r6.patch | 45 ++++++ felix-bundlerepository.changes | 9 ++ felix-bundlerepository.spec | 110 ++++++++++++++ ...dlerepository-2.0.10-source-release.tar.gz | 3 + org.apache.felix.bundlerepository-build.xml | 141 ++++++++++++++++++ 7 files changed, 384 insertions(+) create mode 100644 .gitattributes create mode 100644 0001-Unbundle-libraries.patch create mode 100644 0002-Compatibility-with-osgi-r6.patch create mode 100644 felix-bundlerepository.changes create mode 100644 felix-bundlerepository.spec create mode 100644 org.apache.felix.bundlerepository-2.0.10-source-release.tar.gz create mode 100644 org.apache.felix.bundlerepository-build.xml diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /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..c6ab6c1 --- /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..7634b43 --- /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..fc05250 --- /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..ae444f1 --- /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..8ae8e9e --- /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..7bb8026 --- /dev/null +++ b/org.apache.felix.bundlerepository-build.xml @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +