diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2021-07-28 14:22:43 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2021-08-02 17:17:53 -0400 |
commit | d876cfc5bfafa516dee55d04b50b319a22165640 (patch) | |
tree | ea03c34f999bd85e440c85fc8e722df8666e2e68 /recipes-networking/openvswitch | |
parent | 5fdf66c1e2ec0c6b08573bf0a6aa9f84d2fc4ae6 (diff) | |
download | meta-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.inc | 46 | ||||
-rw-r--r-- | recipes-networking/openvswitch/openvswitch_git.bb | 8 |
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 | ||
14 | DEPENDS += "bridge-utils openssl python3 perl python3-six-native coreutils-native" | 14 | DEPENDS += "bridge-utils openssl python3 perl python3-six-native coreutils-native" |
15 | 15 | ||
16 | RDEPENDS_${PN} += "util-linux-uuidgen util-linux-libuuid coreutils \ | 16 | RDEPENDS:${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" |
19 | RDEPENDS_${PN}-testcontroller = "${PN} ${PN}-pki" | 19 | RDEPENDS:${PN}-testcontroller = "${PN} ${PN}-pki" |
20 | RDEPENDS_${PN}-switch = "${PN} openssl procps util-linux-uuidgen" | 20 | RDEPENDS:${PN}-switch = "${PN} openssl procps util-linux-uuidgen" |
21 | RDEPENDS_${PN}-pki = "${PN}" | 21 | RDEPENDS:${PN}-pki = "${PN}" |
22 | RDEPENDS_${PN}-brcompat = "${PN} ${PN}-switch" | 22 | RDEPENDS:${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. |
27 | RDEPENDS_${PN} += "sed gawk grep" | 27 | RDEPENDS:${PN} += "sed gawk grep" |
28 | 28 | ||
29 | SRC_URI = "\ | 29 | SRC_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 | ||
48 | ALLOW_EMPTY_${PN}-pki = "1" | 48 | ALLOW_EMPTY:${PN}-pki = "1" |
49 | PACKAGES =+ "${PN}-testcontroller ${PN}-switch ${PN}-brcompat ${PN}-pki" | 49 | PACKAGES =+ "${PN}-testcontroller ${PN}-switch ${PN}-brcompat ${PN}-pki" |
50 | 50 | ||
51 | FILES_${PN}-testcontroller = "\ | 51 | FILES:${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 | ||
58 | FILES_${PN}-brcompat = "${sbindir}/ovs-brcompatd" | 58 | FILES:${PN}-brcompat = "${sbindir}/ovs-brcompatd" |
59 | 59 | ||
60 | FILES_${PN}-switch = "\ | 60 | FILES:${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 |
71 | FILES_${PN} += "${datadir}/ovsdbmonitor" | 71 | FILES:${PN} += "${datadir}/ovsdbmonitor" |
72 | FILES_${PN} += "/run" | 72 | FILES:${PN} += "/run" |
73 | 73 | ||
74 | FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/" | 74 | FILES:${PN} += "${libdir}/python${PYTHON_BASEVERSION}/" |
75 | inherit autotools update-rc.d systemd python3native | 75 | inherit autotools update-rc.d systemd python3native |
76 | 76 | ||
77 | SYSTEMD_PACKAGES = "${PN}-switch" | 77 | SYSTEMD_PACKAGES = "${PN}-switch" |
78 | SYSTEMD_SERVICE_${PN}-switch = " \ | 78 | SYSTEMD_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 | ||
84 | INITSCRIPT_PACKAGES = "${PN}-switch ${PN}-testcontroller" | 84 | INITSCRIPT_PACKAGES = "${PN}-switch ${PN}-testcontroller" |
85 | INITSCRIPT_NAME_${PN}-switch = "openvswitch-switch" | 85 | INITSCRIPT_NAME:${PN}-switch = "openvswitch-switch" |
86 | INITSCRIPT_PARAMS_${PN}-switch = "defaults 71" | 86 | INITSCRIPT_PARAMS:${PN}-switch = "defaults 71" |
87 | 87 | ||
88 | INITSCRIPT_NAME_${PN}-testcontroller = "openvswitch-testcontroller" | 88 | INITSCRIPT_NAME:${PN}-testcontroller = "openvswitch-testcontroller" |
89 | INITSCRIPT_PARAMS_${PN}-testcontroller = "defaults 72" | 89 | INITSCRIPT_PARAMS:${PN}-testcontroller = "defaults 72" |
90 | 90 | ||
91 | do_configure_prepend() { | 91 | do_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 | ||
97 | do_install_prepend() { | 97 | do_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 | ||
105 | do_install_append() { | 105 | do_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 | ||
140 | pkg_postinst_ontarget_${PN}-pki () { | 140 | pkg_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 | ||
146 | pkg_postinst_ontarget_${PN}-testcontroller () { | 146 | pkg_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 | ||
5 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 5 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
6 | 6 | ||
7 | RDEPENDS_${PN}-ptest += "\ | 7 | RDEPENDS:${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" | |||
17 | PV = "2.15+${SRCPV}" | 17 | PV = "2.15+${SRCPV}" |
18 | CVE_VERSION = "2.13.0" | 18 | CVE_VERSION = "2.13.0" |
19 | 19 | ||
20 | FILESEXTRAPATHS_append := "${THISDIR}/${PN}-git:" | 20 | FILESEXTRAPATHS:append := "${THISDIR}/${PN}-git:" |
21 | 21 | ||
22 | SRCREV = "8dc1733eaea866dce033b3c44853e1b09bf59fc7" | 22 | SRCREV = "8dc1733eaea866dce033b3c44853e1b09bf59fc7" |
23 | SRC_URI += "git://github.com/openvswitch/ovs.git;protocol=git;branch=branch-2.15 \ | 23 | SRC_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 |
48 | FILES_${PN} += "/lib/modules" | 48 | FILES:${PN} += "/lib/modules" |
49 | 49 | ||
50 | inherit ptest | 50 | inherit ptest |
51 | 51 | ||
@@ -55,6 +55,6 @@ do_install_ptest() { | |||
55 | oe_runmake test-install | 55 | oe_runmake test-install |
56 | } | 56 | } |
57 | 57 | ||
58 | do_install_append() { | 58 | do_install:append() { |
59 | oe_runmake modules_install INSTALL_MOD_PATH=${D} | 59 | oe_runmake modules_install INSTALL_MOD_PATH=${D} |
60 | } | 60 | } |