summaryrefslogtreecommitdiffstats
path: root/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git')
-rw-r--r--external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0002-Define-WAIT_ANY-if-not-provided-by-system.patch29
-rw-r--r--external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/disable_m4_check.patch24
-rw-r--r--external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/kernel_module.patch26
-rw-r--r--external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-5563e309b80bbea9bff538e71ecfd7e5e538bab9.patch110
-rw-r--r--external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch31
-rw-r--r--external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/systemd-update-tool-paths.patch47
6 files changed, 267 insertions, 0 deletions
diff --git a/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0002-Define-WAIT_ANY-if-not-provided-by-system.patch b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0002-Define-WAIT_ANY-if-not-provided-by-system.patch
new file mode 100644
index 00000000..f997bbff
--- /dev/null
+++ b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0002-Define-WAIT_ANY-if-not-provided-by-system.patch
@@ -0,0 +1,29 @@
+From 801023e72b31e7c49cbccedd76ade33a17fcbe45 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 20 Mar 2017 12:13:30 -0700
+Subject: [PATCH] Define WAIT_ANY if not provided by system
+
+POSIX does not define it and uses -1 directly
+some libc do not have this definitions
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ tests/test-ovn.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/tests/test-ovn.c b/tests/test-ovn.c
+index 84adf81..2bc6bdf 100644
+--- a/tests/test-ovn.c
++++ b/tests/test-ovn.c
+@@ -38,6 +38,10 @@
+ #include "simap.h"
+ #include "util.h"
+
++#ifndef WAIT_ANY
++# define WAIT_ANY (-1) /* Any process. */
++#endif
++
+ /* --relops: Bitmap of the relational operators to test, in exhaustive test. */
+ static unsigned int test_relops;
+
diff --git a/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/disable_m4_check.patch b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/disable_m4_check.patch
new file mode 100644
index 00000000..711a1487
--- /dev/null
+++ b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/disable_m4_check.patch
@@ -0,0 +1,24 @@
+From f675d7209f999ce80cb4249c4ebb216697387b71 Mon Sep 17 00:00:00 2001
+From: Amy Fong <amy.fong@windriver.com>
+Date: Thu, 29 Jan 2015 09:56:03 -0500
+Subject: [PATCH] Disable m4 file test where sources are built from git.
+
+Signed-off-by: Amy Fong <amy.fong@windriver.com>
+
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index ff7d70a..2fc1f13 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -187,7 +187,7 @@ CLEAN_LOCAL += clean-pycov
+
+ # If we're checked out from a Git repository, make sure that every
+ # file that is in Git is distributed.
+-ALL_LOCAL += dist-hook-git
++# ALL_LOCAL += dist-hook-git
+ dist-hook-git: distfiles
+ @if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1; then \
+ (cd datapath && $(MAKE) distfiles); \
diff --git a/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/kernel_module.patch b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/kernel_module.patch
new file mode 100644
index 00000000..c177202f
--- /dev/null
+++ b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/kernel_module.patch
@@ -0,0 +1,26 @@
+From adfd2380d71dff1a31efaf63cf7ac97470466ec9 Mon Sep 17 00:00:00 2001
+From: Amy Fong <amy.fong@windriver.com>
+Date: Thu, 29 Jan 2015 09:56:03 -0500
+Subject: [PATCH] Specify install path for kernel module
+
+Signed-off-by: Amy Fong <amy.fong@windriver.com>
+
+---
+ datapath/linux/Makefile.main.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/datapath/linux/Makefile.main.in b/datapath/linux/Makefile.main.in
+index 7d18253..63c520f 100644
+--- a/datapath/linux/Makefile.main.in
++++ b/datapath/linux/Makefile.main.in
+@@ -71,8 +71,8 @@ default:
+ $(MAKE) -C $(KSRC) M=$(builddir) modules
+
+ modules_install:
+- $(MAKE) -C $(KSRC) M=$(builddir) modules_install
+- depmod `sed -n 's/#define UTS_RELEASE "\([^"]*\)"/\1/p' $(KSRC)/include/generated/utsrelease.h`
++ $(MAKE) -C $(KSRC) M=$(builddir) modules_install INSTALL_MOD_PATH=${INSTALL_MOD_PATH}
++ # depmod `sed -n 's/#define UTS_RELEASE "\([^"]*\)"/\1/p' $(KSRC)/include/generated/utsrelease.h`
+ endif
+
+ # Much of the kernel build system in this file is derived from Intel's
diff --git a/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-5563e309b80bbea9bff538e71ecfd7e5e538bab9.patch b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-5563e309b80bbea9bff538e71ecfd7e5e538bab9.patch
new file mode 100644
index 00000000..a8fc86c9
--- /dev/null
+++ b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-5563e309b80bbea9bff538e71ecfd7e5e538bab9.patch
@@ -0,0 +1,110 @@
+From 37df262d2b0f0b8c177aa850623f2c5880484ff0 Mon Sep 17 00:00:00 2001
+From: He Zhe <zhe.he@windriver.com>
+Date: Wed, 30 Mar 2016 06:23:45 -0400
+Subject: [PATCH] openvswitch: Add test-install rule to support ptest execution
+
+Signed-off-by: Radu Patriu <radu.patriu@enea.com>
+
+Fix ptest for v2.5
+ - Copy certain files from srcdir since it has been different from
+ build directory.
+ - Copy more necessary files for new added test cases.
+ - Modify config files for running on target.
+
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+
+---
+ Makefile.am | 1 +
+ test.mk | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 75 insertions(+)
+ create mode 100644 test.mk
+
+diff --git a/Makefile.am b/Makefile.am
+index 7889728..6435399 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -494,3 +494,4 @@ include windows/automake.mk
+ include ovn/automake.mk
+ include selinux/automake.mk
+ include build-aux/automake.mk
++include test.mk
+diff --git a/test.mk b/test.mk
+new file mode 100644
+index 0000000..0b4587c
+--- /dev/null
++++ b/test.mk
+@@ -0,0 +1,74 @@
++TEST_DEST ?= ${prefix}/lib/openvswitch
++TEST_ROOT ?= ${prefix}/lib/openvswitch
++TEST_DEPEND =
++
++if HAVE_OPENSSL
++TEST_DEPEND += $(TESTPKI_FILES)
++endif
++
++test-install: $(TEST_DEPEND)
++ @list='$(noinst_PROGRAMS) $(EXTRA_DIST) $(dist_check_SCRIPTS) $(TEST_DEPEND) tests/atlocal tests/atconfig' ;\
++ install -d $(TEST_DEST)/tests ;\
++ install $(srcdir)/vtep/ovs-vtep $(TEST_DEST)/tests ;\
++ install -d $(TEST_DEST)/python ;\
++ install -d $(TEST_DEST)/python/ovs ;\
++ install -d $(TEST_DEST)/python/ovs/db ;\
++ install -d $(TEST_DEST)/python/ovs/compat ;\
++ install -d $(TEST_DEST)/python/ovs/compat/sortedcontainers ;\
++ install -d $(TEST_DEST)/python/ovs/unixctl ;\
++ install -d $(TEST_DEST)/vswitchd ;\
++ install $(srcdir)/vswitchd/vswitch.ovsschema $(TEST_DEST)/vswitchd ;\
++ install vswitchd/ovs-vswitchd $(TEST_DEST)/vswitchd ;\
++ install -d $(TEST_DEST)/debian ;\
++ install $(srcdir)/debian/ovs-monitor-ipsec $(TEST_DEST)/debian ;\
++ install -d $(TEST_DEST)/build-aux ;\
++ install $(srcdir)/build-aux/check-structs $(TEST_DEST)/build-aux ;\
++ install -d $(TEST_DEST)/xenserver ;\
++ install $(srcdir)/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync $(TEST_DEST)/xenserver ;\
++ install $(srcdir)/xenserver/opt_xensource_libexec_interface-reconfigure $(TEST_DEST)/xenserver ;\
++ install $(srcdir)/xenserver/opt_xensource_libexec_InterfaceReconfigure.py $(TEST_DEST)/xenserver ;\
++ install $(srcdir)/xenserver/opt_xensource_libexec_InterfaceReconfigureBridge.py $(TEST_DEST)/xenserver ;\
++ install $(srcdir)/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py $(TEST_DEST)/xenserver ;\
++ install -d $(TEST_DEST)/vtep ;\
++ install $(srcdir)/vtep/vtep.ovsschema $(TEST_DEST)/vtep ;\
++ install -d $(TEST_DEST)/ovn ;\
++ install $(srcdir)/ovn/ovn-nb.ovsschema $(TEST_DEST)/ovn ;\
++ install $(srcdir)/ovn/ovn-sb.ovsschema $(TEST_DEST)/ovn ;\
++ install -d $(TEST_DEST)/utilities ;\
++ install $(srcdir)/utilities/ovs-pcap.in $(TEST_DEST)/utilities ;\
++ install $(srcdir)/utilities/ovs-pki.in $(TEST_DEST)/utilities ;\
++ for p in $$list ; do \
++ echo $$p ;\
++ p=$${p#../git/} ;\
++ pre=$${p#tests\/} ;\
++ if test $$pre != $$p ; then \
++ echo installing $$p to $(TEST_DEST)/tests/$$pre ;\
++ if test -f $$p ; then \
++ install $$p $(TEST_DEST)/tests/$$pre ;\
++ else \
++ install $(srcdir)/$$p $(TEST_DEST)/tests/$$pre ;\
++ fi ;\
++ continue ;\
++ fi ;\
++ pre=$${p#python\/ovs\/} ;\
++ if test $$pre != $$p ; then \
++ echo installing $$p to $(TEST_DEST)/python/ovs/$$pre ;\
++ if test -f $$p ; then \
++ install $$p $(TEST_DEST)/python/ovs/$$pre ;\
++ else \
++ install $(srcdir)/$$p $(TEST_DEST)/python/ovs/$$pre ;\
++ fi ;\
++ continue ;\
++ fi; \
++ done ;\
++ sed -i 's|abs_builddir=.*|abs_builddir='"'"'$(TEST_ROOT)/tests'"'"'|g' $(TEST_DEST)/tests/atconfig
++ sed -i 's|abs_srcdir=.*|abs_srcdir='"'"'$(TEST_ROOT)/tests'"'"'|g' $(TEST_DEST)/tests/atconfig
++ sed -i 's|abs_top_srcdir=.*|abs_top_srcdir='"'"'$(TEST_ROOT)'"'"'|g' $(TEST_DEST)/tests/atconfig
++ sed -i 's|abs_top_builddir=.*|abs_top_builddir='"'"'$(TEST_ROOT)'"'"'|g' $(TEST_DEST)/tests/atconfig
++ sed -i 's|at_srcdir=.*|at_srcdir='"'"'.'"'"'|g' $(TEST_DEST)/tests/atconfig
++ sed -i 's|at_top_srcdir=.*|at_top_srcdir='"'"'..'"'"'|g' $(TEST_DEST)/tests/atconfig
++ sed -i 's|at_top_build_prefix=.*|at_top_build_prefix='"'"'../'"'"'|g' $(TEST_DEST)/tests/atconfig
++ sed -i 's|^\(.*config\.log.*\)|#\1|g' $(TEST_DEST)/tests/testsuite
++ sed -i 's|$$srcdir|$$abs_srcdir|g' $(TEST_DEST)/tests/testsuite
++ sed -i 's|ovs-appctl-bashcomp\.bash|/etc/bash_completion.d/ovs-appctl-bashcomp\.bash|g' $(TEST_DEST)/tests/testsuite
++ sed -i 's|ovs-vsctl-bashcomp\.bash|/etc/bash_completion.d/ovs-vsctl-bashcomp\.bash|g' $(TEST_DEST)/tests/testsuite
diff --git a/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch
new file mode 100644
index 00000000..65290cf6
--- /dev/null
+++ b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch
@@ -0,0 +1,31 @@
+From 219e7cf9f28fdf14747fdf674bec293f763fe8e3 Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Tue, 4 Sep 2018 15:38:59 -0400
+Subject: [PATCH] systemd: create runtime dirs
+
+The recommendation would be to make use of "RuntimeDirectory=" and
+"RuntimeDirectoryMode=" instead of 'mkdir' and 'chown' but since the
+upstream service file uses 'chown' we will match this by using
+'mkdir'. Without this the service will fail to start since these
+directories won't exist.
+
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ rhel/usr_lib_systemd_system_ovsdb-server.service | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service b/rhel/usr_lib_systemd_system_ovsdb-server.service
+index 694598f..0bb2274 100644
+--- a/rhel/usr_lib_systemd_system_ovsdb-server.service
++++ b/rhel/usr_lib_systemd_system_ovsdb-server.service
+@@ -10,6 +10,7 @@ Type=forking
+ Restart=on-failure
+ EnvironmentFile=/etc/openvswitch/default.conf
+ EnvironmentFile=-/etc/sysconfig/openvswitch
++ExecStartPre=-/bin/mkdir /var/run/openvswitch /var/log/openvswitch
+ ExecStartPre=/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch
+ ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch/useropts; if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /bin/echo "OVSUSER=--ovs-user=${OVS_USER_ID}" > /run/openvswitch/useropts; fi'
+ EnvironmentFile=-/run/openvswitch/useropts
+--
+2.7.4
+
diff --git a/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/systemd-update-tool-paths.patch b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/systemd-update-tool-paths.patch
new file mode 100644
index 00000000..d7d4c159
--- /dev/null
+++ b/external/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/systemd-update-tool-paths.patch
@@ -0,0 +1,47 @@
+From 163020a5bba1323dc337d72d4771bb81d824b0dc Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Tue, 29 May 2018 18:57:46 +0000
+Subject: [PATCH] systemd: update tool paths
+
+We are using the rhel files but we install our tools in a slightly
+different path, update accordingly.
+
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ rhel/usr_lib_systemd_system_ovs-vswitchd.service.in | 4 ++--
+ rhel/usr_lib_systemd_system_ovsdb-server.service | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in b/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in
+index 11b34c6..94c48f8 100644
+--- a/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in
++++ b/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in
+@@ -15,8 +15,8 @@ EnvironmentFile=/etc/openvswitch/default.conf
+ EnvironmentFile=-/etc/sysconfig/openvswitch
+ EnvironmentFile=-/run/openvswitch/useropts
+ @begin_dpdk@
+-ExecStartPre=-/bin/sh -c '/usr/bin/chown :$${OVS_USER_ID##*:} /dev/hugepages'
+-ExecStartPre=-/usr/bin/chmod 0775 /dev/hugepages
++ExecStartPre=-/bin/sh -c '/bin/chown :$${OVS_USER_ID##*:} /dev/hugepages'
++ExecStartPre=-/bin/chmod 0775 /dev/hugepages
+ @end_dpdk@
+ ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
+ --no-ovsdb-server --no-monitor --system-id=random \
+diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service b/rhel/usr_lib_systemd_system_ovsdb-server.service
+index 70da1ec..694598f 100644
+--- a/rhel/usr_lib_systemd_system_ovsdb-server.service
++++ b/rhel/usr_lib_systemd_system_ovsdb-server.service
+@@ -10,8 +10,8 @@ Type=forking
+ Restart=on-failure
+ EnvironmentFile=/etc/openvswitch/default.conf
+ EnvironmentFile=-/etc/sysconfig/openvswitch
+-ExecStartPre=/usr/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch
+-ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch/useropts; if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /usr/bin/echo "OVSUSER=--ovs-user=${OVS_USER_ID}" > /run/openvswitch/useropts; fi'
++ExecStartPre=/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch
++ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch/useropts; if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /bin/echo "OVSUSER=--ovs-user=${OVS_USER_ID}" > /run/openvswitch/useropts; fi'
+ EnvironmentFile=-/run/openvswitch/useropts
+ ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
+ --no-ovs-vswitchd --no-monitor --system-id=random \
+--
+2.7.4
+