Add support for different editions
authorSam Hague <shague@redhat.com>
Sun, 2 Feb 2014 04:16:33 +0000 (23:16 -0500)
committerSam Hague <shague@redhat.com>
Sun, 2 Feb 2014 04:21:24 +0000 (23:21 -0500)
- Added virtualization and service provider sub packages
- Renamed opendaylight-distribution to opendaylight
- Added proper bundle filters to run.odl.sh script
- Added virt-affinity option to run.odl.sh script
- Added a release build option to buildrpm.sh

Change-Id: Ib164c0e6fd8eedd22bc1ad2447789d1d07854a94
Signed-off-by: Sam Hague <shague@redhat.com>
packaging/rpm/buildrpm.sh
packaging/rpm/opendaylight-controller.spec
packaging/rpm/opendaylight-controller.sysconfig
packaging/rpm/opendaylight-controller.systemd
packaging/rpm/opendaylight-controller.sysv
packaging/rpm/opendaylight-distribution.spec [deleted file]
packaging/rpm/opendaylight.spec [new file with mode: 0644]
packaging/rpm/run.dist.sh [deleted file]
packaging/rpm/run.odl.sh [new file with mode: 0755]

index 9d9ee6481b5b08683e4cad4caab4cb72624cffe1..b2fd0a57c14e144efdf07c214bd23900d967fb67 100755 (executable)
@@ -133,20 +133,20 @@ readonly PJ_OVSDB=2
 readonly PJ_OPENFLOWJAVA=3
 readonly PJ_OPENFLOWPLUGIN=4
 readonly PJ_DEPENDENCIES=5
-readonly PJ_DISTRIBUTION=6
+readonly PJ_OPENDAYLIGHT=6
 readonly PJ_OPENDOVE=7
 readonly PJ_LISPFLOWMAPPING=8
 readonly PJ_LAST=8
 
-projects[$PJ_INTEGRATION]="integration"
-projects[$PJ_CONTROLLER]="controller"
-projects[$PJ_OVSDB]="ovsdb"
-projects[$PJ_OPENFLOWJAVA]="openflowjava"
-projects[$PJ_OPENFLOWPLUGIN]="openflowplugin"
-projects[$PJ_DEPENDENCIES]="controller-dependencies"
-projects[$PJ_DISTRIBUTION]="distribution"
-projects[$PJ_OPENDOVE]="opendove"
-projects[$PJ_LISPFLOWMAPPING]="lispflowmapping"
+projects[$PJ_INTEGRATION]="opendaylight-integration"
+projects[$PJ_CONTROLLER]="opendaylight-controller"
+projects[$PJ_OVSDB]="opendaylight-ovsdb"
+projects[$PJ_OPENFLOWJAVA]="opendaylight-openflowjava"
+projects[$PJ_OPENFLOWPLUGIN]="opendaylight-openflowplugin"
+projects[$PJ_DEPENDENCIES]="opendaylight-controller-dependencies"
+projects[$PJ_OPENDAYLIGHT]="opendaylight"
+projects[$PJ_OPENDOVE]="opendaylight-opendove"
+projects[$PJ_LISPFLOWMAPPING]="opendaylight-lispflowmapping"
 
 versions[$PJ_INTEGRATION]=""
 versions[$PJ_CONTROLLER]=""
@@ -154,7 +154,7 @@ versions[$PJ_OVSDB]=""
 versions[$PJ_OPENFLOWJAVA]=""
 versions[$PJ_OPENFLOWPLUGIN]=""
 versions[$PJ_DEPENDENCIES]=""
-versions[$PJ_DISTRIBUTION]=""
+versions[$PJ_OPENDAYLIGHT]=""
 versions[$PJ_OPENDOVE]=""
 versions[$PJ_LISPFLOWMAPPING]=""
 
@@ -164,7 +164,7 @@ suffix[$PJ_OVSDB]=""
 suffix[$PJ_OPENFLOWJAVA]=""
 suffix[$PJ_OPENFLOWPLUGIN]=""
 suffix[$PJ_DEPENDENCIES]=""
-suffix[$PJ_DISTRIBUTION]=""
+suffix[$PJ_OPENDAYLIGHT]=""
 suffix[$PJ_OPENDOVE]=""
 suffix[$PJ_LISPFLOWMAPPING]=""
 
