Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#18780 - packages should not install example configurations files under /etc
Attached to Project:
Arch Linux
Opened by Heiko Baums (cyberpatrol) - Sunday, 21 March 2010, 21:00 GMT
Last edited by Andrea Scarpino (BaSh) - Wednesday, 08 September 2010, 14:38 GMT
Opened by Heiko Baums (cyberpatrol) - Sunday, 21 March 2010, 21:00 GMT
Last edited by Andrea Scarpino (BaSh) - Wednesday, 08 September 2010, 14:38 GMT
|
DetailsDescription:
When mpd is installed, its config file is installed as /etc/mpd.conf.example as it is called in the doc directory in the source package. It should be installed as /etc/mpd.conf instead, so that it's removed by pacman -Rn. After installation this file needs to be renamed to /etc/mpd.conf by the user anyway to get mpd working. Because pacman -Rn only removes files that it has installed - in this case /etc/mpd.conf.example - it doesn't remove /etc/mpd.conf, though pacman -Rn is supposed to also remove every global configuration file. Of course the same applies to pacman -R with the obvious exception that /etc/mpd.conf doesn't get renamed to /etc/mpd.conf.pacsave as it supposed to. |
This task depends upon
Closed by Andrea Scarpino (BaSh)
Wednesday, 08 September 2010, 14:38 GMT
Reason for closing: Won't implement
Additional comments about closing: this should be discuss on arch-dev-public ML
Wednesday, 08 September 2010, 14:38 GMT
Reason for closing: Won't implement
Additional comments about closing: this should be discuss on arch-dev-public ML
Most packages and every "main" package follow these standards and install .conf files and not example files:
clamav
gimp
gnucash
apache
lxdm
midnight commander
mkinitcpio
mysql
networkmanager
pacman
php
postfix
ppp
privoxy
sane
snort
fbsplash incl. fbsplash-scripts etc.
openssl
tor
udev
wicd
abcde
abs
bash
ca-certificates
colordiff
dhcpcd
efax-gtk
esound
f-prot
foremost
fuse
filesystem
logrotate
mailx
man-db
mdadm
e2fsprogs
mailx-heirloom
nano
glibc
ntp
rkhunter
rsnapshot
rsync
rsyslog
lm_sensors
slim
openslp
slang
smartmontools
procps
syslog-ng
wvstreams
mlocate
usb_modeswitch
vim
wget
wpa_supplicant
wvdial
Do you need more examples?
Do you really want such stupid example files for all of these packages? Do you really want to be forced to rename every single config file or every single package from *.conf.example to *.conf? What a stupid, unnecessary and senseless work! And what shall pacman's parameter -Sn be for? Wouldn't make any sense.
Such example files would only make sense if there are different configuration scenarios which require completely different config files like a firewall script e.g. which needs to be completely different on a single-position system or on a internet gateway of a network.
This isn't the case with mpd and most other package.
And does it really hurt to just change the line
install -Dm644 doc/mpdconf.example ${pkgdir}/etc/mpd.conf.example || return 1
to
install -Dm644 doc/mpdconf.example ${pkgdir}/etc/mpd.conf || return 1
in the PKGBUILD?
I think this much less work than to have every single user rename this file manually by himself and to force every user to remove this file manually after uninstalling mpd.
I don't see a reason for an example file, because there's only one file and only one use case, and this config file is needed to be able to run mpd.
So why shouldn't it be installed as /etc/mpd.conf directly?
This makes uninstalling and the administration easier. Of course config files in home directories are not deleted, but the global ones can and should be deleted or renamed to *.pacsave, when a package is uninstalled. So it would make things easier and wouldn't waste disk space if mpd is run at boot time. If mpd is run by the user then having /etc/mpd.conf and ~/mpd.conf take the same disk space as /usr/share/mpd/mpd.conf.example and ~/mpd.conf.
So I still don't see a reason for having an example file instead of a real config file in /etc.
An example where example config files in /usr/share make sense is ez-ipupdate. For this program you need different config files with different options depending on the dynaminc DNS provider you are using. So there are example config files for every supported DNS provider in /usr/share/ez-ipupdate/configs. Another example would be a firewall script which needs completely different rules for different setups. But this is not the case with mpd. For mpd you need only one config file, which can be stored globally in /etc or locally in ~.
Also, when you remove mpd /etc/mpd.conf is renamed as .pacsave.
@ DEVs
sorry for spam, but you have to check your packages.
Using the first solution, the package would then conflict with the user-created config. I'm not sure what the best way to handle this would be: .install magic, front page news, etc ?
I see no need for a strict rule here. Maybe this should be discussed on the dev public list if somebody thinks we need a common rule for this.
And I think there must be a strict rule which says that sample config files must either be installed as foo.conf.example into /usr/share or as foo.conf into /etc. Btw., this rule is already a strict rule in the common Linux standards. The latter is to be used if a config file is necessary to get a software running and there's only one possible config file like in mpd. The first one is to be used if a config file is necessary but the software supports various config file formats like ez-ipupdate (in AUR).