On 04/06/2019 11.08, Jan Engelhardt wrote:
On Tuesday 2019-06-04 09:43, Carlos E. R. wrote:
The goal is to provide a concept working for all Linux Distributors (like the FHS, preferred is to get this into the FHS). Short to midterm, it should solve the problems with atomic updates. Midterm to longterm, the result should be, that no package installs anything in /etc, it should only contain changes made by the system administrator or configuration files managed by the system administrator.
But this makes harder to read the actual configuration, because we then need to read two files: the one put by rpm, and the one we modified.
There are two types of programs (and hence config strategies) to be aware of.
1. "Regular programs". Picking mc as my example.
Such programs have built-in defaults and generally only need to read "one file", or more specifically *one kind of file*, namely, the *user preferences* that override parts of the defaults.
Right. Or postfix. But the file lists all the options commented out so that we can easily modify them.
2. "Cooperative duos". Picking systemd as my example:
systemd itself cannot offer defaults to start arbitrary programs, because arbitrary programs live at arbitrary paths; it has to rely on another package providing additional information.
Consequently, systemd needs to read *two kinds* of files, namely the *vendor snippet* from /usr/lib/systemd/system/, and the *user preference snippet* from /etc/systemd/system/.
Except the systemd configuration files, such as "/etc/systemd/journald.conf", which have a single copy.
Now, regular programs outnumber cooperative duos, so the config file problem is not nearly as big as some make it out to be. -- Cheers / Saludos,
Carlos E. R. (from 15.0 x86_64 at Telcontar)