@@ -174,8 +174,9 @@ gitprojects="$PJ_INTEGRATION $PJ_CONTROLLER $PJ_OVSDB $PJ_OPENFLOWJAVA $PJ_OPENF
 function clone_source {
     for i in $gitprojects; do
         # We only care about a shallow clone (no need to grab the entire project)
-        log $LOGINFO "Cloning ${projects[$i]} to $buildroot/${projects[$i]}"
-        git clone --depth 0 https://git.opendaylight.org/gerrit/p/${projects[$i]}.git $buildroot/${projects[$i]}
+        project=${projects[$i]:13}
+        log $LOGINFO "Cloning $project to $buildroot/${projects[$i]}"
+        git clone --depth 0 https://git.opendaylight.org/gerrit/p/$project.git $buildroot/${projects[$i]}
     done
 }
 
@@ -192,40 +193,57 @@ function snapshot_source {
 # - copy the archives to the SOURCES dir
 # shague: need another archive method for snapshot getsource builds since
 # the source did not come from a git repo.
+# versionmajor=0.1.0.snap.20140201.191633.git.7c5788d
+# versionsnapsuffix=snap.20140201.191633.git.7c5788d
+
 function mk_git_archives {
     local timesuffix=$1
 
     for i in $gitprojects; do
         if [ "$version" == "" ]; then
-            cd $buildroot/${projects[$i]}
-            suffix[$i]="snap.$timesuffix.git.$(git log -1 --pretty=format:%h)"
+            if [ "$buildtype" == "snapshot" ]; then
+                cd $buildroot/${projects[$i]}
+                suffix[$i]="snap.$timesuffix.git.$(git log -1 --pretty=format:%h)"
+            else
+                suffix[$i]=""
+            fi
         else
-            suffix[$i]="snap.$version"
+            if [ "$buildtype" == "snapshot" ]; then
+                suffix[$i]="snap.$version"
+            else
+                suffix[$i]=""
+            fi
         fi
 
-        cd $buildroot/integration/packaging/rpm
+        cd $buildroot/${projects[$PJ_INTEGRATION]}/packaging/rpm
+        # Get the version from the spec and append the suffix.
         # integration uses the controller.spec because there isn't an integration.spec to query.
         if [ ${projects[$i]} == ${projects[$PJ_INTEGRATION]} ]; then
-            versions[$i]="$( rpm -q --queryformat="%{version}\n" --specfile opendaylight-${projects[$PJ_CONTROLLER]}.spec | head -n 1 | awk '{print $1}').${suffix[$i]}"
+            versions[$i]="$( rpm -q --queryformat="%{version}\n" --specfile ${projects[$PJ_CONTROLLER]}.spec | head -n 1 | awk '{print $1}').${suffix[$i]}"
         else
-            versions[$i]="$( rpm -q --queryformat="%{version}\n" --specfile opendaylight-${projects[$i]}.spec | head -n 1 | awk '{print $1}').${suffix[$i]}"
+            versions[$i]="$( rpm -q --queryformat="%{version}\n" --specfile ${projects[$i]}.spec | head -n 1 | awk '{print $1}').${suffix[$i]}"
+        fi
+
+        # User really wants to set the version.
+        if [ "$buildtype" == "release" ] && [ "$version" != "" ]; then
+            versions[$i]=$version
         fi
 
-        log $LOGINFO "Building archive: $tmpbuild/opendaylight-${projects[$i]}-${versions[$i]}.tar.xz"
+        log $LOGINFO "Building archive: $tmpbuild/${projects[$i]}-${versions[$i]}.tar.xz"
         cd $buildroot/${projects[$i]}
-        git archive --prefix=opendaylight-${projects[$i]}-${versions[$i]}/ HEAD | \
-            xz > $tmpbuild/opendaylight-${projects[$i]}-${versions[$i]}.tar.xz
+        git archive --prefix=${projects[$i]}-${versions[$i]}/ HEAD | \
+            xz > $tmpbuild/${projects[$i]}-${versions[$i]}.tar.xz
 
     done
 
     # Use the controller versions because these projects don't have a repo.
-    for i in `seq $PJ_DEPENDENCIES $PJ_DISTRIBUTION`; do
+    for i in `seq $PJ_DEPENDENCIES $PJ_OPENDAYLIGHT`; do
         suffix[$i]=${suffix[$PJ_CONTROLLER]}
         versions[$i]=${versions[$PJ_CONTROLLER]}
     done
 
     # Don't forget any patches.
-    cp $buildroot/integration/packaging/rpm/opendaylight-integration-fix-paths.patch $tmpbuild
+    cp $buildroot/${projects[$PJ_INTEGRATION]}/packaging/rpm/opendaylight-integration-fix-paths.patch $tmpbuild
 }
 
 # Pushes rpms to the specified Nexus repository
@@ -302,15 +320,19 @@ function build_project {
     local versionsnapsuffix="$3"
 
     log $LOGINFO ":::::"
-    log $LOGINFO "::::: building opendaylight-$project.rpm"
+    log $LOGINFO "::::: building $project.rpm"
     log $LOGINFO ":::::"
 
-    cp -f $buildroot/integration/packaging/rpm/opendaylight-$project.spec \
-        $tmpbuild
+    cp -f $buildroot/${projects[$PJ_INTEGRATION]}/packaging/rpm/$project.spec $tmpbuild
 
     cd $tmpbuild
-    # Find lines starting with Version: and replace the rest of the line with the versionsnapsuffix
-    sed -r -i -e '/^Version:/s/\s*$/'".$versionsnapsuffix/" opendaylight-$project.spec
+    if [ "$buildtype" == "release" ] && [ "$version" != "" ]; then
+        # Find lines starting with Version: and replace the whole line with the version requested
+        sed -r -i -e '/^Version:./c\Version: '"$versionmajor"  $project.spec
+    else
+        # Find lines starting with Version: and replace the rest of the line with the versionsnapsuffix
+        sed -r -i -e '/^Version:/s/\s*$/'".$versionsnapsuffix/" $project.spec
+    fi
 
     # Set the write values in the spec files.
     case "$project" in
@@ -318,17 +340,17 @@ function build_project {
         # Set the version for the integration source.
         # Find lines with opendaylight-integration-%{version} and replace %{version} with the version.
         sed -r -i -e '/opendaylight-integration-\%\{version\}/s/\%\{version\}/'"${versions[$PJ_INTEGRATION]}"'/g' \
-            opendaylight-$project.spec
+            $project.spec
         ;;
 
     ${projects[$PJ_DEPENDENCIES]})
         # Set the version for ovsdb in the dependencies spec.
         # Find lines with opendaylight-ovsdb-%{version} and replace %{version} with the version.
         sed -r -i -e '/opendaylight-ovsdb-\%\{version\}/s/\%\{version\}/'"${versions[$PJ_OVSDB]}"'/g' \
-            opendaylight-$project.spec
+            $project.spec
         # Find lines with opendaylight-ovsdb-dependencies-%{version} and replace %{version} with the version.
         sed -r -i -e '/opendaylight-ovsdb-dependencies-\%\{version\}/s/\%\{version\}/'"${versions[$PJ_OVSDB]}"'/g' \
-            opendaylight-$project.spec
+            $project.spec
         ;;
 
     *)
@@ -337,15 +359,15 @@ function build_project {
 
     # Rewrite the mvn command in the rpmbuild if the user requests it.
     if [ "$mockmvn" != "" ]; then
-        # Find lines starting with export MAVEN_OPTS= and repalce the whole line with $mockmvn
-        sed -r -i -e '/^export MAVEN_OPTS=./c\ '"$mockmvn" opendaylight-$project.spec
+        # Find lines starting with export MAVEN_OPTS= and replace the whole line with $mockmvn
+        sed -r -i -e '/^export MAVEN_OPTS=./c\ '"$mockmvn" $project.spec
     fi
 
     # Build the source RPM for use by mock later.
     #rm -f SRPMS/*.src.rpm
-    log $LOGINFO "::::: building opendaylight-$project.src.rpm in rpmbuild"
+    log $LOGINFO "::::: building $project.src.rpm with rpmbuild"
     rpmbuild -bs --define '%_topdir '"`pwd`" --define '%_sourcedir %{_topdir}' \
-       --define "%dist .$pkg_dist_suffix" opendaylight-$project.spec
+       --define "%dist .$pkg_dist_suffix" $project.spec
 
     rc=$?
     if [ $rc != 0 ]; then
@@ -353,16 +375,20 @@ function build_project {
         exit $RCRPMBUILDERROR
     fi
 
-    log $LOGINFO "::::: building opendaylight-$project.rpm in mock"
+    log $LOGINFO "::::: building $project.rpm with mock"
 
-    resultdir="repo/$project.$pkg_dist_suffix.noarch.snap"
+    if [ "$buildtype" == "release" ]; then
+        resultdir="repo/$project.$pkg_dist_suffix.noarch"
+    else
+        resultdir="repo/$project.$pkg_dist_suffix.noarch.snap"
+    fi
 
     # Build the rpm using mock.
     # Keep the build because we will need the distribution zip file for later
     # when building the controller-dependencies.rpm.
     eval $mock_cmd $mockdebug -r $dist --no-clean --no-cleanup-after --resultdir \"$resultdir\" \
         -D \"dist .$pkg_dist_suffix\" -D \"noclean 1\" \
-        SRPMS/opendaylight-$project-$versionmajor-*.src.rpm
+        SRPMS/$project-$versionmajor-*.src.rpm
 
     rc=$?
     if [ $rc != 0 ]; then
@@ -370,36 +396,38 @@ function build_project {
         exit $RCRMOCKERROR
     fi
 
+    log $LOGINFO "::::: finished building $project.rpm in mock"
+
     # Copy the distribution zip from the controller and ovsdb projects
     # for use in the dependencies.rpm.
     case "$project" in
-    controller)
+    ${projects[$PJ_CONTROLLER]})
         log $LOGINFO "::::: Copying $project distribution.zip."
         eval $mock_cmd $mockdebug -r $dist --no-clean --no-cleanup-after --resultdir \"$resultdir\" \
             -D \"dist .$pkg_dist_suffix\" -D \"noclean 1\" \
-            --copyout \"builddir/build/BUILD/opendaylight-$project-$versionmajor/opendaylight/distribution/opendaylight/target/distribution.opendaylight-osgipackage.zip\" \"$resultdir/opendaylight-$project-$versionmajor.zip\"
+            --copyout \"builddir/build/BUILD/$project-$versionmajor/opendaylight/distribution/opendaylight/target/distribution.opendaylight-osgipackage.zip\" \"$resultdir/$project-$versionmajor.zip\"
         rc1=$?
-        ln -sf $resultdir/opendaylight-$project-$versionmajor.zip $tmpbuild
+        ln -sf $resultdir/$project-$versionmajor.zip $tmpbuild
         rc2=$?
-        if [ ! -e $tmpbuild/opendaylight-$project-$versionmajor.zip ]; then
+        if [ ! -e $tmpbuild/$project-$versionmajor.zip ]; then
             log $LOGERROR "cannot find $project distribution zip file (rc=$rc1:$rc2)."
             exit $RCERROR
         fi
         ;;
 
-    ovsdb)
+    ${projects[$PJ_OVSDB]})
         log $LOGINFO "::::: Copying $project distribution.zip."
         # Grab the version from the pom.xml file.
         # Get the lines between the parent tags, then get the line with the version tag and remove leading space and
         # the tag itself, then remove the trailing tag to be left with the version.
