openvswitch: multiple fixes for 2.10

- initscript: skip when ctl scripts are absent.  When only ovs is
   installed, this will quash error messages of ovn-ctl not found when
   invoking stop
 - openvswitch-common: include ovs-kmod-ctl
 - patches: ovs-save: compatible with busybox ip command

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
This commit is contained in:
Yousong Zhou 2018-09-05 10:21:45 +00:00
parent 3b6e346a4c
commit 76e57b333d
10 changed files with 44 additions and 15 deletions

View File

@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=openvswitch
PKG_VERSION:=2.10.0
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.openvswitch.org/releases/
PKG_HASH:=64f7cdcfffc73b2e09980d04ee22731eadd6453698b92d7397c9e45c7c174050
@ -173,6 +173,7 @@ ovs_common_depends:=+librt +openvswitch-libopenvswitch +openvswitch-libofproto +
ovs_common_files:= \
usr/share/openvswitch/scripts/ovs-lib \
usr/share/openvswitch/scripts/ovs-ctl \
usr/share/openvswitch/scripts/ovs-kmod-ctl \
usr/share/openvswitch/scripts/ovs-save \
$(foreach b,ovs-appctl ovs-dpctl ovs-ofctl ovs-vsctl ovsdb-client ovsdb-tool,usr/bin/$(b))
define ovs_common_install
@ -184,6 +185,7 @@ define ovs_common_install
$$(INSTALL_DIR) $$(1)/usr/share/openvswitch/scripts
$$(INSTALL_BIN) ./files/ovs-ctl-wrapper $$(1)/usr/share/openvswitch/scripts/
$$(LN) /usr/share/openvswitch/scripts/ovs-ctl-wrapper $$(1)/usr/bin/ovs-ctl
$$(LN) /usr/share/openvswitch/scripts/ovs-ctl-wrapper $$(1)/usr/bin/ovs-kmod-ctl
endef
define Package/openvswitch-common/conffiles
/etc/openvswitch

View File

@ -6,8 +6,8 @@
START=15
ovs_script_dir=/usr/share/openvswitch/scripts
ovs_ctl="$ovs_script_dir/ovs-ctl"
ovn_ctl="$ovs_script_dir/ovn-ctl"
ovs_ctl="$ovs_script_dir/ovs-ctl"; [ -x "$ovs_ctl" ] || ovs_ctl=:
ovn_ctl="$ovs_script_dir/ovn-ctl"; [ -x "$ovn_ctl" ] || ovn_ctl=:
EXTRA_COMMANDS=status

View File

@ -3,6 +3,7 @@
s=/usr/share/openvswitch/scripts
case "$0" in
*ovs-ctl) "$s/ovs-ctl" "$@" ;;
*ovs-kmod-ctl) "$s/ovs-kmod-ctl" "$@" ;;
*ovn-ctl) "$s/ovn-ctl" "$@" ;;
*) exit 1;;
esac

View File

@ -1,7 +1,7 @@
From 054968d5748c9ff73a69155cd64f0e81287d3bb3 Mon Sep 17 00:00:00 2001
From e4ac9741a99866976322c21605b312bc27633c92 Mon Sep 17 00:00:00 2001
From: Helmut Schaa <helmut.schaa@googlemail.com>
Date: Wed, 8 Jan 2014 13:48:33 +0100
Subject: [PATCH 100/105] netdev-linux: Use unsigned int for ifi_flags
Subject: [PATCH 100/106] netdev-linux: Use unsigned int for ifi_flags
ifi_flags is unsigned, the local equivalents should do the same.

View File

@ -1,7 +1,7 @@
From a3eabe1e639c98ce8537df4ac4187a8c047dac59 Mon Sep 17 00:00:00 2001
From 9f4775d9a2541e8128ea99f3b02925cc1ee05374 Mon Sep 17 00:00:00 2001
From: Helmut Schaa <helmut.schaa@googlemail.com>
Date: Wed, 8 Jan 2014 13:48:49 +0100
Subject: [PATCH 101/105] netdev-linux: Let interface flag survive internal
Subject: [PATCH 101/106] netdev-linux: Let interface flag survive internal
port setup
Due to a race condition when bringing up an internal port on Linux

View File

@ -1,7 +1,7 @@
From b5c6d8c2e1ba0c3d9b93622f68f6c0b9e9c62f0d Mon Sep 17 00:00:00 2001
From e451d74788c73e8679e6a2268185a08901ac7f8c Mon Sep 17 00:00:00 2001
From: Yousong Zhou <zhouyousong@yunionyun.com>
Date: Tue, 21 Aug 2018 12:21:05 +0000
Subject: [PATCH 102/105] python: separate host/target python for cross-compile
Subject: [PATCH 102/106] python: separate host/target python for cross-compile
At the moment, python-six is a requirement for openvswitch python
library on target machine.

View File

@ -1,7 +1,7 @@
From 0b8ef58a26ed8d426acfe1fa27713cbcc2427f3f Mon Sep 17 00:00:00 2001
From 6b9732c8851c5466f2a363d88b5acae320801efe Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Wed, 14 Mar 2018 16:40:01 +0800
Subject: [PATCH 103/105] ovs-ctl: fix setting hostname
Subject: [PATCH 103/106] ovs-ctl: fix setting hostname
The command "hostname" is not available in OpenWrt by default.

View File

@ -1,7 +1,7 @@
From 97107da940da7814c3e9e947aee1c247cd7b95db Mon Sep 17 00:00:00 2001
From 940441e2982cb35765830060e8203e5dd1a0f967 Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Wed, 14 Mar 2018 16:44:13 +0800
Subject: [PATCH 104/105] ovs-lib: fix install_dir()
Subject: [PATCH 104/106] ovs-lib: fix install_dir()
The command "install" is not available in OpenWrt by default

View File

@ -1,7 +1,7 @@
From f5c6e5d4c567f3705de503b7271d384d1aad88ab Mon Sep 17 00:00:00 2001
From d0cad5ac122aca722dc2013c1f53fda44c477cf2 Mon Sep 17 00:00:00 2001
From: Yousong Zhou <zhouyousong@yunionyun.com>
Date: Tue, 21 Aug 2018 13:02:21 +0000
Subject: [PATCH 105/105] build: disable building tests
Subject: [PATCH 105/106] build: disable building tests
Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
---

View File

@ -0,0 +1,26 @@
From 2a59f2b60e8a22dc93d48c511b5c4255b429ff66 Mon Sep 17 00:00:00 2001
From: Yousong Zhou <zhouyousong@yunionyun.com>
Date: Wed, 5 Sep 2018 12:32:54 +0000
Subject: [PATCH 106/106] ovs-save: compatible with busybox ip command
Busybox ip command will have exit code 1 for `ip -V` or `ip help` etc.,
use `ip rule list` to cover both iproute2 and busybox ip command
Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
---
utilities/ovs-save | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utilities/ovs-save b/utilities/ovs-save
index ea8fb6a45..72d460df4 100755
--- a/utilities/ovs-save
+++ b/utilities/ovs-save
@@ -38,7 +38,7 @@ EOF
}
save_interfaces () {
- if (ip -V) > /dev/null 2>&1; then :; else
+ if (ip rule list) > /dev/null 2>&1; then :; else
echo "$0: ip not found in $PATH" >&2
exit 1
fi