summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2024-12-10 03:31:59 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2024-12-10 03:36:25 +0000
commit405d625c86bb87500ea5cdb324dbf0fb0b425b5c (patch)
treeb64ca210c1084ee0dee68afeaaa8398eb37f52a1
parent1640a4dc81f5d06a1e43c9870fefb2a0d016ef81 (diff)
downloadmeta-virtualization-405d625c86bb87500ea5cdb324dbf0fb0b425b5c.tar.gz
container-base: fix /var/volatile
The existing workaround to populate /var/volatile was broken since oe-core has a rootfs postprocess command that ensures that /var/volatile is empty .. which undoes our creation of the log and tmp directories. We :remove that routine to get our /var/volatile as we like it. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-extended/images/container-base.bb9
1 files changed, 9 insertions, 0 deletions
diff --git a/recipes-extended/images/container-base.bb b/recipes-extended/images/container-base.bb
index b68938b9..64655e0b 100644
--- a/recipes-extended/images/container-base.bb
+++ b/recipes-extended/images/container-base.bb
@@ -41,7 +41,16 @@ CONTAINER_SHELL ?= "${@bb.utils.contains('PACKAGE_EXTRA_ARCHS', 'container-dummy
41IMAGE_CONTAINER_NO_DUMMY = "1" 41IMAGE_CONTAINER_NO_DUMMY = "1"
42 42
43# Workaround /var/volatile for now 43# Workaround /var/volatile for now
44# This is required because the lack of post-install scripts means volatile
45# directories (/var/volatile/*, etc.) are not created, so we do that ourselves
46# in a minimal way below. We could bootstrap and run some of the more standard
47# scripts that do it at boot, but we avoid that until needed.
44ROOTFS_POSTPROCESS_COMMAND += "rootfs_fixup_var_volatile ; " 48ROOTFS_POSTPROCESS_COMMAND += "rootfs_fixup_var_volatile ; "
49
50# This :remove is required, because it comes along and deletes our /var/volatile/
51# fixups!
52ROOTFS_POSTPROCESS_COMMAND:remove = "empty_var_volatile"
53
45rootfs_fixup_var_volatile () { 54rootfs_fixup_var_volatile () {
46 install -m 1777 -d ${IMAGE_ROOTFS}/${localstatedir}/volatile/tmp 55 install -m 1777 -d ${IMAGE_ROOTFS}/${localstatedir}/volatile/tmp
47 install -m 755 -d ${IMAGE_ROOTFS}/${localstatedir}/volatile/log 56 install -m 755 -d ${IMAGE_ROOTFS}/${localstatedir}/volatile/log