Commit Graph

157 Commits

Author SHA1 Message Date
Xiangyu Chen
f13ced4d8d libvirt: fix soruce code comments contain build folder path cause QA Issue warning
gendispatch.pl add build dir in code comments which was generated
by itself. those build dir information would cause yocto qa report
warnings like:

WARNING: libvirt-8.1.0-r0 do_package_qa: QA Issue:
File /usr/src/debug/libvirt/8.1.0-r0/src/access/viraccessapicheckqemu.h in package libvirt-src contains reference to TMPDIR
File /usr/src/debug/libvirt/8.1.0-r0/src/access/viraccessapichecklxc.h in package libvirt-src contains reference to TMPDIR
File /usr/src/debug/libvirt/8.1.0-r0/src/access/viraccessapicheckqemu.c in package libvirt-src contains reference to TMPDIR
File /usr/src/debug/libvirt/8.1.0-r0/src/access/viraccessapichecklxc.c in package libvirt-src contains reference to TMPDIR
File /usr/src/debug/libvirt/8.1.0-r0/src/access/viraccessapicheck.h in package libvirt-src contains reference to TMPDIR
File /usr/src/debug/libvirt/8.1.0-r0/src/access/viraccessapicheck.c in package libvirt-src contains reference to TMPDIR [buildpaths]

Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2023-01-19 15:43:53 -05:00
Markus Volk
4169fae169 libvirt-glib: fix pointer-sign issue
Update to latest commit to fix a build issue with latest glib-2-0

Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2022-12-07 16:12:33 -05:00
Markus Volk
3fc29f569e libvirt-glib: add recipe
libvirt-glib wraps libvirt to provide a high-level object-oriented API better
suited for glib-based applications, via three libraries:

  - libvirt-glib - GLib main loop integration & misc helper APIs
  - libvirt-gconfig - GObjects for manipulating libvirt XML documents
  - libvirt-gobject - GObjects for managing libvirt objects

It is needed as a dependency for glib based projects that make use of libvirt e.g.
virt-manager, virt-viewer or gnome boxes.

Compilation was tested for x86_64, aarch64 and qemumips

Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2022-12-07 16:12:33 -05:00
Kai Kang
0d2f235a4a libvirt: remove package config qemu for powerpc and riscv32
qemu is not compatible with ppc32 and riscv32, so remove libvirt's
package config 'qemu' for them.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2022-10-26 10:09:38 -04:00
He Zhe
b7e5662405 libvirt: Fix keeping restarting
LIBVIRTD_ARGS has been moved to libvirtd.service since v8.1.0. Move our mode
setting accordingly, otherwise libvirt would keep restarting and VMs would be
constantly stopped.

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2022-05-18 13:52:14 -04:00
He Zhe
c21e22e8e6 libvirt: Fix error on undefining domain and segfault on libvirt_driver_qemu.so
Backport a patch to fix segfault when undefining virtual machines.

virsh undefine vm
rpc-libvirtd[9725]: segfault at 18 ip 00007f8b0a5f17a9 sp 00007f8b3f8cbb60
error 4 in libvirt_driver_qemu.so[7f8b0a56e000+113000]
error: Code: a4 01 0f 84 89 03 00 00 4c 89 ff e8 d1 ed f7 ff 85 c0 0f 88 b9
             02 00 00 48 8b 45 b8 48 8b b0 80 00 00 00 48 8b 86 b0 02 00 00
             <48> 8b 78 18 48 85 ff 0f 84 42 01 00 00 e8 b5 02 f8 ff 48 89 45 c0
Disconnected from qemu:///system due to end of file
error: Failed to undefine domain 'vm'
error: End of file while reading data: Input/output error

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2022-04-26 17:03:20 -04:00
Bruce Ashfield
d4f84ae3cd libvirt: fix QA packaging issue when multlib is enabled
The uprev of libvirt introduced a new sysctl file:
60-qemu-postcopy-migration.conf

