diff --git a/.gitignore b/.gitignore index e69de29..14895c1 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/org.apache.felix.gogo.runtime-0.10.0-project.tar.gz diff --git a/felix-gogo-runtime-bundle-resources.patch b/felix-gogo-runtime-bundle-resources.patch new file mode 100644 index 0000000..4443435 --- /dev/null +++ b/felix-gogo-runtime-bundle-resources.patch @@ -0,0 +1,13 @@ +diff --git a/pom.xml b/pom.xml +index 345457c..d467d41 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -71,7 +71,7 @@ + ${pom.artifactId} + The Apache Software Foundation + org.apache.felix.gogo.runtime.activator.Activator +- {maven-resources},META-INF/LICENSE=LICENSE,META-INF/NOTICE=NOTICE,META-INF/DEPENDENCIES=DEPENDENCIES ++ {maven-resources},LICENSE,NOTICE,DEPENDENCIES + <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@))) + <_removeheaders>Private-Package,Ignore-Package,Include-Resource + diff --git a/felix-gogo-runtime-deleted-io-test.patch b/felix-gogo-runtime-deleted-io-test.patch new file mode 100644 index 0000000..d0c500c --- /dev/null +++ b/felix-gogo-runtime-deleted-io-test.patch @@ -0,0 +1,95 @@ +diff --git a/src/test/java/org/apache/felix/gogo/runtime/threadio/TestThreadIO.java b/src/test/java/org/apache/felix/gogo/runtime/threadio/TestThreadIO.java +deleted file mode 100644 +index 32ea917..0000000 +--- a/src/test/java/org/apache/felix/gogo/runtime/threadio/TestThreadIO.java ++++ /dev/null +@@ -1,89 +0,0 @@ +-/* +- * Licensed to the Apache Software Foundation (ASF) under one +- * or more contributor license agreements. See the NOTICE file +- * distributed with this work for additional information +- * regarding copyright ownership. The ASF licenses this file +- * to you under the Apache License, Version 2.0 (the +- * "License"); you may not use this file except in compliance +- * with the License. You may obtain a copy of the License at +- * +- * http://www.apache.org/licenses/LICENSE-2.0 +- * +- * Unless required by applicable law or agreed to in writing, +- * software distributed under the License is distributed on an +- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +- * KIND, either express or implied. See the License for the +- * specific language governing permissions and limitations +- * under the License. +- */ +-package org.apache.felix.gogo.runtime.threadio; +- +-import junit.framework.TestCase; +- +-import java.io.ByteArrayOutputStream; +-import java.io.PrintStream; +-import java.util.ArrayList; +-import java.util.List; +- +-public class TestThreadIO extends TestCase +-{ +- +- /** +- * Test if the threadio works in a nested fashion. We first push +- * ten markers on the stack and print a message for each, capturing +- * the output in a ByteArrayOutputStream. Then we pop them, also printing +- * a message identifying the level. Then we verify the output for each level. +- */ +- public void testNested() +- { +- ThreadIOImpl tio = new ThreadIOImpl(); +- tio.start(); +- List list = new ArrayList(); +- for (int i = 0; i < 10; i++) +- { +- ByteArrayOutputStream out = new ByteArrayOutputStream(); +- list.add(out); +- tio.setStreams(System.in, new PrintStream(out), System.err); +- System.out.print("b" + i); +- } +- for (int i = 9; i >= 0; i--) +- { +- System.out.println("e" + i); +- tio.close(); +- } +- tio.stop(); +- for (int i = 0; i < 10; i++) +- { +- String message = list.get(i).toString().trim(); +- assertEquals("b" + i + "e" + i, message); +- } +- } +- +- /** +- * Simple test too see if the basics work. +- */ +- public void testSimple() +- { +- ThreadIOImpl tio = new ThreadIOImpl(); +- tio.start(); +- System.out.println("Hello World"); +- ByteArrayOutputStream out = new ByteArrayOutputStream(); +- ByteArrayOutputStream err = new ByteArrayOutputStream(); +- tio.setStreams(System.in, new PrintStream(out), new PrintStream(err)); +- try +- { +- System.out.println("Simple Normal Message"); +- System.err.println("Simple Error Message"); +- } +- finally +- { +- tio.close(); +- } +- tio.stop(); +- String normal = out.toString().trim(); +- //String error = err.toString().trim(); +- assertEquals("Simple Normal Message", normal); +- //assertEquals("Simple Error Message", error ); +- System.out.println("Goodbye World"); +- } +-} diff --git a/felix-gogo-runtime-dictionary.patch b/felix-gogo-runtime-dictionary.patch new file mode 100644 index 0000000..8ede2a2 --- /dev/null +++ b/felix-gogo-runtime-dictionary.patch @@ -0,0 +1,21 @@ +diff --git a/src/main/java/org/apache/felix/gogo/runtime/activator/EventAdminListener.java b/src/main/java/org/apache/felix/gogo/runtime/activator/EventAdminListener.java +index 2368ce1..dab9269 100644 +--- a/src/main/java/org/apache/felix/gogo/runtime/activator/EventAdminListener.java ++++ b/src/main/java/org/apache/felix/gogo/runtime/activator/EventAdminListener.java +@@ -19,6 +19,7 @@ + package org.apache.felix.gogo.runtime.activator; + + import java.util.Properties; ++import java.util.Dictionary; + + import org.apache.felix.gogo.api.CommandSessionListener; + import org.apache.felix.service.command.CommandSession; +@@ -45,7 +46,7 @@ public class EventAdminListener implements CommandSessionListener + if (admin != null) { + Properties props = new Properties(); + props.setProperty("command", command.toString()); +- Event event = new Event("org/apache/felix/service/command/EXECUTING", props); ++ Event event = new Event("org/apache/felix/service/command/EXECUTING", (Dictionary)props); + admin.postEvent(event); + } + } diff --git a/felix-gogo-runtime-parent.patch b/felix-gogo-runtime-parent.patch new file mode 100644 index 0000000..f8b0bfd --- /dev/null +++ b/felix-gogo-runtime-parent.patch @@ -0,0 +1,12 @@ +diff --git a/pom.xml b/pom.xml +index d467d41..5dd4bbb 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -21,7 +21,6 @@ + org.apache.felix + gogo-parent + 0.6.0 +- ../gogo-parent/pom.xml + + 4.0.0 + bundle diff --git a/felix-gogo-runtime.spec b/felix-gogo-runtime.spec new file mode 100644 index 0000000..d397ce7 --- /dev/null +++ b/felix-gogo-runtime.spec @@ -0,0 +1,97 @@ +%global project felix-gogo +%global bundle org.apache.felix.gogo.runtime +%global pkgname runtime + +Name: %{project}-%{pkgname} +Version: 0.10.0 +Release: 2%{?dist} +Summary: Community OSGi R4 Service Platform Implementation - Basic Commands +Group: Development/Tools +License: ASL 2.0 +URL: http://felix.apache.org/site/apache-felix-gogo.html + +Source0: http://www.mirrorservice.org/sites/ftp.apache.org//felix/org.apache.felix.gogo.runtime-0.10.0-project.tar.gz + +# Typecast an Event constructor call with java.util.Properties to +# java.util.Dictionary because the call to the constructor with Properties +# was ambiguous. +Patch1: %{name}-dictionary.patch +# Changed path to DEPENDENCIES, LICENSE and NOTICE from META-INF to root dir +Patch2: %{name}-bundle-resources.patch +# Removed failing thread IO test +Patch3: %{name}-deleted-io-test.patch +# Removed relativePath to parent pom +Patch4: %{name}-parent.patch + +BuildArch: noarch + +BuildRequires: java +BuildRequires: jpackage-utils +BuildRequires: maven +BuildRequires: felix-osgi-core +BuildRequires: felix-osgi-compendium +BuildRequires: maven-surefire-provider-junit4 +BuildRequires: felix-gogo-parent + +Requires: java +Requires: jpackage-utils + +%description +Apache Felix is a community effort to implement the OSGi R4 Service Platform +and other interesting OSGi-related technologies under the Apache license. The +OSGi specifications originally targeted embedded devices and home services +gateways, but they are ideally suited for any project interested in the +principles of modularity, component-orientation, and/or service-orientation. +OSGi technology combines aspects of these aforementioned principles to define a +dynamic service deployment framework that is amenable to remote management. + +%package javadoc +Group: Documentation +Summary: Javadoc for %{name} +Requires: jpackage-utils + +%description javadoc +This package contains the API documentation for %{name}. + +%prep +%setup -q -n %{bundle}-%{version} +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 + +%build +mvn-rpmbuild install javadoc:aggregate + +%install +# jars +install -d -m 0755 %{buildroot}%{_javadir}/%{project} +install -pm 644 target/%{bundle}-%{version}.jar %{buildroot}%{_javadir}/%{project}/%{bundle}.jar + +# pom +install -d -m 755 %{buildroot}%{_mavenpomdir} +install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{project}-%{bundle}.pom +%add_maven_depmap JPP.%{project}-%{bundle}.pom %{project}/%{bundle}.jar + +# javadoc +install -d -m 0755 %{buildroot}%{_javadocdir}/%{name} +cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name} + + +%files +%doc DEPENDENCIES LICENSE NOTICE +%{_javadir}/* +%{_mavenpomdir}/JPP.%{project}-%{bundle}.pom +%{_mavendepmapfragdir}/%{name} + +%files javadoc +%doc LICENSE +%{_javadocdir}/%{name} + +%changelog +* Fri Dec 16 2011 Tomas Radej - 0.10.0-2 +- Repackaged, minor changes + +* Mon Nov 07 2011 Tomas Radej - 0.10.0-1 +- Initial packaging + diff --git a/sources b/sources index e69de29..2b5dd8b 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +dcf4657b20dde0883ad30cff1ced19de org.apache.felix.gogo.runtime-0.10.0-project.tar.gz