Update ODL RPM to Helium SR2
authorDaniel Farrell <dfarrell@redhat.com>
Mon, 2 Feb 2015 18:49:37 +0000 (13:49 -0500)
committerDaniel Farrell <dfarrell@redhat.com>
Mon, 16 Mar 2015 03:00:46 +0000 (23:00 -0400)
- Makes current RPM version 0.2.2-1
- Includes 0.2.1-6 update, which fixed a home dir-related bug

Change-Id: Id022190a5689a93e4650e6b69010819530bec988
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
packaging/rpm/README.md
packaging/rpm/build.sh
packaging/rpm/install.sh
packaging/rpm/opendaylight.spec

index 5cf1dfd38f96c47d2b495f684231893a7e562bff..838b31b6dcecca90e9819783f5034a83addb4eaa 100644 (file)
@@ -1,6 +1,6 @@
 Everything required for building the Karaf OpenDaylight RPM.
 
-Note that the currently supported version is Helium SR1.1.
+Note that the currently supported version is Helium SR2.
 
 ## Building the RPM
 
index 8196ae37478f7d2fad04ee75fdfecef8134f4cbe..999ddb144134db4aefc121d453441fe53c05e1a1 100755 (executable)
@@ -2,11 +2,12 @@
 
 # Common paths used in this script
 # NB: Name will need to be updated for both ODL and RMP version bumps
-rpm_name="opendaylight-0.2.1-5.fc20.noarch.rpm"
+rpm_name="opendaylight-0.2.2-1.fc20.noarch.rpm"
 rpm_out_path="$HOME/rpmbuild/RPMS/noarch/$rpm_name"
-src_name="distribution-karaf-0.2.1-Helium-SR1.1.tar.gz"
-src_cache_path="$HOME/$src_name"
-sysd_commit=520321a
+src_name="distribution-karaf-0.2.2-Helium-SR2.tar.gz"
+src_cache_path0="$HOME/$src_name"
+src_cache_path1="/vagrant/$src_name"
+sysd_commit=f984005
 
 # Install required software, add user to mock group for rpmbuild
 sudo yum install -y @development-tools fedora-packager
@@ -16,12 +17,15 @@ sudo usermod -a -G mock $USER
 rpmdev-setuptree
 
 # Put ODL source archive location required by rpmbuild
-if [ -f  $src_cache_path ]; then
-    echo "Using cached version of ODL at $src_cache_path"
-    cp $src_cache_path $HOME/rpmbuild/SOURCES/$src_name
+if [ -f  $src_cache_path0 ]; then
+    echo "Using cached version of ODL at $src_cache_path0"
+    cp $src_cache_path0 $HOME/rpmbuild/SOURCES/$src_name
+elif [ -f  $src_cache_path1 ]; then
+    echo "Using cached version of ODL at $src_cache_path1"
+    cp $src_cache_path1 $HOME/rpmbuild/SOURCES/$src_name
 else
     echo "No cached ODL found, downloading from Nexus..."
-    curl -o $HOME/rpmbuild/SOURCES/$src_name https://nexus.opendaylight.org/content/groups/public/org/opendaylight/integration/distribution-karaf/0.2.1-Helium-SR1.1/$src_name
+    curl -o $HOME/rpmbuild/SOURCES/$src_name https://nexus.opendaylight.org/content/groups/public/org/opendaylight/integration/distribution-karaf/0.2.2-Helium-SR2/$src_name
 fi
 
 # Put systemd unit file archive in rpmbuild's SOURCES dir
index f3edea9cdb981686f2f72ee7da3b25ccdade0dc4..10203f6c9028ddfd1197edf1c7d81b7d768607ff 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env sh
 
 # Update if needed
-rpm_path="$HOME/rpmbuild/RPMS/noarch/opendaylight-0.2.1-5.fc20.noarch.rpm"
+rpm_path="$HOME/rpmbuild/RPMS/noarch/opendaylight-0.2.2-1.fc20.noarch.rpm"
 
 # Install ODL
 echo "Installing ODL"
