Re: Moving existing ostree users to a new branch - take 2



On Mon, May 15, 2017 at 2:45 AM, Alexander Larsson <alexl redhat com> wrote:
So, here is a strawman proposal:

* Add new per-commit metadata "ostree.origin-ref", and set it
  whenever we commit.

* Add a new operation to ostree that makes it easy to copy a commit
  from one ref to another, changing only the origin-ref.

* Add a new security mode in the repo config where GPG signatures
  are required for commits *and* the commits are required to have
  an ostree.origin-ref that matches the ref that was pulled.

* Add a new magic ref name, "ostree/config", where the commit contains
  metadata that is global configuration for the remote. There is
  a corresponding [config] group in the config file for the repo
  and an ostree operation that takes all the configuration data in
  the config group (plus the gpg key) and commits a new version
  of the ostree/config ref.
  (For flatpak I would also want to store our extra global metadata
   here with custom keys, currently xa.title and xa.default-branch.)

* Add a client side operation that update the remote configuration
  based on a ostree/config commit object. (i.e. update url, add new
  gpg keys, revoke old gpg keys, etc).

I can see how you would use this to rewrite a remote config so that it
points at a new URL/key.

How about redirecting refs within the remote though? I guess we could
do it by adding configuration data that includes the ref redirects,
also to be included in the ostree/config commits?

It seems like the discussion has progressed beyond the original
suggestion of just using commit metadata to redirect to a new branch,
but in case it is of interest, here is a rough implementation of that:
https://github.com/endlessm/ostree/commits/commit-eol-redirect

Daniel


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