In a standard configuration, the FILES variable of
python-libvirt picks up the fiel, but in a multiconfig setup,
the definition of ${libdir} changes and the file is missed.

Since systcl always looks in /usr/lib, we can't rely only
on ${libdir}, so we explicitly add the new .conf file into
the packaging. This will allow new additions in the future
to be considered as to in which package they belong.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Preeti Sachan <preeti.sachan@intel.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2022-04-11 10:16:46 -04:00
Bruce Ashfield
2a355647b9 libvirt: uprev to 8.1.0
Bumping libvirt to a newer version. We drop our backported patches,
update the checksums, change the meson configuration slightly and
adjust the location of the systemd manipulations.

Along with functionality changes and bugfixes, we pickup newer
python components, so we can survive the depreciation of distutils
more easily.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2022-03-25 16:48:36 -04:00
Kai Kang
2dc502a269 libvirt: backport patch to fix compile error
Backport patch to fix compile error of libvirt:

| runtime error: file ../libvirt-7.2.0/docs/page.xsl line 217 element element
| xsl:element: The effective name '' is not a valid QName.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2022-03-10 14:42:10 -05:00
Bruce Ashfield
108e089f7e global: update licence values to SPDX values
These changes are the result of running the convert-spdx-licenses.py
oe-core script.

There's no impact to the build, but we will avoid issues when
interacting with core QA by the alignment.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2022-02-18 13:07:10 -05:00
Xu, Yanfei
da0f1599ce libvirt: fix CVE-2021-3667
Backport a fix for CVE-2021-3667.

The CVE discription: An improper locking issue was found in the
virStoragePoolLookupByTargetPath API of libvirt. It occurs in the
storagePoolLookupByTargetPath function where a locked virStoragePoolObj
object is not properly released on ACL permission failure. Clients
connecting to the read-write socket with limited ACL permissions could
use this flaw to acquire the lock and prevent other users from accessing
storage pool/volume APIs, resulting in a denial of service condition.
The highest threat from this vulnerability is to system availability.

Refer to: https://bugzilla.redhat.com/show_bug.cgi?id=1986094

Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-11-24 16:57:20 -05:00
Bruce Ashfield
7bc99cda52 libvirt: inhibit empty-dirs QA check
OEcore has recently added a QA check for directories that should
be empty. libvirt (via meson) creates some localsstate directories
for the various components. These trigger the QA check and break
the build.

We still have some non-volatile localstate (/var) scenarios, and
not seeing a distro feature that controls the QA check, and/or to
coordinate the removal of the populated directories, we inhibit
the QA check. In a boot with a volatile /var, the directories
will be overlayed and no harm will come, in a non-volatile
scenario, they'll be visible and no harm will come.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-11-12 15:46:45 +00:00
Zqiang
0644e808ac libvirt: fix CVE-2021-3631
Selinux MCS generate a single category context and may
be accessed by another machine.

link: https://gitlab.com/libvirt/libvirt/-/issues/153

Signed-off-by: Zqiang <qiang.zhang@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-09-16 18:08:46 -04:00
Bruce Ashfield
d876cfc5bf 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>
2021-08-02 17:17:53 -04:00
Martin Jansa
950386a988 libvirt: fix do_install with usrmerge
* meson build uses these paths:
  ./src/meson.build:    systemd_unit_dir = prefix / 'lib' / 'systemd' / 'system'
  ./tools/meson.build:    install_dir: prefix / 'lib' / 'systemd' / 'system',

  with usrmerge it fails with:
  sed: can't read TOPDIR/tmp-glibc/work/core2-64-oe-linux/libvirt/7.2.0-r0/image//usr/lib/systemd/system/libvirtd.service: No such file or directory
  because systemd_unitdir and systemd_system_unitdir are different
  with and without usrmerge in DISTRO_FEATURES:

  env.libvirt-without-usrmerge:export systemd_unitdir="/lib/systemd"
  env.libvirt-with-usrmerge:export systemd_unitdir="/usr/lib/systemd"

  env.libvirt-without-usrmerge:export systemd_system_unitdir="/lib/systemd/system"
  env.libvirt-with-usrmerge:export systemd_system_unitdir="/usr/lib/systemd/system"

