Open cgwalters opened 9 years ago
There was a recent thread on this on ostree-list.
Related to the git repo/URL, we did land https://github.com/projectatomic/rpm-ostree/pull/676 - though we haven't talked about showing that in the UI in any way.
It does seem clear we should at least have the equivalent of the new ostree commit -F.
In the short term, if anyone wants to use commit messages right now, you can hack it like this, by having rpm-ostree write the commit, then overwrite it but use the contents:
rpm-ostree compose --repo=repo tree <treefile>
ostree --repo=repo commit -s <subject> -F <commit body file> --tree=ref=exampleos/42/x86_64/demo --parent exampleos/42/x86_64/demo^
This general principle applies broadly - you can use rpm-ostree just to generate content, and then ostree tooling to manipulate/edit/promote it after.
Concrete cmdline I just tested:
# echo 'Commit body here!' > body.txt
# ostree --repo=repo commit -b fedora/rawhide/x86_64/atomic-host -s 'My awesome Fedora Atomic Host build!' -F body.txt --tree=ref=fedora/rawhide/x86_64/atomic-host --parent $(ostree --repo=repo rev-parse fedora/rawhide/x86_64/atomic-host^)
You can make the "rpm-ostree just generates content" even more explicit by using --write-commitid-to
(which also will avoid needing --parent
). E.g.:
rpm-ostree compose --repo=repo tree --write-commitid-to=csum <treefile>
ostree --repo=repo commit -b my/actual/branch -F body.txt -s "summary!" --tree=ref=$(cat csum)
OSTree has them, we should support people writing them for a few reasons.
One use case I see is it's very common to maintain metadata in a git repository, and it'd be nice to have that git repo URL + commit in the message.