summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-networking/openvswitch/files/0001-ovs-use-run-instead-of-var-run-for-in-systemd-units.patch106
-rw-r--r--recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch15
-rw-r--r--recipes-networking/openvswitch/openvswitch-git/systemd-update-tool-paths.patch29
-rw-r--r--recipes-networking/openvswitch/openvswitch_git.bb9
4 files changed, 23 insertions, 136 deletions
diff --git a/recipes-networking/openvswitch/files/0001-ovs-use-run-instead-of-var-run-for-in-systemd-units.patch b/recipes-networking/openvswitch/files/0001-ovs-use-run-instead-of-var-run-for-in-systemd-units.patch
deleted file mode 100644
index 8bda865f..00000000
--- a/recipes-networking/openvswitch/files/0001-ovs-use-run-instead-of-var-run-for-in-systemd-units.patch
+++ /dev/null
@@ -1,106 +0,0 @@
1From ae55fa8168b4b9692ad757c54255a89f935c587e Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Thu, 11 Mar 2021 11:35:24 +0800
4Subject: [PATCH] ovs: use /run instead of /var/run for in systemd units
5
6Upstream-Status: Pending
7
8Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
9---
10 rhel/etc_logrotate.d_openvswitch | 4 ++--
11 rhel/usr_lib_systemd_system_openvswitch-ipsec.service | 2 +-
12 ...sr_lib_systemd_system_ovs-delete-transient-ports.service | 2 +-
13 rhel/usr_lib_systemd_system_ovs-vswitchd.service.in | 6 +++---
14 rhel/usr_lib_systemd_system_ovsdb-server.service | 6 +++---
15 5 files changed, 10 insertions(+), 10 deletions(-)
16
17diff --git a/rhel/etc_logrotate.d_openvswitch b/rhel/etc_logrotate.d_openvswitch
18index f4302ffbc..c0f476744 100644
19--- a/rhel/etc_logrotate.d_openvswitch
20+++ b/rhel/etc_logrotate.d_openvswitch
21@@ -13,8 +13,8 @@
22 missingok
23 postrotate
24 # Tell Open vSwitch daemons to reopen their log files
25- if [ -d /var/run/openvswitch ]; then
26- for ctl in /var/run/openvswitch/*.ctl; do
27+ if [ -d /run/openvswitch ]; then
28+ for ctl in /run/openvswitch/*.ctl; do
29 ovs-appctl -t "$ctl" vlog/reopen 2>/dev/null || :
30 done
31 fi
32diff --git a/rhel/usr_lib_systemd_system_openvswitch-ipsec.service b/rhel/usr_lib_systemd_system_openvswitch-ipsec.service
33index d8f47af68..92dad44f9 100644
34--- a/rhel/usr_lib_systemd_system_openvswitch-ipsec.service
35+++ b/rhel/usr_lib_systemd_system_openvswitch-ipsec.service
36@@ -5,7 +5,7 @@ After=openvswitch.service
37
38 [Service]
39 Type=forking
40-PIDFile=/var/run/openvswitch/ovs-monitor-ipsec.pid
41+PIDFile=/run/openvswitch/ovs-monitor-ipsec.pid
42 ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
43 --ike-daemon=libreswan start-ovs-ipsec
44 ExecStop=/usr/share/openvswitch/scripts/ovs-ctl stop-ovs-ipsec
45diff --git a/rhel/usr_lib_systemd_system_ovs-delete-transient-ports.service b/rhel/usr_lib_systemd_system_ovs-delete-transient-ports.service
46index 4cd4d7f57..d4d7b204b 100644
47--- a/rhel/usr_lib_systemd_system_ovs-delete-transient-ports.service
48+++ b/rhel/usr_lib_systemd_system_ovs-delete-transient-ports.service
49@@ -2,7 +2,7 @@
50 Description=Open vSwitch Delete Transient Ports
51 After=ovsdb-server.service
52 Before=ovs-vswitchd.service
53-AssertPathExists=/var/run/openvswitch/db.sock
54+AssertPathExists=/run/openvswitch/db.sock
55
56 [Service]
57 Type=oneshot
58diff --git a/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in b/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in
59index f88b57cae..82748bf2d 100644
60--- a/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in
61+++ b/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in
62@@ -4,14 +4,14 @@ After=ovsdb-server.service network-pre.target systemd-udev-settle.service
63 Before=network.target network.service
64 Requires=ovsdb-server.service
65 ReloadPropagatedFrom=ovsdb-server.service
66-AssertPathIsReadWrite=/var/run/openvswitch/db.sock
67+AssertPathIsReadWrite=/run/openvswitch/db.sock
68 PartOf=openvswitch.service
69
70 [Service]
71 Type=forking
72-PIDFile=/var/run/openvswitch/ovs-vswitchd.pid
73+PIDFile=/run/openvswitch/ovs-vswitchd.pid
74 Restart=on-failure
75-Environment=XDG_RUNTIME_DIR=/var/run/openvswitch
76+Environment=XDG_RUNTIME_DIR=/run/openvswitch
77 EnvironmentFile=/etc/openvswitch/default.conf
78 EnvironmentFile=-/etc/sysconfig/openvswitch
79 EnvironmentFile=-/run/openvswitch.useropts
80diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service b/rhel/usr_lib_systemd_system_ovsdb-server.service
81index 74e5acb7f..39698f238 100644
82--- a/rhel/usr_lib_systemd_system_ovsdb-server.service
83+++ b/rhel/usr_lib_systemd_system_ovsdb-server.service
84@@ -7,7 +7,7 @@ PartOf=openvswitch.service
85
86 [Service]
87 Type=forking
88-PIDFile=/var/run/openvswitch/ovsdb-server.pid
89+PIDFile=/run/openvswitch/ovsdb-server.pid
90 Restart=on-failure
91 EnvironmentFile=/etc/openvswitch/default.conf
92 EnvironmentFile=-/etc/sysconfig/openvswitch
93@@ -17,8 +17,8 @@ EnvironmentFile=-/run/openvswitch.useropts
94 # remove openvswitch.useropts first to reload a fresh
95 # OVS_USER_ID from default.conf or sysconfig.
96 ExecStartPre=/bin/rm -f /run/openvswitch.useropts
97-ExecStartPre=-/bin/mkdir /var/run/openvswitch /var/log/openvswitch
98-ExecStartPre=-/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch
99+ExecStartPre=-/bin/mkdir -p /run/openvswitch /var/log/openvswitch
100+ExecStartPre=-/bin/chown ${OVS_USER_ID} /run/openvswitch /var/log/openvswitch
101 ExecStartPre=/bin/sh -c '/bin/echo "OVS_USER_ID=${OVS_USER_ID}" > /run/openvswitch.useropts'
102 ExecStartPre=/bin/sh -c 'if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /bin/echo "OVS_USER_OPT=--ovs-user=${OVS_USER_ID}" >> /run/openvswitch.useropts; fi'
103 ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
104--
1052.17.1
106
diff --git a/recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch b/recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch
index 12b9e17a..7f6e5422 100644
--- a/recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch
+++ b/recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch
@@ -14,19 +14,16 @@ Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
14 rhel/usr_lib_systemd_system_ovsdb-server.service | 2 +- 14 rhel/usr_lib_systemd_system_ovsdb-server.service | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-) 15 1 file changed, 1 insertion(+), 1 deletion(-)
16 16
17diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service b/rhel/usr_lib_systemd_system_ovsdb-server.service 17Index: git/rhel/usr_lib_systemd_system_ovsdb-server.service
18index 5002ddf10..74e5acb7f 100644 18===================================================================
19--- a/rhel/usr_lib_systemd_system_ovsdb-server.service 19--- git.orig/rhel/usr_lib_systemd_system_ovsdb-server.service
20+++ b/rhel/usr_lib_systemd_system_ovsdb-server.service 20+++ git/rhel/usr_lib_systemd_system_ovsdb-server.service
21@@ -17,7 +17,7 @@ EnvironmentFile=-/run/openvswitch.useropts 21@@ -17,7 +17,7 @@
22 # remove openvswitch.useropts first to reload a fresh 22 # remove openvswitch.useropts first to reload a fresh
23 # OVS_USER_ID from default.conf or sysconfig. 23 # OVS_USER_ID from default.conf or sysconfig.
24 ExecStartPre=/bin/rm -f /run/openvswitch.useropts 24 ExecStartPre=/bin/rm -f /run/openvswitch.useropts
25- 25-
26+ExecStartPre=-/bin/mkdir /var/run/openvswitch /var/log/openvswitch 26+ExecStartPre=-/bin/mkdir /var/run/openvswitch /var/log/openvswitch
27 ExecStartPre=-/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch 27 ExecStartPre=-/bin/chown ${OVS_USER_ID} /run/openvswitch /var/log/openvswitch
28 ExecStartPre=/bin/sh -c '/bin/echo "OVS_USER_ID=${OVS_USER_ID}" > /run/openvswitch.useropts' 28 ExecStartPre=/bin/sh -c '/bin/echo "OVS_USER_ID=${OVS_USER_ID}" > /run/openvswitch.useropts'
29 ExecStartPre=/bin/sh -c 'if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /bin/echo "OVS_USER_OPT=--ovs-user=${OVS_USER_ID}" >> /run/openvswitch.useropts; fi' 29 ExecStartPre=/bin/sh -c 'if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /bin/echo "OVS_USER_OPT=--ovs-user=${OVS_USER_ID}" >> /run/openvswitch.useropts; fi'
30--
312.17.1
32
diff --git a/recipes-networking/openvswitch/openvswitch-git/systemd-update-tool-paths.patch b/recipes-networking/openvswitch/openvswitch-git/systemd-update-tool-paths.patch
index be6fa5d9..a9eae832 100644
--- a/recipes-networking/openvswitch/openvswitch-git/systemd-update-tool-paths.patch
+++ b/recipes-networking/openvswitch/openvswitch-git/systemd-update-tool-paths.patch
@@ -12,11 +12,11 @@ Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
12 rhel/usr_lib_systemd_system_ovsdb-server.service | 8 ++++---- 12 rhel/usr_lib_systemd_system_ovsdb-server.service | 8 ++++----
13 2 files changed, 6 insertions(+), 6 deletions(-) 13 2 files changed, 6 insertions(+), 6 deletions(-)
14 14
15diff --git a/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in b/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in 15Index: git/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in
16index ff43dae96..f88b57cae 100644 16===================================================================
17--- a/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in 17--- git.orig/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in
18+++ b/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in 18+++ git/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in
19@@ -17,8 +17,8 @@ EnvironmentFile=-/etc/sysconfig/openvswitch 19@@ -17,8 +17,8 @@
20 EnvironmentFile=-/run/openvswitch.useropts 20 EnvironmentFile=-/run/openvswitch.useropts
21 LimitSTACK=2M 21 LimitSTACK=2M
22 @begin_dpdk@ 22 @begin_dpdk@
@@ -27,26 +27,23 @@ index ff43dae96..f88b57cae 100644
27 @end_dpdk@ 27 @end_dpdk@
28 ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \ 28 ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
29 --no-ovsdb-server --no-monitor --system-id=random \ 29 --no-ovsdb-server --no-monitor --system-id=random \
30diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service b/rhel/usr_lib_systemd_system_ovsdb-server.service 30Index: git/rhel/usr_lib_systemd_system_ovsdb-server.service
31index 98338b9df..5002ddf10 100644 31===================================================================
32--- a/rhel/usr_lib_systemd_system_ovsdb-server.service 32--- git.orig/rhel/usr_lib_systemd_system_ovsdb-server.service
33+++ b/rhel/usr_lib_systemd_system_ovsdb-server.service 33+++ git/rhel/usr_lib_systemd_system_ovsdb-server.service
34@@ -16,11 +16,11 @@ EnvironmentFile=-/run/openvswitch.useropts 34@@ -16,11 +16,11 @@
35 # Environment is reloaded for each Exec*, make sure to 35 # Environment is reloaded for each Exec*, make sure to
36 # remove openvswitch.useropts first to reload a fresh 36 # remove openvswitch.useropts first to reload a fresh
37 # OVS_USER_ID from default.conf or sysconfig. 37 # OVS_USER_ID from default.conf or sysconfig.
38-ExecStartPre=/usr/bin/rm -f /run/openvswitch.useropts 38-ExecStartPre=/usr/bin/rm -f /run/openvswitch.useropts
39+ExecStartPre=/bin/rm -f /run/openvswitch.useropts 39+ExecStartPre=/bin/rm -f /run/openvswitch.useropts
40 40
41-ExecStartPre=-/usr/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch 41-ExecStartPre=-/usr/bin/chown ${OVS_USER_ID} /run/openvswitch /var/log/openvswitch
42-ExecStartPre=/bin/sh -c '/usr/bin/echo "OVS_USER_ID=${OVS_USER_ID}" > /run/openvswitch.useropts' 42-ExecStartPre=/bin/sh -c '/usr/bin/echo "OVS_USER_ID=${OVS_USER_ID}" > /run/openvswitch.useropts'
43-ExecStartPre=/bin/sh -c 'if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /usr/bin/echo "OVS_USER_OPT=--ovs-user=${OVS_USER_ID}" >> /run/openvswitch.useropts; fi' 43-ExecStartPre=/bin/sh -c 'if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /usr/bin/echo "OVS_USER_OPT=--ovs-user=${OVS_USER_ID}" >> /run/openvswitch.useropts; fi'
44+ExecStartPre=-/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch 44+ExecStartPre=-/bin/chown ${OVS_USER_ID} /run/openvswitch /var/log/openvswitch
45+ExecStartPre=/bin/sh -c '/bin/echo "OVS_USER_ID=${OVS_USER_ID}" > /run/openvswitch.useropts' 45+ExecStartPre=/bin/sh -c '/bin/echo "OVS_USER_ID=${OVS_USER_ID}" > /run/openvswitch.useropts'
46+ExecStartPre=/bin/sh -c 'if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /bin/echo "OVS_USER_OPT=--ovs-user=${OVS_USER_ID}" >> /run/openvswitch.useropts; fi' 46+ExecStartPre=/bin/sh -c 'if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /bin/echo "OVS_USER_OPT=--ovs-user=${OVS_USER_ID}" >> /run/openvswitch.useropts; fi'
47 ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \ 47 ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
48 --no-ovs-vswitchd --no-monitor --system-id=random \ 48 --no-ovs-vswitchd --no-monitor --system-id=random \
49 ${OVS_USER_OPT} \ 49 ${OVS_USER_OPT} \
50--
512.17.1
52
diff --git a/recipes-networking/openvswitch/openvswitch_git.bb b/recipes-networking/openvswitch/openvswitch_git.bb
index 4d413170..7051ac5c 100644
--- a/recipes-networking/openvswitch/openvswitch_git.bb
+++ b/recipes-networking/openvswitch/openvswitch_git.bb
@@ -14,20 +14,19 @@ RDEPENDS:${PN}-ptest += "\
14 " 14 "
15 15
16S = "${WORKDIR}/git" 16S = "${WORKDIR}/git"
17PV = "2.15.3+${SRCPV}" 17PV = "2.17.0+${SRCPV}"
18CVE_VERSION = "2.15.3" 18CVE_VERSION = "2.17.0"
19 19
20FILESEXTRAPATHS:append := "${THISDIR}/${PN}-git:" 20FILESEXTRAPATHS:append := "${THISDIR}/${PN}-git:"
21 21
22SRCREV = "e4d2df62e65a615e19f62e2fd294709be8d75cdc" 22SRCREV = "2404d45367d104e74cc9eea50d27dcaa8c8917c0"
23SRC_URI += "git://github.com/openvswitch/ovs.git;protocol=https;branch=branch-2.15 \ 23SRC_URI += "git://github.com/openvswitch/ovs.git;protocol=https;branch=branch-2.17 \
24 file://openvswitch-add-ptest-71d553b995d0bd527d3ab1e9fbaf5a2ae34de2f3.patch \ 24 file://openvswitch-add-ptest-71d553b995d0bd527d3ab1e9fbaf5a2ae34de2f3.patch \
25 file://run-ptest \ 25 file://run-ptest \
26 file://disable_m4_check.patch \ 26 file://disable_m4_check.patch \
27 file://kernel_module.patch \ 27 file://kernel_module.patch \
28 file://systemd-update-tool-paths.patch \ 28 file://systemd-update-tool-paths.patch \
29 file://systemd-create-runtime-dirs.patch \ 29 file://systemd-create-runtime-dirs.patch \
30 file://0001-ovs-use-run-instead-of-var-run-for-in-systemd-units.patch \
31 " 30 "
32 31
33LIC_FILES_CHKSUM = "file://LICENSE;md5=1ce5d23a6429dff345518758f13aaeab" 32LIC_FILES_CHKSUM = "file://LICENSE;md5=1ce5d23a6429dff345518758f13aaeab"