* set -Dinit_script to none when systemd isn't used instead of
  deleting the files in do_install_append

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-05-19 09:26:02 -04:00
Martin Jansa
07ed07b9f1 libvirt: backport patch to fix compatibility with Meson-0.58
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-05-17 10:28:54 -04:00
Yanfei Xu
9f359865c4 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>
2021-04-22 10:18:06 -04:00
Martin Jansa
7094239a63 libvirt-python: inherit python3targetconfig
* otherwise libvirt build will incorrectly use host's gcc and fail with:
  gcc: error: unrecognized command line option "-fmacro-prefix-map=/OE/libvirt/6.1.0-r0=/usr/src/debug/libvirt/6.1.0-r0"

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-02-09 08:21:36 -05:00
Martin Jansa
211925d7f4 Revert "libvirt: fix host gcc can't recognized option -fmacro-prefix-map"
This reverts commit 08b5de42f9.

libvirt shouldn't be using host's gcc to build python module, this issue
is caused by missing inherit of python3targetconfig instead added in:
https://git.openembedded.org/openembedded-core/commit/?id=5a118d4e7985fa88f04c3611f8db813f0dafce75

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-02-09 08:21:36 -05:00
Naveen Saini
08b5de42f9 libvirt: fix host gcc can't recognized option -fmacro-prefix-map
libvirt-python picks host gcc (instead of cross gcc) to build shared
library in absense of LD*SHARED flags.

Instead of inherit distutils3-base.class, taking SHARED flags to create
libvirt-python package.

Ref: https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/distutils-common-base.bbclass

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-11-19 11:05:48 -05:00
Yanfei Xu
58765bd2c9 libvirt: Use /run in replace of /var/run in libvirt
To avoid systemd complains that the libvirt unit files use legacy
directory, we configure the libvirt with '--with-runstatedir=/run'
and do some minor changes.

------------------cut here----------------------
014: systemd[1]: /lib/systemd/system/virtlogd.socket:6: ListenStream=
references a path below legacy directory /var/run/, updating
/var/run/libvirt/virtlogd-sock → /run/libvirt/virtlogd-sock; please
update the unit file accordingly.
014: systemd[1]: /lib/systemd/system/virtlogd-admin.socket:8:
ListenStream= references a path below legacy directory /var/run/,
updating /var/run/libvirt/virtlogd-admin-sock →
/run/libvirt/virtlogd-admin-sock; please update the unit file
accordingly.
014: systemd[1]: /lib/systemd/system/virtlockd.socket:6: ListenStream=
references a path below legacy directory /var/run/, updating
/var/run/libvirt/virtlockd-sock → /run/libvirt/virtlockd-sock; please
update the unit file accordingly.
014: systemd[1]: /lib/systemd/system/virtlockd-admin.socket:8:
ListenStream= references a path below legacy directory /var/run/,
updating /var/run/libvirt/virtlockd-admin-sock →
/run/libvirt/virtlockd-admin-sock; please update the unit file
accordingly.
014: systemd[1]: /lib/systemd/system/libvirtd.socket:9: ListenStream=
references a path below legacy directory /var/run/, updating
/var/run/libvirt/libvirt-sock → /run/libvirt/libvirt-sock; please update
the unit file accordingly.
014: systemd[1]: /lib/systemd/system/libvirtd-ro.socket:11:
ListenStream= references a path below legacy directory /var/run/,
updating /var/run/libvirt/libvirt-sock-ro →
/run/libvirt/libvirt-sock-ro; please update the unit file accordingly.
......

Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-09-21 17:32:39 -04:00
Joe Slater
cbf47a093d libvirt: specify location of dmidecode
We should tell configure where dmidecode is rather than
have it search the host for it.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-08-07 22:21:22 -04:00
Lavocat, Nicolas
ba6143a680 libvirt: fix install error without qemu
An error occurs during the install step of libvirt when the variable
PACKAGECONFIG does not contain qemu.

