summaryrefslogtreecommitdiffstats
path: root/classes/image_types_ostree.bbclass
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2020-04-25 23:36:46 +0000
committerLaurent Bonnans <laurent.bonnans@here.com>2020-06-02 12:04:05 +0200
commit237edebe4170db9a22e4d14a65120e8a627bab14 (patch)
treeb3d26a70413d49fcb0e868a92a558f102be8c844 /classes/image_types_ostree.bbclass
parent20c8a0dbda0295d4973559a96b92c2ac5169f213 (diff)
downloadmeta-updater-237edebe4170db9a22e4d14a65120e8a627bab14.tar.gz
image_types_ostree/ota: move home physically to /var/rootdirs/home
Instead of using the double indirection mode /home -> /var/rootdirs/home -> /sysroot/home move the home directory physically into /var/rootdirs. This allows to use the --modern flag when initializing the file system. The "old" style is still supported, and does make sense in case the home directories need to be shared between multiple deployments. Since multiple deployments is not a use case in meta-updater use the /var approach. See also: https://github.com/ostreedev/ostree/issues/2085. The modern flag also gets rid of dev, proc, root, run, sys and tmp. All of them have been empty and unused. Note: This change cannot be pushed through updates as this is an initial deployment setting. Only devices provisioned with images built with this change applied will use the new layout. Updates will continue to work on both systems as the symlink from the deployment stays the same (first indirection is still /home -> /var/rootdirs/home). Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Diffstat (limited to 'classes/image_types_ostree.bbclass')
-rw-r--r--classes/image_types_ostree.bbclass2
1 files changed, 0 insertions, 2 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index 95035e2..7cc4baa 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -55,13 +55,11 @@ IMAGE_CMD_ostree () {
55 mkdir -p usr/etc/tmpfiles.d 55 mkdir -p usr/etc/tmpfiles.d
56 tmpfiles_conf=usr/etc/tmpfiles.d/00ostree-tmpfiles.conf 56 tmpfiles_conf=usr/etc/tmpfiles.d/00ostree-tmpfiles.conf
57 echo "d /var/rootdirs 0755 root root -" >>${tmpfiles_conf} 57 echo "d /var/rootdirs 0755 root root -" >>${tmpfiles_conf}
58 echo "L /var/rootdirs/home - - - - /sysroot/home" >>${tmpfiles_conf}
59 else 58 else
60 mkdir -p usr/etc/init.d 59 mkdir -p usr/etc/init.d
61 tmpfiles_conf=usr/etc/init.d/tmpfiles.sh 60 tmpfiles_conf=usr/etc/init.d/tmpfiles.sh
62 echo '#!/bin/sh' > ${tmpfiles_conf} 61 echo '#!/bin/sh' > ${tmpfiles_conf}
63 echo "mkdir -p /var/rootdirs; chmod 755 /var/rootdirs" >> ${tmpfiles_conf} 62 echo "mkdir -p /var/rootdirs; chmod 755 /var/rootdirs" >> ${tmpfiles_conf}
64 echo "ln -sf /sysroot/home /var/rootdirs/home" >> ${tmpfiles_conf}
65 63
66 ln -s ../init.d/tmpfiles.sh usr/etc/rcS.d/S20tmpfiles.sh 64 ln -s ../init.d/tmpfiles.sh usr/etc/rcS.d/S20tmpfiles.sh
67 fi 65 fi