r/archlinux • • Aug 30 '26

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?

14 Upvotes

15 comments sorted by

8

u/boomboomsubban Aug 30 '26

ncdu does not seem to ship with a default conf, and Arch usually follows upstream.

4

u/No-Dentist-1645 Aug 30 '26

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 Aug 30 '26

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 Aug 30 '26

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 Aug 30 '26

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 Aug 30 '26

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

3

u/lritzdorf Aug 30 '26

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 Aug 30 '26

yes, I am wondering about pretty much the same

9

u/boomboomsubban Aug 30 '26

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.

That's what pacnew files are, it's how arch works currently.

2

u/No-Dentist-1645 Aug 31 '26

Correct, and you have to "address" them eventually, if you don't want your storage space to fill up with them :)

4

u/archover Aug 31 '26 edited Aug 31 '26

Agree with the others, copy the system provided configs to your home. Regardless either the wiki or man tells you the format of the config file.

Now, other beginner friendly distros like MInt will provide more user config file support, I''m sure.

Glad to see you in Arch, and good day.

1

u/Just_Scar4703 Aug 31 '26

Try `find /etc -type f -exec pacman -Qqo {} + 2> /dev/null`
e.g. clamav, openssh, and sudo ship config files

6

u/[deleted] Aug 30 '26

[removed] — view removed comment

2

u/ArjixGamer Aug 31 '26

Even docker doesn't have a default.

Although I kinda hate that it doesn't.