Indeed, in this case, the operation "chown -R qemu:qemu
${D}/${localstatedir}/lib/libvirt/qemu" fails, since the folder
${D}/${localstatedir}/lib/libvirt/qemu has not been created.

The fix consist in doing this operation only if
the variable “PACKAGECONFIG” contains “qemu”.
remark: issue present since the Warrior release of yocto.

Upstream-Status: Pending

Signed-off-by: Nicolas Lavocat <nicolas.lavocat@harman.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-08-07 22:19:43 -04:00
sakib.sajal@windriver.com
4ba3d8daad libvirt: fix patch fuzz warning
Refreshed patches to fix:
"WARNING: libvirt-6.3.0-r0 do_patch: Fuzz detected"

Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-06-01 22:30:39 -04:00
sakib.sajal@windriver.com
7b002ac180 libvirt: uprev v6.1.0 -> v6.3.0
Minor update bringing in new features, improvements
and bug fixes.
Most notable changes:
- vbox: removed support for version 5.0 and 5.1 APIs
- vbox: added support for version 6.0 and 6.1 APIs
- qemu: Various embed driver fixes
- qemu: Add virtiofs support
- qemu: support disabling hotplug/unplug of PCIe devices
- xen: Add support for 'passthrough' hypervisor feature

Straightforward uprev, requiring patch refreshes to
remove fuzz.

Build and runtime behaviour is identical to older
version v6.1.0.

ptest summary:
===================================
Testsuite summary for libvirt 6.3.0
===================================
- TOTAL: 129
- PASS:  123
- SKIP:  1
- XFAIL: 0
- FAIL:  5
- XPASS: 0
- ERROR: 0

Failed test:
- virschematest
- domaincapstest
- qemuxml2argvtest
- qemuhotplugtest
- virsh-auth

Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-05-19 17:24:41 -04:00
He Zhe
420479e0fc libvirt: Add setuid permission to virt-login-shell
virt-login-shell asks for setuid permission as follow.
"virt-login-shell: must be run as setuid root"

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-04-05 22:17:10 -04:00
hongxu
2bba10be28 libvirt: Workaround mips assembler crash on target
While enabling multilib on qemumips64, lib32 assembler ends up
crashing on target sometimes due to branch out of range,
therefore using -O2 for now

[snip]
|../../libvirt-6.1.0/tests/qemuxml2argvtest.c: In function 'mymain':
|../../libvirt-6.1.0/tests/qemuxml2argvtest.c:608:1: note: variable
tracking size limit exceeded with '-fvar-tracking-assignments', retrying without
|  608 | mymain(void)
|      | ^~~~~~
|/tmp/ccXJSwZR.s: Assembler messages:
|/tmp/ccXJSwZR.s:43943: Error: branch out of range
[snip]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-04-01 22:30:18 -04:00
Bruce Ashfield
7a8ee8e986 libvirt: uprev to v6.1.0
Updating libvirt to the next major release series. With this, brings
some changes to the build:

 - add python3-docutils-native to DEPENDS, since it is needed for doc
   building
 - remove a reference to libgnu.la from the Makefiles, since it is not
   needed or provided in the build dependencies
 - remove obselete packageconfig options: xenapi and phyp
 - add an explicit do_compile rule (versus the autotools bbclass
   variant), so we can create some directories before compilation
   starts
 - add ${B}/src to the PKG_CONFIG_PATH to the libvirt.pc file can be
   found during build, as it is queried by libvirt-python
 - with the ability to find the libvirt.pc file, we can also drop the
   manipulations for libvirt_api_xml_path, as it is returned from
   pkg-config queries.
 - clear PKG_CONFIG_SYSROOT_DIR during libvirt-python builds, since
   the libvirt.pc file already provides cflags/includes that are
   contained to the build/src directory structure.

