commit:     db8e4d5bdd298d4ccd4ea805c83cefb0b9b5d1c3
Author:     Brahmajit Das <listout <AT> listout <DOT> xyz>
AuthorDate: Fri Mar  6 18:53:51 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Mar  8 02:09:54 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db8e4d5b

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 <listout <AT> listout.xyz>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/231
Merges: https://codeberg.org/gentoo/gentoo/pulls/231
Signed-off-by: Sam James <sam <AT> gentoo.org>

 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(+)

diff --git a/app-emulation/libvirt/files/libvirtd.tmpfiles.conf 
b/app-emulation/libvirt/files/libvirtd.tmpfiles.conf
index c22c23dd469f..ceda7af4c23e 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

Reply via email to