Re: How to find versions from ostree repo

On Mon, Aug 6, 2018 at 8:43 AM, Cristian Falcas via ostree-list
<ostree-list gnome org> wrote:

Where is the version for a specific commit kept in the repo?

I can see the commit at
$REPONAME/refs/heads/fedora/27/x86_64/atomic-host-kubernetes, but I can't
find the version. For me it's something like this:
# rpm-ostree status
State: idle; auto updates disabled
* ostree://our_custom_repo:fedora/27/x86_64/atomic-host-kubernetes
                   Version: 27.20180801_1740.0 (2018-08-03 15:00:29)
              GPGSignature: Valid signature by

The version is kept in the commit metadata key version. You can get it
out with show --print-metadata-key. Here's an example in the Endless
OS repo:

$ ostree show --print-metadata-key=version os/eos/amd64/eos3a

Also, I'm trying to keep the repo in s3, and for this I'm doing something

rpm-ostree compose tree --cachedir=/srv/cache --repo=$REPONAME
aws s3 sync $REPONAME s3://$S3BUCKET/$REPONAME --acl public-read

But this always keeps only the latest version. Is there a way to make
rpm-ostree keep all versions built? I copied the file
$REPONAME/refs/heads/fedora/27/x86_64/atomic-host-kubernetes to a new build,
but the content is overwritten.

This is dependent on how rpm-ostree makes commits. If it keeps
history, then the old versions are just ancestors to the
fedora/27/x86_64/atomic-host-kubernetes ref. But maybe rpm-ostree
compose prunes all but the latest commit. You'd have to look at what
rpm-ostree does, but you can run ostree log from the local repo to

ostree --repo=$REPONAME log fedora/27/x86_64/atomic-host-kubernetes

If there are multiple commits, then you can reference them by adding ^
after the ref sort of like git. For example,
fedora/27/x86_64/atomic-host-kubernetes^^ would be two commits prior
to the ref head.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]