diff --git a/src/app/rpmostree-builtin-status.c b/src/app/rpmostree-builtin-status.c index df15da2e4a..94a6da70a7 100644 --- a/src/app/rpmostree-builtin-status.c +++ b/src/app/rpmostree-builtin-status.c @@ -301,6 +301,10 @@ status_generic (RPMOSTreeSysroot *sysroot_proxy, else g_print ("%s", checksum); g_print ("\n"); + const gchar *source_title = NULL; + g_variant_dict_lookup (dict, "source-title", "&s", &source_title); + if (source_title) + g_print (" └ %s\n", source_title); const char *base_checksum = NULL; g_variant_dict_lookup (dict, "base-checksum", "&s", &base_checksum); diff --git a/src/daemon/rpmostreed-deployment-utils.c b/src/daemon/rpmostreed-deployment-utils.c index e5d4ab86ff..5cbfc11c37 100644 --- a/src/daemon/rpmostreed-deployment-utils.c +++ b/src/daemon/rpmostreed-deployment-utils.c @@ -253,6 +253,8 @@ rpmostreed_deployment_generate_variant (OstreeSysroot *sysroot, variant_add_metadata_attribute (&dict, OSTREE_COMMIT_META_KEY_ENDOFLIFE, "endoflife", commit); } + variant_add_metadata_attribute (&dict, OSTREE_COMMIT_META_KEY_SOURCE_TITLE, "source-title", commit); + sigs = rpmostreed_deployment_gpg_results (repo, refspec, base_checksum, &gpg_enabled); variant_add_commit_details (&dict, NULL, commit); diff --git a/tests/vmcheck/overlay.sh b/tests/vmcheck/overlay.sh index 4f613fbddb..99a2724624 100755 --- a/tests/vmcheck/overlay.sh +++ b/tests/vmcheck/overlay.sh @@ -21,13 +21,19 @@ set -x # And then this code path in the VM -# get csum of current default deployment +# get csum and origin of current default deployment commit=$(rpm-ostree status --json | \ python -c ' import sys, json; deployment = json.load(sys.stdin)["deployments"][0] print deployment["checksum"] exit()') +origin=$(rpm-ostree status --json | \ + python -c ' +import sys, json; +deployment = json.load(sys.stdin)["deployments"][0] +print deployment["origin"] +exit()') if [[ -z $commit ]] || ! ostree rev-parse $commit; then echo "Error while determining current commit" >&2 @@ -59,6 +65,6 @@ fi rm -vrf vmcheck/usr/etc/selinux/targeted/semanage.*.LOCK # ✀✀✀ END tmp hack -ostree commit --parent=none -b vmcheck --link-checkout-speedup \ +ostree commit --parent=none -b vmcheck --add-metadata-string=ostree.source-title="Dev overlay on ${origin}" --add-metadata-string=rpmostree.original-origin=${origin} --link-checkout-speedup \ --selinux-policy=vmcheck --tree=dir=vmcheck ostree admin deploy vmcheck