summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2018-11-29 11:18:38 +0100
committerGitHub <noreply@github.com>2018-11-29 11:18:38 +0100
commit0b2db436420531d9f4a57e8ec27943bba6ac2b1f (patch)
tree922e6f2f8316ad719c23814f3e090809c755d019 /classes
parent0dd9c75b3f187acca3b4032ac2f1ae002b806275 (diff)
parent2b5d6110db3960a5f37b8ab0836226d7753c74e0 (diff)
downloadmeta-updater-0b2db436420531d9f4a57e8ec27943bba6ac2b1f.tar.gz
Merge pull request #440 from agners/mandate-usr-move
Use usrmerge
Diffstat (limited to 'classes')
-rw-r--r--classes/image_types_ostree.bbclass12
1 files changed, 2 insertions, 10 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index ff807a4..4095de0 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -1,4 +1,5 @@
1# OSTree deployment 1# OSTree deployment
2inherit distro_features_check
2 3
3OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}" 4OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}"
4OSTREE_ROOTFS ??= "${WORKDIR}/ostree-rootfs" 5OSTREE_ROOTFS ??= "${WORKDIR}/ostree-rootfs"
@@ -14,6 +15,7 @@ IMAGE_CMD_TAR = "tar --xattrs --xattrs-include=*"
14CONVERSION_CMD_tar = "touch ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}; ${IMAGE_CMD_TAR} --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.tar -C ${OTA_IMAGE_ROOTFS} . || [ $? -eq 1 ]" 15CONVERSION_CMD_tar = "touch ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}; ${IMAGE_CMD_TAR} --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.tar -C ${OTA_IMAGE_ROOTFS} . || [ $? -eq 1 ]"
15CONVERSIONTYPES_append = " tar" 16CONVERSIONTYPES_append = " tar"
16 17
18REQUIRED_DISTRO_FEATURES = "usrmerge"
17OTA_IMAGE_ROOTFS_task-image-ostree = "${OSTREE_ROOTFS}" 19OTA_IMAGE_ROOTFS_task-image-ostree = "${OSTREE_ROOTFS}"
18do_image_ostree[dirs] = "${OSTREE_ROOTFS}" 20do_image_ostree[dirs] = "${OSTREE_ROOTFS}"
19do_image_ostree[cleandirs] = "${OSTREE_ROOTFS}" 21do_image_ostree[cleandirs] = "${OSTREE_ROOTFS}"
@@ -39,16 +41,6 @@ IMAGE_CMD_ostree () {
39 mkdir -p usr/rootdirs 41 mkdir -p usr/rootdirs
40 42
41 mv etc usr/ 43 mv etc usr/
42 # Implement UsrMove
43 dirs="bin sbin lib"
44
45 for dir in ${dirs} ; do
46 if [ -d ${dir} ] && [ ! -L ${dir} ] ; then
47 mv ${dir} usr/rootdirs/
48 rm -rf ${dir}
49 ln -sf usr/rootdirs/${dir} ${dir}
50 fi
51 done
52 44
53 if [ -n "${SYSTEMD_USED}" ]; then 45 if [ -n "${SYSTEMD_USED}" ]; then
54 mkdir -p usr/etc/tmpfiles.d 46 mkdir -p usr/etc/tmpfiles.d