[I] media-sound/mpd (0.23.9-r1@21.09.2022): The Music Player Daemon (mpd) /etc/mpd.conf: … # 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 "/var/lib/mpd/log" … On commonly used systemd builds log file doesn't matter. But Gentoo default is non-systemd profile (that is excellent!). So, I think we should follow FHS reglamentations. And fix log_file into config and logrotate script in ebuild, together with reporting upstream. To something like: > log_file "/var/log/mpd/log" P.S. Also: pid_file "/var/lib/mpd/pid" looks suspicios. AFAIR accodring FHS pid files should be located in /var/run/
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(+)