-
Notifications
You must be signed in to change notification settings - Fork 148
conf: Add bootc_unsafe_paths #1711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
conf: Add bootc_unsafe_paths #1711
Conversation
Why not something generic like There are other image-based update systems out there, and I could imagine wanting something like this even for a package-based system. (e.g. a subdirectory that should only be writable by an ansible playbook or whatever) |
I agree, I would like to keep the option name generic if we can. But that being said, we want the logic here to only apply for "bootc transactions". If you're running DNF at image build time, We use "bootc" language in our docs and CLI output already so it seems more appropriate in an option name than "ostree" or "image mode". We could call it If we wanted to make the path protection option be useful generally outside bootc systems, we could add a second option like |
Actually how about simply basing it off detecting that |
Perhaps, yes, maybe DNF should be aware of how the mounts are actually set up. For example, how does this play with bootc's On the other hand, it's common for different paths in the FHS to be on different filesystems. It's sometimes recommended to place /var on a separate partition for example. So we can't naively look at the mount table and assume that drift will occur if paths are on separate filesystems. We may need some additional coupling with bootc/OSTree. |
Good point! A few thoughts here:
@jmarrero also suggests one approach here is to reconcile on shutdown (or on reboot) by detecting when we had transient overlay packages and undoing their changes to persistent volumes |
Per the meeting earlier I think this would work for DNF. IIUC if the bootc transient overlays all had the source "bootc-transient" then we could detect "are changes to $path going away on reboot?" with But until that's ready we can proceed with this "unsafe path" warning and keep assuming that /etc and /usr will always drift. How about we forget |
2273eb2
to
c837c38
Compare
Adds the `usr_drift_protected_paths` configuration option which can be configured by adding .conf files to the drop-in directory /etc/dnf/usr-drift-protected-paths.d, similar to /etc/dnf/protected.d. Distributions will be able to add paths that are known to cause problems when their contents drift with respect to /usr, e.g. /etc/pam.d. For rpm-software-management/dnf#2199.
c837c38
to
be32d9f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not that familiar with bootc
but the name usr_drift_protected_paths
sounds good to me assuming there are no plans to extend the overlay beyond /usr
.
Tests pass locally. |
84a8a95
into
rpm-software-management:dnf-4-master
Adds the
bootc_unsafe_paths
configuration option which can be configured by adding .conf files to the drop-in directory /etc/dnf/bootc-unsafe-paths.d, similar to /etc/dnf/protected.d. Distributions will be able to add paths which are not recommended to be modified at runtime on bootc systems, e.g. /etc/pam.d.Also bump libdnf version to 0.75.0.
For rpm-software-management/dnf#2199.