And finally, existing patches are refreshed to remove fuzz.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-03-08 14:34:03 -04:00
Changqing Li
0adc4c38fc hook_support.py: convert to python3
python2 has been removed from oe-core, convert the scripts
to python3 to avoid runtime error like:
/usr/bin/env: 'python': No such file or directory'

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-02-20 12:43:20 -05:00
Chen Qi
ad580c253d libvirt: inherit perlnative for pod2man
pod2man is now provided by perlnative instead host.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-02-11 16:09:02 -05:00
Jeremy Puhlman
c487e0f511 libvirt: Use python3-native for python install
Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-02-03 17:08:30 -05:00
Bruce Ashfield
407b822068 libvirt: make python3 safe
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-01-22 15:53:49 +00:00
Mark Asselstine
8a43b4f1b7 libvirt: fixup multiple shlib providers
Build libvirt results in the follow warning:
ERROR: libvirt-5.5.0-r0 do_package: libvirt-ptest: Multiple shlib providers for libvirt-admin.so.0: libvirt, libvirt-ptest
(used by files: ./tmp/work/aarch64-overc-linux/libvirt/5.5.0-r0/packages-split/libvirt-ptest/usr/lib/libvirt/ptest/tools/virt-admin)
ERROR: libvirt-5.5.0-r0 do_package: libvirt: Multiple shlib providers for libvirt-admin.so.0: libvirt, libvirt-ptest
(used by files: ./tmp/work/aarch64-overc-linux/libvirt/5.5.0-r0/packages-split/libvirt/usr/bin/virt-admin)

This is caused by the introduction of a shlib provider check added to
openembedded-core (commit 61c413690034 [package: Multiple
shlib_providers for the same file should error]). You can see the
issue and solution discussed more here
https://bugzilla.yoctoproject.org/show_bug.cgi?id=4628

Since the ptest version of the shared library will only be used by the
ptest package so we can use PRIVATE_LIBS to have the shlib providers
list.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-10-02 14:12:39 -04:00
He Zhe
fc129dccd3 libvirt: Remove numactl from PACKAGECONFIG for arm
b5b5def ("libvirt: add hook support") introduces a wrong check against KARCH
which is not defined.

This patch use TARGET_ARCH overrides to remove numactl from PACKAGECONFIG for
32-bit arm arches.

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-07-31 22:15:23 -04:00
He Zhe
1bd526d9fe libvirt: Do not change /var/lib/libvirt/qemu for mips and mips64 in do_install
qemu does not support mips and mips64 and thus /var/lib/libvirt/qemu is not
generated. Do not change it.

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-07-25 14:25:59 -04:00
He Zhe
37a554a249 libvirt: libvirtd: Facilitate using tls connection mode
tls is the default network connection mode of libvirtd upstream, though we use
tcp mode as default.

tls requires necessary keys and certificates of certificate authority, server
and client to be properly generated and deployed. Otherwise servers and clients
cannot be connected.