index 98b38039812902ab47ea79632739808f15b61677..52b221921ae3fbd235b4d7c87a1f8f6c61f41be9 100644 (file)
@@ -2,19 +2,19 @@
 %define __jar_repack 0
 
 # Update this commit if systemd unit file is updated
-%global commit 520321a932a15392a67f45bae52e879c703a2c85
+%global commit f984005039c39596a6cf4e7718b44a48db0ba849
 %global shortcommit %(c=%{commit}; echo ${c:0:7})
 
 Name:       opendaylight
-Version:    0.2.1
-Release:    5%{?dist}
+Version:    0.2.2
+Release:    1%{?dist}
 Summary:    OpenDaylight SDN Controller
 
 Group:      Applications/Communications
 License:    EPL-1.0
 URL:        http://www.opendaylight.org
 BuildArch:  noarch
-Source0:    https://nexus.opendaylight.org/content/repositories/public/org/opendaylight/integration/distribution-karaf/0.2.1-Helium-SR1.1/distribution-karaf-0.2.1-Helium-SR1.1.tar.gz
+Source0:    https://nexus.opendaylight.org/content/groups/public/org/opendaylight/integration/distribution-karaf/0.2.2-Helium-SR2/distribution-karaf-0.2.2-Helium-SR2.tar.gz
 Source1:    https://github.com/dfarrell07/opendaylight-systemd/archive/b080cdc/opendaylight-systemd-%{shortcommit}.tar.gz
 Buildroot:  /tmp
 
@@ -28,15 +28,16 @@ BuildRequires: systemd
 %pre
 # Create `odl` user/group
 # Short circuits if the user/group already exists
-getent passwd odl > /dev/null || useradd odl -M
+# Home dir must be a valid path for various files to be created in it
+getent passwd odl > /dev/null || useradd odl -M -d $RPM_BUILD_ROOT/opt/%name-%version
 getent group odl > /dev/null || groupadd odl
 
 %description
-OpenDaylight Helium SR1.1 (0.2.1)
+OpenDaylight Helium SR2 (0.2.2)
 
 %prep
 # Extract Source0 (ODL archive)
-%autosetup -n distribution-karaf-0.2.1-Helium-SR1.1
+%autosetup -n distribution-karaf-0.2.2-Helium-SR2
 # Extract Source1 (systemd config)
 %autosetup -T -D -b 1 -n opendaylight-systemd-%{commit}
 
@@ -44,7 +45,7 @@ OpenDaylight Helium SR1.1 (0.2.1)
 # Create directory in build root for ODL
 mkdir -p $RPM_BUILD_ROOT/opt/%name-%version
 # Move ODL from archive to its dir in build root
-cp -r ../distribution-karaf-0.2.1-Helium-SR1.1/* $RPM_BUILD_ROOT/opt/%name-%version
+cp -r ../distribution-karaf-0.2.2-Helium-SR2/* $RPM_BUILD_ROOT/opt/%name-%version
 # Create directory in build root for systemd .service file
 mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
 # Move ODL's systemd .service file to correct dir in build root
@@ -64,6 +65,10 @@ rm -rf $RPM_BUILD_ROOT/opt/%name-%version
 
 
 %changelog
+* Sat Jan 31 2015 Daniel Farrell <dfarrell@redhat.com> - 0.2.2-1
+- Upgrade from Helium SR1.1 to Helium SR2
+* Thu Jan 29 2015 Daniel Farrell <dfarrell@redhat.com> - 0.2.1-6
+- Give odl user a valid home dir for automatically created files
 * Tue Jan 13 2015 Daniel Farrell <dfarrell@redhat.com> - 0.2.1-5
 - Set ODL ownership to odl:odl vs root:odl
 * Mon Jan 12 2015 Daniel Farrell <dfarrell@redhat.com> - 0.2.1-4