summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorThomas F Herbert <therbert@redhat.com>2016-04-10 00:56:02 -0400
committerThomas F Herbert <therbert@redhat.com>2016-04-11 08:04:29 -0400
commitcbe1f7f40f5f60f9a8a0d2ed3c9ab3463f55bbc1 (patch)
treec753cd986a93407906dbb32ba45343cdf011db45 /build
parent5181fb94a7485af207c1232753eeb74fb8975b1a (diff)
Fixes RPM build problem. Use correct copr repo. Fix some version number parsing
and tarball and rpm naming that was specific to old repo and old DPDK version. Now supports DPDK 16.04-rc4. Change-Id: Ia64b38d676e945df27917f4d9aa90ba4872c8cb5 Signed-off-by: Thomas F Herbert <therbert@redhat.com>
Diffstat (limited to 'build')
-rwxr-xr-xbuild/build_dpdk_rpm.sh11
-rwxr-xr-xbuild/build_ovs_rpm.sh14
-rw-r--r--build/config2
-rwxr-xr-xbuild/test_ovs_rpm.sh11
4 files changed, 26 insertions, 12 deletions
diff --git a/build/build_dpdk_rpm.sh b/build/build_dpdk_rpm.sh
index a36403d..04cf7a1 100755
--- a/build/build_dpdk_rpm.sh
+++ b/build/build_dpdk_rpm.sh
@@ -87,7 +87,7 @@ echo "---------------------"
echo "Get copr distribution git"
mkdir -p copr
cd copr
-git clone http://copr-dist-git.fedorainfracloud.org/cgit/pmatilai/dpdk/dpdk.git
+git clone http://copr-dist-git.fedorainfracloud.org/cgit/pmatilai/dpdk-snapshot/dpdk.git
echo "---------------------"
echo "Build DPDK RPM version $DPDK_VERSION"
@@ -111,7 +111,7 @@ snapser=`git log --pretty=oneline | wc -l`
makever=`make showversion`
basever=`echo ${makever} | cut -d- -f1`
-prefix=dpdk-$basever
+prefix=dpdk-$basever-${snapser}.git${snapgit}
archive=${prefix}.tar.gz
DPDK_VERSION=$basever
@@ -126,6 +126,13 @@ echo
rpmbuild -bb --define "_topdir $RPMDIR" dpdk.spec
echo "-------------------------------"
+echo Delete all rpms from $HOME
+echo
+set +e
+rm $HOME/*.rpm
+set -e
+
+echo "-------------------------------"
echo Copy dpdk RPM
echo
cp $RPMDIR/RPMS/x86_64/*.rpm $HOME
diff --git a/build/build_ovs_rpm.sh b/build/build_ovs_rpm.sh
index 0eb6478..198d43b 100755
--- a/build/build_ovs_rpm.sh
+++ b/build/build_ovs_rpm.sh
@@ -123,7 +123,7 @@ if [ ! -z $DPDK ]; then
echo "----------------------------------"
echo "Clone Fedora copr repo and copy files."
echo
- git clone http://copr-dist-git.fedorainfracloud.org/cgit/pmatilai/dpdk/openvswitch.git
+ git clone http://copr-dist-git.fedorainfracloud.org/cgit/pmatilai/dpdk-snapshot/openvswitch.git
cp $TMPDIR/openvswitch/openvswitch.spec $RPMDIR/SPECS
cp $TMPDIR/openvswitch/* $RPMDIR/SOURCES
snapgit=`grep "define snapver" $TMPDIR/openvswitch/openvswitch.spec | cut -c26-33`
@@ -131,10 +131,14 @@ if [ ! -z $DPDK ]; then
echo "Remove old dpdk, ovs and dpdk development rpms"
echo
cleanrpms
+
+ if [ -z $DPDK_VERSION ]; then
+ DPDK_VERSION=16.04.0
+ fi
echo "-------------------------------------------"
- echo "Install dpdk and dpdk development rpms"
+ echo "Install dpdk and dpdk development rpms for version $DPDK_VERSION"
echo
- sudo rpm -ivh $HOME/dpdk-2*.rpm
+ sudo rpm -ivh $HOME/dpdk-${DPDK_VERSION:0:1}*.rpm
sudo rpm -ivh $HOME/dpdk-devel*.rpm
echo "----------------------------------------"
echo "Copy DPDK RPM to SOURCES"
@@ -153,8 +157,8 @@ if [ ! -z $DPDK ]; then
snapser=`git log --pretty=oneline | wc -l`
basever=`grep AC_INIT configure.ac | cut -d' ' -f2 | cut -d, -f1`
prefix=openvswitch-${basever}
- archive=openvswitch-${basever}.tar.gz
- git archive --prefix=${prefix}/ HEAD | gzip -9 > $RPMDIR/SOURCES/${archive}
+ archive=${prefix}-${snapser}.git${snapgit}.tar.gz
+ git archive --prefix=${prefix}-${snapser}.git${snapgit}/ HEAD | gzip -9 > $RPMDIR/SOURCES/${archive}
cd $TMPDIR/openvswitch
echo "--------------------------------------------"
echo "Build openvswitch RPM"
diff --git a/build/config b/build/config
index b30db9a..73a2293 100644
--- a/build/config
+++ b/build/config
@@ -36,7 +36,7 @@ export PATCH=none
#
export WITH_DPDK=yes
export DPDK_PATCH=none
-export DPDK_VERSION=2.2.0
+export DPDK_VERSION=16.04-rc4
#
# When KMOD is set, the Linux kernel module is built and tested.
#
diff --git a/build/test_ovs_rpm.sh b/build/test_ovs_rpm.sh
index 264cd6e..d0b9174 100755
--- a/build/test_ovs_rpm.sh
+++ b/build/test_ovs_rpm.sh
@@ -102,12 +102,15 @@ stopovs
cleanrpms
if [ ! -z $DPDK ]; then
+ if [ -z $DPDK_VERSION ]; then
+ DPDK_VERSION=16.04.0
+ fi
echo "-----------------------------------"
- echo "Install DPDK RPMs"
+ echo "Install DPDK RPMs for version $DPDK_VERSION"
echo
- sudo rpm -ivh $RPMDIR/RPMS/x86_64/dpdk-2*.rpm
- sudo rpm -ivh $RPMDIR/RPMS/x86_64/dpdk-tools-2*.rpm
- sudo rpm -ivh $RPMDIR/RPMS/x86_64/dpdk-examples-2*.rpm
+ sudo rpm -ivh $RPMDIR/RPMS/x86_64/dpdk-${DPDK_VERSION:0:1}*.rpm
+ sudo rpm -ivh $RPMDIR/RPMS/x86_64/dpdk-tools-${DPDK_VERSION:0:1}*.rpm
+ sudo rpm -ivh $RPMDIR/RPMS/x86_64/dpdk-examples-${DPDK_VERSION:0:1}*.rpm
fi
if [ ! -z $kmod ]; then