#152 /etc/default vs. /etc/sysconfig
Closed: Invalid None Opened 12 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 /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. There is also a proposal to symlink them to a single directory.

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://fedorahosted.org/fesco/ticket/818 former FESCo ticket moved here]

[https://bugzilla.redhat.com/show_bug.cgi?id=800152 BZ for grub2]

[http://lists.fedoraproject.org/pipermail/devel/2012-March/163636.html fedora-devel thread]


by mhlavink:

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.


by sgallagh

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.


by kevin

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).


by mitr

"/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.

I probably won't be here for Wednesday's Meeting. At the moment I agree with mitr that /etc/default is fine for this use.

We might want to write a Guideline that defines distribution-integration config and specify that those go in /etc/sysconfig but that's tangential to whether to let packagers place upstream config files in other subdirectories of /etc.

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.

I disagree. /etc/X11 is mostly legacy, /etc/foo.conf or /etc/foo/foo.conf for the package is also quite std. across distributions, and expected.

However, as the OP said, /etc/default and /etc/sysconfig are basically the same thing the former used on Debian/Ubuntu and the later on Fedora/RHEL. I think just saying "don't use /etc/default" in Fedora packages is the easiest thing to do.

I probably also won't be able to attend this Wednesday, so let me express my opinion, here.

I concur with james and jan. Packages were always required to be adapted/configured to a distro's conventions, to properly integrate into a distro, so I do not see any need nor use to add /etc/default "just because Debian does it this way".

Let's stay with /etc/sysconfig and ban /etc/default from Fedora.

If /etc/default has to be banned, can we please at least not require using /etc/sysconfig for upstream config files? Plain /etc is a perfectly good place; if everything were supposed to be in /etc/sysconfig, the "sysconfig" subdirectory would lose its meaning.

It seems like making /etc/default a symlink to /etc/sysconfig is a much better approach...

Replying to [comment:5 mitr]:

if everything were supposed to be in /etc/sysconfig, the "sysconfig" subdirectory would lose its meaning.

Historically /etc/sysconfig had been the place, Linux vendors installed their distros's distro specific/proprietary config-files, while /etc/* has been the place, individual packages installed their package-specific config-files.

Replying to [comment:6 spot]:
What would this sysmlink be useful for? To me /etc/default vs. /etc/sysconfig is a distro specific configuration item amongst many others (c.f. multilib dirs), a distro's packages needs to honor, rsp. packages need adapt to.

Replying to [comment:7 corsepiu]:

What would this sysmlink be useful for? To me /etc/default vs. /etc/sysconfig is a distro specific configuration item amongst many others (c.f. multilib dirs), a distro's packages needs to honor, rsp. packages need adapt to.

Yes, but it has the advantage of minimizing pain in apps (and packaging those apps) which assume /etc/default, and it retains /etc/sysconfig as the canonical location for such config files.

It seems to me now we should just push upstream to move /etc/default/ to /etc/ as those are upstream packages, not Debian specific features.

Just ignore this issue, let people talk to upstreams if they are motivated to do so. (+1:5, 0:2, -1:0)

Login to comment on this ticket.

Metadata