From 987e8b0cc4cc6a39ac0d4d32a47764f833c57a2e Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Fri, 31 Aug 2018 14:44:31 +0100 Subject: [PATCH] Fix devstack/lib/ovs to run with Fedora 28 The patch is fixing two problems found when stacking DevStack on a Fedora 28 host OS. Problem 1: Account to the different patch versions between the kernel-devel and kernel-headers packages. Problem 2: Install the elfutils-libelf-devel package which is needed to compile OVS. For more a detailed information about each problem, check the bug linked in this patch. Closes-Bug: #1790143 Change-Id: Idfdee28124ff19272abcaaa3adade0435e3e474a --- devstack/lib/ovs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/devstack/lib/ovs b/devstack/lib/ovs index 7c3e7a7f14d..a82f1276986 100644 --- a/devstack/lib/ovs +++ b/devstack/lib/ovs @@ -53,7 +53,10 @@ function prepare_for_compilation { if is_fedora ; then # is_fedora covers Fedora, RHEL, CentOS, etc... - if [[ ${KERNEL_VERSION:0:2} != "3." ]]; then + if [[ "$os_VENDOR" == "Fedora" ]]; then + install_package elfutils-libelf-devel + KERNEL_VERSION=`echo $KERNEL_VERSION | cut --delimiter='-' --field 1` + elif [[ ${KERNEL_VERSION:0:2} != "3." ]]; then # dash is illegal character in rpm version so replace # them with underscore like it is done in the kernel # https://github.com/torvalds/linux/blob/master/scripts/package/mkspec#L25