summaryrefslogtreecommitdiffstats
path: root/classes/image_types_ostree.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/image_types_ostree.bbclass')
-rw-r--r--classes/image_types_ostree.bbclass13
1 files changed, 4 insertions, 9 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index 71cacc6..44a3aa4 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -7,17 +7,12 @@ do_image_ostree[depends] += "ostree-native:do_populate_sysroot \
7" 7"
8do_image_ostree[lockfiles] += "${OSTREE_REPO}/ostree.lock" 8do_image_ostree[lockfiles] += "${OSTREE_REPO}/ostree.lock"
9 9
10export OSTREE_REPO
11export OSTREE_BRANCHNAME
12export GARAGE_TARGET_NAME
13
14OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}" 10OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}"
15
16OSTREE_COMMIT_SUBJECT ??= "Commit-id: ${IMAGE_NAME}" 11OSTREE_COMMIT_SUBJECT ??= "Commit-id: ${IMAGE_NAME}"
17OSTREE_COMMIT_BODY ??= "" 12OSTREE_COMMIT_BODY ??= ""
18OSTREE_UPDATE_SUMMARY ??= "0" 13OSTREE_UPDATE_SUMMARY ??= "0"
19 14
20export SYSTEMD_USED = "${@oe.utils.ifelse(d.getVar('VIRTUAL-RUNTIME_init_manager', True) == 'systemd', 'true', '')}" 15SYSTEMD_USED = "${@oe.utils.ifelse(d.getVar('VIRTUAL-RUNTIME_init_manager', True) == 'systemd', 'true', '')}"
21 16
22IMAGE_CMD_ostree () { 17IMAGE_CMD_ostree () {
23 if [ -z "$OSTREE_REPO" ]; then 18 if [ -z "$OSTREE_REPO" ]; then
@@ -62,7 +57,7 @@ IMAGE_CMD_ostree () {
62 fi 57 fi
63 done 58 done
64 59
65 if [ -n "$SYSTEMD_USED" ]; then 60 if [ -n "${SYSTEMD_USED}" ]; then
66 mkdir -p usr/etc/tmpfiles.d 61 mkdir -p usr/etc/tmpfiles.d
67 tmpfiles_conf=usr/etc/tmpfiles.d/00ostree-tmpfiles.conf 62 tmpfiles_conf=usr/etc/tmpfiles.d/00ostree-tmpfiles.conf
68 echo "d /var/rootdirs 0755 root root -" >>${tmpfiles_conf} 63 echo "d /var/rootdirs 0755 root root -" >>${tmpfiles_conf}
@@ -98,7 +93,7 @@ IMAGE_CMD_ostree () {
98 bbwarn "Data in /$dir directory is not preserved by OSTree. Consider moving it under /usr" 93 bbwarn "Data in /$dir directory is not preserved by OSTree. Consider moving it under /usr"
99 fi 94 fi
100 95
101 if [ -n "$SYSTEMD_USED" ]; then 96 if [ -n "${SYSTEMD_USED}" ]; then
102 echo "d /var/rootdirs/${dir} 0755 root root -" >>${tmpfiles_conf} 97 echo "d /var/rootdirs/${dir} 0755 root root -" >>${tmpfiles_conf}
103 else 98 else
104 echo "mkdir -p /var/rootdirs/${dir}; chown 755 /var/rootdirs/${dir}" >>${tmpfiles_conf} 99 echo "mkdir -p /var/rootdirs/${dir}; chown 755 /var/rootdirs/${dir}" >>${tmpfiles_conf}
@@ -113,7 +108,7 @@ IMAGE_CMD_ostree () {
113 bbfatal "Data in /root directory is not preserved by OSTree." 108 bbfatal "Data in /root directory is not preserved by OSTree."
114 fi 109 fi
115 110
116 if [ -n "$SYSTEMD_USED" ]; then 111 if [ -n "${SYSTEMD_USED}" ]; then
117 echo "d /var/roothome 0755 root root -" >>${tmpfiles_conf} 112 echo "d /var/roothome 0755 root root -" >>${tmpfiles_conf}
118 else 113 else
119 echo "mkdir -p /var/roothome; chown 755 /var/roothome" >>${tmpfiles_conf} 114 echo "mkdir -p /var/roothome; chown 755 /var/roothome" >>${tmpfiles_conf}