diff --git a/0001-Fix-servlet-api-dependency.patch b/0001-Fix-servlet-api-dependency.patch new file mode 100644 index 0000000..081ab42 --- /dev/null +++ b/0001-Fix-servlet-api-dependency.patch @@ -0,0 +1,27 @@ +From 3a7cfc3cf5cadca0e25854ccb85c65f46fd15737 Mon Sep 17 00:00:00 2001 +From: Stanislav Ochotnicky +Date: Wed, 2 Feb 2011 14:17:20 +0100 +Subject: [PATCH 1/2] Fix servlet api dependency + +--- + pom.xml | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/pom.xml b/pom.xml +index d53eaa9..f45d162 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -38,8 +38,8 @@ + 1.4.0 + + +- ${pom.groupId} +- javax.servlet ++ javax.servlet ++ javax.servlet-api + 1.0.0 + + +-- +1.7.3.5 + diff --git a/0002-Fix-compile-target.patch b/0002-Fix-compile-target.patch new file mode 100644 index 0000000..363bf68 --- /dev/null +++ b/0002-Fix-compile-target.patch @@ -0,0 +1,32 @@ +From 5b80abcb5b2dbead332e1c77fa615d6f93fe2218 Mon Sep 17 00:00:00 2001 +From: Stanislav Ochotnicky +Date: Wed, 2 Feb 2011 14:50:17 +0100 +Subject: [PATCH 2/2] Fix compile target + +--- + pom.xml | 9 +++++++++ + 1 files changed, 9 insertions(+), 0 deletions(-) + +diff --git a/pom.xml b/pom.xml +index f45d162..2c1a7a9 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -67,6 +67,15 @@ + + + ++ ++ org.apache.maven.plugins ++ maven-compiler-plugin ++ 2.3.2 ++ ++ 1.5 ++ 1.5 ++ ++ + + + +-- +1.7.3.5 + diff --git a/0003-Add-CM_LOCATION_CHANGED-property-to-ConfigurationEve.patch b/0003-Add-CM_LOCATION_CHANGED-property-to-ConfigurationEve.patch new file mode 100644 index 0000000..a3127c1 --- /dev/null +++ b/0003-Add-CM_LOCATION_CHANGED-property-to-ConfigurationEve.patch @@ -0,0 +1,37 @@ +From ec6885545fb6889ed9a5522647b9780a53c6fd93 Mon Sep 17 00:00:00 2001 +From: Marek Goldmann +Date: Fri, 15 Jun 2012 11:25:12 +0200 +Subject: [PATCH 3/3] Add CM_LOCATION_CHANGED property to ConfigurationEvent. + +--- + .../java/org/osgi/service/cm/ConfigurationEvent.java | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/src/main/java/org/osgi/service/cm/ConfigurationEvent.java b/src/main/java/org/osgi/service/cm/ConfigurationEvent.java +index f17007f..e98f3ac 100644 +--- a/src/main/java/org/osgi/service/cm/ConfigurationEvent.java ++++ b/src/main/java/org/osgi/service/cm/ConfigurationEvent.java +@@ -79,6 +79,20 @@ public class ConfigurationEvent { + */ + public static final int CM_DELETED = 2; + /** ++ * The location of a {@code Configuration} has been changed. ++ * ++ *

++ * This {@code ConfigurationEvent} type that indicates that the location of ++ * a {@code Configuration} object has been changed. ++ * ++ * An event is fired when a call to ++ * {@link Configuration#setBundleLocation(String)} successfully changes the ++ * location. ++ * ++ * @since 1.4 ++ */ ++ public static final int CM_LOCATION_CHANGED = 3; ++ /** + * Type of this event. + * + * @see #getType +-- +1.7.10.2 + diff --git a/0004-Add-TARGET-property-to-ConfigurationPermission.patch b/0004-Add-TARGET-property-to-ConfigurationPermission.patch new file mode 100644 index 0000000..7d3c064 --- /dev/null +++ b/0004-Add-TARGET-property-to-ConfigurationPermission.patch @@ -0,0 +1,31 @@ +From 88616a67fcdcf3bbc201ed1736b31a61da7f609e Mon Sep 17 00:00:00 2001 +From: Marek Goldmann +Date: Fri, 15 Jun 2012 11:32:27 +0200 +Subject: [PATCH 4/4] Add TARGET property to ConfigurationPermission + +--- + src/main/java/org/osgi/service/cm/ConfigurationPermission.java | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/main/java/org/osgi/service/cm/ConfigurationPermission.java b/src/main/java/org/osgi/service/cm/ConfigurationPermission.java +index 3af9088..7b8f3e3 100644 +--- a/src/main/java/org/osgi/service/cm/ConfigurationPermission.java ++++ b/src/main/java/org/osgi/service/cm/ConfigurationPermission.java +@@ -40,6 +40,14 @@ public final class ConfigurationPermission extends BasicPermission { + public final static String CONFIGURE = "configure"; + + /** ++ * The permission to be updated, that is, act as a Managed Service or ++ * Managed Service Factory. The action string {@value #TARGET}. ++ * ++ * @since 1.4 ++ */ ++ public final static String TARGET = "target"; ++ ++ /** + * Create a new ConfigurationPermission. + * + * @param name Name must be "*". +-- +1.7.10.2 + diff --git a/0005-Add-getResourceURL-method-to-make-jbosgi-framework-h.patch b/0005-Add-getResourceURL-method-to-make-jbosgi-framework-h.patch new file mode 100644 index 0000000..aab7f71 --- /dev/null +++ b/0005-Add-getResourceURL-method-to-make-jbosgi-framework-h.patch @@ -0,0 +1,28 @@ +From d9df4679129efdc654b44213fb33abd7ac042e81 Mon Sep 17 00:00:00 2001 +From: Marek Goldmann +Date: Tue, 3 Jul 2012 18:43:17 +0200 +Subject: [PATCH 5/5] Add getResourceURL method to make jbosgi-framework + happy... + +--- + src/main/java/org/osgi/util/xml/XMLParserActivator.java | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/main/java/org/osgi/util/xml/XMLParserActivator.java b/src/main/java/org/osgi/util/xml/XMLParserActivator.java +index 963c092..85f9f56 100644 +--- a/src/main/java/org/osgi/util/xml/XMLParserActivator.java ++++ b/src/main/java/org/osgi/util/xml/XMLParserActivator.java +@@ -165,6 +165,10 @@ public class XMLParserActivator implements BundleActivator, ServiceFactory { + .getResource(DOMCLASSFILE))); + } + ++ protected URL getResourceURL(Bundle parserBundle, String resname) { ++ return parserBundle.getResource(resname); ++ } ++ + /** + * This method has nothing to do as all active service registrations will + * automatically get unregistered when the bundle stops. +-- +1.7.10.4 + diff --git a/felix-osgi-compendium.spec b/felix-osgi-compendium.spec new file mode 100644 index 0000000..9dc7cf1 --- /dev/null +++ b/felix-osgi-compendium.spec @@ -0,0 +1,53 @@ +%global bundle org.osgi.compendium +Name: felix-osgi-compendium +Version: 1.4.0 +Release: 1 +Summary: Felix OSGi R4 Compendium Bundle +License: ASL 2.0 +URL: http://felix.apache.org +BuildArch: noarch +Source0: http://www.apache.org/dist/felix/%{bundle}-%{version}-project.tar.gz +Patch0: 0001-Fix-servlet-api-dependency.patch +Patch1: 0002-Fix-compile-target.patch +Patch2: 0003-Add-CM_LOCATION_CHANGED-property-to-ConfigurationEve.patch +Patch3: 0004-Add-TARGET-property-to-ConfigurationPermission.patch +Patch4: 0005-Add-getResourceURL-method-to-make-jbosgi-framework-h.patch +BuildRequires: maven-local mvn(javax.servlet:javax.servlet-api) +BuildRequires: mvn(org.apache.felix:felix-parent:pom:) +BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) mvn(org.apache.felix:org.osgi.core) +BuildRequires: mvn(org.apache.felix:org.osgi.foundation) +%description +OSGi Service Platform Release 4 Compendium Interfaces and Classes. + +%package help +Summary: API documentation for %{name} +Provides: %{name}-javadoc = %{version}-%{release} +Obsoletes: %{name}-javadoc < %{version}-%{release} +%description help +This package contains API documentation for %{name}. + +%prep +%setup -q -n %{bundle}-%{version} +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%mvn_file :%{bundle} "felix/%{bundle}" +%mvn_alias "org.apache.felix:%{bundle}" "org.osgi:%{bundle}" + +%build +%mvn_build -- -Drat.numUnapprovedLicenses=100 + +%install +%mvn_install + +%files -f .mfiles +%license LICENSE NOTICE + +%files help -f .mfiles-javadoc +%license LICENSE NOTICE + +%changelog +* Mon Aug 24 2020 liyanan - 1.4.0-1 +- package init diff --git a/felix-osgi-compendium.yaml b/felix-osgi-compendium.yaml new file mode 100644 index 0000000..a015ca1 --- /dev/null +++ b/felix-osgi-compendium.yaml @@ -0,0 +1,5 @@ +git_url: https://github.com/apache/felix-dev.git +version_control: github +src_repo: apache/felix-dev +tag_prefix: "org.osgi.compendium-" +seperator: "." diff --git a/org.osgi.compendium-1.4.0-project.tar.gz b/org.osgi.compendium-1.4.0-project.tar.gz new file mode 100644 index 0000000..fc3ad08 Binary files /dev/null and b/org.osgi.compendium-1.4.0-project.tar.gz differ