Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 48210 - media-sound/mpd ebuild: please get rid of the Gentoo config file
Summary: media-sound/mpd ebuild: please get rid of the Gentoo config file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Jeremy Huddleston (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-18 05:30 UTC by Warren Dukes
Modified: 2004-04-20 11:12 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
new mpd ebuild (mpd-0.10.3.ebuild,1.62 KB, text/plain)
2004-04-18 15:06 UTC, Nathan Brown
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Warren Dukes 2004-04-18 05:30:01 UTC
The current ebuilds for mpd install a "gentoo" config file in /etc/conf.d

Please remove this config file!  It causes me too many support headaches, as ppl need to work around problems or change config settings by creating a "real" mpd config file.  So, commonly they add new config options to the gentoo config file, and obviously they do not affect in mpd at all!

Please remove the gentoo config file!  If a default config file is to be installed, use the default one from the mpd source package. and place it at /etc/mpd.conf (or whereever you see fit, and change the init.d scripts appropriatly).

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Nathan Brown 2004-04-18 15:06:47 UTC
Created attachment 29579 [details]
new mpd ebuild

This is a new version of the mpd-0.10.3 ebuild that installs the config file to
/etc/mpd.conf and uses the author's example from the source.  Only thing to
think about is why did the previous version install to /etc/conf.d/mpd and
should the defaults (for example the log file and error file location) be
changed to match Gentoo ideas.

Hope this helps
Comment 2 Nathan Brown 2004-04-18 15:11:23 UTC
Oh and here's the diff between the original version 0.10.3 ebuild and my new version if you'd rather see that:

<       insinto /etc/conf.d
<       newins ${FILESDIR}/mpd.conf mpd
---
>       insinto /etc
>       newins ${S}/doc/mpdconf.example mpd.conf
56c56
<       einfo " LOG_FILE and ERROR_FILE in /etc/conf.d/mpd"
---
>       einfo " LOG_FILE and ERROR_FILE in /etc/mpd.conf"
Comment 3 Jeremy Huddleston (RETIRED) gentoo-dev 2004-04-19 13:38:17 UTC
the gentoo way works... if users want to do it another way, they're free to change the init scripts to suit their needs.
Comment 4 Warren Dukes 2004-04-19 13:59:27 UTC
Then in the next release, I will remove the ability to start mpd with command arguments.  Then the "gentoo way" will not work.

Thank you,
-shank

PS: I don't find it acceptable, that gentoo must have their own config file, that does not work with the config paramters specified in the mpd manpage!  It is entirely too confusing to users to remember there is a "real" mpd config file, for which there is documentation for in the mpd man page, and there is a "gentto" config file that has nothing todo with the mpd config file.  In fact, if a sure specifies a real config file, it will not use gentoo's at all!  At the very least, until i break the gentoo config file in the next release, a note should be specified in the gentoo config file that this is not a real config file, and that the parameters in the mpd man page will not work with the gentoo config file!  

Or you can simply just remove the gentoo config file and install a default config file.
Comment 5 Eric Wong 2004-04-19 14:45:29 UTC
There's absolutely no reason to have a redundant, and more importantly:  incompatible_ configuration file anywhere in /etc when MPD has a perfectly good config file already.

Check out the init script (mpd.init), mpd.postinst, and the libmpdconf shell function library I did for the Debian MPD package if you want some ideas:

http://des.petta-tech.bogomips.org/~eric/viewarch.cgi/eric@petta-tech.com--2004a

Although I maintain Debian packages, I wrote the functions of libmpdconf with ALL distributions in mind and plan on submitting it to be included with MPD itself soon.
Comment 7 David H. Bronke 2004-04-19 15:15:10 UTC
I have used mpd under gentoo for some time and found it necessary to rewrite the init script so that it would work correctly with mpd's standard configuration file. I have uploaded the new /etc/init.d/mpd script to http://www.maltastart.com/~whitelynx/programming/downloads/mpd . The current state of the gentoo ebuild for mpd is not only confusing for new users (finding that they have to put the configuration options in a completely different file than the one they first had to edit), it also causes problems for the mpd devs having to explain the whole situation to other users. mpd already has its own configuration file (/etc/mpd.conf) and it should _not_ require any command-line arguments to run, as this was meant for debugging purposes or for running multiple mpd daemons at different ports. It was not meant to take the place of mpd's original configuration file. Please remove the /etc/conf.d/mpd file and instead copy the example configuration file from mpd's manpage to /etc/mpd.conf .
Comment 8 Nathan Brown 2004-04-19 18:52:50 UTC
Jeremy, the current init scripts will use the correct /etc/mpd.conf file and ignor the conf.d if the /etc/mpd.conf exists.  There's no need for the init scripts to change, the only thing is that the /etc/conf.d file doesn't support all of the options available in the mpd man pages.  Thus when I tried to add more options, they were ignored and my attempts to debug only led to me frustrating the developer.  Now maybe I should have come here first, but once the developer and I figured it out, I rewrote the ebuild to use the config file suggested by the mpd dev.

Is there any reason why the gentoo way is better?
To me it only seems to add layers of confusion.  Can someone explain why gentoo chose to go this way?
Comment 9 Starz McCllelan 2004-04-19 19:13:10 UTC
Yes, the current init script _does_ break mpd. Please see why this bug came into existance: http://www.musicpd.org/forum/viewtopic.php?t=242 . This is not the first time this has happened. It's just confusing, and there is really no reason it should be like this.
Comment 10 Jeremy Huddleston (RETIRED) gentoo-dev 2004-04-19 21:14:25 UTC
re: comment #4

All the configuration information for /etc/init.d/<init script> is contained in /etc/conf.d/<init script> when possible.  It is too confusing for users to have a different configuration script in a different location for every package they install.

the /etc/conf.d/<init script> file sets environment variables for the init script.

Additionally, intentionally breaking a distribution's init script because you do not like the way the distribution handles things is not very professional.

re comment #5, #6, #7:

Thanks, I'll take a look at Eric's Debian script and David's modified gentoo script alternatives...
Comment 11 Jeremy Huddleston (RETIRED) gentoo-dev 2004-04-20 00:50:21 UTC
ok, i've reworked the init script.
Comment 12 Warren Dukes 2004-04-20 04:24:40 UTC
Thanks for your help Jeremy, and I'm sorry for being an ass.

As far as the "location" of the config script, i personally do not care where it is, so long as the config script can take the same configuration parameters in the manpage of mpd, or it is clearly marked in the config file, where to put those paramters.

I'm sorry for acting childish.

Thanks,
-shank
Comment 13 Jeremy Huddleston (RETIRED) gentoo-dev 2004-04-20 08:02:34 UTC
thanks... no hard feelings ;)