FS#52099 - [mpd] unable to start as a user service after 0.19.20-1

Attached to Project: Arch Linux
Opened by hexchain (hexchain) - Saturday, 10 December 2016, 07:10 GMT
Last edited by Gaetan Bisson (vesath) - Saturday, 10 December 2016, 14:24 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Gaetan Bisson (vesath)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

Description:
MPD cannot start as a user service since 0.19.20-1 (probably after capability restrictions are added in systemd unit file).

Additional info:
mpd 0.19.20-1
systemd 232-6

$ systemctl --user status mpd.service
● mpd.service - Music Player Daemon
Loaded: loaded (/usr/lib/systemd/user/mpd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2016-12-10 15:04:15 CST; 4min 45s ago
Process: 1545 ExecStart=/usr/bin/mpd --no-daemon (code=exited, status=218/CAPABILITIES)
Main PID: 1545 (code=exited, status=218/CAPABILITIES)

Dec 10 15:04:15 hostname systemd[663]: Started Music Player Daemon.
Dec 10 15:04:15 hostname systemd[1545]: mpd.service: Failed at step CAPABILITIES spawning /usr/bin/mpd: Operation not permitted
Dec 10 15:04:15 hostname systemd[663]: mpd.service: Main process exited, code=exited, status=218/CAPABILITIES
Dec 10 15:04:15 hostname systemd[663]: mpd.service: Unit entered failed state.
Dec 10 15:04:15 hostname systemd[663]: mpd.service: Failed with result 'exit-code'.
This task depends upon

Closed by  Gaetan Bisson (vesath)
Saturday, 10 December 2016, 14:24 GMT
Reason for closing:  Fixed
Additional comments about closing:  0.19.20-2 in [extra]
Comment by Gaetan Bisson (vesath) - Saturday, 10 December 2016, 07:25 GMT
The systemd service files we ship in our package are almost vanilla in the sense that the only modifications we do are:

sed '/\[Service\]/a User=mpd' -i /usr/lib/systemd/system/mpd.service
sed '/WantedBy=/c WantedBy=default.target' -i /usr/lib/systemd/{system,user}/mpd.service

However I do remember the ChangeLog for 0.19.20 mentioning "systemd: paranoid security settings." Could you please report your issue upstream? I'd be more than welcome to fix this in our PKGBUILD if it turns out to be a packaging issue but I do not believe it is one. Cheers.
Comment by hexchain (hexchain) - Saturday, 10 December 2016, 07:36 GMT Comment by hexchain (hexchain) - Saturday, 10 December 2016, 08:38 GMT
According to upstream, the service file is not intended to be used as a user service. So, there still seems to be a little bit of a packaging issue.

Can we use the old service file for user, or just stop installing the system service as a user one, until upstream may provide its own user service? Thanks.
Comment by Gaetan Bisson (vesath) - Saturday, 10 December 2016, 12:59 GMT
Oh, right! I had completely forgotten what a hack that user service file was. Let me get rid of it straight away.

Loading...