This patch,
 - integrates sample keys and certificats of certificate authority, server and
   client for users to be able to use tls mode out of box.
 - sets default server IP address to 127.0.0.1 for users to use local client out
   of box.
 - integrates certtool and provides gnutls-help.py for users to generate keys
   and certificates on targets in their own ways.
 - adds a PACKAGECONFIG option "gnutls" to control all of the above integration
   but disables it to keep the same default behavior as before.

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-07-16 19:41:05 +00:00
Mingli Yu
990d6d8d2b libvirt: Only add polkit to PACKAGECONFIG if polkit is in DISTRO_FEATURES
At first, the polkit support is always enabled in
PACKAGECONFIG and since Feb 27 2014, use x11
DISTRO_FEATURES to control the polkit support
with below commit.
=========================================================
commit ce991a62d5
Author: Jonas Eriksson <jonas.eriksson@enea.com>
Date:   Thu Feb 27 17:10:09 2014 +0100

    libvirt: Disable polkit driver when there is no x11

    To avoid having the default build of libvirt depend on virtual/x11
    through polkit and consolekit, check for x11 in DISTRO_FEATURES before
    enabling the polkit support in the default PKG_CONFIG.

    Signed-off-by: Jonas Eriksson <jonas.eriksson@enea.com>
    Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>
    Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>

 diff --git a/recipes-extended/libvirt/libvirt_1.2.1.bb b/recipes-extended/libvirt/libvirt_1.2.1.bb
 index 5365b8d..4c9cf36 100644
 --- a/recipes-extended/libvirt/libvirt_1.2.1.bb
 +++ b/recipes-extended/libvirt/libvirt_1.2.1.bb
 @@ -109,10 +109,11 @@ INITSCRIPT_PARAMS_${PN}-libvirtd = "defaults 72"
  #PACKAGECONFIG ??= "xen libxl xen-inotify test remote libvirtd"

  # full config
 -PACKAGECONFIG ??= "qemu yajl uml openvz vmware vbox esx iproute2 polkit lxc test \
 +PACKAGECONFIG ??= "qemu yajl uml openvz vmware vbox esx iproute2 lxc test \
                    remote macvtap libvirtd netcf udev python ebtables \
                    ${@base_contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
                    ${@base_contains('DISTRO_FEATURES', 'xen', 'xen libxl xen-inotify', '', d)} \
 +                   ${@base_contains('DISTRO_FEATURES', 'x11', 'polkit', '', d)} \
                   "
=========================================================

After below commits to add polkit as a required distro feature
in meta-oe, we should unify altogether to enable polkit if
polkit distro feature is set.
97a1a55 polkit: add polkit as a required distro
feature c049e02 polkit: inherit distro_features_check

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-07-16 19:40:49 +00:00
Bruce Ashfield
cd3767f0b0 libvirt: uprev to 5.5.x
Upgrading to 5.5.x for libvirt.

One pach refresh is required, but otherwise, build and runtime behaviour
is identical to 5.3.x.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-07-12 14:50:34 +00:00
Dengke Du
8e634ac487 libvirt: upgrade to 5.3.0
1. remove the uml configure option because new version libvirt drop it
2. rebase three patches for new source codes

Signed-off-by: Dengke Du <dengke.du@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-05-10 16:42:06 -04:00
Dengke Du
a1528f85a6 libvirt: place the qemu configure option to PACKAGECONFIG
If we build libvirt with mips64 arch will fail that was not compatible with,
so place the qemu configure options to PACKAGECONFIG, let the PACKAGECONFIG
control the build options.

qemu is in the default PACKAGECONFIG, so we are not changing the build
for non-mips architectures.

Signed-off-by: Dengke Du <dengke.du@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-03-20 14:42:42 -04:00
Dengke Du
b5b5defc78 libvirt: add hook support
1. Add a hook support script for libvirt
   Add daemon, qemu, lxc and network script when the correspond to
   libvirt daemon, qemu guest, lxc guest and network started or stoped,
   based on:
   https://libvirt.org/hooks.html

2. Add a qemu user and a qemu group and a kvm group

Signed-off-by: Dengke Du <dengke.du@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-03-01 11:37:46 -05:00
Chris Patterson
fe63f43470 libvirt: fix dependency for libxl
"libxl" package does not exist, use Xen.

Signed-off-by: Chris Patterson <pattersonc@ainfosec.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-02-06 20:51:09 +00:00
Mark Asselstine
9ad042c295 libvirt: uprev from 4.7.0 to 4.9.0
Minor update bringing in new features such as better support for
cgroup v2, vfio AP support, support for XEN suspend/wakeup.

Basic usecases pass and the ptest return similar results we have been
achieving with the last few uprevs:

    ====================================
    Testsuite summary for libvirt 4.9.0
    ====================================
    # TOTAL: 120
    # PASS:  117
    # SKIP:  0
    # XFAIL: 0
    # FAIL:  3
    # XPASS: 0
    # ERROR: 0

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
2018-11-29 12:05:18 -05:00
Kai Kang
7403b5a691 libvirt: remove qemu from PACKAGECONFIG for mips n32 and n64
PACKAGECONFIG 'qemu' causes libvirt depends on package qemu. But qemu
is not compatible with mips n32 and n64. So remove 'qemu' from
PACKAGECONFIG for mips n32 and n64.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-10-18 11:37:55 -04:00
Chen Qi
915c43874d libvirt: do not defer postinstall to first boot when not necessary
The postinstall invokes `/etc/init.d/populate-volatile.sh update'.
This is only useful for an on-target package upgrade. For now,
this postinstall in libvirt has already got a check against $D to
tell whether it's running on target or not, we do not need to use
pkg_postinstall_ontarget. Otherwise, we get unnecessary postinstall
deferred to first boot, which is not what we want.

Note that the postinstall was originally written as 'pkg_postinstall_${PN}',
but was incorrectly modified to be 'pkg_postinstall_ontarget_${PN}' by the
following commit.

  """
  commit 1e67a44db7
  Author: He Zhe <zhe.he@windriver.com>
  Date:   Tue Jul 24 05:50:01 2018 -0700

      libvirt: Remove unsupported configure options and fix warning

  [snip]
  """

I think the warning about deferred postinstall was caused by some bbappend
file instead of the main recipe in this layer.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-10-16 10:25:36 -04:00
Mark Asselstine
6e3fb05e2a libvirt: backport LXC AB / BA deadlock fix
This fix will most likely be part of libvirt 4.8.0 but since we took
the time to investigate and fix this issue we are including it now to
prevent others from hitting this issue.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-09-30 21:31:14 -04:00
Mark Asselstine
b3619dec91 libvirt: uprev to v4.7.0
A straight-forward uprev to the latest stable release. As usual basic
runtime sanity tests have been run along with the ptests. The
following is the results of the ptests:

  ====================================
  Testsuite summary for libvirt 4.7.0
  ====================================
  # TOTAL: 120
  # PASS:  117
  # SKIP:  0
  # XFAIL: 0
  # FAIL:  3
  # XPASS: 0
  # ERROR: 0

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-09-30 21:31:14 -04:00
Mark Asselstine
2c8e62d5b4 libvirt: uprev to v4.5.0
Although v4.6.0 was just recently released we do not want to jump to
it due to:

https://bugzilla.redhat.com/show_bug.cgi?id=1614569

Unfortunately the mess around the above defect basically renders that
release useless. We will need to keep an eye for either a v4.7.0 or
grab updates off of the 'v4.5-maint' over the coming weeks.

As usual I have tested using qemu and lxc usecases (define, boot and
'virsh console' onto a guest). The ptests results match those of
v4.3.0:

  ======================================
  Testsuite summary for libvirt 4.5.0
  ======================================
  # TOTAL: 119
  # PASS:  114
  # SKIP:  0
  # XFAIL: 0
  # FAIL:  5
  # XPASS: 0
  # ERROR: 0

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-08-20 11:35:48 -04:00
Mark Asselstine
cdd4241dd7 libvirt: fixup ptest to prevent attempts to build tests on the target
Oddly something seems to have changed since I did the uprev of libvirt
to v4.3.0. Previously using the 'run-ptests' script would only run the
tests and not attempt to build them first. In preparation for the
uprev to v4.5.0 I attempted to run the tests and found that they would
fail to run and instead the tests were attempting to be built. I
suspect this change is caused by an uprev of autotools and the
handling of the 'TESTS' built-in.

To prevent this we are explicitly using the '--with-test-suite'
configure option and this return the previously observed behavior,
where the tests are simply run and not built.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-08-20 11:35:48 -04:00
Joe Slater
02d2c7daeb libvirt: use relative path to local .m4 files
If our project is in a directory with a pathname of longer than
about 125 characters, configuration will fail with an "Argument
list too long" error.  This patch uses the technique that was applied
to the coreutils recipe.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-08-02 22:57:14 -04:00