openvswitch: rework packaging

New scheme mainly provides three packages: openvswitch,
openvswitch-ovn-north, openvswitch-ovn-controller.  These should fit
most usage scenarios.  Other subpackages like openvswitch-libXXX
etc.  are there for dependency management and are hidden from the
menu.

Many python and shell scripts are removed in this revision.  Most of
them cannot run out of box at all for lack of dependencies.  Others
being legacy ones are not that useful now.  Add them back at later time
when real need appears

Below are a simple listing of additions

 - initscript now incorporate also ovn north and controller support
 - ovn-ctl and ovs-ctl can be invoked directly from within $PATH

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
This commit is contained in:
Yousong Zhou
2018-05-28 18:21:38 +08:00
parent efa81850f2
commit c2f788f054
12 changed files with 284 additions and 263 deletions
@@ -1,20 +1,16 @@
diff --git a/configure.ac b/configure.ac
index e6a23a6..8a7c6d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -118,7 +118,6 @@ OVS_CHECK_XENSERVER_VERSION
@@ -122,7 +122,6 @@ OVS_CHECK_SOCKET_LIBS
OVS_CHECK_XENSERVER_VERSION
OVS_CHECK_GROFF
OVS_CHECK_GNU_MAKE
OVS_CHECK_TLS
-OVS_CHECK_ATOMIC_LIBS
OVS_CHECK_GCC4_ATOMICS
OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(1)
OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(2)
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index 712cb5a..e840f10 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -40,7 +40,9 @@
@@ -39,7 +39,9 @@
#include <netpacket/packet.h>
#include <net/if.h>
#include <net/if_arp.h>
@@ -22,13 +18,11 @@ index 712cb5a..e840f10 100644
#include <net/if_packet.h>
+#endif
#include <net/route.h>
#include <netinet/in.h>
#include <poll.h>
diff --git a/lib/ovs-atomic.h b/lib/ovs-atomic.h
index 9ead907..0a131d7 100644
#include <stdlib.h>
--- a/lib/ovs-atomic.h
+++ b/lib/ovs-atomic.h
@@ -318,7 +318,7 @@
@@ -320,7 +320,7 @@
#include "util.h"
#define IN_OVS_ATOMIC_H
@@ -10,11 +10,9 @@ Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
lib/netdev-linux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index c0471be15..0750e5f2c 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -2788,7 +2788,7 @@ update_flags(struct netdev_linux *netdev, enum netdev_flags off,
@@ -2810,7 +2810,7 @@ update_flags(struct netdev_linux *netdev
enum netdev_flags on, enum netdev_flags *old_flagsp)
OVS_REQUIRES(netdev->mutex)
{
@@ -23,6 +21,3 @@ index c0471be15..0750e5f2c 100644
int error = 0;
old_flags = netdev->ifi_flags;
--
2.16.2
@@ -17,11 +17,9 @@ Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
lib/netdev-linux.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index 0750e5f2c..59e7b9c96 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -2791,7 +2791,13 @@ update_flags(struct netdev_linux *netdev, enum netdev_flags off,
@@ -2813,7 +2813,13 @@ update_flags(struct netdev_linux *netdev
unsigned int old_flags, new_flags;
int error = 0;
@@ -36,6 +34,3 @@ index 0750e5f2c..59e7b9c96 100644
*old_flagsp = iff_to_nd_flags(old_flags);
new_flags = (old_flags & ~nd_to_iff_flags(off)) | nd_to_iff_flags(on);
if (new_flags != old_flags) {
--
2.16.2
@@ -12,11 +12,9 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
m4/openvswitch.m4 | 12 ++++--------
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 31d633179..4b9e8d491 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -59,7 +59,7 @@ endif
@@ -60,7 +60,7 @@ endif
# foo/__init__.pyc will cause Python to ignore foo.py.
run_python = \
PYTHONPATH=$(top_srcdir)/python$(psep)$$PYTHONPATH \
@@ -25,11 +23,9 @@ index 31d633179..4b9e8d491 100644
ALL_LOCAL =
BUILT_SOURCES =
diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4
index 00ffad35f..52f207bda 100644
--- a/m4/openvswitch.m4
+++ b/m4/openvswitch.m4
@@ -347,20 +347,16 @@ else:
@@ -351,20 +351,16 @@ else:
if test $ovs_cv_python = no; then
AC_MSG_ERROR([cannot find python 2.7 or higher.])
fi
@@ -54,6 +50,3 @@ index 00ffad35f..52f207bda 100644
dnl Checks for Python 3.x, x >= 4.
AC_DEFUN([OVS_CHECK_PYTHON3],
--
2.16.2
@@ -13,11 +13,9 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
utilities/ovs-ctl.in | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
index 4ddc450fb..52018e6d3 100755
--- a/utilities/ovs-ctl.in
+++ b/utilities/ovs-ctl.in
@@ -68,9 +68,7 @@ ovs_vsctl () {
@@ -64,9 +64,7 @@ insert_mod_if_required () {
}
set_hostname () {
@@ -28,6 +26,3 @@ index 4ddc450fb..52018e6d3 100755
}
set_system_ids () {
--
2.16.2
@@ -1,4 +1,4 @@
From d8dd661e1c100a2d2ba0361cf6c91dcdedfeeb70 Mon Sep 17 00:00:00 2001
From 43b855e201bd25a015ba6444cabce12b8cc181ec 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/104] ovs-lib: fix install_dir()
@@ -10,8 +10,6 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
utilities/ovs-lib.in | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in
index 1bccea0c5..457297f3f 100644
--- a/utilities/ovs-lib.in
+++ b/utilities/ovs-lib.in
@@ -157,7 +157,10 @@ install_dir () {
@@ -20,12 +18,9 @@ index 1bccea0c5..457297f3f 100644
if test ! -d "$DIR"; then
- install -d -m "$INSTALL_MODE" -o "$INSTALL_USER" -g "$INSTALL_GROUP" "$DIR"
+ mkdir -p "$DIR"
+ chmod "$INSTALL_MODE"
+ chmod "$INSTALL_MODE" "$DIR"
+ chown "$INSTALL_USER" "$DIR"
+ chgrp "$INSTALL_GROUP" "$DIR"
restorecon "$DIR" >/dev/null 2>&1
fi
}
--
2.16.2