On the many Fedora ostree systems, mainly because of the immutable root feature, the /usr filesystem is shipped as read-only and can’t be written to.
However, the rpm-ostree usroverlay command can be used to unblock the root, making it possible to write to a overlay which adds the ability to override files in /usr provided by the current ostree commit.
I think it might make sense to first explain why I think knowing the rpm-ostree usroverlay command is useful, since I have a personal use case.
So, previously on Linux I used to use Deja Dup as the backup tool, but more recently I had to move to Windows for a while, so looking for a backup tool there I found Duplicati, which is the closest to how it works.
On coming back to Linux, I wanted to use Duplicati, but unfortunately (it has a problem with openssl)[https://github.com/duplicati/duplicati/issues/4716] which requires (overriding specific lib file with an alternative compatible with latest dll)[https://github.com/duplicati/duplicati/issues/4716#issuecomment-1334013420].
The alternatives here are extracting the files from the RPM, and repackaging it (didn’t figure out an easy way), dumping directly on the installed system (could work on non-ostree, but won’t work on ostree-based due to ro /usr) and using the overlay feature on ostree.
I plan on demonstrating on the Duplicati example, but I guess other use cases could work.
Like, for exameple, maybe a temporary /usr/local could be useful? You could dump the compiled programs you are dealing there and know for sure it will be cleared on reboot.
Metadata Update from @rlengland:
- Issue assigned to mateusrodcosta
- Issue tagged with: article, needs-image
I ahve been thinking on also making an article about apply-live which apparently is a very similar feature and I use it a lot.
Basically, apply lives will install an RPM and its dependencies on the current running system via overlay, this will work unless it has to replace other RPMs or write to a few very specific places,.
Maybe it makes sense to merge talking about apply live into this same article?
With my limited knowledge, I would think that adding this would be reasonable. It should, however, come with a clear description of the use-case and the differences between "apply-live" and rpm-ostree. This is assuming that the article won't become overly long.
Two articles as part of a series is an alternative but you have a better understanding of the topic than I have. It may depend on how closely related you feel the two topics are and how much possible duplication might occur if you make it two articles.
[How was that for a wishy-washy response :-) ]
@mateusrodcosta Have you had time to work on this article? It would be a welcomed addition to the Fedora Magazine.
@rlengland Hey, haven't looked into this for a while.
Since you guys still think this is an interesting article, I can take a look into trying to write it this week.
Essentially the apply-live command can either work (and so the packages are installed on the running system) or fail due to some dependencies conflicts (or likely due to updates to them).
I would preferably need examples for both, the former is easy but I also need the output of the latter for examples.
For usroverlay I just need any random file that could be useful in / that I can delete afterwars, I will just simulate something like a /usr/local/bin install.
Anyway, I will get to it soon.
to comment on this ticket.