Rpm-ostree install command performs a symbolic link to a read-only filesystem

I’ve installed a custom rpm using the rpm-ostree install command. After rebooting the system there is a symbolic link between the files put by the rpm in /var/opt and the /usr/lib/opt (immutable filesystem) so the files are read-only now even if the intention of the rpm was to put them into the /var/opt directory to allow writing.

Is there a way to avoid the creation of this symbolic link when installing a rpm using rpm-ostree ?

The purpose of rpm-ostree is to put the package into the immutable filesystem.

What are you trying to do? Could you use a toolbox or some other type of container instead?


Thanks for your reply @dalto. I was expecting that rpm-ostree put the binary into the immutable filesystem but not the config files required, since the rpm was built to put the config files into the /var/opt/ directory. However, the config files now have a symbolic link to /usr/bin/ and now I cannot modify them.

Sure, the container/toolbx are alternatives but I was trying to use rpm-ostree as the initial approach.

It could depend on the rpm itself. If the rpm was built to put stuff all around the file system, without respecting any good practice (config files in /us/bin??) well, on ostree based system you will have such experience.
What rpm is it?

1 Like

Thanks for your reply @alciregi.

No, the rpm wasn’t built to put config files in /usr/bin. But the rpm-ostree install command is linking the files created at /var/opt/ to /usr/bin/opt/. I was looking to understand why ?

I’m just curious. Could I try this rpm?

1 Like

This is because of the immutable base nature of rpm-ostree. The system has a read-only base, so rpm-ostree install acts sort of like a persistent overlay on top of that image. Here’s a breakdown of where the run-time stuff lands: Technical Information :: Fedora Docs

Understood. Thank you @vwbusguy

1 Like