Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 937264 - media-sound/mpd-0.23.15-r1 init script no longer supports log_file="syslog"
Summary: media-sound/mpd-0.23.15-r1 init script no longer supports log_file="syslog"
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-08-04 05:45 UTC by Walther
Modified: 2024-09-22 13:07 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Walther 2024-08-04 05:45:41 UTC
/etc/mpd.conf:
[code]
# These settings are the locations for the daemon log files for the daemon.
#
# The special value "syslog" makes MPD use the local syslog daemon. This
# setting defaults to logging to syslog.
#
# If you use systemd, do not configure a log_file.  With systemd, MPD
# defaults to the systemd journal, which is fine.
#
log_file "syslog"
[/code]

/etc/init.d/mpd:
[code]
start_pre() {
   check_config

   local pid_dir="$(dirname "${pidfile}")"
   checkpath -d -m 700 -o "${mpd_user}:${mpd_group}" "${pid_dir}"

   local log_file="$(get_config log_file)"
   if [ -n "${log_file}" ]; then
      local log_dir="$(dirname "${log_file}")"
      checkpath -d -m 755 -o "${mpd_user}:${mpd_group}" "${log_dir}"
   fi
}
[/code]


 /etc/init.d/mpd start
 * checkpath: empty or relative path
 * ERROR: mpd failed to start

The current (stable) init.d script for mpd fails to account for the special value of the log_file "syslog", and the daemon only starts if it specifies an absolute file.
Comment 1 Larry the Git Cow gentoo-dev 2024-09-22 13:07:10 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7274988e561d1dfd666b5c02d39a98d7db39995e

commit 7274988e561d1dfd666b5c02d39a98d7db39995e
Author:     Adrian Schollmeyer <nex+b-g-o@nexadn.de>
AuthorDate: 2024-09-21 14:42:23 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-09-22 13:06:29 +0000

    media-sound/mpd: optional io-uring, fix yajl deps, support log_file=syslog
    
    This introduces yajl as a new USE flag, controlling whether the program
    should link against dev-libs/yajl. This is needed for two different
    features, hence the new REQUIRED_USE.
    
    Closes: https://bugs.gentoo.org/922980
    Closes: https://bugs.gentoo.org/934927
    Closes: https://bugs.gentoo.org/937264
    
    Signed-off-by: Adrian Schollmeyer <nex+b-g-o@nexadn.de>
    Signed-off-by: Sam James <sam@gentoo.org>

 media-sound/mpd/files/mpd-0.23.15.init-r1 |  61 +++++++
 media-sound/mpd/metadata.xml              |   2 +
 media-sound/mpd/mpd-0.23.15-r2.ebuild     | 291 ++++++++++++++++++++++++++++++
 3 files changed, 354 insertions(+)