summaryrefslogtreecommitdiffstats
path: root/recipes-extended/libvirt
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-extended/libvirt
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-extended/libvirt')
-rw-r--r--recipes-extended/libvirt/libvirt-python.inc14
-rw-r--r--recipes-extended/libvirt/libvirt_7.2.0.bb58
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
5export BUILD_SYS 5export BUILD_SYS
6export HOST_SYS 6export HOST_SYS
7 7
8RDEPENDS_${PN}-python += "python3" 8RDEPENDS:${PN}-python += "python3"
9PACKAGECONFIG_${PN}-python[xen] = ",,,xen-python" 9PACKAGECONFIG_${PN}-python[xen] = ",,,xen-python"
10 10
11PACKAGES += "${PN}-python-staticdev ${PN}-python-dev ${PN}-python-dbg ${PN}-python" 11PACKAGES += "${PN}-python-staticdev ${PN}-python-dev ${PN}-python-dbg ${PN}-python"
12 12
13FILES_${PN}-python-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" 13FILES:${PN}-python-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
14FILES_${PN}-python-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la" 14FILES:${PN}-python-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
15FILES_${PN}-python-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/" 15FILES:${PN}-python-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
16FILES_${PN}-python = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}/*" 16FILES:${PN}-python = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}/*"
17 17
18SRC_URI += "http://libvirt.org/sources/python/libvirt-python-${PV}.tar.gz;name=libvirt_python" 18SRC_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
41do_compile_append() { 41do_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
52do_install_append() { 52do_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#
16RDEPENDS_${PN} = "gettext-runtime" 16RDEPENDS:${PN} = "gettext-runtime"
17 17
18RDEPENDS_libvirt-libvirtd += "bridge-utils iptables pm-utils dnsmasq netcat-openbsd ebtables" 18RDEPENDS:libvirt-libvirtd += "bridge-utils iptables pm-utils dnsmasq netcat-openbsd ebtables"
19RDEPENDS_libvirt-libvirtd_append_x86-64 = " dmidecode" 19RDEPENDS:libvirt-libvirtd:append:x86-64 = " dmidecode"
20RDEPENDS_libvirt-libvirtd_append_x86 = " dmidecode" 20RDEPENDS: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
23RCONFLICTS_${PN}_libvirtd = "connman" 23RCONFLICTS:${PN}_libvirtd = "connman"
24 24
25SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.xz;name=libvirt \ 25SRC_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
37inherit meson gettext update-rc.d pkgconfig systemd useradd perlnative 37inherit meson gettext update-rc.d pkgconfig systemd useradd perlnative
38USERADD_PACKAGES = "${PN}" 38USERADD_PACKAGES = "${PN}"
39GROUPADD_PARAM_${PN} = "-r qemu; -r kvm" 39GROUPADD_PARAM:${PN} = "-r qemu; -r kvm"
40USERADD_PARAM_${PN} = "-r -g qemu -G kvm qemu" 40USERADD_PARAM:${PN} = "-r -g qemu -G kvm qemu"
41 41
42 42
43EXTRA_OEMESON += "--cross-file ${WORKDIR}/meson-${PN}.cross" 43EXTRA_OEMESON += "--cross-file ${WORKDIR}/meson-${PN}.cross"
44do_write_config_append() { 44do_write_config:append() {
45 cat >${WORKDIR}/meson-${PN}.cross <<EOF 45 cat >${WORKDIR}/meson-${PN}.cross <<EOF
46[binaries] 46[binaries]
47iptables = '/usr/sbin/iptables' 47iptables = '/usr/sbin/iptables'
@@ -52,13 +52,13 @@ dnsmasq = '/usr/bin/dnsmasq'
52EOF 52EOF
53} 53}
54 54
55ALLOW_EMPTY_${PN} = "1" 55ALLOW_EMPTY:${PN} = "1"
56 56
57PACKAGES =+ "${PN}-libvirtd ${PN}-virsh" 57PACKAGES =+ "${PN}-libvirtd ${PN}-virsh"
58 58
59ALLOW_EMPTY_${PN}-libvirtd = "1" 59ALLOW_EMPTY:${PN}-libvirtd = "1"
60 60
61FILES_${PN}-libvirtd = " \ 61FILES:${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
73FILES_${PN}-virsh = " \ 73FILES:${PN}-virsh = " \
74 ${bindir}/virsh \ 74 ${bindir}/virsh \
75 ${datadir}/bash-completion/completions/virsh \ 75 ${datadir}/bash-completion/completions/virsh \
76" 76"
77 77
78FILES_${PN} += "${libdir}/libvirt/connection-driver \ 78FILES:${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
86FILES_${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug ${libdir}/libvirt/lock-driver/.debug" 86FILES:${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug ${libdir}/libvirt/lock-driver/.debug"
87FILES_${PN}-staticdev += "${libdir}/*.a ${libdir}/libvirt/connection-driver/*.a ${libdir}/libvirt/lock-driver/*.a" 87FILES:${PN}-staticdev += "${libdir}/*.a ${libdir}/libvirt/connection-driver/*.a ${libdir}/libvirt/lock-driver/*.a"
88 88
89CONFFILES_${PN} += "${sysconfdir}/libvirt/libvirt.conf \ 89CONFFILES:${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
96CONFFILES_${PN}-libvirtd = "${sysconfdir}/logrotate.d/libvirt ${sysconfdir}/logrotate.d/libvirt.lxc \ 96CONFFILES:${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
101INITSCRIPT_PACKAGES = "${PN}-libvirtd" 101INITSCRIPT_PACKAGES = "${PN}-libvirtd"
102INITSCRIPT_NAME_${PN}-libvirtd = "libvirtd" 102INITSCRIPT_NAME:${PN}-libvirtd = "libvirtd"
103INITSCRIPT_PARAMS_${PN}-libvirtd = "defaults 72" 103INITSCRIPT_PARAMS:${PN}-libvirtd = "defaults 72"
104 104
105SYSTEMD_PACKAGES = "${PN}-libvirtd" 105SYSTEMD_PACKAGES = "${PN}-libvirtd"
106SYSTEMD_SERVICE_${PN}-libvirtd = " \ 106SYSTEMD_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
125PACKAGECONFIG_remove_mipsarchn32 = "qemu" 125PACKAGECONFIG:remove:mipsarchn32 = "qemu"
126PACKAGECONFIG_remove_mipsarchn64 = "qemu" 126PACKAGECONFIG:remove:mipsarchn64 = "qemu"
127 127
128# numactl is NOT compatible with arm 128# numactl is NOT compatible with arm
129PACKAGECONFIG_remove_arm = "numactl" 129PACKAGECONFIG:remove:arm = "numactl"
130PACKAGECONFIG_remove_armeb = "numactl" 130PACKAGECONFIG: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
182do_install_prepend() { 182do_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
187do_install_append() { 187do_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
316SELECTED_OPTIMIZATION_remove_virtclass-multilib-lib32_mipsarch = "-Og" 316SELECTED_OPTIMIZATION:remove:virtclass-multilib-lib32:mipsarch = "-Og"
317SELECTED_OPTIMIZATION_append_virtclass-multilib-lib32_mipsarch = " -O2" 317SELECTED_OPTIMIZATION:append:virtclass-multilib-lib32:mipsarch = " -O2"
318 318
319pkg_postinst_${PN}() { 319pkg_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