Add yangtools to rpm packaging. Also remove test artifacts from some packages.
authorSam Hague <shague@redhat.com>
Sun, 9 Feb 2014 04:41:53 +0000 (23:41 -0500)
committerSam Hague <shague@redhat.com>
Sun, 9 Feb 2014 04:41:53 +0000 (23:41 -0500)
- Added yangtools.spec to make the yangtools.rpm.
- Modified controller.spec to not package the yangtools. There is still an issue
with the yangtools.thirdparty.(antlr4|extend-lib-osgi) jars still being pulled in
by the controller project. Need to have them moved to the yangtools package.
- Modified opendaylight.spec to include the new yangtools rpm.
- Removed test artifacts from openflowjava and openflowplugin rpms.

Change-Id: I9535bc0b18e68d3a5a8f7940312ce2ebc730e2ba
Signed-off-by: Sam Hague <shague@redhat.com>
packaging/rpm/opendaylight-controller.spec
packaging/rpm/opendaylight-openflowjava.spec
packaging/rpm/opendaylight-openflowplugin.spec
packaging/rpm/opendaylight-yangtools.spec [new file with mode: 0644]
packaging/rpm/opendaylight.spec

index fa68a278481474abd0501cb3cfd41cb91aaef601..e53cd1395dd3b6872021a35d7eef57de058b12dc 100644 (file)
@@ -3,7 +3,7 @@
 
 Name: opendaylight-controller
 Version: 0.1.0
-Release: 0.8.0%{?dist}
+Release: 0.9.0%{?dist}
 Summary: OpenDaylight SDN Controller
 Group: Applications/Communications
 License: EPL
@@ -167,6 +167,10 @@ do
 done
 
 cd %{buildroot}%{resources_dir}/plugins
+# rm the yangtools since they are part of the yangtools.rpm, but keep the yangtools.thirdparty
+mv org.opendaylight.yangtools.thirdparty.* /tmp
+rm org.opendaylight.yangtools.*
+mv /tmp/org.opendaylight.yangtools.thirdparty.* .
 for src in $( ls -I "org.opendaylight.*" );
 do
     rm -f ${src}
@@ -275,6 +279,9 @@ fi
 %endif
 
 %changelog
+* Sat Feb 08 2014 Sam Hague <shague@redhat.com> - 0.1.0-0.2.0
+- Remove yangtools artifacts.
+
 * Sat Feb 01 2014 Sam Hague <shague@redhat.com> - 0.1.0-0.4.0
 - Changed package name to opendaylight.
 - Removed openflowjava and openflowplugin Requires.
index 3f25b5e33de78260f17a5ebc08ccc00496432223..9e49f69cd4abc0cfb4a10bb78bd4e23aa6dd0ad1 100644 (file)
@@ -3,7 +3,7 @@
 
 Name: opendaylight-openflowjava
 Version: 0.1.0
-Release: 0.1.0%{?dist}
+Release: 0.2.0%{?dist}
 Summary: OpenDaylight Openflow Java
 Group: Applications/Communications
 License: EPL
@@ -69,14 +69,6 @@ do
     fi
 done
 
