#818 /etc/default vs. /etc/sysconfig
Closed None Opened 10 years ago by jankratochvil.

= phenomenon =

Recently some packages started to use '''/etc/default'''. Fedora standard has always been '''/etc/sysconfig'''.

= reason =

One no longer knows where to search for a config file.

= recommendation =

Keep the /etc/sysconfig. The other possibility is to remove /etc/sysconfig and move everything to /etc/default but I do not see a reason for it.

Arguments that some upstream package has fixed /etc/default path is irrelevant, it can be patched best to respect configure '''sysconfdir''' value where this change can be even upstreamed. Also documentation can be generated according to the configuration - GDB does so.

discussion:
[https://bugzilla.redhat.com/show_bug.cgi?id=800152 link for config file in/etc/sysconfig]
[http://lists.fedoraproject.org/pipermail/devel/2012-March/163636.html /etc/default in Fedora]


We use both /etc/sysconfig and /etc/default in Fedora (on my system, there are glibc and shadow-utils files). If those directories exist, I think we should use what upstream use if there is not a really good reason. Sure, we can patch documentation, but even if we do this, it would make confusion. I guess
that when looking for solution, people use google (search for problem keywords) more often than read all documentation available and hope they will found their solution there. For "/etc/default/grub" I get 834 000 results already. We could change paths in documentation we ship, but we can't change paths in the
documentation "out there".


reason: One no longer knows where to search for a config file

I think rpm -ql <package> | grep /etc works reasonably well, as it always did.

It might not be a terrible idea to consolidate them though. Perhaps we could do something similar to the UsrMove change, whereby we make /etc/default a symlink to /etc/sysconfig (or vice-versa) such that all files can be findable in either location.

This seems much more a proposal to the Fedora Packaging Comittee than FESCo.

I'd suggest submitting a proposal there to disallow /etc/default and see what guidelines they come up with around it.

(Personally, I see no reason to forbid /etc/default if upstream uses it).

"/etc/sysconfig" is in RHL, SUSE and related distribution a sub-namespace of /etc for "the distribution-integration-specific files" (often both /etc/foo and /etc/sysconfig/foo exist, even if the names are slightly different, see e.g. ssh, init, clock, cron...). /etc/default/grub is clearly an upstream config file, not a distribution-integration-specific file, so it doesn't belong in /etc/sysconfig.

Also, I can't see that consolidation adds any real value. FHS standardizes /etc; some config files are /etc/foo, some are /etc/foo/foo, some are /etc/X11/foo; /etc/default/foo consistently fits into the general mess!^Wpattern.

The various ways upstreams provide documentation documentation all refer to files by path, so it is easy enough ways to find the correct config file (after all, finding a file is not enough if you don't understand what it does, and the time to find a file is trivial compared to the time to meaningfully edit it). I can't see any real benefit from moving things around, especially when the cost is adding more permanent symlinks and making the filesystem structure even more complex.

Login to comment on this ticket.

Metadata