Skip to content

Commit

Permalink
Fix various build issues on Ubuntu 14.04.
Browse files Browse the repository at this point in the history
 * We require autoconf
 * Newer Ubuntu doesn't need separate openvswitch kernel module,
   we can use the in-tree kernel one fine.
  • Loading branch information
gizmoguy committed Aug 10, 2015
1 parent 9d1a79f commit 6e1cd3d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ APT_OPTS="-y"
PIP_OPTS=""

ROUTEFLOW_GIT="https://github.com/routeflow/RouteFlow.git"
DEPENDENCIES="build-essential pkg-config git-core libboost-dev libboost-dev \
DEPENDENCIES="build-essential autoconf pkg-config git-core libboost-dev libboost-dev \
libboost-program-options-dev libboost-thread-dev \
libboost-filesystem-dev libboost-system-dev libnl-3-dev libnl-route-3-dev \
python-dev python-pip python-bson"
Expand Down
24 changes: 20 additions & 4 deletions dist/build_ovs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@ OVS_BRANCH="origin/master"

OVS_COMMON="linux-headers-generic"
OVS_BUILD_DEPS="dh-autoreconf pkg-config"
OVS_BINARY="openvswitch-switch openvswitch-datapath-source module-assistant"
OVS_BINARY="openvswitch-switch"
OVS_KERNEL="openvswitch-datapath-source module-assistant"

verlte() {
local result=`echo "$1 < $2" | bc`
[ "$result" = "1" ]
}

verlt() {
[ "$1" = "$2" ] && return 1 || verlte $1 $2
}

install_ovs() {
print_status "Installing Open vSwitch"
Expand Down Expand Up @@ -68,9 +78,15 @@ build_ovs() {
get_ovs() {
pkg_install "$OVS_COMMON"
if [ "$1" = "deb" ]; then
pkg_install "$OVS_BINARY"
$SUPER module-assistant prepare
$SUPER module-assistant auto-install openvswitch-datapath
version=`lsb_release -a 2>/dev/null | grep "Release" | cut -f2`
if (verlt $version "12.04"); then
pkg_install "$OVS_BINARY $OVS_KERNEL"
$SUPER module-assistant prepare
$SUPER module-assistant auto-install openvswitch-datapath
else
# with newer ubuntu we can just use in-tree OVS kernel module
pkg_install "$OVS_BINARY"
fi
else
pkg_install "$OVS_BUILD_DEPS"
build_ovs $@
Expand Down

0 comments on commit 6e1cd3d

Please sign in to comment.