From 212efc4f52dd9979511b871a560356c3e7b7ad6b Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sat, 8 Jun 2019 19:31:30 +0100 Subject: [PATCH] [Packaging] Move user out of systemd files and add to tarball With the `deluge` user specified in the unit files it ties it to that user and makes it unavailable for re-use by systemd user instance. Remove the user and group from the unit files and put them in a separate `user.conf` file that should be installed as an override file e.g. for deluged.service this would be placed as follows: /etc/systemd/service/deluge.service.d/user.conf Add the systemd files to the tarball for package maintainers. Closes: #2034 --- CHANGELOG.md | 4 ++++ MANIFEST.in | 1 + packaging/systemd/deluge-web.service | 3 --- packaging/systemd/deluged.service | 2 -- packaging/systemd/user.conf | 4 ++++ 5 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 packaging/systemd/user.conf diff --git a/CHANGELOG.md b/CHANGELOG.md index d08c04e9a..ad72bd878 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## 2.0.2 (WiP) +### Packaging + +- Add systemd deluged and deluge-web service files to package tarball (#2034) + ### Core - Fix Python 2 compatiblity issue with SimpleNamespace. diff --git a/MANIFEST.in b/MANIFEST.in index c88a56c1b..d2d970fe6 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -8,6 +8,7 @@ include version.py include gen_web_gettext.py graft docs/man +graft packaging/systemd include deluge/i18n/*.po recursive-exclude deluge/i18n *.mo diff --git a/packaging/systemd/deluge-web.service b/packaging/systemd/deluge-web.service index 9e8ca5eef..b74c0ada8 100644 --- a/packaging/systemd/deluge-web.service +++ b/packaging/systemd/deluge-web.service @@ -6,9 +6,6 @@ Wants=deluged.service [Service] Type=simple - -User=deluge -Group=deluge UMask=027 ExecStart=/usr/bin/deluge-web -d diff --git a/packaging/systemd/deluged.service b/packaging/systemd/deluged.service index 7541548d4..fa00de0fe 100644 --- a/packaging/systemd/deluged.service +++ b/packaging/systemd/deluged.service @@ -5,8 +5,6 @@ After=network-online.target [Service] Type=simple -User=deluge -Group=deluge UMask=007 ExecStart=/usr/bin/deluged -d diff --git a/packaging/systemd/user.conf b/packaging/systemd/user.conf new file mode 100644 index 000000000..ae59820c4 --- /dev/null +++ b/packaging/systemd/user.conf @@ -0,0 +1,4 @@ +# Override service user +[Service] +User=deluge +Group=deluge