Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 939943 - media-sound/mpd-0.23.15-r1 die: command not found in openrc init script
Summary: media-sound/mpd-0.23.15-r1 die: command not found in openrc init script
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Adrian Schollmeyer
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-09-21 05:15 UTC by Alix
Modified: 2025-04-08 09:34 UTC (History)
2 users (show)

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


Attachments
possible init script patch (mpd.patch,1.03 KB, patch)
2024-09-21 05:17 UTC, Alix
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alix 2024-09-21 05:15:20 UTC
Openrc init script references die function in check_config() to guard against misconfiguration. Logic doesn't work as die function is not defined and no such command exist. 

And since init script errors don't stop script execution for some reason, service starts anyway.

Reproducible: Always

Steps to Reproduce:
1. Don't define group in /etc/mpd.conf
2. /etc/init.d/mpd start
Actual Results:  
# /etc/init.d/mpd start
/etc/init.d/mpd: line 40: die: command not found
 * Starting mpd ...                                                  [ ok ]

Expected Results:  
# /etc/init.d/mpd start
 * Checking mpd configuration ...
 * group must be set in /etc/mpd.conf!
 * failed, please correct errors above                              [ !! ]
 * ERROR: mpd failed to start
Comment 1 Alix 2024-09-21 05:17:22 UTC
Created attachment 903483 [details, diff]
possible init script patch
Comment 2 Larry the Git Cow gentoo-dev 2025-04-08 09:34:03 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f83d2daecdabce6ddbe39eaa26a1d4c6cb6c292

commit 3f83d2daecdabce6ddbe39eaa26a1d4c6cb6c292
Author:     Nicolas PARLANT <nicolas.parlant@parhuet.fr>
AuthorDate: 2025-04-07 15:36:59 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-04-08 09:32:11 +0000

    media-sound/mpd: add 0.24.2
    
    SRC_URI : use $(ver_cut 1-2)
    
    iuse :
    * rm cue, no dep
    * rm fifo, no dep
    * rm pipe, no dep
    * rm udisks (this is only dbus)
    * rm network (was httpd+shout, but this is two different plugins)
    * rm yajl, it's used only with qobuz/snapcast/soundcloud
    * add httpd
    * add shout
    * add tremor
    * upstream prefers mpg123 over mad, so +mpg123
    REQUIRED_USE :
    * soundcloud don't require qobuz
    
    deps :
    * boost is not longer required
    * libogg is required only for opus/tremor/vorbis
    * for qobuz, select ffmpeg/libgcrypt with ffmpeg/!ffmpeg
    * media-libs/libsidplay is no longer supported (masked for ppc/ppc64)
    * twolame/lame are only required for httpd/shout/recorder
    
    documentation :
    * add sphinx-rtd-theme
    * set HTML_DOCS
    * use manpages from DISTFILES if !doc
    
    initscript :
    * use eerror and return 1 for failures
    * stop sed of mpd.conf after the first occurence of 'user'
    
    Closes: https://bugs.gentoo.org/939943
    Closes: https://bugs.gentoo.org/944145
    Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
    Signed-off-by: Sam James <sam@gentoo.org>

 media-sound/mpd/Manifest                |   1 +
 media-sound/mpd/files/mpd-0.24.2.init   |  64 ++++++
 media-sound/mpd/files/mpd.1-0.24.2      | 105 ++++++++++
 media-sound/mpd/files/mpd.conf.5-0.24.2 | 249 ++++++++++++++++++++++++
 media-sound/mpd/metadata.xml            |   3 +
 media-sound/mpd/mpd-0.24.2.ebuild       | 331 ++++++++++++++++++++++++++++++++
 6 files changed, 753 insertions(+)