summaryrefslogtreecommitdiffstats
path: root/recipes-networking/openvswitch
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2021-07-28 14:22:43 -0400
committerBruce Ashfield <bruce.ashfield@gmail.com>2021-08-02 17:17:53 -0400
commitd876cfc5bfafa516dee55d04b50b319a22165640 (patch)
treeea03c34f999bd85e440c85fc8e722df8666e2e68 /recipes-networking/openvswitch
parent5fdf66c1e2ec0c6b08573bf0a6aa9f84d2fc4ae6 (diff)
downloadmeta-virtualization-d876cfc5bfafa516dee55d04b50b319a22165640.tar.gz
global: overrides syntax conversion
OEcore/bitbake are moving to use the clearer ":" as an overrides separator. This is pass one of updating the meta-virt recipes to use that syntax. This has only been minimally build/runtime tested, more changes will be required for missed overrides, or incorrect conversions Note: A recent bitbake is required: commit 75fad23fc06c008a03414a1fc288a8614c6af9ca Author: Richard Purdie <richard.purdie@linuxfoundation.org> Date: Sun Jul 18 12:59:15 2021 +0100 bitbake: data_smart/parse: Allow ':' characters in variable/function names It is becomming increasingly clear we need to find a way to show what is/is not an override in our syntax. We need to do this in a way which is clear to users, readable and in a way we can transition to. The most effective way I've found to this is to use the ":" charater to directly replace "_" where an override is being specified. This includes "append", "prepend" and "remove" which are effectively special override directives. This patch simply adds the character to the parser so bitbake accepts the value but maps it back to "_" internally so there is no behaviour change. This change is simple enough it could potentially be backported to older version of bitbake meaning layers using the new syntax/markup could work with older releases. Even if other no other changes are accepted at this time and we don't backport, it does set us on a path where at some point in future we could require a more explict syntax. I've tested this patch by converting oe-core/meta-yocto to the new syntax for overrides (9000+ changes) and then seeing that builds continue to work with this patch. (Bitbake rev: 0dbbb4547cb2570d2ce607e9a53459df3c0ac284) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-networking/openvswitch')
-rw-r--r--recipes-networking/openvswitch/openvswitch.inc46
-rw-r--r--recipes-networking/openvswitch/openvswitch_git.bb8
2 files changed, 27 insertions, 27 deletions
diff --git a/recipes-networking/openvswitch/openvswitch.inc b/recipes-networking/openvswitch/openvswitch.inc
index 37fbe5ab..b354a847 100644
--- a/recipes-networking/openvswitch/openvswitch.inc
+++ b/recipes-networking/openvswitch/openvswitch.inc
@@ -13,18 +13,18 @@ LICENSE = "Apache-2"
13 13
14DEPENDS += "bridge-utils openssl python3 perl python3-six-native coreutils-native" 14DEPENDS += "bridge-utils openssl python3 perl python3-six-native coreutils-native"
15 15
16RDEPENDS_${PN} += "util-linux-uuidgen util-linux-libuuid coreutils \ 16RDEPENDS:${PN} += "util-linux-uuidgen util-linux-libuuid coreutils \
17 python3 perl perl-module-strict ${PN}-switch \ 17 python3 perl perl-module-strict ${PN}-switch \
18 bash python3-twisted python3-six" 18 bash python3-twisted python3-six"
19RDEPENDS_${PN}-testcontroller = "${PN} ${PN}-pki" 19RDEPENDS:${PN}-testcontroller = "${PN} ${PN}-pki"
20RDEPENDS_${PN}-switch = "${PN} openssl procps util-linux-uuidgen" 20RDEPENDS:${PN}-switch = "${PN} openssl procps util-linux-uuidgen"
21RDEPENDS_${PN}-pki = "${PN}" 21RDEPENDS:${PN}-pki = "${PN}"
22RDEPENDS_${PN}-brcompat = "${PN} ${PN}-switch" 22RDEPENDS:${PN}-brcompat = "${PN} ${PN}-switch"
23 23
24# Some installers will fail because of an install order based on 24# Some installers will fail because of an install order based on
25# rdeps. E.g. ovs-pki calls sed in the postinstall. sed may be 25# rdeps. E.g. ovs-pki calls sed in the postinstall. sed may be
26# queued for install later. 26# queued for install later.
27RDEPENDS_${PN} += "sed gawk grep" 27RDEPENDS:${PN} += "sed gawk grep"
28 28
29SRC_URI = "\ 29SRC_URI = "\
30 file://openvswitch-switch \ 30 file://openvswitch-switch \
@@ -45,19 +45,19 @@ CONFIGUREOPT_DEPTRACK = ""
45# distro layers can enable with EXTRA_OECONF_pn_openvswitch += "" 45# distro layers can enable with EXTRA_OECONF_pn_openvswitch += ""
46# EXTRA_OECONF = "--with-linux=${STAGING_KERNEL_DIR} KARCH=${TARGET_ARCH}" 46# EXTRA_OECONF = "--with-linux=${STAGING_KERNEL_DIR} KARCH=${TARGET_ARCH}"
47 47
48ALLOW_EMPTY_${PN}-pki = "1" 48ALLOW_EMPTY:${PN}-pki = "1"
49PACKAGES =+ "${PN}-testcontroller ${PN}-switch ${PN}-brcompat ${PN}-pki" 49PACKAGES =+ "${PN}-testcontroller ${PN}-switch ${PN}-brcompat ${PN}-pki"
50 50
51FILES_${PN}-testcontroller = "\ 51FILES:${PN}-testcontroller = "\
52 ${sysconfdir}/init.d/openvswitch-testcontroller \ 52 ${sysconfdir}/init.d/openvswitch-testcontroller \
53 ${sysconfdir}/default/openvswitch-testcontroller \ 53 ${sysconfdir}/default/openvswitch-testcontroller \
54 ${sysconfdir}/openvswitch-testcontroller \ 54 ${sysconfdir}/openvswitch-testcontroller \
55 ${bindir}/ovs-testcontroller \ 55 ${bindir}/ovs-testcontroller \
56 " 56 "
57 57
58FILES_${PN}-brcompat = "${sbindir}/ovs-brcompatd" 58FILES:${PN}-brcompat = "${sbindir}/ovs-brcompatd"
59 59
60FILES_${PN}-switch = "\ 60FILES:${PN}-switch = "\
61 ${sysconfdir}/init.d/openvswitch-switch \ 61 ${sysconfdir}/init.d/openvswitch-switch \
62 ${sysconfdir}/default/openvswitch-switch \ 62 ${sysconfdir}/default/openvswitch-switch \
63 ${systemd_unitdir}/system/ovs-vswitchd.service \ 63 ${systemd_unitdir}/system/ovs-vswitchd.service \
@@ -68,33 +68,33 @@ FILES_${PN}-switch = "\
68 " 68 "
69 69
70# silence a warning 70# silence a warning
71FILES_${PN} += "${datadir}/ovsdbmonitor" 71FILES:${PN} += "${datadir}/ovsdbmonitor"
72FILES_${PN} += "/run" 72FILES:${PN} += "/run"
73 73
74FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/" 74FILES:${PN} += "${libdir}/python${PYTHON_BASEVERSION}/"
75inherit autotools update-rc.d systemd python3native 75inherit autotools update-rc.d systemd python3native
76 76
77SYSTEMD_PACKAGES = "${PN}-switch" 77SYSTEMD_PACKAGES = "${PN}-switch"
78SYSTEMD_SERVICE_${PN}-switch = " \ 78SYSTEMD_SERVICE:${PN}-switch = " \
79 ovsdb-server.service \ 79 ovsdb-server.service \
80 ovs-vswitchd.service \ 80 ovs-vswitchd.service \
81 openvswitch.service \ 81 openvswitch.service \
82" 82"
83 83
84INITSCRIPT_PACKAGES = "${PN}-switch ${PN}-testcontroller" 84INITSCRIPT_PACKAGES = "${PN}-switch ${PN}-testcontroller"
85INITSCRIPT_NAME_${PN}-switch = "openvswitch-switch" 85INITSCRIPT_NAME:${PN}-switch = "openvswitch-switch"
86INITSCRIPT_PARAMS_${PN}-switch = "defaults 71" 86INITSCRIPT_PARAMS:${PN}-switch = "defaults 71"
87 87
88INITSCRIPT_NAME_${PN}-testcontroller = "openvswitch-testcontroller" 88INITSCRIPT_NAME:${PN}-testcontroller = "openvswitch-testcontroller"
89INITSCRIPT_PARAMS_${PN}-testcontroller = "defaults 72" 89INITSCRIPT_PARAMS:${PN}-testcontroller = "defaults 72"
90 90
91do_configure_prepend() { 91do_configure:prepend() {
92 # Work around the for Makefile CC=$(if ....) by swapping out any 92 # Work around the for Makefile CC=$(if ....) by swapping out any
93 # "-Wa," assembly directives with "-Xassembler 93 # "-Wa," assembly directives with "-Xassembler
94 CC=`echo '${CC}' | sed 's/-Wa,/-Xassembler /g'` 94 CC=`echo '${CC}' | sed 's/-Wa,/-Xassembler /g'`
95} 95}
96 96
97do_install_prepend() { 97do_install:prepend() {
98 SERVICE_FILE="${S}/rhel/usr_lib_systemd_system_ovs-vswitchd.service" 98 SERVICE_FILE="${S}/rhel/usr_lib_systemd_system_ovs-vswitchd.service"
99 ${S}/build-aux/dpdkstrip.py \ 99 ${S}/build-aux/dpdkstrip.py \
100 ${@bb.utils.contains('PACKAGECONFIG','dpdk','--dpdk','--nodpdk',d)} \ 100 ${@bb.utils.contains('PACKAGECONFIG','dpdk','--dpdk','--nodpdk',d)} \
@@ -102,7 +102,7 @@ do_install_prepend() {
102 > ${SERVICE_FILE} 102 > ${SERVICE_FILE}
103} 103}
104 104
105do_install_append() { 105do_install:append() {
106 install -d ${D}/${sysconfdir}/default/ 106 install -d ${D}/${sysconfdir}/default/
107 install -m 660 ${WORKDIR}/openvswitch-switch-setup ${D}/${sysconfdir}/default/openvswitch-switch 107 install -m 660 ${WORKDIR}/openvswitch-switch-setup ${D}/${sysconfdir}/default/openvswitch-switch
108 install -d ${D}/${sysconfdir}/openvswitch-testcontroller 108 install -d ${D}/${sysconfdir}/openvswitch-testcontroller
@@ -137,13 +137,13 @@ do_install_append() {
137 cp -r ${S}/python/ovstest/ ${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages/ 137 cp -r ${S}/python/ovstest/ ${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages/
138} 138}
139 139
140pkg_postinst_ontarget_${PN}-pki () { 140pkg_postinst_ontarget:${PN}-pki () {
141 if test ! -d $D/${datadir}/${PN}/pki; then 141 if test ! -d $D/${datadir}/${PN}/pki; then
142 ovs-pki init --dir=$D/${datadir}/${PN}/pki 142 ovs-pki init --dir=$D/${datadir}/${PN}/pki
143 fi 143 fi
144} 144}
145 145
146pkg_postinst_ontarget_${PN}-testcontroller () { 146pkg_postinst_ontarget:${PN}-testcontroller () {
147 if test ! -d $D/${datadir}/${PN}/pki; then 147 if test ! -d $D/${datadir}/${PN}/pki; then
148 ovs-pki init --dir=$D/${datadir}/${PN}/pki 148 ovs-pki init --dir=$D/${datadir}/${PN}/pki
149 fi 149 fi
diff --git a/recipes-networking/openvswitch/openvswitch_git.bb b/recipes-networking/openvswitch/openvswitch_git.bb
index 616bc277..412a7075 100644
--- a/recipes-networking/openvswitch/openvswitch_git.bb
+++ b/recipes-networking/openvswitch/openvswitch_git.bb
@@ -4,7 +4,7 @@ DEPENDS += "virtual/kernel"
4 4
5PACKAGE_ARCH = "${MACHINE_ARCH}" 5PACKAGE_ARCH = "${MACHINE_ARCH}"
6 6
7RDEPENDS_${PN}-ptest += "\ 7RDEPENDS:${PN}-ptest += "\
8 python3-logging python3-syslog python3-io python3-core \ 8 python3-logging python3-syslog python3-io python3-core \
9 python3-fcntl python3-shell python3-xml python3-math \ 9 python3-fcntl python3-shell python3-xml python3-math \
10 python3-datetime python3-netclient python3 sed \ 10 python3-datetime python3-netclient python3 sed \
@@ -17,7 +17,7 @@ S = "${WORKDIR}/git"
17PV = "2.15+${SRCPV}" 17PV = "2.15+${SRCPV}"
18CVE_VERSION = "2.13.0" 18CVE_VERSION = "2.13.0"
19 19
20FILESEXTRAPATHS_append := "${THISDIR}/${PN}-git:" 20FILESEXTRAPATHS:append := "${THISDIR}/${PN}-git:"
21 21
22SRCREV = "8dc1733eaea866dce033b3c44853e1b09bf59fc7" 22SRCREV = "8dc1733eaea866dce033b3c44853e1b09bf59fc7"
23SRC_URI += "git://github.com/openvswitch/ovs.git;protocol=git;branch=branch-2.15 \ 23SRC_URI += "git://github.com/openvswitch/ovs.git;protocol=git;branch=branch-2.15 \
@@ -45,7 +45,7 @@ PACKAGECONFIG[ssl] = ",--disable-ssl,openssl,"
45# EXTRA_OECONF += "--with-linux=${STAGING_KERNEL_BUILDDIR} --with-linux-source=${STAGING_KERNEL_DIR} KARCH=${TARGET_ARCH}" 45# EXTRA_OECONF += "--with-linux=${STAGING_KERNEL_BUILDDIR} --with-linux-source=${STAGING_KERNEL_DIR} KARCH=${TARGET_ARCH}"
46 46
47# silence a warning 47# silence a warning
48FILES_${PN} += "/lib/modules" 48FILES:${PN} += "/lib/modules"
49 49
50inherit ptest 50inherit ptest
51 51
@@ -55,6 +55,6 @@ do_install_ptest() {
55 oe_runmake test-install 55 oe_runmake test-install
56} 56}
57 57
58do_install_append() { 58do_install:append() {
59 oe_runmake modules_install INSTALL_MOD_PATH=${D} 59 oe_runmake modules_install INSTALL_MOD_PATH=${D}
60} 60}