Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 566806 - net-p2p/deluge systemd service assumes existence of user not created by ebuild
Summary: net-p2p/deluge systemd service assumes existence of user not created by ebuild
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Paolo Pedroni
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2015-11-25 12:40 UTC by Renee D'Netto
Modified: 2016-03-10 10:34 UTC (History)
1 user (show)

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


Attachments
Patch for ebuilds, service and default conf. (0001-net-p2p-deluge-Fixed-broken-service-default-conf.patch,3.62 KB, patch)
2015-11-25 12:44 UTC, Renee D'Netto
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Renee D'Netto 2015-11-25 12:40:47 UTC
The service file for deluge specifies `User=deluge` and `Group=deluge`, but does not create either. The service is also broken in that it assumes `DELUGED_PORT` is set, but the conf file does not specify it by default.

The attached patch fixes both of these. It also patches the service file to use DELUGED_HOME and DELUGED_OPTS the same way that the OpenRC init file already does, improving compatibility.


Workaround:
Manually create the user (or just delete those entries to run as root) and edit the conf file.

Reproducible: Always

Steps to Reproduce:
emerge net-p2p/deluge
systemctl start deluged
systemctl status deluged
Actual Results:  
Service fails to start with the following error message:

● deluged.service - Deluge BitTorrent client
   Loaded: loaded (/usr/lib64/systemd/system/deluged.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2015-11-25 23:38:18 AEDT; 1s ago
  Process: 22464 ExecStart=/usr/bin/deluged -d -p $DELUGED_PORT $DELUGED_OPTIONS (code=exited, status=217/USER)
 Main PID: 22464 (code=exited, status=217/USER)

Nov 25 23:38:18 phenom systemd[1]: Started Deluge BitTorrent client.
Nov 25 23:38:18 phenom systemd[22464]: deluged.service: Failed at step USER spawning /usr/bin/deluged: No such process
Nov 25 23:38:18 phenom systemd[1]: deluged.service: Main process exited, code=exited, status=217/USER
Nov 25 23:38:18 phenom systemd[1]: deluged.service: Unit entered failed state.
Nov 25 23:38:18 phenom systemd[1]: deluged.service: Failed with result 'exit-code'.


Expected Results:  
Service starts successfully.

Patch provided.
Comment 1 Renee D'Netto 2015-11-25 12:44:07 UTC
Created attachment 417838 [details, diff]
Patch for ebuilds, service and default conf.
Comment 2 Patrice Clement gentoo-dev 2016-03-10 10:34:05 UTC
commit 2360546f8c45012d6e5b4754d8d3b73c283b469a (HEAD -> master)
Author: PPed72 <paolo.pedroni@iol.it>
Date:   Wed Mar 9 11:39:51 2016 +0100

net-p2p/deluge: sync live ebuild

This series of commits closes #1010.

Pull-Request: https://github.com/gentoo/gentoo/pull/1010
Gentoo-Bug: https://bugs.gentoo.org/566806
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>

net-p2p/deluge/deluge-9999.ebuild | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)