From d876cfc5bfafa516dee55d04b50b319a22165640 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Wed, 28 Jul 2021 14:22:43 -0400 Subject: 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 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 Signed-off-by: Bruce Ashfield --- recipes-networking/openvswitch/openvswitch.inc | 46 +++++++++++------------ recipes-networking/openvswitch/openvswitch_git.bb | 8 ++-- 2 files changed, 27 insertions(+), 27 deletions(-) (limited to 'recipes-networking/openvswitch') 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" DEPENDS += "bridge-utils openssl python3 perl python3-six-native coreutils-native" -RDEPENDS_${PN} += "util-linux-uuidgen util-linux-libuuid coreutils \ +RDEPENDS:${PN} += "util-linux-uuidgen util-linux-libuuid coreutils \ python3 perl perl-module-strict ${PN}-switch \ bash python3-twisted python3-six" -RDEPENDS_${PN}-testcontroller = "${PN} ${PN}-pki" -RDEPENDS_${PN}-switch = "${PN} openssl procps util-linux-uuidgen" -RDEPENDS_${PN}-pki = "${PN}" -RDEPENDS_${PN}-brcompat = "${PN} ${PN}-switch" +RDEPENDS:${PN}-testcontroller = "${PN} ${PN}-pki" +RDEPENDS:${PN}-switch = "${PN} openssl procps util-linux-uuidgen" +RDEPENDS:${PN}-pki = "${PN}" +RDEPENDS:${PN}-brcompat = "${PN} ${PN}-switch" # Some installers will fail because of an install order based on # rdeps. E.g. ovs-pki calls sed in the postinstall. sed may be # queued for install later. -RDEPENDS_${PN} += "sed gawk grep" +RDEPENDS:${PN} += "sed gawk grep" SRC_URI = "\ file://openvswitch-switch \ @@ -45,19 +45,19 @@ CONFIGUREOPT_DEPTRACK = "" # distro layers can enable with EXTRA_OECONF_pn_openvswitch += "" # EXTRA_OECONF = "--with-linux=${STAGING_KERNEL_DIR} KARCH=${TARGET_ARCH}" -ALLOW_EMPTY_${PN}-pki = "1" +ALLOW_EMPTY:${PN}-pki = "1" PACKAGES =+ "${PN}-testcontroller ${PN}-switch ${PN}-brcompat ${PN}-pki" -FILES_${PN}-testcontroller = "\ +FILES:${PN}-testcontroller = "\ ${sysconfdir}/init.d/openvswitch-testcontroller \ ${sysconfdir}/default/openvswitch-testcontroller \ ${sysconfdir}/openvswitch-testcontroller \ ${bindir}/ovs-testcontroller \ " -FILES_${PN}-brcompat = "${sbindir}/ovs-brcompatd" +FILES:${PN}-brcompat = "${sbindir}/ovs-brcompatd" -FILES_${PN}-switch = "\ +FILES:${PN}-switch = "\ ${sysconfdir}/init.d/openvswitch-switch \ ${sysconfdir}/default/openvswitch-switch \ ${systemd_unitdir}/system/ovs-vswitchd.service \ @@ -68,33 +68,33 @@ FILES_${PN}-switch = "\ " # silence a warning -FILES_${PN} += "${datadir}/ovsdbmonitor" -FILES_${PN} += "/run" +FILES:${PN} += "${datadir}/ovsdbmonitor" +FILES:${PN} += "/run" -FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/" +FILES:${PN} += "${libdir}/python${PYTHON_BASEVERSION}/" inherit autotools update-rc.d systemd python3native SYSTEMD_PACKAGES = "${PN}-switch" -SYSTEMD_SERVICE_${PN}-switch = " \ +SYSTEMD_SERVICE:${PN}-switch = " \ ovsdb-server.service \ ovs-vswitchd.service \ openvswitch.service \ " INITSCRIPT_PACKAGES = "${PN}-switch ${PN}-testcontroller" -INITSCRIPT_NAME_${PN}-switch = "openvswitch-switch" -INITSCRIPT_PARAMS_${PN}-switch = "defaults 71" +INITSCRIPT_NAME:${PN}-switch = "openvswitch-switch" +INITSCRIPT_PARAMS:${PN}-switch = "defaults 71" -INITSCRIPT_NAME_${PN}-testcontroller = "openvswitch-testcontroller" -INITSCRIPT_PARAMS_${PN}-testcontroller = "defaults 72" +INITSCRIPT_NAME:${PN}-testcontroller = "openvswitch-testcontroller" +INITSCRIPT_PARAMS:${PN}-testcontroller = "defaults 72" -do_configure_prepend() { +do_configure:prepend() { # Work around the for Makefile CC=$(if ....) by swapping out any # "-Wa," assembly directives with "-Xassembler CC=`echo '${CC}' | sed 's/-Wa,/-Xassembler /g'` } -do_install_prepend() { +do_install:prepend() { SERVICE_FILE="${S}/rhel/usr_lib_systemd_system_ovs-vswitchd.service" ${S}/build-aux/dpdkstrip.py \ ${@bb.utils.contains('PACKAGECONFIG','dpdk','--dpdk','--nodpdk',d)} \ @@ -102,7 +102,7 @@ do_install_prepend() { > ${SERVICE_FILE} } -do_install_append() { +do_install:append() { install -d ${D}/${sysconfdir}/default/ install -m 660 ${WORKDIR}/openvswitch-switch-setup ${D}/${sysconfdir}/default/openvswitch-switch install -d ${D}/${sysconfdir}/openvswitch-testcontroller @@ -137,13 +137,13 @@ do_install_append() { cp -r ${S}/python/ovstest/ ${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages/ } -pkg_postinst_ontarget_${PN}-pki () { +pkg_postinst_ontarget:${PN}-pki () { if test ! -d $D/${datadir}/${PN}/pki; then ovs-pki init --dir=$D/${datadir}/${PN}/pki fi } -pkg_postinst_ontarget_${PN}-testcontroller () { +pkg_postinst_ontarget:${PN}-testcontroller () { if test ! -d $D/${datadir}/${PN}/pki; then ovs-pki init --dir=$D/${datadir}/${PN}/pki 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" PACKAGE_ARCH = "${MACHINE_ARCH}" -RDEPENDS_${PN}-ptest += "\ +RDEPENDS:${PN}-ptest += "\ python3-logging python3-syslog python3-io python3-core \ python3-fcntl python3-shell python3-xml python3-math \ python3-datetime python3-netclient python3 sed \ @@ -17,7 +17,7 @@ S = "${WORKDIR}/git" PV = "2.15+${SRCPV}" CVE_VERSION = "2.13.0" -FILESEXTRAPATHS_append := "${THISDIR}/${PN}-git:" +FILESEXTRAPATHS:append := "${THISDIR}/${PN}-git:" SRCREV = "8dc1733eaea866dce033b3c44853e1b09bf59fc7" SRC_URI += "git://github.com/openvswitch/ovs.git;protocol=git;branch=branch-2.15 \ @@ -45,7 +45,7 @@ PACKAGECONFIG[ssl] = ",--disable-ssl,openssl," # EXTRA_OECONF += "--with-linux=${STAGING_KERNEL_BUILDDIR} --with-linux-source=${STAGING_KERNEL_DIR} KARCH=${TARGET_ARCH}" # silence a warning -FILES_${PN} += "/lib/modules" +FILES:${PN} += "/lib/modules" inherit ptest @@ -55,6 +55,6 @@ do_install_ptest() { oe_runmake test-install } -do_install_append() { +do_install:append() { oe_runmake modules_install INSTALL_MOD_PATH=${D} } -- cgit v1.2.3-54-g00ecf