ostreedev / ostree

Operating system and container binary deployment and upgrades
https://ostreedev.github.io/ostree/
Other
1.26k stars 291 forks source link

How to apply changes made in `ostree admin unlock`? #2518

Open vteivans opened 2 years ago

vteivans commented 2 years ago

Sorry if this is not the correct place to ask this, but I can't find the solution.

I have made the changes in my Fedora Kinoite deployment with ostree admin unlock (and with --hotfix) flag. But the changes go away after any update or rpm-ostree install of course. What would be the fastest way I could commit the changes to the ostree and deploy them as the "actual" deployment, so that every next install would go on top of this?

I got so far that, I created a commit with the changes made in temporary file system /var/tmp/ostree-unlock-ov1.xxx to a new branch fedora/my/branch. But I don't understand how to combine that with the current deployment. At least I can't figure it out from the current documentation at https://ostreedev.github.io/ostree.

jlebon commented 2 years ago

This is not supported yet in an easy way. Specifically for rpm-ostree, arbitrary OSTree overlays are supported at compose time but not yet on the client-side (this is related to https://github.com/coreos/rpm-ostree/issues/2326).

vteivans commented 2 years ago

Thanks a lot for your answer. I understand it's a complicated problem, but I wonder how does the local layering of an RPM package work? Is there no way to repeat it without having an RPM package?

Also another question - I can see the rpm-ostree commits and deployments with ostree command line utility. What would happen if manually created a new deployment by combining the existing packages and the base layer as described in ostree doc? Would it break the rpm-ostree setup?

Maybe there's some resource you can direct me to learn more?

jlebon commented 2 years ago

Thanks a lot for your answer. I understand it's a complicated problem, but I wonder how does the local layering of an RPM package work? Is there no way to repeat it without having an RPM package?

rpm-ostree is optimized for RPM layering so it knows to always re-install the RPMs on each update. It does use ostree APIs underneath, but not a single high-level API/CLI which would be easy to use on your own.

Worth noting we're working on things highly related to this which will allows users to more easily customize the base image: https://fedoraproject.org/wiki/Changes/OstreeNativeContainer. Though there would be some overhead in the single node.

But regardless, we would like to also add OSTree layering support directly in client-side rpm-ostree at some point, which is why I linked to https://github.com/coreos/rpm-ostree/issues/2326 earlier which is related to this.