All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] lxc: delete empty lxc state directory
@ 2025-12-04  6:43 Vishwas Udupa
  2025-12-22  6:18 ` Vishwas Udupa
  2026-01-06 19:43 ` Bruce Ashfield
  0 siblings, 2 replies; 4+ messages in thread
From: Vishwas Udupa @ 2025-12-04  6:43 UTC (permalink / raw)
  To: meta-virtualization; +Cc: anuj.mittal, Vishwas Udupa

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 <vudupa@qti.qualcomm.com>
---
 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.
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-01-06 19:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-04  6:43 [PATCH v2] lxc: delete empty lxc state directory Vishwas Udupa
2025-12-22  6:18 ` Vishwas Udupa
2025-12-22 13:08   ` [meta-virtualization] " Bruce Ashfield
2026-01-06 19:43 ` Bruce Ashfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.