diff --git a/0001-Unbundle-libraries.patch b/0001-Unbundle-libraries.patch new file mode 100644 index 0000000..e6e0009 --- /dev/null +++ b/0001-Unbundle-libraries.patch @@ -0,0 +1,52 @@ +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 +@@ -70,12 +70,6 @@ + kxml2 + 2.3.0 + true +- +- +- xmlpull +- xmlpull +- +- + + + org.osgi +@@ -123,18 +117,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.spec b/felix-bundlerepository.spec new file mode 100644 index 0000000..5b47385 --- /dev/null +++ b/felix-bundlerepository.spec @@ -0,0 +1,64 @@ +Name: felix-bundlerepository +Version: 2.0.10 +Release: 5 +Summary: Apache Felix OSGi Bundle Repository service +License: ASL 2.0 and MIT +URL: http://felix.apache.org/documentation/subprojects/apache-felix-osgi-bundle-repository.html +Source0: https://archive.apache.org/dist/felix/org.apache.felix.bundlerepository-%{version}-source-release.tar.gz + +Patch0001: 0001-Unbundle-libraries.patch +Patch0002: 0002-Compatibility-with-osgi-r6.patch + +BuildRequires: maven-local mvn(net.sf.kxml:kxml2) mvn(org.apache.felix:felix-parent:pom:) +BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) mvn(org.apache.felix:org.apache.felix.gogo.runtime) +BuildRequires: mvn(org.apache.felix:org.apache.felix.shell) mvn(org.apache.felix:org.apache.felix.utils) +BuildRequires: mvn(org.apache.felix:org.osgi.service.obr) mvn(org.codehaus.woodstox:woodstox-core-asl) +BuildRequires: mvn(org.easymock:easymock) mvn(org.osgi:osgi.cmpn) mvn(org.osgi:osgi.core) mvn(xpp3:xpp3) +BuildArch: noarch + +%description +The goal of the Apache Felix OSGi Bundle Repository (OBR) is two-fold: +1.To simplify deploying and using available bundles with Felix. +2.To encourage independent bundle development so that communities of interest can grow. + +OBR achieves the first goal by providing a service that can automatically install a bundle, with its +deployment dependencies, from a bundle repository. This makes it easier for people to experiment with +existing bundles. The second goal is achieved by raising the visibility of the available bundles and +providing access to both the executable bundle and its source code. Hopefully, by making OBR and the +bundles themselves more visible, community members will be encouraged to provide or improve service +implementations. + +%package help +Summary: Help package for felix-bundlerepository +Provides: %{name}-javadoc = %{version}-%{release} +Obsoletes: %{name}-javadoc < %{version}-%{release} + +%description help +This package contains the API help documentation for felix-bundlerepository. + +%prep +%autosetup -n org.apache.felix.bundlerepository-%{version} -p1 +%pom_remove_plugin :maven-source-plugin +%pom_add_dep "xpp3:xpp3:1.1.3.4.O" pom.xml "true" +%pom_xpath_remove "pom:dependency[pom:artifactId[text()='org.apache.felix.utils']]/pom:optional" +%pom_change_dep :easymock :::test +%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 +%mvn_file : felix/%{name} + +%build +%mvn_build + +%install +%mvn_install + +%files -f .mfiles +%doc DEPENDENCIES LICENSE LICENSE.kxml2 NOTICE + +%files help -f .mfiles-javadoc + +%changelog +* Thu Dec 12 2019 lingsheng - 2.0.10-5 +- Package init 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..dea4ab8 Binary files /dev/null and b/org.apache.felix.bundlerepository-2.0.10-source-release.tar.gz differ