Summary: | media-sound/mpd-0.23.9-r1 write logs into /var/lib/mpd directory instead of FHS dedicated /var/log/ | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sergey S. Starikoff <Ikonta> |
Component: | Current packages | Assignee: | Adrian Schollmeyer <nex+b-g-o> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | proxy-maint, sam |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/gentoo/gentoo/pull/34469 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Sergey S. Starikoff
2022-09-24 15:59:53 UTC
This is from the sed block in the ebuild so it seems deliberate, but I've no idea why: ``` sed -i \ -e 's:^#filesystem_charset.*$:filesystem_charset "UTF-8":' \ -e 's:^#user.*$:user "mpd":' \ -e 's:^#bind_to_address.*any.*$:bind_to_address "localhost":' \ -e 's:^#bind_to_address.*$:bind_to_address "/var/lib/mpd/socket":' \ -e 's:^#music_directory.*$:music_directory "/var/lib/mpd/music":' \ -e 's:^#playlist_directory.*$:playlist_directory "/var/lib/mpd/playlists":' \ -e 's:^#db_file.*$:db_file "/var/lib/mpd/database":' \ -e 's:^#log_file.*$:log_file "/var/lib/mpd/log":' \ -e 's:^#pid_file.*$:pid_file "/var/lib/mpd/pid":' \ -e 's:^#state_file.*$:state_file "/var/lib/mpd/state":' \ doc/mpdconf.example || die ``` mpd is a bit misbehaving in that it creates the PID file after switching the user. Thus, if the "user" config directive is set in the config, MPD creates the PID file with that user as owner and thus can't write to /run. This could explain the switch to /var/lib/mpd/pid as default. While creating the PID file as non-root user is a bad practice, I wouldn't consider this a problem of the ebuild itself. One could potentially ask upstream to resolve the matter. A quick search in GitHub yielded no results about PID file permissions. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e052555c5ead5ea46c5b8d5ebc61f9e89a4d5fa8 commit e052555c5ead5ea46c5b8d5ebc61f9e89a4d5fa8 Author: Adrian Schollmeyer <nex+b-g-o@nexadn.de> AuthorDate: 2023-11-12 21:11:27 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2024-02-05 15:13:55 +0000 media-sound/mpd: add 0.23.15 The new version removes unnecessary modifications to the default configuration and adds default values for creating the PID file and log file in FHS directories. Co-Authored-By: Jeroen Roovers <jer@xs4all.nl> Closes: https://bugs.gentoo.org/872668 Closes: https://bugs.gentoo.org/918421 Closes: https://bugs.gentoo.org/919577 Signed-off-by: Adrian Schollmeyer <nex+b-g-o@nexadn.de> Closes: https://github.com/gentoo/gentoo/pull/34469 Signed-off-by: Joonas Niilola <juippis@gentoo.org> media-sound/mpd/Manifest | 1 + media-sound/mpd/files/mpd-0.23.15.init | 61 ++++++ media-sound/mpd/files/mpd-0.23.15.logrotate | 9 + media-sound/mpd/mpd-0.23.15.ebuild | 284 ++++++++++++++++++++++++++++ 4 files changed, 355 insertions(+) |