From db8e4d5bdd298d4ccd4ea805c83cefb0b9b5d1c3 Mon Sep 17 00:00:00 2001 From: Brahmajit Das Date: Sat, 7 Mar 2026 00:23:51 +0530 Subject: [PATCH] app-emulation/libvirt: create /var/lib/libvirt/secrets via tmpfiles libvirt 12.1.0 introduces virt-secret-init-encryption.service which generates a host-specific key used to encrypt libvirt secrets. The service writes the key to /var/lib/libvirt/secrets/secrets-encryption-key. Since in the ebuild we are doing rm -fr ${D}/var during src_install and relying on tmpfiles to recreate required directories an entry in the tmpfiles is needed with correct permission for the creation of the secrets folder. Please note that this only affects systemd based systems as the virt-secret-init-encryption.service is never used in OpenRC. On systemd without the secrets folder, virt-secret-init-encryption.service fails wich inturn blocks libvirtd.service from starting. Closes: https://bugs.gentoo.org/970956 Signed-off-by: Brahmajit Das Part-of: https://codeberg.org/gentoo/gentoo/pulls/231 Merges: https://codeberg.org/gentoo/gentoo/pulls/231 Signed-off-by: Sam James --- app-emulation/libvirt/files/libvirtd.tmpfiles.conf | 1 + .../libvirt/{libvirt-12.1.0.ebuild => libvirt-12.1.0-r1.ebuild} | 0 2 files changed, 1 insertion(+) rename app-emulation/libvirt/{libvirt-12.1.0.ebuild => libvirt-12.1.0-r1.ebuild} (100%) diff --git a/app-emulation/libvirt/files/libvirtd.tmpfiles.conf b/app-emulation/libvirt/files/libvirtd.tmpfiles.conf index c22c23dd469f2..ceda7af4c23e7 100644 --- a/app-emulation/libvirt/files/libvirtd.tmpfiles.conf +++ b/app-emulation/libvirt/files/libvirtd.tmpfiles.conf @@ -1 +1,2 @@ d /run/libvirt/lxc 0755 root root - +d /var/lib/libvirt/secrets 0700 root root - diff --git a/app-emulation/libvirt/libvirt-12.1.0.ebuild b/app-emulation/libvirt/libvirt-12.1.0-r1.ebuild similarity index 100% rename from app-emulation/libvirt/libvirt-12.1.0.ebuild rename to app-emulation/libvirt/libvirt-12.1.0-r1.ebuild