summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--classes/image_types_ostree.bbclass12
-rw-r--r--conf/distro/sota.conf.inc2
-rw-r--r--lib/oeqa/selftest/cases/updater.py4
3 files changed, 7 insertions, 11 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
diff --git a/conf/distro/sota.conf.inc b/conf/distro/sota.conf.inc
index ea1ca95..8de9597 100644
--- a/conf/distro/sota.conf.inc
+++ b/conf/distro/sota.conf.inc
@@ -4,7 +4,7 @@
4# 4#
5# require conf/distro/sota.conf.inc 5# require conf/distro/sota.conf.inc
6 6
7DISTRO_FEATURES_append = " sota" 7DISTRO_FEATURES_append = " sota usrmerge"
8DISTRO_FEATURES_NATIVE_append = " sota" 8DISTRO_FEATURES_NATIVE_append = " sota"
9INHERIT += " sota" 9INHERIT += " sota"
10# Prelinking increases the size of downloads and causes build errors 10# Prelinking increases the size of downloads and causes build errors
diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py
index 7e55d07..92bf6fc 100644
--- a/lib/oeqa/selftest/cases/updater.py
+++ b/lib/oeqa/selftest/cases/updater.py
@@ -36,6 +36,10 @@ class GeneralTests(OESelftestTestCase):
36 result = get_bb_var('DISTRO_FEATURES').find('sota') 36 result = get_bb_var('DISTRO_FEATURES').find('sota')
37 self.assertNotEqual(result, -1, 'Feature "sota" not set at DISTRO_FEATURES') 37 self.assertNotEqual(result, -1, 'Feature "sota" not set at DISTRO_FEATURES')
38 38
39 def test_feature_usrmerge(self):
40 result = get_bb_var('DISTRO_FEATURES').find('usrmerge')
41 self.assertNotEqual(result, -1, 'Feature "sota" not set at DISTRO_FEATURES')
42
39 def test_feature_systemd(self): 43 def test_feature_systemd(self):
40 result = get_bb_var('DISTRO_FEATURES').find('systemd') 44 result = get_bb_var('DISTRO_FEATURES').find('systemd')
41 self.assertNotEqual(result, -1, 'Feature "systemd" not set at DISTRO_FEATURES') 45 self.assertNotEqual(result, -1, 'Feature "systemd" not set at DISTRO_FEATURES')