virt/libvirt
Thales Elero Cervi 7a7256da11 libvirt: Fix device hot-plug on 7.0.0
The QEMU base version on 7.2+dfsg-7+deb12u5 was still causing
incompatibilities other than the ones fixed in [1].
When hot-plugging devices to instances, the error was still occurring
and extra cherry-picks [2-4] were required to be brought from master
in order to fix bug/2083929.

Patch 0014-qemu-remove-support-for-generating-yes-no-boolean-op.patch
was not strictly necessary for this fix, but it helped to smooth the
package build with the other two patches in place.

When we decide to uprev libvirt, this change will no longer be needed.

[1] https://opendev.org/starlingx/virt/commit/a4fad169adb97d5d7d6fd1ae6510db8c24fd6f3
[2] libvirt/libvirt/-/commit/29318399667114b3dd8a054f7ef898b3ba74828d
[3] libvirt/libvirt/-/commit/4f33b817b2926198ec626f10c3fca1c8aaececf6
[4] libvirt/libvirt/-/commit/f763b6e43900605308df8dbca16e4702033947e9

Test Plan:
PASS - build-pkgs -c -p libvirt
PASS - build-stx-images.sh --only stx-libvirt
PASS - Re-apply STX-O with new stx-libvirt image
PASS - Launch VM with 1 bootable volume
PASS - Attach 1 extra volume to the VM
PASS - Live-migrate the VM

Bug: 2083929

Change-Id: I19bcce19fb006e9023505e0c9d6aa67c4c0cb827
Signed-off-by: Thales Elero Cervi <thaleselero.cervi@windriver.com>
Co-authored-by: Daniel Caires <DanielMarques.Caires@windriver.com>
2024-10-18 08:34:36 -03:00
..
centos remove /data which is not being used 2021-08-16 09:50:38 -04:00
debian libvirt: Fix device hot-plug on 7.0.0 2024-10-18 08:34:36 -03:00
libvirt Formatting cleanups in libvirt hook bash script 2019-03-13 09:50:35 -06:00
.gitignore Internal restructuring of stx-integ 2018-08-01 10:06:31 -04:00
PKG-INFO Internal restructuring of stx-integ 2018-08-01 10:06:31 -04:00
README Internal restructuring of stx-integ 2018-08-01 10:06:31 -04:00

The Centos 7 libvirt source rpm was taken from:
http://vault.centos.org/centos/7/updates/Source/SPackages/libvirt-1.2.17-13.el7_2.3.src.rpm

It's possible to resolve the source rpm based on the yum repos:
$ yumdownloader --source --urls libvirt

The libvirt source code was forked under .../cgcs/git/libvirt.
Notes: - The branch is based on upstream tag v1.2.17-maint.
       - Then each RedHat patches have been committed one by one in the same
         order specified in the RedHat spec (actually this was automated to use
         'git am' for each of the patches mentionned in the spec).
       - The last patch from RedHat is tagged 'libvirt-1.2.17-13.el7_2.3'.
       - After this tag, all the patches are port from R2.

The libvirt git repository doesn't come with the ./configure script (and its
dependancies).  This has to be built using autoconf (but the libvirt releases
comes with those, releases are generated using 'make dist').

One caveat is that bootstrap is made to be executed in a git tree.  Trying to
execute it out of tree, like the Centos build environment, was unsuccessfull
so far.

The current workaround for now is to commit the configure scripts in the
libvirt git repo:

$ NOCONFIGURE=1 ./autogen.sh --copy
$ NOCONFIGURE=1 ./autogen.sh --copy
# Remove all .gitignore temporarily for showing modified files
$ find . -name .gitignore | xargs rm
$ git add -A
$ git reset HEAD .gitignore
# Repeat last command for all .gitignore files removed
$ git commit

Autogen is executed twice.  The first time soft links are created under
build-aux/.  Running it a second time makes bootstrap copying them and
replacing the soft links (there is most likely a smarter way to do this).