after many months and many discussions, we decided to go with my
Proposal for a better configuration file management on openSUSE
) and use /usr/etc
as the directory below /usr for distribution provided configuration files.
While there is a small risk in using this directory, the feedback was
nearly unanimously to go with this directory, as this is well known to
people. Having the by-in from so many people is in our opinion really
important. If we choose a name nobody likes, we can declare it already
So, what do we plan?
The plan is, to make updating of configuration files a lot of easier
and solve the problems of configuration file updates with atomic updates
(transactional-update on openSUSE).
Longterm, /etc should only contain the host specific and by the admin
modified configuration, all distribution provided configuration files
should be in /usr/etc.
Additional, the distribution provided configuration files should be
moved from /usr/lib and consolidated in /usr/etc.
Configuration files in /usr/etc should not be modified by the admin,
as /usr/etc can be read-only. Instead, the applications needs to be
enhanced, as far as possible and necessary, to read the configuration
files from several locations. Take the systemd configuration as
What needs to be done?
In the first place, you need to adopt your packages. What you need to
do and what you can do depends on your package. It's not possible to
implement this with every kind of configuration file, but on the other side,
there are many applications which supports this already, and it is only
a question of the right configuration and maybe a little bit of tweaking
We develop currently an universal, really flexible config file parser
for config files more or less compatible with the ini file format,
it's libeconf: https://github.com/parlt91/libeconf
This should make it much easier to port some applications to the new
We will start with adding the directory to the filesystem RPM and
adjust the scripts to not throw an error if you use this directory.
Afterwards we will go through the files in /etc and move the easy
ones and continue until we are done. At some point in time we will
create new tests which forbids to deliver files in /etc, so that
this will really finish at some point in time and we don't add
more files to /etc then others remove.
If you read the github document, you will see, that we don't have
a solution for everything yet. I hope we can improve here over the
Second, the big question for packagers: configuration files in
/usr/etc, should we mark them as %config or not?
As no customer should touch them, %config is not really necessary.
On the other side, if we mark them as %config and the user modifies
them by accident, the next update would not overwrite the changes, but
save them as *.rpmsave file. %config(noreplace) is no option, this would
lead again to big problems with not updated configuration files and thus
not working services.
Thorsten Kukuk, Distinguished Engineer, Senior Architect SLES & MicroOS
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany
GF: Felix Imendoerffer, Mary Higgins, Sri Rasiah, HRB 21284 (AG Nuernberg)
To unsubscribe, e-mail: opensuse-packaging+unsubscribe(a)opensuse.org
To contact the owner, e-mail: opensuse-packaging+owner(a)opensuse.org