summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.adoc6
-rw-r--r--classes/image_types_ostree.bbclass14
-rw-r--r--classes/image_types_ota.bbclass10
-rw-r--r--conf/distro/sota.conf.inc2
-rw-r--r--lib/oeqa/selftest/cases/updater.py4
-rw-r--r--recipes-sota/aktualizr/aktualizr-ca-implicit-prov-creds.bb4
-rwxr-xr-xrecipes-sota/aktualizr/aktualizr_git.bb2
7 files changed, 22 insertions, 20 deletions
diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc
index 4d9e8f6..0b40438 100644
--- a/CONTRIBUTING.adoc
+++ b/CONTRIBUTING.adoc
@@ -13,6 +13,12 @@ Previously, some older branches were also regularly supported, and while they sh
13 13
14If you are developing with meta-updater, it may be helpful to read the README and other documentation for link:README.adoc[this repo], https://github.com/advancedtelematic/aktualizr[aktualizr], and the https://github.com/advancedtelematic/updater-repo/[updater-repo], particularly the sections about development and debugging. 14If you are developing with meta-updater, it may be helpful to read the README and other documentation for link:README.adoc[this repo], https://github.com/advancedtelematic/aktualizr[aktualizr], and the https://github.com/advancedtelematic/updater-repo/[updater-repo], particularly the sections about development and debugging.
15 15
16== Developer Certificate of Origin (DCO)
17
18All commits in pull requests must contain a `Signed-off-by:` line to indicate that the developer has agreed to the terms of the https://developercertificate.org[Developer Certificate of Origin]. A simple way to achieve that is to use the `-s` flag of `git commit`.
19
20New pull requests will automatically be checked by the https://probot.github.io/apps/dco/[probot/dco].
21
16== Contributor checklist 22== Contributor checklist
17 23
18* OTA-enabled build succeeds for at least one platform, the resulting image boots, and an update can be installed. This check is absolutely necessary for every pull request unless it only touches documentation. 24* OTA-enabled build succeeds for at least one platform, the resulting image boots, and an update can be installed. This check is absolutely necessary for every pull request unless it only touches documentation.
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index d433acb..0820af7 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"
@@ -15,6 +16,7 @@ IMAGE_CMD_TAR = "tar --xattrs --xattrs-include=*"
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 ]" 16CONVERSION_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 ]"
16CONVERSIONTYPES_append = " tar" 17CONVERSIONTYPES_append = " tar"
17 18
19REQUIRED_DISTRO_FEATURES = "usrmerge"
18OTA_IMAGE_ROOTFS_task-image-ostree = "${OSTREE_ROOTFS}" 20OTA_IMAGE_ROOTFS_task-image-ostree = "${OSTREE_ROOTFS}"
19do_image_ostree[dirs] = "${OSTREE_ROOTFS}" 21do_image_ostree[dirs] = "${OSTREE_ROOTFS}"
20do_image_ostree[cleandirs] = "${OSTREE_ROOTFS}" 22do_image_ostree[cleandirs] = "${OSTREE_ROOTFS}"
@@ -40,16 +42,6 @@ IMAGE_CMD_ostree () {
40 mkdir -p usr/rootdirs 42 mkdir -p usr/rootdirs
41 43
42 mv etc usr/ 44 mv etc usr/
43 # Implement UsrMove
44 dirs="bin sbin lib"
45
46 for dir in ${dirs} ; do
47 if [ -d ${dir} ] && [ ! -L ${dir} ] ; then
48 mv ${dir} usr/rootdirs/
49 rm -rf ${dir}
50 ln -sf usr/rootdirs/${dir} ${dir}
51 fi
52 done
53 45
54 if [ -n "${SYSTEMD_USED}" ]; then 46 if [ -n "${SYSTEMD_USED}" ]; then
55 mkdir -p usr/etc/tmpfiles.d 47 mkdir -p usr/etc/tmpfiles.d
@@ -138,7 +130,7 @@ IMAGE_CMD_ostree () {
138 130
139IMAGE_TYPEDEP_ostreecommit = "ostree" 131IMAGE_TYPEDEP_ostreecommit = "ostree"
140do_image_ostreecommit[depends] += "ostree-native:do_populate_sysroot" 132do_image_ostreecommit[depends] += "ostree-native:do_populate_sysroot"
141do_image_ostreecommit[lockfiles] += "${WORKDIR}/${OSTREE_REPO}-commit.lock" 133do_image_ostreecommit[lockfiles] += "${OSTREE_REPO}/ostree.lock"
142IMAGE_CMD_ostreecommit () { 134IMAGE_CMD_ostreecommit () {
143 if ! ostree --repo=${OSTREE_REPO} refs 2>&1 > /dev/null; then 135 if ! ostree --repo=${OSTREE_REPO} refs 2>&1 > /dev/null; then
144 ostree --repo=${OSTREE_REPO} init --mode=archive-z2 136 ostree --repo=${OSTREE_REPO} init --mode=archive-z2
diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass
index c9d21d1..9883a68 100644
--- a/classes/image_types_ota.bbclass
+++ b/classes/image_types_ota.bbclass
@@ -94,19 +94,19 @@ IMAGE_TYPEDEP_ota-ext4 = "ota"
94do_image_ota_ext4[depends] = "e2fsprogs-native:do_populate_sysroot" 94do_image_ota_ext4[depends] = "e2fsprogs-native:do_populate_sysroot"
95IMAGE_CMD_ota-ext4 () { 95IMAGE_CMD_ota-ext4 () {
96 # Calculate image type 96 # Calculate image type
97 OTA_ROOTFS_SIZE=$(calculate_size `du -ks $OTA_SYSROOT | cut -f 1` "${IMAGE_OVERHEAD_FACTOR}" "${IMAGE_ROOTFS_SIZE}" "${IMAGE_ROOTFS_MAXSIZE}" `expr ${IMAGE_ROOTFS_EXTRA_SPACE}` "${IMAGE_ROOTFS_ALIGNMENT}") 97 OTA_ROOTFS_SIZE=$(calculate_size `du -ks ${OTA_SYSROOT} | cut -f 1` "${IMAGE_OVERHEAD_FACTOR}" "${IMAGE_ROOTFS_SIZE}" "${IMAGE_ROOTFS_MAXSIZE}" `expr ${IMAGE_ROOTFS_EXTRA_SPACE}` "${IMAGE_ROOTFS_ALIGNMENT}")
98 98
99 if [ $OTA_ROOTFS_SIZE -lt 0 ]; then 99 if [ ${OTA_ROOTFS_SIZE} -lt 0 ]; then
100 bbfatal "create_ota failed to calculate OTA rootfs size!" 100 bbfatal "create_ota failed to calculate OTA rootfs size!"
101 fi 101 fi
102 102
103 eval local COUNT=\"0\" 103 eval local COUNT=\"0\"
104 eval local MIN_COUNT=\"60\" 104 eval local MIN_COUNT=\"60\"
105 if [ $OTA_ROOTFS_SIZE -lt $MIN_COUNT ]; then 105 if [ ${OTA_ROOTFS_SIZE} -lt ${MIN_COUNT} ]; then
106 eval COUNT=\"$MIN_COUNT\" 106 eval COUNT=\"${MIN_COUNT}\"
107 fi 107 fi
108 108
109 dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 seek=${OTA_ROOTFS_SIZE} count=$COUNT bs=1024 109 dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 seek=${OTA_ROOTFS_SIZE} count=${COUNT} bs=1024
110 mkfs.ext4 -O ^64bit ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 -L otaroot -d ${OTA_SYSROOT} 110 mkfs.ext4 -O ^64bit ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 -L otaroot -d ${OTA_SYSROOT}
111} 111}
112 112
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')
diff --git a/recipes-sota/aktualizr/aktualizr-ca-implicit-prov-creds.bb b/recipes-sota/aktualizr/aktualizr-ca-implicit-prov-creds.bb
index e2d52da..7420983 100644
--- a/recipes-sota/aktualizr/aktualizr-ca-implicit-prov-creds.bb
+++ b/recipes-sota/aktualizr/aktualizr-ca-implicit-prov-creds.bb
@@ -21,11 +21,11 @@ do_install() {
21 SOTA_CACERT_PATH=${DEPLOY_DIR_IMAGE}/CA/cacert.pem 21 SOTA_CACERT_PATH=${DEPLOY_DIR_IMAGE}/CA/cacert.pem
22 SOTA_CAKEY_PATH=${DEPLOY_DIR_IMAGE}/CA/ca.private.pem 22 SOTA_CAKEY_PATH=${DEPLOY_DIR_IMAGE}/CA/ca.private.pem
23 mkdir -p ${DEPLOY_DIR_IMAGE}/CA 23 mkdir -p ${DEPLOY_DIR_IMAGE}/CA
24 bbwarn "SOTA_CACERT_PATH is not specified, use default one at $SOTA_CACERT_PATH" 24 bbwarn "SOTA_CACERT_PATH is not specified, use default one at ${SOTA_CACERT_PATH}"
25 25
26 if [ ! -f ${SOTA_CACERT_PATH} ]; then 26 if [ ! -f ${SOTA_CACERT_PATH} ]; then
27 bbwarn "${SOTA_CACERT_PATH} does not exist, generate a new CA" 27 bbwarn "${SOTA_CACERT_PATH} does not exist, generate a new CA"
28 SOTA_CACERT_DIR_PATH="$(dirname "$SOTA_CACERT_PATH")" 28 SOTA_CACERT_DIR_PATH="$(dirname "${SOTA_CACERT_PATH}")"
29 openssl genrsa -out ${SOTA_CACERT_DIR_PATH}/ca.private.pem 4096 29 openssl genrsa -out ${SOTA_CACERT_DIR_PATH}/ca.private.pem 4096
30 openssl req -key ${SOTA_CACERT_DIR_PATH}/ca.private.pem -new -x509 -days 7300 -out ${SOTA_CACERT_PATH} -subj "/C=DE/ST=Berlin/O=Reis und Kichererbsen e.V/commonName=meta-updater" -batch -config ${WORKDIR}/ca.cnf -extensions cacert 30 openssl req -key ${SOTA_CACERT_DIR_PATH}/ca.private.pem -new -x509 -days 7300 -out ${SOTA_CACERT_PATH} -subj "/C=DE/ST=Berlin/O=Reis und Kichererbsen e.V/commonName=meta-updater" -batch -config ${WORKDIR}/ca.cnf -extensions cacert
31 bbwarn "${SOTA_CACERT_PATH} has been created, you'll need to upload it to the server" 31 bbwarn "${SOTA_CACERT_PATH} has been created, you'll need to upload it to the server"
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb
index 82449f0..d49f28c 100755
--- a/recipes-sota/aktualizr/aktualizr_git.bb
+++ b/recipes-sota/aktualizr/aktualizr_git.bb
@@ -27,7 +27,7 @@ SRC_URI = " \
27 file://aktualizr-serialcan.service \ 27 file://aktualizr-serialcan.service \
28 " 28 "
29 29
30SRCREV = "348822d914f422a8d7b34a1e98cfdd1fa3cf816c" 30SRCREV = "d00d1a04cc2366d1a5f143b84b9f507f8bd32c44"
31BRANCH ?= "master" 31BRANCH ?= "master"
32 32
33S = "${WORKDIR}/git" 33S = "${WORKDIR}/git"