rpm-ostree status --json does not properly serialize ostree.manifest
for OCI deploymentsΒ #5196
Open
Description
Describe the bug
When the booted deployment is a container image , the output of rpm-ostree status --json does not properly serialize a few keys under base-commit-meta
:
ostree.manifest
and ostree.container.image-config
are both serialized as strings with the JSON structure escaped.
Reproduction steps
- rebase to a container image:
rpm-ostree rebase ostree-unverified-registry:quay.io/fedora/fedora-coreos@sha256:d12dd2fcb57ecfde0941be604f4dcd43ce0409b86e5ee4e362184c802b80fb84
then reboot - run
rpm-ostree status --json
3 . output :
{
"deployments": [
{
"unlocked": "none",
"requested-local-packages": [],
"base-commit-meta": {
"ostree.importer.version": "0.14.1",
"ostree.tar-filtered": {},
"ostree.manifest": "{\"schemaVersion\":2,\"config\":{\"mediaType\":\"applic........ [snip]",
"ostree.container.image-config": "{\"created\":\"2024-11-25T02:09:37Z\", ........[snip]",
"ostree.manifest-digest": "sha256:d12dd2fcb57ecfde0941be604f4dcd43ce0409b86e5ee4e362184c802b80fb84"
},
"base-removals": [],
"pinned": false,
"osname": "fedora-coreos",
"base-remote-replacements": {},
"regenerate-initramfs": false,
"checksum": "41e8b64a8995e7412047dc0436934df69cb7886c73c2476f5743ba752dbb3e98",
"container-image-reference-digest": "sha256:d12dd2fcb57ecfde0941be604f4dcd43ce0409b86e5ee4e362184c802b80fb84",
"requested-base-local-replacements": [],
"id": "fedora-coreos-41e8b64a8995e7412047dc0436934df69cb7886c73c2476f5743ba752dbb3e98.0",
"version": "41.20241109.3.0",
"requested-local-fileoverride-packages": [],
"requested-base-removals": [],
"requested-packages": [],
"serial": 0,
"timestamp": 1732500577,
"staged": false,
"booted": true,
"container-image-reference": "ostree-unverified-registry:quay.io/fedora/fedora-coreos@sha256:d12dd2fcb57ecfde0941be604f4dcd43ce0409b86e5ee4e362184c802b80fb84",
"packages": [],
"base-local-replacements": []
}
],
"transaction": null,
"cached-update": null,
"update-driver": null
}
Expected behavior
I am expexting ostree.manifest
and ostree.container.image-config
to be properly serialized as JSON objects
Actual behavior
ostree.manifest
and ostree.container.image-config
are serialized as strings
System details
rpm-ostree:
Version: '2024.9'
Git: bd152998332c2b11af671447d3fd311319d5b3a8
Features:
- rust
- compose
- container
- fedora-integration
Additional information
No response
Metadata
Assignees
Labels
No labels