diff options
| author | Yanfei Xu <yanfei.xu@windriver.com> | 2021-04-22 21:49:26 +0800 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2021-04-22 10:18:06 -0400 |
| commit | 9f359865c4512771f914dab99fe22f7da2fe029a (patch) | |
| tree | f9711ab799f9e8a64f31b2ebb83a89dcd0d585d8 /recipes-extended/libvirt/libvirt_7.2.0.bb | |
| parent | d5aa7e668db030f45d9e23b4cae0ddf2088d12d8 (diff) | |
| download | meta-virtualization-9f359865c4512771f914dab99fe22f7da2fe029a.tar.gz | |
libvirt: uprev v6.3 -> v7.2
This upgrade spans 9 small release. The detailed realese logs could
refer to: https://gitlab.com/libvirt/libvirt/-/blob/master/NEWS.rst
Libvirt's buildsystem has changed to meson, So this upgrade drop some
obsolete patches applied to makefile.
I ran libvirt testcase and ovs testcase for this upgrade, the summary
as follow:
libvirt_test (keyword: ) test results:
*1 Run libvirt_test testing(do_test1) PASS
*2 Check result (virsh_local_capabilities) PASS
*3 Check result (virsh_local_domcapabilities) PASS
*4 Check result (virsh_local_freecell) PASS
*5 Check result (virsh_local_help) PASS
*6 Check result (virsh_local_hostname) PASS
*7 Check result (virsh_local_iface-begin) PASS
*8 Check result (virsh_local_iface-commit) PASS
*9 Check result (virsh_local_iface-list) PASS
*10 Check result (virsh_local_list) PASS
*11 Check result (virsh_local_maxvcpus) PASS
*12 Check result (virsh_local_net-list) PASS
*13 Check result (virsh_local_nodecpumap) PASS
*14 Check result (virsh_local_nodecpustats) PASS
*15 Check result (virsh_local_nodedev-list) PASS
*16 Check result (virsh_local_nodeinfo) PASS
*17 Check result (virsh_local_node-memory-tune) PASS
*18 Check result (virsh_local_nodememstats) PASS
*19 Check result (virsh_local_nwfilter-binding-list) PASS
*20 Check result (virsh_local_nwfilter-list) PASS
*21 Check result (virsh_local_pool-capabilities) PASS
*22 Check result (virsh_local_pool-list) PASS
*23 Check result (virsh_local_pwd) PASS
*24 Check result (virsh_local_secret-list) PASS
*25 Check result (virsh_local_sysinfo) PASS
*26 Check result (virsh_local_uri) PASS
*27 Check result (virsh_local_version) PASS
openvswitch_vm2vm (keyword: qemux86) test results:
*1 openvswitch_vm2vm testing(do_test1) PASS
*2 Check result (ovs_vm2vm_boot_guest1) PASS
*3 Check result (ovs_vm2vm_boot_guest2) PASS
*4 Check result (ovs_vm2vm_netperf_test) PASS
*5 Check result (ovs_vm2vm_destroy_guest1) PASS
*6 Check result (ovs_vm2vm_destroy_guest2) PASS
*7 check testcase call trace(do_check_call_trace) PASS
Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-extended/libvirt/libvirt_7.2.0.bb')
| -rw-r--r-- | recipes-extended/libvirt/libvirt_7.2.0.bb | 324 |
1 files changed, 324 insertions, 0 deletions
diff --git a/recipes-extended/libvirt/libvirt_7.2.0.bb b/recipes-extended/libvirt/libvirt_7.2.0.bb new file mode 100644 index 00000000..24748efa --- /dev/null +++ b/recipes-extended/libvirt/libvirt_7.2.0.bb | |||
| @@ -0,0 +1,324 @@ | |||
| 1 | DESCRIPTION = "A toolkit to interact with the virtualization capabilities of recent versions of Linux." | ||
| 2 | HOMEPAGE = "http://libvirt.org" | ||
| 3 | LICENSE = "LGPLv2.1+ & GPLv2+" | ||
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
| 5 | file://COPYING.LESSER;md5=4b54a1fd55a448865a0b32d41598759d" | ||
| 6 | SECTION = "console/tools" | ||
| 7 | |||
| 8 | DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcap util-linux e2fsprogs pm-utils \ | ||
| 9 | iptables dnsmasq readline libtasn1 libxslt-native acl libdevmapper libtirpc \ | ||
| 10 | python3-docutils-native \ | ||
| 11 | ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'shadow-native', '', d)} \ | ||
| 12 | ${@bb.utils.contains('PACKAGECONFIG', 'gnutls', 'gnutls-native', '', d)}" | ||
| 13 | |||
| 14 | # libvirt-guests.sh needs gettext.sh | ||
| 15 | # | ||
| 16 | RDEPENDS_${PN} = "gettext-runtime" | ||
| 17 | |||
| 18 | RDEPENDS_libvirt-libvirtd += "bridge-utils iptables pm-utils dnsmasq netcat-openbsd ebtables" | ||
| 19 | RDEPENDS_libvirt-libvirtd_append_x86-64 = " dmidecode" | ||
| 20 | RDEPENDS_libvirt-libvirtd_append_x86 = " dmidecode" | ||
| 21 | |||
| 22 | #connman blocks the 53 port and libvirtd can't start its DNS service | ||
| 23 | RCONFLICTS_${PN}_libvirtd = "connman" | ||
| 24 | |||
| 25 | SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.xz;name=libvirt \ | ||
| 26 | file://libvirtd.sh \ | ||
| 27 | file://libvirtd.conf \ | ||
| 28 | file://dnsmasq.conf \ | ||
| 29 | file://hook_support.py \ | ||
| 30 | file://gnutls-helper.py \ | ||
| 31 | " | ||
| 32 | |||
| 33 | SRC_URI[libvirt.md5sum] = "92044b629216e44adce63224970a54a3" | ||
| 34 | SRC_URI[libvirt.sha256sum] = "01f459d0c7ba5009622a628dba1a026200e8f4a299fea783b936a71d7e0ed1d0" | ||
| 35 | |||
| 36 | inherit meson gettext update-rc.d pkgconfig systemd useradd perlnative | ||
| 37 | USERADD_PACKAGES = "${PN}" | ||
| 38 | GROUPADD_PARAM_${PN} = "-r qemu; -r kvm" | ||
| 39 | USERADD_PARAM_${PN} = "-r -g qemu -G kvm qemu" | ||
| 40 | |||
| 41 | |||
| 42 | EXTRA_OEMESON += "--cross-file ${WORKDIR}/meson-${PN}.cross" | ||
| 43 | do_write_config_append() { | ||
| 44 | cat >${WORKDIR}/meson-${PN}.cross <<EOF | ||
| 45 | [binaries] | ||
| 46 | iptables = '/usr/sbin/iptables' | ||
| 47 | ip6tables = '/usr/sbin/ip6tables' | ||
| 48 | dmidecode = '/usr/sbin/dmidecode' | ||
| 49 | ebtables = '/sbin/ebtables' | ||
| 50 | dnsmasq = '/usr/bin/dnsmasq' | ||
| 51 | EOF | ||
| 52 | } | ||
| 53 | |||
| 54 | ALLOW_EMPTY_${PN} = "1" | ||
| 55 | |||
| 56 | PACKAGES =+ "${PN}-libvirtd ${PN}-virsh" | ||
| 57 | |||
| 58 | ALLOW_EMPTY_${PN}-libvirtd = "1" | ||
| 59 | |||
| 60 | FILES_${PN}-libvirtd = " \ | ||
| 61 | ${sysconfdir}/init.d \ | ||
| 62 | ${sysconfdir}/sysctl.d \ | ||
| 63 | ${sysconfdir}/logrotate.d \ | ||
| 64 | ${sysconfdir}/libvirt/libvirtd.conf \ | ||
| 65 | /usr/lib/sysctl.d/60-libvirtd.conf \ | ||
| 66 | ${sbindir}/libvirtd \ | ||
| 67 | ${systemd_unitdir}/system/* \ | ||
| 68 | ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '', '${libexecdir}/libvirt-guests.sh', d)} \ | ||
| 69 | ${@bb.utils.contains('PACKAGECONFIG', 'gnutls', '${sysconfdir}/pki/libvirt/* ${sysconfdir}/pki/CA/*', '', d)} \ | ||
| 70 | " | ||
| 71 | |||
| 72 | FILES_${PN}-virsh = " \ | ||
| 73 | ${bindir}/virsh \ | ||
| 74 | ${datadir}/bash-completion/completions/virsh \ | ||
| 75 | " | ||
| 76 | |||
| 77 | FILES_${PN} += "${libdir}/libvirt/connection-driver \ | ||
| 78 | ${datadir}/augeas \ | ||
| 79 | ${@bb.utils.contains('PACKAGECONFIG', 'polkit', '${datadir}/polkit-1', '', d)} \ | ||
| 80 | ${datadir}/bash-completion/completions/vsh \ | ||
| 81 | ${datadir}/bash-completion/completions/virt-admin \ | ||
| 82 | /usr/lib/firewalld/zones/libvirt.xml \ | ||
| 83 | " | ||
| 84 | |||
| 85 | FILES_${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug ${libdir}/libvirt/lock-driver/.debug" | ||
| 86 | FILES_${PN}-staticdev += "${libdir}/*.a ${libdir}/libvirt/connection-driver/*.a ${libdir}/libvirt/lock-driver/*.a" | ||
| 87 | |||
| 88 | CONFFILES_${PN} += "${sysconfdir}/libvirt/libvirt.conf \ | ||
| 89 | ${sysconfdir}/libvirt/lxc.conf \ | ||
| 90 | ${sysconfdir}/libvirt/qemu-lockd.conf \ | ||
| 91 | ${sysconfdir}/libvirt/qemu.conf \ | ||
| 92 | ${sysconfdir}/libvirt/virt-login-shell.conf \ | ||
| 93 | ${sysconfdir}/libvirt/virtlockd.conf" | ||
| 94 | |||
| 95 | CONFFILES_${PN}-libvirtd = "${sysconfdir}/logrotate.d/libvirt ${sysconfdir}/logrotate.d/libvirt.lxc \ | ||
| 96 | ${sysconfdir}/logrotate.d/libvirt.qemu ${sysconfdir}/logrotate.d/libvirt.uml \ | ||
| 97 | ${sysconfdir}/libvirt/libvirtd.conf \ | ||
| 98 | /usr/lib/sysctl.d/libvirtd.conf" | ||
| 99 | |||
| 100 | INITSCRIPT_PACKAGES = "${PN}-libvirtd" | ||
| 101 | INITSCRIPT_NAME_${PN}-libvirtd = "libvirtd" | ||
| 102 | INITSCRIPT_PARAMS_${PN}-libvirtd = "defaults 72" | ||
| 103 | |||
| 104 | SYSTEMD_PACKAGES = "${PN}-libvirtd" | ||
| 105 | SYSTEMD_SERVICE_${PN}-libvirtd = " \ | ||
| 106 | libvirtd.service \ | ||
| 107 | virtlockd.service \ | ||
| 108 | libvirt-guests.service \ | ||
| 109 | virtlockd.socket \ | ||
| 110 | " | ||
| 111 | |||
| 112 | # xen-minimal config | ||
| 113 | #PACKAGECONFIG ??= "xen libxl xen-inotify test remote libvirtd" | ||
| 114 | |||
| 115 | # full config | ||
| 116 | PACKAGECONFIG ??= "gnutls qemu yajl openvz vmware vbox esx lxc test remote \ | ||
| 117 | libvirtd netcf udev python fuse firewalld libpcap \ | ||
| 118 | ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit libcap-ng', '', d)} \ | ||
| 119 | ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'libxl', '', d)} \ | ||
| 120 | ${@bb.utils.contains('DISTRO_FEATURES', 'polkit', 'polkit', '', d)} \ | ||
| 121 | " | ||
| 122 | |||
| 123 | # qemu is NOT compatible with mips64 | ||
| 124 | PACKAGECONFIG_remove_mipsarchn32 = "qemu" | ||
| 125 | PACKAGECONFIG_remove_mipsarchn64 = "qemu" | ||
| 126 | |||
| 127 | # numactl is NOT compatible with arm | ||
| 128 | PACKAGECONFIG_remove_arm = "numactl" | ||
| 129 | PACKAGECONFIG_remove_armeb = "numactl" | ||
| 130 | |||
| 131 | # enable,disable,depends,rdepends | ||
| 132 | # | ||
| 133 | PACKAGECONFIG[gnutls] = ",,,gnutls-bin" | ||
| 134 | PACKAGECONFIG[qemu] = "-Ddriver_qemu=enabled -Dqemu_user=qemu -Dqemu_group=qemu,-Ddriver_qemu=disabled,qemu," | ||
| 135 | PACKAGECONFIG[yajl] = "-Dyajl=enabled,-Dyajl=disabled,yajl,yajl" | ||
| 136 | PACKAGECONFIG[libxl] = "-Ddriver_libxl=enabled,-Ddriver_libxl=disabled,xen," | ||
| 137 | PACKAGECONFIG[openvz] = "-Ddriver_openvz=enabled,-Ddriver_openvz=disabled,," | ||
| 138 | PACKAGECONFIG[vmware] = "-Ddriver_vmware=enabled,-Ddriver_vmware=disabled,," | ||
| 139 | PACKAGECONFIG[vbox] = "-Ddriver_vbox=enabled,-Ddriver_vbox=disabled,," | ||
| 140 | PACKAGECONFIG[esx] = "-Ddriver_esx=enabled,-Ddriver_esx=disabled,," | ||
| 141 | PACKAGECONFIG[hyperv] = "-Ddriver_hyperv=enabled,-Ddriver_hyperv=disabled,," | ||
| 142 | PACKAGECONFIG[polkit] = "-Dpolkit=enabled,-Dpolkit=disabled,polkit,polkit" | ||
| 143 | PACKAGECONFIG[lxc] = "-Ddriver_lxc=enabled,-Ddriver_lxc=disabled,lxc," | ||
| 144 | PACKAGECONFIG[test] = "-Ddriver_test=enabled,-Ddriver_test=disabled,," | ||
| 145 | PACKAGECONFIG[remote] = "-Ddriver_remote=enabled,-Ddriver_remote=disabled,," | ||
| 146 | PACKAGECONFIG[libvirtd] = "-Ddriver_libvirtd=enabled,-Ddriver_libvirtd=disabled,," | ||
| 147 | PACKAGECONFIG[netcf] = "-Dnetcf=enabled,-Dnetcf=disabled,netcf,netcf" | ||
| 148 | PACKAGECONFIG[dtrace] = "-Ddtrace=enabled,-Ddtrace=disabled,," | ||
| 149 | PACKAGECONFIG[udev] = "-Dudev=enabled -Dpciaccess=enabled,-Dudev=disabled,udev libpciaccess," | ||
| 150 | PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux," | ||
| 151 | PACKAGECONFIG[python] = ",,python3," | ||
| 152 | PACKAGECONFIG[sasl] = "-Dsasl=enabled,-Dsasl=disabled,cyrus-sasl,cyrus-sasl" | ||
| 153 | PACKAGECONFIG[numactl] = "-Dnumactl=enabled,-Dnumactl=disabled,numactl," | ||
| 154 | PACKAGECONFIG[fuse] = "-Dfuse=enabled,-Dfuse=disabled,fuse," | ||
| 155 | PACKAGECONFIG[audit] = "-Daudit=enabled,-Daudit=disabled,audit," | ||
| 156 | PACKAGECONFIG[libcap-ng] = "-Dcapng=enabled,-Dcapng=disabled,libcap-ng," | ||
| 157 | PACKAGECONFIG[wireshark] = "-Dwireshark_dissector=enabled,-Dwireshark_dissector=disabled,wireshark libwsutil," | ||
| 158 | PACKAGECONFIG[apparmor_profiles] = "-Dapparmor_profiles=true, -Dapparmor_profiles=false," | ||
| 159 | PACKAGECONFIG[firewalld] = "-Dfirewalld=enabled, -Dfirewalld=disabled," | ||
| 160 | PACKAGECONFIG[libpcap] = "-Dlibpcap=enabled, -Dlibpcap=disabled,libpcap,libpcap" | ||
| 161 | PACKAGECONFIG[numad] = "-Dnumad=enabled, -Dnumad=disabled," | ||
| 162 | |||
| 163 | # Enable the Python tool support | ||
| 164 | require libvirt-python.inc | ||
| 165 | |||
| 166 | do_compile() { | ||
| 167 | cd ${B}/src | ||
| 168 | # There may be race condition, but without creating these directories | ||
| 169 | # in the source tree, generation of files fails. | ||
| 170 | for i in access admin logging esx locking rpc hyperv lxc \ | ||
| 171 | remote network storage interface nwfilter node_device \ | ||
| 172 | secret vbox qemu; do | ||
| 173 | mkdir -p $i; | ||
| 174 | done | ||
| 175 | |||
| 176 | cd ${B} | ||
| 177 | export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:${B}/src:" | ||
| 178 | ninja all | ||
| 179 | } | ||
| 180 | |||
| 181 | do_install_prepend() { | ||
| 182 | # so the install routines can find the libvirt.pc in the source dir | ||
| 183 | export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:${B}/src:" | ||
| 184 | } | ||
| 185 | |||
| 186 | do_install_append() { | ||
| 187 | install -d ${D}/etc/init.d | ||
| 188 | install -d ${D}/etc/libvirt | ||
| 189 | install -d ${D}/etc/dnsmasq.d | ||
| 190 | |||
| 191 | install -m 0755 ${WORKDIR}/libvirtd.sh ${D}/etc/init.d/libvirtd | ||
| 192 | install -m 0644 ${WORKDIR}/libvirtd.conf ${D}/etc/libvirt/libvirtd.conf | ||
| 193 | |||
| 194 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then | ||
| 195 | # This will wind up in the libvirtd package, but will NOT be invoked by default. | ||
| 196 | # | ||
| 197 | mv ${D}/${libexecdir}/libvirt-guests.sh ${D}/${sysconfdir}/init.d | ||
| 198 | fi | ||
| 199 | |||
| 200 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
| 201 | mkdir -p ${D}/lib | ||
| 202 | mv ${D}/usr/lib/systemd ${D}/lib | ||
| 203 | # This variable is used by libvirtd.service to start libvirtd in the right mode | ||
| 204 | sed -i '/#LIBVIRTD_ARGS="--listen"/a LIBVIRTD_ARGS="--listen --daemon"' ${D}/${sysconfdir}/sysconfig/libvirtd | ||
| 205 | |||
| 206 | # We can't use 'notify' when we don't support 'sd_notify' dbus capabilities. | ||
| 207 | sed -i -e 's/Type=notify/Type=forking/' \ | ||
| 208 | -e '/Type=forking/a PIDFile=/run/libvirtd.pid' \ | ||
| 209 | ${D}/${systemd_unitdir}/system/libvirtd.service | ||
| 210 | else | ||
| 211 | rm -rf ${D}/usr/lib/systemd | ||
| 212 | fi | ||
| 213 | |||
| 214 | # The /run/libvirt directories created by the Makefile are | ||
| 215 | # wiped out in volatile, we need to create these at boot. | ||
| 216 | rm -rf ${D}/run | ||
| 217 | install -d ${D}${sysconfdir}/default/volatiles | ||
| 218 | echo "d root root 0755 /run/libvirt none" \ | ||
| 219 | > ${D}${sysconfdir}/default/volatiles/99_libvirt | ||
| 220 | echo "d root root 0755 /run/libvirt/lockd none" \ | ||
| 221 | >> ${D}${sysconfdir}/default/volatiles/99_libvirt | ||
| 222 | echo "d root root 0755 /run/libvirt/lxc none" \ | ||
| 223 | >> ${D}${sysconfdir}/default/volatiles/99_libvirt | ||
| 224 | echo "d root root 0755 /run/libvirt/network none" \ | ||
| 225 | >> ${D}${sysconfdir}/default/volatiles/99_libvirt | ||
| 226 | echo "d root root 0755 /run/libvirt/qemu none" \ | ||
| 227 | >> ${D}${sysconfdir}/default/volatiles/99_libvirt | ||
| 228 | |||
| 229 | # Manually set permissions and ownership to match polkit recipe | ||
| 230 | if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then | ||
| 231 | install -d -m 0700 ${D}/${datadir}/polkit-1/rules.d | ||
| 232 | chown polkitd ${D}/${datadir}/polkit-1/rules.d | ||
| 233 | chgrp root ${D}/${datadir}/polkit-1/rules.d | ||
| 234 | else | ||
| 235 | rm -rf ${D}/${datadir}/polkit-1 | ||
| 236 | fi | ||
| 237 | |||
| 238 | # disable seccomp_sandbox | ||
| 239 | if [ -e ${D}${sysconfdir}/libvirt/qemu.conf ] ; then | ||
| 240 | sed -i '/^#seccomp_sandbox = 1/aseccomp_sandbox = 0' \ | ||
| 241 | ${D}${sysconfdir}/libvirt/qemu.conf | ||
| 242 | fi | ||
| 243 | |||
| 244 | # Add hook support for libvirt | ||
| 245 | mkdir -p ${D}/etc/libvirt/hooks | ||
| 246 | for hook in "daemon" "lxc" "network" "qemu" | ||
| 247 | do | ||
| 248 | install -m 0755 ${WORKDIR}/hook_support.py ${D}/etc/libvirt/hooks/${hook} | ||
| 249 | done | ||
| 250 | |||
| 251 | # Force the main dnsmasq instance to bind only to specified interfaces and | ||
| 252 | # to not bind to virbr0. Libvirt will run its own instance on this interface. | ||
| 253 | install -m 644 ${WORKDIR}/dnsmasq.conf ${D}/${sysconfdir}/dnsmasq.d/libvirt-daemon | ||
| 254 | |||
| 255 | # remove .la references to our working diretory | ||
| 256 | for i in `find ${D}${libdir} -type f -name *.la`; do | ||
| 257 | sed -i -e 's#-L${B}/src/.libs##g' $i | ||
| 258 | done | ||
| 259 | |||
| 260 | sed -i -e 's/^\(unix_sock_group\ =\ \).*/\1"kvm"/' ${D}/etc/libvirt/libvirtd.conf | ||
| 261 | sed -i -e 's/^\(unix_sock_rw_perms\ =\ \).*/\1"0776"/' ${D}/etc/libvirt/libvirtd.conf | ||
| 262 | |||
| 263 | case ${MACHINE_ARCH} in | ||
| 264 | *mips*) | ||
| 265 | break | ||
| 266 | ;; | ||
| 267 | *) | ||
| 268 | if ${@bb.utils.contains('PACKAGECONFIG', 'qemu', 'true', 'false', d)}; then | ||
| 269 | chown -R qemu:qemu ${D}/${localstatedir}/lib/libvirt/qemu | ||
| 270 | echo "d qemu qemu 0755 ${localstatedir}/cache/libvirt/qemu none" \ | ||
| 271 | >> ${D}${sysconfdir}/default/volatiles/99_libvirt | ||
| 272 | break | ||
| 273 | fi | ||
| 274 | ;; | ||
| 275 | esac | ||
| 276 | |||
| 277 | if ${@bb.utils.contains('PACKAGECONFIG','gnutls','true','false',d)}; then | ||
| 278 | # Generate sample keys and certificates. | ||
| 279 | cd ${WORKDIR} | ||
| 280 | ${WORKDIR}/gnutls-helper.py -y | ||
| 281 | |||
| 282 | # Deploy all sample keys and certificates of CA, server and client | ||
| 283 | # to target so that libvirtd is able to boot successfully and local | ||
| 284 | # connection via 127.0.0.1 is available out of box. | ||
| 285 | install -d ${D}/etc/pki/CA | ||
| 286 | install -d ${D}/etc/pki/libvirt/private | ||
| 287 | install -m 0755 ${WORKDIR}/gnutls-helper.py ${D}/${bindir} | ||
| 288 | install -m 0644 ${WORKDIR}/cakey.pem ${D}/${sysconfdir}/pki/libvirt/private/cakey.pem | ||
| 289 | install -m 0644 ${WORKDIR}/cacert.pem ${D}/${sysconfdir}/pki/CA/cacert.pem | ||
| 290 | install -m 0644 ${WORKDIR}/serverkey.pem ${D}/${sysconfdir}/pki/libvirt/private/serverkey.pem | ||
| 291 | install -m 0644 ${WORKDIR}/servercert.pem ${D}/${sysconfdir}/pki/libvirt/servercert.pem | ||
| 292 | install -m 0644 ${WORKDIR}/clientkey.pem ${D}/${sysconfdir}/pki/libvirt/private/clientkey.pem | ||
| 293 | install -m 0644 ${WORKDIR}/clientcert.pem ${D}/${sysconfdir}/pki/libvirt/clientcert.pem | ||
| 294 | |||
| 295 | # Force the connection to be tls. | ||
| 296 | sed -i -e 's/^\(listen_tls\ =\ .*\)/#\1/' -e 's/^\(listen_tcp\ =\ .*\)/#\1/' ${D}/etc/libvirt/libvirtd.conf | ||
| 297 | fi | ||
| 298 | |||
| 299 | # virt-login-shell needs to run with setuid permission | ||
| 300 | chmod 4755 ${D}${bindir}/virt-login-shell | ||
| 301 | } | ||
| 302 | |||
| 303 | EXTRA_OEMESON += " \ | ||
| 304 | -Dinit_script=systemd \ | ||
| 305 | -Drunstatedir=/run \ | ||
| 306 | -Dtests=enabled \ | ||
| 307 | " | ||
| 308 | |||
| 309 | # gcc9 end up mis-compiling qemuxml2argvtest.o with Og which then | ||
| 310 | # crashes on target, so remove -Og and use -O2 as workaround | ||
| 311 | SELECTED_OPTIMIZATION_remove_virtclass-multilib-lib32_mipsarch = "-Og" | ||
| 312 | SELECTED_OPTIMIZATION_append_virtclass-multilib-lib32_mipsarch = " -O2" | ||
| 313 | |||
| 314 | pkg_postinst_${PN}() { | ||
| 315 | if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then | ||
| 316 | /etc/init.d/populate-volatile.sh update | ||
| 317 | fi | ||
| 318 | mkdir -m 711 -p $D/data/images | ||
| 319 | } | ||
| 320 | |||
| 321 | python () { | ||
| 322 | if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): | ||
| 323 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") | ||
| 324 | } | ||
