Include required disttag in RPM release version
authorDaniel Farrell <dfarrell@redhat.com>
Fri, 17 Jul 2015 17:12:51 +0000 (13:12 -0400)
committerDaniel Farrell <dfarrell@redhat.com>
Fri, 17 Jul 2015 18:18:49 +0000 (14:18 -0400)
Extract ODL's version in the Nexus URL to a var for easier updates.

We're building RPMs on the CentOS CBS, which uses el-based build
boxes, so use a CentOS Vagrant box for our SRPM build box.

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

index 102c110fd73c55f1a10371b8867ad1f2e457027f..ae09bfc9ea2c5e02fd80a8bb866f50492533f836 100644 (file)
@@ -6,5 +6,5 @@ VAGRANTFILE_API_VERSION = "2"
 
 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
   # Build Vagrant box based on Fedora 21
-  config.vm.box = "chef/fedora-21"
+  config.vm.box = "chef/centos-7.0"
 end
index b8fd20a5aca40f6d25e1a3eb5180f4d018f0b65e..f60372ad8da5b41293aff070fb2396f9107e0c73 100755 (executable)
@@ -8,7 +8,7 @@ set -x
 # NB: These will need to be updated for version bumps
 odl_version="0.3.0-Lithium"
 rpm_version="3.0.0"
-rpm_release=1
+rpm_release="2.el7.centos"
 sysd_commit="4a87227"
 
 # Common names used in this script
@@ -28,6 +28,7 @@ rpmbuild_src_dir="$HOME/rpmbuild/SOURCES/"
 rpmbuild_spec_dir="$HOME/rpmbuild/SPECS/"
 
 # Install required software, add user to mock group for rpmbuild
+sudo yum install -y epel-release
 sudo yum install -y @development-tools fedora-packager
 sudo usermod -a -G mock $USER
 
index ddf18b0a31e6ceccc5dd25556243e647014cfebe..4d1c0d00c11bcaa20c4622d40cdca126257ac3dc 100755 (executable)
@@ -6,7 +6,7 @@ set -x
 
 # NB: These will need to be updated for version bumps
 rpm_version="3.0.0"
-rpm_release=1
+rpm_release="2.el7.centos"
 rpm_path="./opendaylight-$rpm_version-$rpm_release.noarch.rpm"
 
 # Install Java, required by ODL
index c5169e6cd4f7824e6408be3ba4895776d8ac919a..5d2ce5b00f62f000c963a4d3d0fa9654549a28da 100644 (file)
@@ -4,6 +4,7 @@
 # Update this commit if systemd unit file is updated
 %global commit 4a872270893f0daeebcbbcc0ff0014978e3c5f68
 %global shortcommit %(c=%{commit}; echo ${c:0:7})
+%global odl_version 0.3.0-Lithium
 
 Name:       opendaylight
 # Shifting ODL's current versioning to make room for patch versions.
@@ -11,14 +12,19 @@ Name:       opendaylight
 #   initial discussions about adopting this scheme for all artifacts,
 #   but the RPM needs it now to support deplying daily/weekly/etc builds.
 Version:    3.0.0
-Release:    1
+# The Fedora/CentOS packaging guidelines *require* the use of a disttag. ODL's
+#   RPM build doesn't do anything Fedora/CentOS spicific, so the disttag is
+#   unnecessary and unused in our case, but both the docs and the pros (apevec)
+#   agree that we should include it.
+# See: https://fedoraproject.org/wiki/Packaging:DistTag
+Release:    2%{?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/groups/public/org/opendaylight/integration/distribution-karaf/0.3.0-Lithium/distribution-karaf-0.3.0-Lithium.tar.gz
+Source0:    https://nexus.opendaylight.org/content/groups/public/org/opendaylight/integration/distribution-karaf/%{odl_version}/distribution-karaf-%{odl_version}.tar.gz
 Source1:    https://github.com/dfarrell07/opendaylight-systemd/archive/%{shortcommit}/opendaylight-systemd-%{shortcommit}.tar.gz
 Buildroot:  /tmp
 
@@ -69,6 +75,8 @@ rm -rf $RPM_BUILD_ROOT/opt/%name
 
 
 %changelog
+* Fri Jul 17 2015 Daniel Farrell <dfarrell@redhat.com> - 3.0.0-2
+- Include required disttag in RPM release version
 * Tue Jul 14 2015 Daniel Farrell <dfarrell@redhat.com> - 3.0.0-1
 - Upgrade from Helium SR3 to Lithium
 * Thu Apr 16 2015 Daniel Farrell <dfarrell@redhat.com> - 0.2.3-2