diff --git a/NEWS b/NEWS index 21b15dcfef..1766d27c9e 100644 --- a/NEWS +++ b/NEWS @@ -144,9 +144,9 @@ CHANGES WITH 262 in spe: hierarchy that is not merged is now shown as "-" instead of "none". * The JSON payload returned by systemd-sysupdated's DescribeFeature() - method changed the "name" keys to "id". The "appStream" key is now - "appstream", and the "documentation" key is now an array of strings. - Consumers of this interface must update their JSON parsing + method and by the "systemd-sysupdate features" command changed the + "name" key to "id". The "documentation" key is now an array of + strings. Consumers of this interface must update their JSON parsing accordingly. * The PrivateUsersOwnership= setting in .nspawn files now defaults to diff --git a/man/org.freedesktop.sysupdate1.xml b/man/org.freedesktop.sysupdate1.xml index 27ec86926d..ab9720afa1 100644 --- a/man/org.freedesktop.sysupdate1.xml +++ b/man/org.freedesktop.sysupdate1.xml @@ -350,7 +350,7 @@ node /org/freedesktop/sysupdate1/target/host { - appstream + appStream An optional string that contains an HTTP/HTTPS URL to an appstream catalog XML file containing metadata about this feature. diff --git a/src/shared/varlink-io.systemd.SysUpdate.c b/src/shared/varlink-io.systemd.SysUpdate.c index f5fa7a6e69..1880b50bf9 100644 --- a/src/shared/varlink-io.systemd.SysUpdate.c +++ b/src/shared/varlink-io.systemd.SysUpdate.c @@ -39,7 +39,7 @@ static SD_VARLINK_DEFINE_STRUCT_TYPE( SD_VARLINK_FIELD_COMMENT("URLs to documentation for the feature."), SD_VARLINK_DEFINE_FIELD(documentation, SD_VARLINK_STRING, SD_VARLINK_NULLABLE|SD_VARLINK_ARRAY), SD_VARLINK_FIELD_COMMENT("A URL to an AppStream catalog XML file describing the feature."), - SD_VARLINK_DEFINE_FIELD(appstream, SD_VARLINK_STRING, SD_VARLINK_NULLABLE), + SD_VARLINK_DEFINE_FIELD(appStream, SD_VARLINK_STRING, SD_VARLINK_NULLABLE), SD_VARLINK_FIELD_COMMENT("Whether the feature is enabled."), SD_VARLINK_DEFINE_FIELD(enabled, SD_VARLINK_BOOL, 0), SD_VARLINK_FIELD_COMMENT("Whether the feature is suggested for enablement."), diff --git a/src/sysupdate/sysupdate.c b/src/sysupdate/sysupdate.c index 7b68bdde1e..3a776d972c 100644 --- a/src/sysupdate/sysupdate.c +++ b/src/sysupdate/sysupdate.c @@ -2442,7 +2442,7 @@ static int feature_to_json(Context *context, const Feature *f, sd_json_variant * SD_JSON_BUILD_PAIR_STRING("id", f->id), JSON_BUILD_PAIR_STRING_NON_EMPTY("description", f->description), JSON_BUILD_PAIR_STRV_NON_EMPTY("documentation", f->documentation), - JSON_BUILD_PAIR_STRING_NON_EMPTY("appstream", f->appstream), + JSON_BUILD_PAIR_STRING_NON_EMPTY("appStream", f->appstream), SD_JSON_BUILD_PAIR_BOOLEAN("enabled", f->enabled), SD_JSON_BUILD_PAIR_CONDITION(suggested >= 0, "suggested", SD_JSON_BUILD_BOOLEAN(suggested > 0)), JSON_BUILD_PAIR_STRV_NON_EMPTY("transfers", transfers)); diff --git a/src/sysupdate/updatectl.c b/src/sysupdate/updatectl.c index 194ab0a9cd..7fa7bc731b 100644 --- a/src/sysupdate/updatectl.c +++ b/src/sysupdate/updatectl.c @@ -1423,7 +1423,7 @@ static int describe_feature(sd_bus *bus, const char *feature, Feature *ret) { { "enabled", SD_JSON_VARIANT_BOOLEAN, sd_json_dispatch_stdbool, offsetof(Feature, enabled), SD_JSON_MANDATORY }, { "suggested", SD_JSON_VARIANT_BOOLEAN, sd_json_dispatch_tristate, offsetof(Feature, suggested), SD_JSON_NULLABLE }, { "documentation", SD_JSON_VARIANT_ARRAY, sd_json_dispatch_strv, offsetof(Feature, documentation), SD_JSON_NULLABLE }, - { "appstream", SD_JSON_VARIANT_STRING, sd_json_dispatch_string, offsetof(Feature, appstream), SD_JSON_NULLABLE }, + { "appStream", SD_JSON_VARIANT_STRING, sd_json_dispatch_string, offsetof(Feature, appstream), SD_JSON_NULLABLE }, { "transfers", SD_JSON_VARIANT_ARRAY, sd_json_dispatch_strv, offsetof(Feature, transfers), SD_JSON_NULLABLE }, {} }; diff --git a/test/units/TEST-72-SYSUPDATE.sh b/test/units/TEST-72-SYSUPDATE.sh index 77d711f087..fc98dd8963 100755 --- a/test/units/TEST-72-SYSUPDATE.sh +++ b/test/units/TEST-72-SYSUPDATE.sh @@ -509,7 +509,7 @@ EOF ' <<<"$feature_json" >/dev/null jq -e '.enabled == false' <<<"$feature_json" >/dev/null jq -e '.suggested == false' <<<"$feature_json" >/dev/null - jq -e '.appstream == "https://example.com/optional.appstream.xml"' <<<"$feature_json" >/dev/null + jq -e '.appStream == "https://example.com/optional.appstream.xml"' <<<"$feature_json" >/dev/null suggested_json="$("$SYSUPDATE" --json=short features suggested)" jq -e '.id == "suggested" and .suggested == true' <<<"$suggested_json" >/dev/null