Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 26513

Summary: Give the mpd ebuild a script in init.d and default configuration
Product: Gentoo Linux Reporter: Chris Carlin <volkris>
Component: New packagesAssignee: Gentoo Sound Team <sound>
Status: RESOLVED FIXED    
Severity: normal CC: sbh, shank, thread
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: /etc/conf.d/mpd and /etc/init.d/mpd for running mpd as an init-script
/etc/conf.d/mpd and /etc/init.d/mpd for running mpd as an init-script

Description Chris Carlin 2003-08-12 18:28:54 UTC
I'm still in the process of installing mpd, so excuse me if I misunderstand
something about the progam itself, but...

The ebuild should probably include an init file in /etc/init.d and
configuration, perhaps as an entry in /etc/conf.d. mpd is a daemon, after all...

I'd consider this necessary for moving the ebuild out from under ~x86

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 sbh 2003-08-12 22:05:51 UTC
Configuration is not necessary, although there could be a default if it is thought to be needed, this file will default in the next version to /etc/mpd.conf or ~/.mpdconf (or something very similar) in 0.9.0.
Comment 2 Chris Carlin 2003-08-13 00:46:55 UTC
Configuration IS needed, as the program won't run without it :)

I mean, if I type "/usr/bin/mpd <enter>" I get the following:

usage: /usr/bin/mpd <port> <mp3/ogg dir> <playlist dir> <log file> <error file>
or: /usr/bin/mpd <conf file>

Whether the configuration is passed on the command line or exists in a config file, configuration is needed, and either way the ebuild script should leave you a step closer to running the thing.

Even in 0.9.0, as you describe, the script should copy the default config file to /etc/mpd.conf. In the end I might prefer a command line, conf.d based approach instead, though.
Comment 3 sbh 2003-08-14 00:42:12 UTC
Well, in that case if someone finds that this is a needed fix, the example conf file is currently at /usr/share/doc/mpd-0.8.4/mpdconf.example.gz with the 0.8.4 install. The best placing for it would be /etc/mpd.conf or ~/.mpdconf because in 0.9.0 this will most likely be it's default and mpd will then be able to be started without arguments, but until then whereever it is stored is still going to be needed as an argument to mpd's binary (fyi if the init.d script is concidered needed).
Comment 4 Chris Carlin 2003-08-14 00:57:22 UTC
To be consistent with the rest of the Gentoo distribution the example config needs to be copied by the ebuild script and a very basic init.d script needs to be installed.

Sbh, are you a developer of mpd? What other types of stuff might eventually be included in the config file?

I'm still thinking a conf.d entry would be preferable to a config file in this case. The values specified in the conf.d file would be passed to the mpd command line through the init.d script.
Comment 5 sbh 2003-08-14 14:34:34 UTC
I am not a dev of mpd, just an advocate, which is not really important with this bug, there will _always_ (more or less ;p) be additions, and I don't really disagree with a conf.d entry, but it won't be a default for the mpd binary, unless it's put in /etc/ or ~/ as I has said before, so all this means is people will be more bound to the init.d entry.

Cheers!
Comment 6 Nikl 2003-09-08 12:15:26 UTC
Created attachment 17268 [details]
/etc/conf.d/mpd and /etc/init.d/mpd for running mpd as an init-script

hi,

i've been using mpd-0.8.5 for quite some time now and it works like a charm. I
created a user "mpd" (group: audio; home: /home/mpd). I've been using the
attached files to run it as an init-script, only waiting for mpd to support
setuid ;)

hope, it's useful for others as well.
Comment 7 Nikl 2003-09-08 12:15:58 UTC
Created attachment 17269 [details]
/etc/conf.d/mpd and /etc/init.d/mpd for running mpd as an init-script

hi,

i've been using mpd-0.8.5 for quite some time now and it works like a charm. I
created a user "mpd" (group: audio; home: /home/mpd). I've been using the
attached files to run it as an init-script, only waiting for mpd to support
setuid ;)

hope, it's useful for others as well.
Comment 8 sbh 2003-09-09 22:40:54 UTC
Somewhat offtopic but MPD supports setuid in CVS and will be a feature for 0.9.x
Comment 9 Martin Holzer (RETIRED) gentoo-dev 2003-11-19 09:06:57 UTC
added in cvs with 0.9.3