-for src in $( ls %{_builddir}/%{buildsubdir}/openflow-protocol-it/target/*.jar);
-do
-    if [ "${src}" == "${src/javadoc.jar/}" ]; then
-        tgt=org.opendaylight.openflowjava.$(basename ${src})
-        mv ${src} %{buildroot}%{resources_dir}/plugins/${tgt}
-    fi
-done
-
 for src in $( ls %{_builddir}/%{buildsubdir}/openflow-protocol-spi/target/*.jar);
 do
     if [ "${src}" == "${src/javadoc.jar/}" ]; then
@@ -145,5 +137,8 @@ find %{buildroot}%{resources_dir} -type f -exec chmod 644 {} \;
 %endif
 
 %changelog
+* Sat Feb 08 2014 Sam Hague <shague@redhat.com> - 0.1.0-0.2.0
+- Remove test artifacts.
+
 * Tue Jan 07 2014 Hsin-Yi Shen <hshen@redhat.com> - 0.1.0-0.1.0
 - Initial package.
index 28edd0f1c2ee21de36817fe87ef4c32a7c988e57..c2d325cefa5c493ad633b00212c2ba554c2b8f1d 100644 (file)
@@ -3,7 +3,7 @@
 
 Name: opendaylight-openflowplugin
 Version: 0.1.0
-Release: 0.1.0%{?dist}
+Release: 0.2.0%{?dist}
 Summary: OpenDaylight Openflow Plugin
 Group: Applications/Communications
 License: EPL
@@ -30,7 +30,13 @@ Requires: java >= 1:1.7.0
 
 
 %description
-OpenDaylight Openflow Plugin
+The Openflow Protocol Library will be an implementation of Openflow
+Protocol as defined in Openflow Switch Specification v1.3 and later
+versions.
+
+The library is designed to be extensible from third-party bundles in
+order to support vendor extensions and should serve as a basis for
+Openflow Southbound Plugin for Controller.
 
 
 %prep
@@ -67,6 +73,10 @@ mkdir -p %{buildroot}%{resources_dir}/plugins
 # Only install the extra jars needed by openflowplugin
 # opendaylight jars will be moved to the plugins dir and external jars will be
 # symlinked to the opendaylight dependencies directory.
+# rm some test files that are not distributed
+rm tmp/org.opendaylight.openflowplugin.drop-test-*
+rm tmp/org.opendaylight.openflowplugin.test-provider-*
+
 for src in $( ls tmp/opendaylight/plugins/*.jar);
 do
     tgt=$(basename ${src})
@@ -105,5 +115,9 @@ rm -rf tmp
 %endif
 
 %changelog
+* Sat Feb 08 2014 Sam Hague <shague@redhat.com> - 0.1.0-0.2.0
+- Remove test artifacts.
+- Update description.
+
 * Wed Jan 08 2014 Hsin-Yi Shen <hshen@redhat.com> - 0.1.0-0.1.0
 - Initial package.
diff --git a/packaging/rpm/opendaylight-yangtools.spec b/packaging/rpm/opendaylight-yangtools.spec
new file mode 100644 (file)
index 0000000..2433c94
--- /dev/null
@@ -0,0 +1,141 @@
+# Spec file only supports RHEL and Fedora now
+%if 0%{?rhel} || 0%{?fedora}
+
+Name: opendaylight-yangtools
+Version: 0.1.0
+Release: 0.1.0%{?dist}
+Summary: OpenDaylight yangtools
+Group: Applications/Communications
+License: EPL
+URL: http://www.opendaylight.org
+
+# todo: Temporary method for generating tarball
+# git clone https://git.opendaylight.org/gerrit/p/yangtools.git
+# cd yangtools
+# git archive --prefix=opendaylight-yangtools-0.1.0/ HEAD | xz > opendaylight-yangtools-0.1.0.tar.xz
+Source0: %{name}-%{version}.tar.xz
+
+BuildArch: noarch
+
+BuildRequires: java-devel
+BuildRequires: maven
+Requires: java >= 1:1.7.0
+
+# This is the directory where all the application resources (scripts,
+# libraries, etc) will be installed: /usr/share/opendaylight
+%global resources_dir %{_datadir}/opendaylight-controller
+
+# This is the directory that has all the JAVA dependencies.
+%global deps_dir %{_javadir}/opendaylight-controller-dependencies
+
+
+%description
+YANG Tools is a infrastructure project aiming to develop necessary
+tooling and libraries providing support of NETCONF and YANG for Java
+(JVM-language based) projects and applications, such as Model Driven
+SAL for Controller (which uses YANG as it's modeling language) and
+Netconf / OFConfig plugins.
+
+
+%prep
+
+%setup -q
+
+
+%build
+
+# This regular maven build will need to be replaced by the distribution
+# specific maven build command, but this is ok for now:
+# todo: eventually move to using mvn-build or mvn-rpmbuild so dependencies are
+# not downloaded.
+# Don't do the tests since those are already covered by the normal merge and
+# verify process and this build does not need to verify them.
+# maven.compile.fork is used to reduce the build time.
+#export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m" && \
+#  mvn clean install -Dmaven.test.skip=true -DskipIT -Dmaven.compile.fork=true
+export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m" && mvn clean install -Dmaven.test.skip=true
+
+
+%install
+
+# Create the directories:
+install -d -m 755 %{buildroot}%{resources_dir}/plugins
+
+while read artifact; do
+    src=$(find . -name "*${artifact}" -a ! -name "*javadoc.jar" -a ! -name "*sources.jar")
+    if [ -f "${src}" ]; then
+        tgt=$(basename ${src})
+        install -m 644 ${src} %{buildroot}%{resources_dir}/plugins/org.opendaylight.yangtools.${tgt}
+    fi
+done <<'.'
+binding-generator-api-*.jar
+binding-generator-impl-*.jar
+binding-generator-spi-*.jar
+binding-generator-util-*.jar
+binding-model-api-*.jar
+binding-type-provider-*.jar
+concepts-*.jar
+yang-binding-*.jar
+yang-common-*.jar
+yang-data-api-*.jar
+yang-data-impl-*.jar
+yang-data-util-*.jar
+yang-model-api-*.jar
+yang-model-util-*.jar
+yang-parser-api-*.jar
+yang-parser-impl-*.jar
+.
+
+# These next two loops have chairs that need a model prefix.
+# But first take care of these topology jars. Notice there is another topology jar
+# in the loop after this one, but its pattern matches all the topology jars and
+# causes the -f to fail so break the loops apart. Some master regex god can
+# probably combine the loops with magic.
+while read base artifact; do
+    src=$(find . -name "*${artifact}" -a ! -name "*javadoc.jar" -a ! -name "*sources.jar")
+    if [ -f "${src}" ]; then
+        tgt=$(basename ${src})
+        install -m 644 ${src} %{buildroot}%{resources_dir}/plugins/org.opendaylight.yangtools.model.${tgt}
+        rm ${src}
+    fi
+done <<'.'
+model ietf-topology-isis-*.jar
+model ietf-topology-l3-unicast-igp-*.jar
+model ietf-topology-ospf-*.jar
+.
+
+while read base artifact; do
+    src=$(find . -name "*${artifact}" -a ! -name "*javadoc.jar" -a ! -name "*sources.jar")
+    if [ -f "${src}" ]; then
+        tgt=$(basename ${src})
+        install -m 644 ${src} %{buildroot}%{resources_dir}/plugins/org.opendaylight.yangtools.model.${tgt}
+    fi
+done <<'.'
+model ietf-inet-types-*.jar
+model ietf-ted-*.jar
+model ietf-topology-*.jar
+model ietf-yang-types-*.jar
+model opendaylight-l2-types-*.jar
+model yang-ext-*.jar
+.
+
+# Remove the temporary directory:
+rm -rf tmp
+
+
+%clean
+%if "%{noclean}" == "1"
+    exit 0
+%endif
+
+
+%files
+
+%{resources_dir}
+
+
+%endif
+
+%changelog
+* Sat Feb 08 2014 Sam Hague <shague@redhat.com> - 0.1.0-0.1.0
+- Initial package.
index 9a37f1511a0cc681b518f11effe52277d003ae10..59603f0985af8a7f8b7fbb7947cddeee7db7046c 100644 (file)
@@ -3,7 +3,7 @@
 
 Name: opendaylight
 Version: 0.1.0
-Release: 0.4.0%{?dist}
+Release: 0.5.0%{?dist}
 Summary: OpenDaylight SDN Controller Platform
 Group: Applications/Communications
 License: EPL
@@ -15,6 +15,7 @@ Requires: opendaylight-controller-dependencies
 Requires: opendaylight-openflowjava
 Requires: opendaylight-openflowplugin
 Requires: opendaylight-ovsdb
+Requires: opendaylight-yangtools
 
 %description
 The OpenDaylight SDN Controller Platform provides the core
@@ -30,7 +31,7 @@ Requires: %{name}
 #Requires: opendaylight-affinity
 #Requires: opendaylight-defense4all
 #Requires: opendaylight-opendove
-Requires: opendaylight-opendove-odmc
+#Requires: opendaylight-opendove-odmc
 #Requires: opendaylight-vtn
 
 %description virtualization
@@ -62,6 +63,9 @@ PCEP, and LISP southbound and the Affinity Service and the LISP Service northbou
 %endif
 
 %changelog
+* Sat Feb 08 2014 Sam Hague <shague@redhat.com> - 0.1.0-0.5.0
+- Add yangtools package.
+
 * Sat Feb 01 2014 Sam Hague <shague@redhat.com> - 0.1.0-0.4.0
 - Changed package name to opendaylight.
 - Added edition sub packages.