From c230ec2492eb0236464f4e746c84d8e49f9d085f Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Sun, 26 Jan 2020 22:14:20 +0100 Subject: meta: move HOSTTOOLS definitions to sota.conf.inc HOSTTOOLS and HOSTTOOLS_NONFATAL are global variables that being handled in base_eventhandler, so they must be defined in config files or in INHERIT classes or classes being inherited by base.bbclass, or else we might run into the following problems: ``` $ bitbake pkgname $ bitbake imgname ``` the HOSTTOOLS and HOSTTOOLS_NONFATAL in the above image recipe, for instance, 'repo python' in image_repo_manifest.bbclass, they would not be copied to HOSTTOOLS_DIR. Signed-off-by: Ming Liu --- classes/image_repo_manifest.bbclass | 2 -- classes/sota.bbclass | 2 -- classes/target_version_example.bbclass | 2 -- 3 files changed, 6 deletions(-) (limited to 'classes') diff --git a/classes/image_repo_manifest.bbclass b/classes/image_repo_manifest.bbclass index 0b311bd..72dc28f 100644 --- a/classes/image_repo_manifest.bbclass +++ b/classes/image_repo_manifest.bbclass @@ -9,8 +9,6 @@ # For more information, see: # https://web.archive.org/web/20161224194009/https://wiki.cyanogenmod.org/w/Doc:_Using_manifests -HOSTTOOLS_NONFATAL += "repo python" - # Write build information to target filesystem buildinfo_manifest () { if [ $(which repo) ]; then diff --git a/classes/sota.bbclass b/classes/sota.bbclass index f6e904e..c248cfc 100644 --- a/classes/sota.bbclass +++ b/classes/sota.bbclass @@ -1,7 +1,5 @@ DISTROOVERRIDES .= "${@bb.utils.contains('DISTRO_FEATURES', 'sota', ':sota', '', d)}" -HOSTTOOLS_NONFATAL += "java" - SOTA_CLIENT ??= "aktualizr" SOTA_CLIENT_PROV ??= "aktualizr-shared-prov" SOTA_DEPLOY_CREDENTIALS ?= "1" diff --git a/classes/target_version_example.bbclass b/classes/target_version_example.bbclass index ef119fb..c0b5aec 100644 --- a/classes/target_version_example.bbclass +++ b/classes/target_version_example.bbclass @@ -1,7 +1,5 @@ # Writes target version to be used by garage-sign -HOSTTOOLS += " git " - deploy_target_version () { version=$(git --git-dir=${METADIR}/.repo/manifests/.git/ rev-parse HEAD) echo -n ${version} > ${STAGING_DATADIR_NATIVE}/target_version -- cgit v1.2.3-54-g00ecf From 00c3c2a1220cbea3dc07a603cac25dfd63acabc8 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Tue, 28 Jan 2020 22:05:14 +0000 Subject: image_types_ostree: set version metadata field OSTree uses the "version" metadata field in various places, e.g. in ostree admin status. Use DISTRO_VERSION as default version number source. This gives a more human readable version number to a particular OSTree: $ ostree admin status * torizon f1825d8a8f89c48cc0915ea059bd23463a97655757a53ae0ab0fe7a97e1ebeb2.0 Version: 3.0+snapshot-20200128 origin refspec: f1825d8a8f89c48cc0915ea059bd23463a97655757a53ae0ab0fe7a97e1ebeb Signed-off-by: Stefan Agner --- classes/image_types_ostree.bbclass | 2 ++ 1 file changed, 2 insertions(+) (limited to 'classes') diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 0f0fd28..7e4a367 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass @@ -5,6 +5,7 @@ OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}" OSTREE_ROOTFS ??= "${WORKDIR}/ostree-rootfs" OSTREE_COMMIT_SUBJECT ??= "Commit-id: ${IMAGE_NAME}" OSTREE_COMMIT_BODY ??= "" +OSTREE_COMMIT_VERSION ??= "${DISTRO_VERSION}" OSTREE_UPDATE_SUMMARY ??= "0" OSTREE_DEPLOY_DEVICETREE ??= "0" @@ -169,6 +170,7 @@ IMAGE_CMD_ostreecommit () { --branch=${OSTREE_BRANCHNAME} \ --subject="${OSTREE_COMMIT_SUBJECT}" \ --body="${OSTREE_COMMIT_BODY}" \ + --add-metadata-string=version="${OSTREE_COMMIT_VERSION}" \ --bind-ref="${OSTREE_BRANCHNAME}-${IMAGE_BASENAME}" if [ "${OSTREE_UPDATE_SUMMARY}" = "1" ]; then -- cgit v1.2.3-54-g00ecf From 580c22e055a079f12feb022aa1f669b63dc77c29 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Tue, 18 Feb 2020 09:56:21 +0100 Subject: image_types_ostree: update doc link. Most of the README content has been moved to the docs portal, so provide the direct link. Signed-off-by: Patrick Vacek --- classes/image_types_ostree.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 7e4a367..533d338 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass @@ -238,10 +238,10 @@ IMAGE_CMD_garagesign () { target_version=${ostree_target_hash} if [ -n "${GARAGE_TARGET_VERSION}" ]; then target_version=${GARAGE_TARGET_VERSION} - bbwarn "Target version is overriden with GARAGE_TARGET_VERSION variable. It is a dangerous operation, make sure you've read the respective secion in meta-updater/README.adoc" + bbwarn "Target version is overriden with GARAGE_TARGET_VERSION variable. This is a dangerous operation! See https://docs.ota.here.com/ota-client/latest/build-configuration.html#_overriding_target_version" elif [ -e "${STAGING_DATADIR_NATIVE}/target_version" ]; then target_version=$(cat "${STAGING_DATADIR_NATIVE}/target_version") - bbwarn "Target version is overriden with target_version file. It is a dangerous operation, make sure you've read the respective secion in meta-updater/README.adoc" + bbwarn "Target version is overriden with target_version file. This is a dangerous operation! See https://docs.ota.here.com/ota-client/latest/build-configuration.html#_overriding_target_version" fi # Push may fail due to race condition when multiple build machines try to push simultaneously -- cgit v1.2.3-54-g00ecf From 6ee652650f0af8a81faa7b37b2d8ea0eabb9f737 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Thu, 27 Feb 2020 12:03:22 +0100 Subject: sota_bleeding: Also set aktualizr-native to the latest. I'm a bit surprised we never noticed this was missing! Signed-off-by: Patrick Vacek --- classes/sota_bleeding.inc | 1 + 1 file changed, 1 insertion(+) (limited to 'classes') diff --git a/classes/sota_bleeding.inc b/classes/sota_bleeding.inc index fc5947d..77d004b 100644 --- a/classes/sota_bleeding.inc +++ b/classes/sota_bleeding.inc @@ -1 +1,2 @@ SRCREV_pn-aktualizr ?= "${AUTOREV}" +SRCREV_pn-aktualizr-native ?= "${AUTOREV}" -- cgit v1.2.3-54-g00ecf