From 03fe48aa5c72877a1d2cf8cd07be09f692aca22a Mon Sep 17 00:00:00 2001 From: Vishwas Udupa Date: Thu, 4 Dec 2025 12:13:29 +0530 Subject: [PATCH] lxc: delete empty lxc state directory lxc systemd service [1] defines a StateDirectory to ensure that the /var/lib/lxc directory is automatically created and managed by systemd during service startup. Do not create lxc directory at build time for systemd. [1] https://github.com/lxc/lxc/blob/f9ff9ea2a92653a823edf25e8e28c9dab08b3090/config/init/systemd/lxc.service.in#L16 Signed-off-by: Vishwas Udupa Signed-off-by: Bruce Ashfield --- recipes-containers/lxc/lxc_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-containers/lxc/lxc_git.bb b/recipes-containers/lxc/lxc_git.bb index d6f137d3..542134db 100644 --- a/recipes-containers/lxc/lxc_git.bb +++ b/recipes-containers/lxc/lxc_git.bb @@ -141,7 +141,7 @@ do_install:append() { if "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}"; then # nothing special for systemd at the moment - true + (cd ${D}${localstatedir}; [ -d lib/lxc ] && rmdir -v --parents lib/lxc) else # with meson, these aren't built unless sysvinit is the enabled # init system.