-        pomversion=`sed -n -e '/<parent>/,/<\/parent>/p' "$buildroot"/ovsdb/pom.xml | sed -n -e '/<version>/s/.*<version>//p' | sed -n -e 's/<\/version>//p'`
+        pomversion=`sed -n -e '/<parent>/,/<\/parent>/p' "$buildroot/${projects[$PJ_OVSDB]}/pom.xml" | sed -n -e '/<version>/s/.*<version>//p' | sed -n -e 's/<\/version>//p'`
         eval $mock_cmd $mockdebug -r $dist --no-clean --no-cleanup-after --resultdir \"$resultdir\" \
             -D \"dist .$pkg_dist_suffix\" -D \"noclean 1\" \
-            --copyout \"builddir/build/BUILD/opendaylight-$project-$versionmajor/distribution/opendaylight/target/distribution.$project-$pomversion-osgipackage.zip\" \"$resultdir/opendaylight-$project-$versionmajor.zip\"
+            --copyout \"builddir/build/BUILD/$project-$versionmajor/distribution/opendaylight/target/distribution.ovsdb-$pomversion-osgipackage.zip\" \"$resultdir/$project-$versionmajor.zip\"
         rc1=$?
-        ln -sf $resultdir/opendaylight-$project-$versionmajor.zip $tmpbuild
+        ln -sf $resultdir/$project-$versionmajor.zip $tmpbuild
         rc2=$?
