# NB: These will need to be updated for version bumps
odl_version="0.3.0-Lithium"
rpm_version="3.0.0"
-rpm_release="2.el7.centos"
+rpm_release="2.el7"
sysd_commit="4a87227"
# Common names used in this script
cp opendaylight.spec $rpmbuild_spec_dir
# Build ODL SRPM and noarch RPM
+# Override disttag from .el7.centos to .el7 per best-practices/expected norms
+# See: https://bugs.centos.org/view.php?id=9098
cd $rpmbuild_spec_dir
-rpmbuild -ba opendaylight.spec
+rpmbuild -ba --define "dist .el7" opendaylight.spec
# Confirm SRPM found in expected location
if [ -f $srpm_out_path ]; then
#!/usr/bin/env sh
# Connect to ODL Karaf shell. Mostly used for testing.
-# Output verbose debug info (true) or not (anything else)
-VERBOSE=true
# Port that the Karaf shell listens on
KARAF_SHELL_PORT=8101
# This could be done with public key crypto, but sshpass is easier
if ! command -v sshpass &> /dev/null; then
echo "Installing sshpass. It's used connecting non-interactively"
- if "$VERBOSE" = true; then
- sudo yum install -y sshpass
- else
- sudo yum install -y sshpass &> /dev/null
+ if ! sudo yum install -y sshpass; then
+ echo "Couldn't find sshpass pkg, trying to install EPEL"
+ if sudo yum install -y epel-release; then
+ echo "Installed EPEL, re-attempting to install sshpass"
+ sudo yum install -y sshpass
+ else
+ echo "Failed to install sshpass and EPEL, giving up"
+ exit 1
+ fi
fi
fi
# NB: These will need to be updated for version bumps
rpm_version="3.0.0"
-rpm_release="2.el7.centos"
+rpm_release="2.el7"
odl_rpm="opendaylight-$rpm_version-$rpm_release.noarch.rpm"
rpm_path="$cache_dir/$odl_rpm"
# Echo commands as they are run
set -x
-# NB: These will need to be updated for version bumps
-rpm_version="3.0.0"
-
# Uninstall ODL
echo "Uninstalling ODL"
-sudo rpm -e opendaylight-$rpm_version
+sudo rpm -e opendaylight