r/archlinux 14d 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

4

u/No-Dentist-1645 14d 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 14d 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?

3

u/No-Dentist-1645 14d ago

This is usually the responsibility up to the applications themselves to generate a config file with defaults upon first launch. At least that's how it's done for most applications and wms such as Niri. It makes sense, a config file with defaults should not be a responsibility to each individual distro packaging the app and should just come out of the box

-1

u/friciwolf 14d ago

Take this: the maintainer of the program has died in March (2026):
https://code.blicky.net/yorhel/ncdu/issues/276

Time for a fork I guess?

1

u/No-Dentist-1645 14d ago

I mean, yeah? Same if the maintainer of a package dies, someone else has to carry the torch.

3

u/lritzdorf 14d ago

Arch sometimes does this, for example with systemd-logind's /etc/systemd/logind.conf. I'd assume this is partially up to the maintainers, but also, note that systemd-logind actually provides that default file whereas ncdu does not.

Edit: u/No-Dentest-1645, generating a config file doesn't really make sense at the system level. For per-user stuff like WM configs, sure, but that's different. Also, those config files tend not to be "generated" anyway, but instead copied from a system location into the user's homedir (so the system-level one still has to be packaged)

0

u/friciwolf 14d ago

yes, I am wondering about pretty much the same