-        if [ ! -e $tmpbuild/opendaylight-ovsdb-$versionmajor.zip ]; then
+        if [ ! -e $tmpbuild/$project-$versionmajor.zip ]; then
             log $LOGERROR "cannot find $project distribution zip file (rc=$rc1:$rc2)."
             exit $RCERROR
         fi
@@ -682,8 +710,10 @@ snapshot)
 
 buildroot)
     cd $buildroot
-    for i in `seq $PJ_INTEGRATION $PJ_OPENFLOWPLUGIN`; do
-        if [ ! -d ${projects[$i]} ]; then
+
+    # Check if all the projects dirs are really there.
+    for i in $gitprojects; do
+        if [ ! -d ${projects[$i]}; then
             log $LOGERROR "Missing ${projects[$i]}"
             exit $RCPARMSERROR
         fi
@@ -695,8 +725,10 @@ if [ "$buildtype" = "snapshot" ]; then
     log $LOGINFO "Building a snapshot build"
     build_snapshot
 else
-    log $LOGINFO "Release builds are not supported yet."
-    build_release
+    #log $LOGINFO "Release builds are not supported yet."
+    #build_release
+    log $LOGINFO "Building a release build"
+    build_snapshot
 fi
 
 date_end=$(date +%s)
index 20605fa3f3b7117c7fa9738dc6a2157f77e53c48..fa68a278481474abd0501cb3cfd41cb91aaef601 100644 (file)
@@ -24,13 +24,13 @@ BuildArch: noarch
 
 BuildRequires: java-devel
 BuildRequires: maven
+Requires: java >= 1:1.7.0
 %if 0%{?fedora}
 BuildRequires: systemd
 %else
 BuildRequires: sysvinit-tools
 %endif
 
-Requires: java >= 1:1.7.0
 
 # todo: Need to create proper packages for all the dependencies.
 # Here you should have at least dependencies for the packages containing .jar
@@ -38,9 +38,9 @@ Requires: java >= 1:1.7.0
 # dependencies package.
 #Requires: slf4j
 
-Requires: %{name}-dependencies
-Requires: opendaylight-openflowjava
-Requires: opendaylight-openflowplugin
+#Requires: %{name}-dependencies
+#Requires: opendaylight-openflowjava
+#Requires: opendaylight-openflowplugin
 
 %if 0%{?fedora}
 Requires(post): systemd
@@ -122,6 +122,7 @@ mkdir -p %{buildroot}%{resources_dir}/configuration
 mkdir -p %{buildroot}%{data_dir}/configuration
 
 mv tmp/opendaylight/configuration/config.ini %{buildroot}%{configuration_dir}
+sed -i -e 's/#\ ovsdb.of.version=1.3/ovsdb.of.version=1.3/' %{buildroot}%{configuration_dir}/config.ini
 ln -s %{configuration_dir}/config.ini %{buildroot}%{data_dir}/configuration
 mv tmp/opendaylight/configuration/* %{buildroot}%{resources_dir}/configuration
 rmdir tmp/opendaylight/configuration
@@ -151,7 +152,7 @@ install -m 755 -D opendaylight-integration-%{version}/distributions/base/src/ass
 rm %{buildroot}%{resources_dir}/run.sh
 install -m 755 -D opendaylight-integration-%{version}/distributions/virtualization/src/assemble/resources/run.sh \
     %{buildroot}%{resources_dir}/run.sh
-install -m 755 -D opendaylight-integration-%{version}/packaging/rpm/run.dist.sh %{buildroot}%{resources_dir}/run.dist.sh
+install -m 755 -D opendaylight-integration-%{version}/packaging/rpm/run.odl.sh %{buildroot}%{resources_dir}/run.odl.sh
 
 # Usually one wants to replace the .jar files of the dependencies by symlinks
 # to the ones provided to the system. This assumes the dependencies have been
@@ -184,7 +185,7 @@ find %{buildroot}%{data_dir} -type f -exec chmod 755 {} \;
 chmod 755 %{buildroot}%{resources_dir}/run.sh
 chmod 755 %{buildroot}%{resources_dir}/run.base.sh
 chmod 755 %{buildroot}%{resources_dir}/run.internal.sh
-chmod 755 %{buildroot}%{resources_dir}/run.dist.sh
+chmod 755 %{buildroot}%{resources_dir}/run.odl.sh
 %if 0%{?rhel}
 chmod 755 %{buildroot}%{_initddir}/%{name}
 %endif
@@ -274,6 +275,13 @@ fi
 %endif
 
 %changelog
+* 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.
+
+* Wed Jan 22 2014 Sam Hague <shague@redhat.com> - 0.1.0-0.9.0
+- Updates to support editions.
+
 * Wed Jan 22 2014 Sam Hague <shague@redhat.com> - 0.1.0-0.8.0
 - Fix changelog day error.
 
index b70f565e3574285f7d191b06c3b1f883fe2a5c18..b6b550df40d9c9e9693371e112100d50948f577c 100644 (file)
@@ -13,9 +13,10 @@ ODL_DATADIR=/var/lib/opendaylight-controller
 # virtualization ovsdb     virt-ovsdb
 # virtualization vtn       virt-vtn
 # virtualization opendove  virt-opendove
+# virtualization affinity  virt-affinity
 # service provider         sp
 ODL_DIST="virt-ovsdb"
 
 # Any additional options required.
 # I.E. -of13, -debug, or -console
-ODL_OPTS=""
\ No newline at end of file
+ODL_OPTS="-of13"
\ No newline at end of file
index b7f1ea970d09617adee9dbe61e3f7c03e9e79aa4..7120164ff4ce55c2e9aebc13beab77b506dd89d5 100644 (file)
@@ -9,8 +9,8 @@ User=opendaylight
 Group=opendaylight
 EnvironmentFile=-/etc/sysconfig/opendaylight-controller
 WorkingDirectory=/var/lib/opendaylight-controller
-ExecStart=-/usr/share/opendaylight-controller/run.dist.sh $ODL_DIST $ODL_OPTS -start
-ExecStop=-/usr/share/opendaylight-controller/run.dist.sh -stop
+ExecStart=-/usr/share/opendaylight-controller/run.odl.sh $ODL_DIST $ODL_OPTS -start
+ExecStop=-/usr/share/opendaylight-controller/run.odl.sh -stop
 
 [Install]
 WantedBy=multi-user.target
index c26e51018c8c1efcef711fa5068e8dd439c4f5d1..ac941f94e4d7174d6daf8a7b504307e96214a22b 100644 (file)
@@ -20,7 +20,7 @@
 # Source function library.
 . /etc/rc.d/init.d/functions
 
-exec="/usr/share/opendaylight-controller/run.dist.sh"
+exec="/usr/share/opendaylight-controller/run.odl.sh"
 prog="opendaylight-controller"
 config="/etc/opendaylight-controller/config.ini"
 
diff --git a/packaging/rpm/opendaylight-distribution.spec b/packaging/rpm/opendaylight-distribution.spec
deleted file mode 100644 (file)
index 15d73e7..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-# Spec file only supports RHEL and Fedora now
-%if 0%{?rhel} || 0%{?fedora}
-
-Name: opendaylight-distribution
-Version: 0.1.0
-Release: 0.3.0%{?dist}
-Summary: OpenDaylight SDN Controller Distributions
-Group: Applications/Communications
-License: EPL
-URL: http://www.opendaylight.org
-BuildArch: noarch
-
-Requires: opendaylight-controller
-Requires: opendaylight-ovsdb
-
-%description
-OpenDaylight SDN Controller Distributions
-
-%files
-
-%endif
-
-%changelog
-* Sat Jan 18 2014 Sam Hague <shague@redhat.com> - 0.1.0-0.3.0
-- Removed controller-dependencies from Requires because controller already pulls it in.
-
-* Thu Jan 09 2014 Sam Hague <shague@redhat.com> - 0.1.0-0.2.0
-- Updates for OF1.3 support.
-- Remove java Requires.
-
-* Thu Jan 02 2014 Sam Hague <shague@redhat.com> - 0.1.0-0.1.0
-- Initial package.
diff --git a/packaging/rpm/opendaylight.spec b/packaging/rpm/opendaylight.spec
new file mode 100644 (file)
index 0000000..9a37f15
--- /dev/null
@@ -0,0 +1,77 @@
+# Spec file only supports RHEL and Fedora now
+%if 0%{?rhel} || 0%{?fedora}
+
+Name: opendaylight
+Version: 0.1.0
+Release: 0.4.0%{?dist}
+Summary: OpenDaylight SDN Controller Platform
+Group: Applications/Communications
+License: EPL
+URL: http://www.opendaylight.org
+BuildArch: noarch
+
+Requires: opendaylight-controller
+Requires: opendaylight-controller-dependencies
+Requires: opendaylight-openflowjava
+Requires: opendaylight-openflowplugin
+Requires: opendaylight-ovsdb
+
+%description
+The OpenDaylight SDN Controller Platform provides the core
+services and abstractions needed for building an SDN controller.
+
+The Base edition of OpenDaylight is designed for testing and experimental
+purposes.
+
+%package virtualization
+Summary: OpenDaylight SDN Controller Platform Virtualization Edition
+Group: Applications/Communications
+Requires: %{name}
+#Requires: opendaylight-affinity
+#Requires: opendaylight-defense4all
+#Requires: opendaylight-opendove
+Requires: opendaylight-opendove-odmc
+#Requires: opendaylight-vtn
+
+%description virtualization
+The Virtualization edition of OpenDaylight is geared towards data centers.
+It includes the OVSDB protocol southbound and the Affinity Service, VTN,
+DOVE, and the OpenStack Service.
+
+%package serviceprovider
+Summary: OpenDaylight SDN Controller Platform Virtualization Edition
+Group: Applications/Communications
+Requires: %{name}
+#Requires: opendaylight-affinity
+#Requires: opendaylight-bgpcep
+#Requires: opendaylight-defense4all
+Requires: opendaylight-lispflowmapping
+#Requires: opendaylight-snmp4sdn
+
+%description serviceprovider
+The Service Provider edition of OpenDaylight is designed for network operator
+use. It does not include OVSDB, VTN or DOVE, but does include SNMP, BGP-LS,
+PCEP, and LISP southbound and the Affinity Service and the LISP Service northbound.
+
+%files
+
+%files virtualization
+
+%files serviceprovider
+
+%endif
+
+%changelog
+* Sat Feb 01 2014 Sam Hague <shague@redhat.com> - 0.1.0-0.4.0
+- Changed package name to opendaylight.
+- Added edition sub packages.
+
+* Sat Jan 18 2014 Sam Hague <shague@redhat.com> - 0.1.0-0.3.0
+- Removed controller-dependencies from Requires because controller already pulls it in.
+
+* Thu Jan 09 2014 Sam Hague <shague@redhat.com> - 0.1.0-0.2.0
+- Updates for OF1.3 support.
+- Remove java Requires.
+
+* Thu Jan 02 2014 Sam Hague <shague@redhat.com> - 0.1.0-0.1.0
+- Initial package.
diff --git a/packaging/rpm/run.dist.sh b/packaging/rpm/run.dist.sh
deleted file mode 100755 (executable)
index bd5e08b..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/bin/bash
-
-usage() {
-    echo -e "Usage:\t$0 base|virt-ovsdb|virt-vtn|virt-opendove|sp|-stop|-status|help\n"
-
-    echo -e "\tbase: base controller edition, good for simple testing"
-    echo -e "\tvirt-ovsdb: virtualization controller edition based on ovsdb"
-    echo -e "\tvirt-vtn: virtualization controller edition based on vtn (not supported yet)"
-    echo -e "\tvirt-opendove: virtualization controller edition based on opendove (not supported yet)"
-    echo -e "\tsp: service provider controller edition (not supported yet)"
-    echo -e "\t-stop: stop the controller"
-    echo -e "\t-status: check if controller is currently running"
-    echo -e "\thelp: generate this help text"
-}
-
-option=$1;
-shift
-
-case "$option" in
-base)
-    bundlefilter="-bundlefilter org.opendaylight.ovsdb.ovsdb.neutron"
-    exec /usr/share/opendaylight-controller/run.base.sh $bundlefilter "$@"
-    ;;
-
-virt-ovsdb)
-    bundlefilter="-bundlefilter org.opendaylight.(vtn|opendove)"
-    exec /usr/share/opendaylight-controller/run.sh -virt ovsdb "$@"
-    ;;
-
-virt-vtn)
-    echo "$option not supported yet"
-    #bundlefilter="-bundlefilter org.opendaylight.(affinity|opendove|ovsdb|controller.(arphandler|samples)"
-    #exec /usr/share/opendaylight-controller/run.sh -virt vtn "$@"
-    ;;
-
-virt-opendove)
-    echo "$option not supported yet"
-    #bundlefilter="-bundlefilter org.opendaylight.(ovsdb|vtn)"
-    #exec /usr/share/opendaylight-controller/run.sh -virt opendove "$@"
-    ;;
-
-sp)
-    echo "$option not supported yet"
-    #exec /usr/share/opendaylight-controller/run.sh sp "$@"
-    ;;
-
--stop)
-    exec /usr/share/opendaylight-controller/run.internal.sh -stop
-    ;;
-
--status)
-    exec /usr/share/opendaylight-controller/run.internal.sh -status
-    ;;
-
-help)
-    usage
-    exit 0
-    ;;
-*)
-    echo "Invalid option: $option"
-    usage
-    ;;
-esac
-
-exit -1
diff --git a/packaging/rpm/run.odl.sh b/packaging/rpm/run.odl.sh
new file mode 100755 (executable)
index 0000000..9ecae9a
--- /dev/null
@@ -0,0 +1,98 @@
+#!/bin/bash
+
+usage() {
+    echo -e "Usage:\t$0 base|virt-ovsdb|virt-vtn|virt-opendove|virt-affinity|sp|-stop|-status|help\n"
+
+    echo -e "\tbase: base controller edition, good for simple testing"
+    echo -e "\tvirt-ovsdb: virtualization controller edition based on ovsdb"
+    echo -e "\tvirt-vtn: virtualization controller edition based on vtn (not supported yet)"
+    echo -e "\tvirt-opendove: virtualization controller edition based on opendove (not supported yet)"
+    echo -e "\tsp: service provider controller edition (not supported yet)"
+    echo -e "\t-stop: stop the controller"
+    echo -e "\t-status: check if controller is currently running"
+    echo -e "\thelp: generate this help text"
+}
+
+option=$1;
+shift
+
+case "$option" in
+base)
+    filter="affinity|bgpcep|lispflowmapping|opendove|ovsdb.ovsdb.neutron|snmp4sdn|vtn|\
+yangtools.model.(ietf-ted-2013|ietf-topology-isis-2013|ietf-topology-l3-2013|\
+ietf-topology-l3-unicast-igp-2013|ietf-topology-ospf-2013)"
+
+    bundlefilter="-bundlefilter org.opendaylight.(${filter})"
+    exec /usr/share/opendaylight-controller/run.base.sh $bundlefilter "$@"
+    ;;
+
+virt-ovsdb)
+    filter="opendove|vtn|\
+bgpcep|lispflowmapping|snmp4sdn|\
+yangtools.model.(ietf-ted-2013|ietf-topology-isis-2013|ietf-topology-l3-2013|\
+ietf-topology-l3-unicast-igp-2013|ietf-topology-ospf-2013)"
+
+    bundlefilter="-bundlefilter org.opendaylight.(${filter})"
+    exec /usr/share/opendaylight-controller/run.base.sh $bundlefilter "$@"
+    ;;
+
+virt-opendove)
+    echo "$option not supported yet"
+    filter="ovsdb|vtn|\
+bgpcep|lispflowmapping|snmp4sdn|\
+yangtools.model.(ietf-ted-2013|ietf-topology-isis-2013|ietf-topology-l3-2013|\
+ietf-topology-l3-unicast-igp-2013|ietf-topology-ospf-2013)"
+
+    bundlefilter="-bundlefilter org.opendaylight.(${filter})"
+    exec /usr/share/opendaylight-controller/run.base.sh $bundlefilter "$@"
+    ;;
+
+virt-vtn)
+    echo "$option not supported yet"
+    filter="affinity|opendove|ovsdb|controller.(arphandler|samples)|\
+bgpcep|lispflowmapping|snmp4sdn|\
+yangtools.model.(ietf-ted-2013|ietf-topology-isis-2013|ietf-topology-l3-2013|\
+ietf-topology-l3-unicast-igp-2013|ietf-topology-ospf-2013)"
+
+    bundlefilter="-bundlefilter org.opendaylight.(${filter})"
+    exec /usr/share/opendaylight-controller/run.base.sh $bundlefilter "$@"
+    ;;
+
+virt-affinity)
+    echo "$option not supported yet"
+    filter="vtn|opendove|ovsdb|controller.samples|\
+bgpcep|lispflowmapping|snmp4sdn|\
+yangtools.model.(ietf-ted-2013|ietf-topology-isis-2013|ietf-topology-l3-2013|\
+ietf-topology-l3-unicast-igp-2013|ietf-topology-ospf-2013)"
+
+    bundlefilter="-bundlefilter org.opendaylight.(${filter})"
+    exec /usr/share/opendaylight-controller/run.base.sh $bundlefilter "$@"
+    ;;
+
+sp)
+    echo "$option not supported yet"
+    filter="opendove|ovsdb.ovsdb.neutron|vtn"
+
+    bundlefilter="-bundlefilter org.opendaylight.(${filter})"
+    exec /usr/share/opendaylight-controller/run.base.sh $bundlefilter "$@"
+    ;;
+
+-stop)
+    exec /usr/share/opendaylight-controller/run.internal.sh -stop
+    ;;
+
+-status)
+    exec /usr/share/opendaylight-controller/run.internal.sh -status
+    ;;
+
+help)
+    usage
+    exit 0
+    ;;
+*)
+    echo "Invalid option: $option"
+    usage
+    ;;
+esac
+
+exit -1