package init

This commit is contained in:
ultra_planet 2019-12-12 17:29:52 +08:00
parent 5d87e9bc1c
commit 9b00e115be
4 changed files with 161 additions and 0 deletions

View File

@ -0,0 +1,52 @@
From 0dbf23a1e17d88b06bd6a7b39d686f1efe6179a6 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
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 @@
<artifactId>kxml2</artifactId>
<version>2.3.0</version>
<optional>true</optional>
- <exclusions>
- <exclusion>
- <groupId>xmlpull</groupId>
- <artifactId>xmlpull</artifactId>
- </exclusion>
- </exclusions>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
@@ -123,18 +117,16 @@
org.osgi.service.repository,
org.apache.felix.bundlerepository;version="2.1"
</Export-Package>
- <Private-Package>
- org.kxml2.io,
- org.xmlpull.v1,
- org.apache.felix.bundlerepository.impl.*,
- org.apache.felix.utils.*
- </Private-Package>
<!-- The org.osgi.service.repository;resolution:=mandatory seems strange below, but otherwise the maven-bundle-plugin
will make that import optional, which we don't want... -->
<!-- The version range on org.osgi.service.repository is required as we are a provider of the 1.0.0 API. -->
<Import-Package>
!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

View File

@ -0,0 +1,45 @@
From 6c8fc9626ef548192849fe8a4dc12f188614027b Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
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<Collection<org.osgi.resource.Resource>> 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

View File

@ -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 "<optional>true</optional>"
%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 <lingsheng@huawei.com> - 2.0.10-5
- Package init