forked from fedora-sysv/chkconfig
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ostree: store state in /etc/alternatives/state
This PR is a draft/proposal to kick-off a dicussion on how to solve a longstanding issue with `alternatives` on ostree-based systems. The summarize the underlying issue: `ostree container commit` wipes /var and thereby erases the data in /var/lib/alternatives; the directory used to store configs/symlinks of alternatives. /var is not a good place for storing such configs since it won't receive updates on bootc images either. Hence, we need to move to another location. This PR proposes to use /etc/alternatives/state. Some very brief smoketests suggest that this "just works". I added a Dockerfile to the PR to test. Without the patch, the `RUN go ...` would error out as it cannot find `go` in the PATH. BACKWARDS COMPATIBILITY I think we need to worry about backwards compatibility. Some users/workloads may very well depend on the symlinks being stored under /var/lib/alternatives. Colin and I discussed a number of options: 1. Use /var/lib/alternatives if it exists and otherwise use the new location. Pro: Easy to implement, test and maintain. Con: Upgraded and freshly installed systems would behave differently and potentially break users depending on the old behavior. 2. Introduce a new alternatives-ostree (sub)package which would replace the current one. Pro: It would ultimately solve the backwards compatibility issue. Con: Slightly more work as we need to add some #ifdef to the code, conditionally compile the source and add a sub-package. [1] fedora-sysv#9 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
- Loading branch information
Showing
4 changed files
with
60 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM quay.io/fedora/fedora-bootc:40 | ||
COPY ./alternatives /usr/sbin/alternatives | ||
RUN mkdir -p /etc/alternatives/state | ||
RUN dnf -y install golang | ||
RUN go help > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters