aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYousong Zhou <yszhou4tech@gmail.com>2018-09-05 10:21:45 +0000
committerYousong Zhou <yszhou4tech@gmail.com>2018-09-09 09:51:14 +0800
commit76e57b333d9d3ce25fc9ce8eba52ff025d847496 (patch)
tree0bcb637e87f1ebfb999526f93a9fd662fb2be848
parent3b6e346a4c63f20cb9b55fc6b49077ca2e995770 (diff)
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>
10 files changed, 44 insertions, 15 deletions
diff --git a/net/openvswitch/Makefile b/net/openvswitch/Makefile
index afe10ee35..373ca8c26 100644
--- a/net/openvswitch/Makefile
+++ b/net/openvswitch/Makefile
@@ -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
diff --git a/net/openvswitch/files/openvswitch.init b/net/openvswitch/files/openvswitch.init
index 3af1b1e40..f504bb63a 100755
--- a/net/openvswitch/files/openvswitch.init
+++ b/net/openvswitch/files/openvswitch.init
@@ -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
diff --git a/net/openvswitch/files/ovs-ctl-wrapper b/net/openvswitch/files/ovs-ctl-wrapper
index 20f344612..88ae72429 100755
--- a/net/openvswitch/files/ovs-ctl-wrapper
+++ b/net/openvswitch/files/ovs-ctl-wrapper
@@ -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
diff --git a/net/openvswitch/patches/0100-netdev-linux-Use-unsigned-int-for-ifi_flags.patch b/net/openvswitch/patches/0100-netdev-linux-Use-unsigned-int-for-ifi_flags.patch
index 0c7022d6e..bee18d383 100644
--- a/net/openvswitch/patches/0100-netdev-linux-Use-unsigned-int-for-ifi_flags.patch
+++ b/net/openvswitch/patches/0100-netdev-linux-Use-unsigned-int-for-ifi_flags.patch
@@ -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.
diff --git a/net/openvswitch/patches/0101-netdev-linux-Let-interface-flag-survive-internal-por.patch b/net/openvswitch/patches/0101-netdev-linux-Let-interface-flag-survive-internal-por.patch
index 29fbc14b2..04b50ee41 100644
--- a/net/openvswitch/patches/0101-netdev-linux-Let-interface-flag-survive-internal-por.patch
+++ b/net/openvswitch/patches/0101-netdev-linux-Let-interface-flag-survive-internal-por.patch
@@ -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
diff --git a/net/openvswitch/patches/0102-python-separate-host-target-python-for-cross-compile.patch b/net/openvswitch/patches/0102-python-separate-host-target-python-for-cross-compile.patch
index 01368beac..cd5af930f 100644
--- a/net/openvswitch/patches/0102-python-separate-host-target-python-for-cross-compile.patch
+++ b/net/openvswitch/patches/0102-python-separate-host-target-python-for-cross-compile.patch
@@ -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.
diff --git a/net/openvswitch/patches/0103-ovs-ctl-fix-setting-hostname.patch b/net/openvswitch/patches/0103-ovs-ctl-fix-setting-hostname.patch
index 8124fd843..43e022def 100644
--- a/net/openvswitch/patches/0103-ovs-ctl-fix-setting-hostname.patch
+++ b/net/openvswitch/patches/0103-ovs-ctl-fix-setting-hostname.patch
@@ -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.
diff --git a/net/openvswitch/patches/0104-ovs-lib-fix-install_dir.patch b/net/openvswitch/patches/0104-ovs-lib-fix-install_dir.patch
index e1a40d0b5..17e633826 100644
--- a/net/openvswitch/patches/0104-ovs-lib-fix-install_dir.patch
+++ b/net/openvswitch/patches/0104-ovs-lib-fix-install_dir.patch
@@ -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
diff --git a/net/openvswitch/patches/0105-build-disable-building-tests.patch b/net/openvswitch/patches/0105-build-disable-building-tests.patch
index 4d52a4c17..4372d9f84 100644
--- a/net/openvswitch/patches/0105-build-disable-building-tests.patch
+++ b/net/openvswitch/patches/0105-build-disable-building-tests.patch
@@ -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>
---
diff --git a/net/openvswitch/patches/0106-ovs-save-compatible-with-busybox-ip-command.patch b/net/openvswitch/patches/0106-ovs-save-compatible-with-busybox-ip-command.patch
new file mode 100644
index 000000000..9e04966dd
--- /dev/null
+++ b/net/openvswitch/patches/0106-ovs-save-compatible-with-busybox-ip-command.patch
@@ -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