In commit [1], it created an empty file libvirt-qemu.conf to solve the issue
of gid mismatch. In commit [2], upstream add sysusers config file for qemu
& kvm user/groups

Remove the one of upstream to fix conflict and QA error while usrmerge not in
DISTRO_FEATURES
...
ERROR: QA Issue: libvirt: Files/directories were installed but not shipped in 
any package:
  /usr/lib/sysusers.d
  /usr/lib/sysusers.d/libvirt-qemu.conf
Please set FILES such that these items are packaged. Alternatively if they are 
unneeded, avoid installing them or delete them within do_install.
libvirt: 2 installed and not shipped files. [installed-vs-shipped]
...

[1] 
https://git.yoctoproject.org/meta-virtualization/commit/?id=8138d9cc7e0c31171230110db0cfa881c46a821b
[2] 
https://github.com/libvirt/libvirt/commit/a2c3e390f7bedf36f4ddc544d09fe3b8772c5c6f

Signed-off-by: Hongxu Jia <[email protected]>
---
 ...ysusers-config-file-for-qemu-kvm-use.patch | 37 +++++++++++++++++++
 recipes-extended/libvirt/libvirt_git.bb       |  1 +
 2 files changed, 38 insertions(+)
 create mode 100644 
recipes-extended/libvirt/libvirt/0001-do-not-install-sysusers-config-file-for-qemu-kvm-use.patch

diff --git 
a/recipes-extended/libvirt/libvirt/0001-do-not-install-sysusers-config-file-for-qemu-kvm-use.patch
 
b/recipes-extended/libvirt/libvirt/0001-do-not-install-sysusers-config-file-for-qemu-kvm-use.patch
new file mode 100644
index 00000000..8f771d5a
--- /dev/null
+++ 
b/recipes-extended/libvirt/libvirt/0001-do-not-install-sysusers-config-file-for-qemu-kvm-use.patch
@@ -0,0 +1,37 @@
+From 077d8bbb7e6697121179bdfaf9499d45cd2a8c6d Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <[email protected]>
+Date: Mon, 10 Feb 2025 15:23:58 +0800
+Subject: [PATCH] do not install sysusers config file for qemu & kvm
+ user/groups
+
+Yocto has define its own sysusers config file for qemu & kvm user/groups,
+remove the one from upstream to avoid conflict
+
+Upstream-Status: Inappropriate [Yocto specific]
+
+Signed-off-by: Hongxu Jia <[email protected]>
+---
+ src/qemu/meson.build | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/src/qemu/meson.build b/src/qemu/meson.build
+index 43a8ad7c3b..97d988881f 100644
+--- a/src/qemu/meson.build
++++ b/src/qemu/meson.build
+@@ -161,13 +161,6 @@ if conf.has('WITH_QEMU')
+     configuration: qemu_user_group_hack_conf,
+   )
+ 
+-  # Install the sysuser config for the qemu driver
+-  install_data(
+-    'libvirt-qemu.sysusers.conf',
+-    install_dir: sysusersdir,
+-    rename: [ 'libvirt-qemu.conf' ],
+-  )
+-
+   virt_conf_files += qemu_conf
+   virt_aug_files += files('libvirtd_qemu.aug')
+   virt_test_aug_files += {
+-- 
+2.34.1
+
diff --git a/recipes-extended/libvirt/libvirt_git.bb 
b/recipes-extended/libvirt/libvirt_git.bb
index 6a524977..a1ae7f69 100644
--- a/recipes-extended/libvirt/libvirt_git.bb
+++ b/recipes-extended/libvirt/libvirt_git.bb
@@ -41,6 +41,7 @@ SRC_URI = 
"gitsm://github.com/libvirt/libvirt.git;name=libvirt;protocol=https;br
            
file://0001-meson.build-clear-abs_top_builddir-to-avoid-QA-warni.patch \
            file://0001-tests-meson-clear-absolute-directory-paths.patch \
            file://0001-qemu_nbdkit.c-use-llu-to-print-time_t.patch \
+           
file://0001-do-not-install-sysusers-config-file-for-qemu-kvm-use.patch \
           "
 
 S = "${WORKDIR}/git"
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9133): 
https://lists.yoctoproject.org/g/meta-virtualization/message/9133
Mute This Topic: https://lists.yoctoproject.org/mt/111098602/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to