GNOME Bugzilla – Bug 759250
teach 'ostree remote refs' to show contents of summary file
Last modified: 2015-12-17 20:54:08 UTC
While debugging a problem retrieving an ostree update from Red Hat's CDN, I asked about downloading the ostree summary file and reading its contents via the 'ostree' cli. Colin suggested we should teach 'ostree remote refs' to display the info from the summary file. <micah> walters: if i download the summary file, is it possible to read it with 'ostree' cli? <walters> micah, unfortunately not, but what we should do is teach `ostree remote refs` to show this
Definitely agree with the feature, but "ostree remote refs" doesn't strike me as the best place for it. We do already have "ostree summary --update". I think "ostree summary --show" or even just "ostree summary" would be a better fit. It could take a --file option to explicitly point to a downloaded summary file, instead of the one for --repo.
+1 to the --file option I don't really have a preference to where this feature lives in the CLI; I'll leave it up to the implementer.
Inspecting the downloaded file wasn't too hard, but if the remote is protected by e.g. client certificates one needs to resort to something like: curl -v --cacert /etc/rhsm/ca/redhat-uep.pem --cert /etc/pki/entitlement/8311524499068446497.pem --key /etc/pki/entitlement/8311524499068446497-key.pem https://cdn.redhat.com/content/dist/rhel/atomic/7/7Server/x86_64/ostree/repo/summary > summary Since we already fetch the summary file in `remote refs` that's why I was thinking something like `ostree remote refs -v` to show full details (maybe things like availability of static deltas too?)
Okay, that makes sense. I was thinking this was for local inspection. Could also do something like "ostree remote summary" since we'd need a completely separate code branch for the -v option anyway.
https://github.com/GNOME/ostree/pull/163
Fixed https://git.gnome.org/browse/ostree/commit/?id=460a4b2852538a75450efc394d4bfe9d625a7e80