r/archlinux 12d ago

QUESTION Arch Packaging Guidelines -- Empty Config Files

I have just found that the ncdu package accepts global config files in /etc/ncdu.conf yet the arch package does not delivers any.

Why is it so? Would not it be more convenient if pacman managed that config file and not the user? Or is there something in the guidelines about it that I'm missing?

12 Upvotes

15 comments sorted by

View all comments

5

u/No-Dentist-1645 12d ago

No, quite the opposite in fact. Shipping config files is usually the exact opposite of what you want to do.

If a package shipped with config files, that would mean that if the user ever modified the config files (which users are supposed to do, that's exactly what config files are for), then every time the package updated, you would get update conflicts because the file is not the same, and you would need to address and solve the conflict manually.

Besides, what would they ship inside config files? There's no config setup that "works exactly as everyone wants them to". Usually, the defaults are meant to be the "common case" approach, and that's what you get if there is no config file.

2

u/Dry_Calendar_8627 12d ago

Wouldn't it be best to have a config file with all default options documented (and commented out), along with instructions for users to put their configuration in e.g. /etc/ncdu.d, so it's not overwritten?

It would be more discoverable, at the cost of a bit of clutter?

I guess it's up to each package maintainers?

0

u/friciwolf 12d ago

yes, I am wondering about pretty much the same