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-extended/libvirt | |
| 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-extended/libvirt')
| -rw-r--r-- | recipes-extended/libvirt/libvirt-python.inc | 14 | ||||
| -rw-r--r-- | recipes-extended/libvirt/libvirt_7.2.0.bb | 58 |
2 files changed, 36 insertions, 36 deletions
diff --git a/recipes-extended/libvirt/libvirt-python.inc b/recipes-extended/libvirt/libvirt-python.inc index 0c661af8..a48aaea5 100644 --- a/recipes-extended/libvirt/libvirt-python.inc +++ b/recipes-extended/libvirt/libvirt-python.inc | |||
| @@ -5,15 +5,15 @@ export STAGING_LIBDIR | |||
| 5 | export BUILD_SYS | 5 | export BUILD_SYS |
| 6 | export HOST_SYS | 6 | export HOST_SYS |
| 7 | 7 | ||
| 8 | RDEPENDS_${PN}-python += "python3" | 8 | RDEPENDS:${PN}-python += "python3" |
| 9 | PACKAGECONFIG_${PN}-python[xen] = ",,,xen-python" | 9 | PACKAGECONFIG_${PN}-python[xen] = ",,,xen-python" |
| 10 | 10 | ||
| 11 | PACKAGES += "${PN}-python-staticdev ${PN}-python-dev ${PN}-python-dbg ${PN}-python" | 11 | PACKAGES += "${PN}-python-staticdev ${PN}-python-dev ${PN}-python-dbg ${PN}-python" |
| 12 | 12 | ||
| 13 | FILES_${PN}-python-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" | 13 | FILES:${PN}-python-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" |
| 14 | FILES_${PN}-python-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la" | 14 | FILES:${PN}-python-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la" |
| 15 | FILES_${PN}-python-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/" | 15 | FILES:${PN}-python-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/" |
| 16 | FILES_${PN}-python = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}/*" | 16 | FILES:${PN}-python = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}/*" |
| 17 | 17 | ||
| 18 | SRC_URI += "http://libvirt.org/sources/python/libvirt-python-${PV}.tar.gz;name=libvirt_python" | 18 | SRC_URI += "http://libvirt.org/sources/python/libvirt-python-${PV}.tar.gz;name=libvirt_python" |
| 19 | 19 | ||
| @@ -38,7 +38,7 @@ python __anonymous () { | |||
| 38 | d.setVar('LIBVIRT_PYTHON_ENABLE', '0') | 38 | d.setVar('LIBVIRT_PYTHON_ENABLE', '0') |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | do_compile_append() { | 41 | do_compile:append() { |
| 42 | if [ "${LIBVIRT_PYTHON_ENABLE}" = "1" ]; then | 42 | if [ "${LIBVIRT_PYTHON_ENABLE}" = "1" ]; then |
| 43 | # we need the python bindings to look into our source dir, not | 43 | # we need the python bindings to look into our source dir, not |
| 44 | # the syroot staged pkgconfig entries. So we clear the sysroot | 44 | # the syroot staged pkgconfig entries. So we clear the sysroot |
| @@ -49,7 +49,7 @@ do_compile_append() { | |||
| 49 | fi | 49 | fi |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | do_install_append() { | 52 | do_install:append() { |
| 53 | if [ "${LIBVIRT_PYTHON_ENABLE}" = "1" ]; then | 53 | if [ "${LIBVIRT_PYTHON_ENABLE}" = "1" ]; then |
| 54 | # we need the python bindings to look into our source dir, not | 54 | # we need the python bindings to look into our source dir, not |
| 55 | # the syroot staged pkgconfig entries. So we clear the sysroot | 55 | # the syroot staged pkgconfig entries. So we clear the sysroot |
diff --git a/recipes-extended/libvirt/libvirt_7.2.0.bb b/recipes-extended/libvirt/libvirt_7.2.0.bb index 19662a7f..9cf29511 100644 --- a/recipes-extended/libvirt/libvirt_7.2.0.bb +++ b/recipes-extended/libvirt/libvirt_7.2.0.bb | |||
| @@ -13,14 +13,14 @@ DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcap util-linux | |||
| 13 | 13 | ||
| 14 | # libvirt-guests.sh needs gettext.sh | 14 | # libvirt-guests.sh needs gettext.sh |
| 15 | # | 15 | # |
| 16 | RDEPENDS_${PN} = "gettext-runtime" | 16 | RDEPENDS:${PN} = "gettext-runtime" |
| 17 | 17 | ||
| 18 | RDEPENDS_libvirt-libvirtd += "bridge-utils iptables pm-utils dnsmasq netcat-openbsd ebtables" | 18 | RDEPENDS:libvirt-libvirtd += "bridge-utils iptables pm-utils dnsmasq netcat-openbsd ebtables" |
| 19 | RDEPENDS_libvirt-libvirtd_append_x86-64 = " dmidecode" | 19 | RDEPENDS:libvirt-libvirtd:append:x86-64 = " dmidecode" |
| 20 | RDEPENDS_libvirt-libvirtd_append_x86 = " dmidecode" | 20 | RDEPENDS:libvirt-libvirtd:append:x86 = " dmidecode" |
| 21 | 21 | ||
| 22 | #connman blocks the 53 port and libvirtd can't start its DNS service | 22 | #connman blocks the 53 port and libvirtd can't start its DNS service |
| 23 | RCONFLICTS_${PN}_libvirtd = "connman" | 23 | RCONFLICTS:${PN}_libvirtd = "connman" |
| 24 | 24 | ||
| 25 | SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.xz;name=libvirt \ | 25 | SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.xz;name=libvirt \ |
| 26 | file://libvirtd.sh \ | 26 | file://libvirtd.sh \ |
| @@ -36,12 +36,12 @@ SRC_URI[libvirt.sha256sum] = "01f459d0c7ba5009622a628dba1a026200e8f4a299fea783b9 | |||
| 36 | 36 | ||
| 37 | inherit meson gettext update-rc.d pkgconfig systemd useradd perlnative | 37 | inherit meson gettext update-rc.d pkgconfig systemd useradd perlnative |
| 38 | USERADD_PACKAGES = "${PN}" | 38 | USERADD_PACKAGES = "${PN}" |
| 39 | GROUPADD_PARAM_${PN} = "-r qemu; -r kvm" | 39 | GROUPADD_PARAM:${PN} = "-r qemu; -r kvm" |
| 40 | USERADD_PARAM_${PN} = "-r -g qemu -G kvm qemu" | 40 | USERADD_PARAM:${PN} = "-r -g qemu -G kvm qemu" |
| 41 | 41 | ||
| 42 | 42 | ||
| 43 | EXTRA_OEMESON += "--cross-file ${WORKDIR}/meson-${PN}.cross" | 43 | EXTRA_OEMESON += "--cross-file ${WORKDIR}/meson-${PN}.cross" |
| 44 | do_write_config_append() { | 44 | do_write_config:append() { |
| 45 | cat >${WORKDIR}/meson-${PN}.cross <<EOF | 45 | cat >${WORKDIR}/meson-${PN}.cross <<EOF |
| 46 | [binaries] | 46 | [binaries] |
| 47 | iptables = '/usr/sbin/iptables' | 47 | iptables = '/usr/sbin/iptables' |
| @@ -52,13 +52,13 @@ dnsmasq = '/usr/bin/dnsmasq' | |||
| 52 | EOF | 52 | EOF |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | ALLOW_EMPTY_${PN} = "1" | 55 | ALLOW_EMPTY:${PN} = "1" |
| 56 | 56 | ||
| 57 | PACKAGES =+ "${PN}-libvirtd ${PN}-virsh" | 57 | PACKAGES =+ "${PN}-libvirtd ${PN}-virsh" |
| 58 | 58 | ||
| 59 | ALLOW_EMPTY_${PN}-libvirtd = "1" | 59 | ALLOW_EMPTY:${PN}-libvirtd = "1" |
| 60 | 60 | ||
| 61 | FILES_${PN}-libvirtd = " \ | 61 | FILES:${PN}-libvirtd = " \ |
| 62 | ${sysconfdir}/init.d \ | 62 | ${sysconfdir}/init.d \ |
| 63 | ${sysconfdir}/sysctl.d \ | 63 | ${sysconfdir}/sysctl.d \ |
| 64 | ${sysconfdir}/logrotate.d \ | 64 | ${sysconfdir}/logrotate.d \ |
| @@ -70,12 +70,12 @@ FILES_${PN}-libvirtd = " \ | |||
| 70 | ${@bb.utils.contains('PACKAGECONFIG', 'gnutls', '${sysconfdir}/pki/libvirt/* ${sysconfdir}/pki/CA/*', '', d)} \ | 70 | ${@bb.utils.contains('PACKAGECONFIG', 'gnutls', '${sysconfdir}/pki/libvirt/* ${sysconfdir}/pki/CA/*', '', d)} \ |
| 71 | " | 71 | " |
| 72 | 72 | ||
| 73 | FILES_${PN}-virsh = " \ | 73 | FILES:${PN}-virsh = " \ |
| 74 | ${bindir}/virsh \ | 74 | ${bindir}/virsh \ |
| 75 | ${datadir}/bash-completion/completions/virsh \ | 75 | ${datadir}/bash-completion/completions/virsh \ |
| 76 | " | 76 | " |
| 77 | 77 | ||
| 78 | FILES_${PN} += "${libdir}/libvirt/connection-driver \ | 78 | FILES:${PN} += "${libdir}/libvirt/connection-driver \ |
| 79 | ${datadir}/augeas \ | 79 | ${datadir}/augeas \ |
| 80 | ${@bb.utils.contains('PACKAGECONFIG', 'polkit', '${datadir}/polkit-1', '', d)} \ | 80 | ${@bb.utils.contains('PACKAGECONFIG', 'polkit', '${datadir}/polkit-1', '', d)} \ |
| 81 | ${datadir}/bash-completion/completions/vsh \ | 81 | ${datadir}/bash-completion/completions/vsh \ |
| @@ -83,27 +83,27 @@ FILES_${PN} += "${libdir}/libvirt/connection-driver \ | |||
| 83 | /usr/lib/firewalld/zones/libvirt.xml \ | 83 | /usr/lib/firewalld/zones/libvirt.xml \ |
| 84 | " | 84 | " |
| 85 | 85 | ||
| 86 | FILES_${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug ${libdir}/libvirt/lock-driver/.debug" | 86 | FILES:${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug ${libdir}/libvirt/lock-driver/.debug" |
| 87 | FILES_${PN}-staticdev += "${libdir}/*.a ${libdir}/libvirt/connection-driver/*.a ${libdir}/libvirt/lock-driver/*.a" | 87 | FILES:${PN}-staticdev += "${libdir}/*.a ${libdir}/libvirt/connection-driver/*.a ${libdir}/libvirt/lock-driver/*.a" |
| 88 | 88 | ||
| 89 | CONFFILES_${PN} += "${sysconfdir}/libvirt/libvirt.conf \ | 89 | CONFFILES:${PN} += "${sysconfdir}/libvirt/libvirt.conf \ |
| 90 | ${sysconfdir}/libvirt/lxc.conf \ | 90 | ${sysconfdir}/libvirt/lxc.conf \ |
| 91 | ${sysconfdir}/libvirt/qemu-lockd.conf \ | 91 | ${sysconfdir}/libvirt/qemu-lockd.conf \ |
| 92 | ${sysconfdir}/libvirt/qemu.conf \ | 92 | ${sysconfdir}/libvirt/qemu.conf \ |
| 93 | ${sysconfdir}/libvirt/virt-login-shell.conf \ | 93 | ${sysconfdir}/libvirt/virt-login-shell.conf \ |
| 94 | ${sysconfdir}/libvirt/virtlockd.conf" | 94 | ${sysconfdir}/libvirt/virtlockd.conf" |
| 95 | 95 | ||
| 96 | CONFFILES_${PN}-libvirtd = "${sysconfdir}/logrotate.d/libvirt ${sysconfdir}/logrotate.d/libvirt.lxc \ | 96 | CONFFILES:${PN}-libvirtd = "${sysconfdir}/logrotate.d/libvirt ${sysconfdir}/logrotate.d/libvirt.lxc \ |
| 97 | ${sysconfdir}/logrotate.d/libvirt.qemu ${sysconfdir}/logrotate.d/libvirt.uml \ | 97 | ${sysconfdir}/logrotate.d/libvirt.qemu ${sysconfdir}/logrotate.d/libvirt.uml \ |
| 98 | ${sysconfdir}/libvirt/libvirtd.conf \ | 98 | ${sysconfdir}/libvirt/libvirtd.conf \ |
| 99 | /usr/lib/sysctl.d/libvirtd.conf" | 99 | /usr/lib/sysctl.d/libvirtd.conf" |
| 100 | 100 | ||
| 101 | INITSCRIPT_PACKAGES = "${PN}-libvirtd" | 101 | INITSCRIPT_PACKAGES = "${PN}-libvirtd" |
| 102 | INITSCRIPT_NAME_${PN}-libvirtd = "libvirtd" | 102 | INITSCRIPT_NAME:${PN}-libvirtd = "libvirtd" |
| 103 | INITSCRIPT_PARAMS_${PN}-libvirtd = "defaults 72" | 103 | INITSCRIPT_PARAMS:${PN}-libvirtd = "defaults 72" |
| 104 | 104 | ||
| 105 | SYSTEMD_PACKAGES = "${PN}-libvirtd" | 105 | SYSTEMD_PACKAGES = "${PN}-libvirtd" |
| 106 | SYSTEMD_SERVICE_${PN}-libvirtd = " \ | 106 | SYSTEMD_SERVICE:${PN}-libvirtd = " \ |
| 107 | libvirtd.service \ | 107 | libvirtd.service \ |
| 108 | virtlockd.service \ | 108 | virtlockd.service \ |
| 109 | libvirt-guests.service \ | 109 | libvirt-guests.service \ |
| @@ -122,12 +122,12 @@ PACKAGECONFIG ??= "gnutls qemu yajl openvz vmware vbox esx lxc test remote \ | |||
| 122 | " | 122 | " |
| 123 | 123 | ||
| 124 | # qemu is NOT compatible with mips64 | 124 | # qemu is NOT compatible with mips64 |
| 125 | PACKAGECONFIG_remove_mipsarchn32 = "qemu" | 125 | PACKAGECONFIG:remove:mipsarchn32 = "qemu" |
| 126 | PACKAGECONFIG_remove_mipsarchn64 = "qemu" | 126 | PACKAGECONFIG:remove:mipsarchn64 = "qemu" |
| 127 | 127 | ||
| 128 | # numactl is NOT compatible with arm | 128 | # numactl is NOT compatible with arm |
| 129 | PACKAGECONFIG_remove_arm = "numactl" | 129 | PACKAGECONFIG:remove:arm = "numactl" |
| 130 | PACKAGECONFIG_remove_armeb = "numactl" | 130 | PACKAGECONFIG:remove:armeb = "numactl" |
| 131 | 131 | ||
| 132 | # enable,disable,depends,rdepends | 132 | # enable,disable,depends,rdepends |
| 133 | # | 133 | # |
| @@ -179,12 +179,12 @@ do_compile() { | |||
| 179 | ninja all | 179 | ninja all |
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | do_install_prepend() { | 182 | do_install:prepend() { |
| 183 | # so the install routines can find the libvirt.pc in the source dir | 183 | # so the install routines can find the libvirt.pc in the source dir |
| 184 | export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:${B}/src:" | 184 | export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:${B}/src:" |
| 185 | } | 185 | } |
| 186 | 186 | ||
| 187 | do_install_append() { | 187 | do_install:append() { |
| 188 | install -d ${D}/etc/init.d | 188 | install -d ${D}/etc/init.d |
| 189 | install -d ${D}/etc/libvirt | 189 | install -d ${D}/etc/libvirt |
| 190 | install -d ${D}/etc/dnsmasq.d | 190 | install -d ${D}/etc/dnsmasq.d |
| @@ -313,10 +313,10 @@ EXTRA_OEMESON += " \ | |||
| 313 | 313 | ||
| 314 | # gcc9 end up mis-compiling qemuxml2argvtest.o with Og which then | 314 | # gcc9 end up mis-compiling qemuxml2argvtest.o with Og which then |
| 315 | # crashes on target, so remove -Og and use -O2 as workaround | 315 | # crashes on target, so remove -Og and use -O2 as workaround |
| 316 | SELECTED_OPTIMIZATION_remove_virtclass-multilib-lib32_mipsarch = "-Og" | 316 | SELECTED_OPTIMIZATION:remove:virtclass-multilib-lib32:mipsarch = "-Og" |
| 317 | SELECTED_OPTIMIZATION_append_virtclass-multilib-lib32_mipsarch = " -O2" | 317 | SELECTED_OPTIMIZATION:append:virtclass-multilib-lib32:mipsarch = " -O2" |
| 318 | 318 | ||
| 319 | pkg_postinst_${PN}() { | 319 | pkg_postinst:${PN}() { |
| 320 | if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then | 320 | if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then |
| 321 | /etc/init.d/populate-volatile.sh update | 321 | /etc/init.d/populate-volatile.sh update |
| 322 | fi | 322 | fi |
