FS#70565 - [prosody] Do not use prosodyctl in the unit file

Attached to Project: Community Packages
Opened by Mathieu Pasquet (mathieui) - Saturday, 24 April 2021, 10:20 GMT
Last edited by Sergej Pupykin (sergej) - Saturday, 26 June 2021, 13:54 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

The current prosody.service file makes use of "prosodyctl" as root:

```
ExecStart=/usr/bin/prosodyctl start
ExecStop=/usr/bin/prosodyctl stop
ExecReload=/usr/bin/prosodyctl reload
```

Those commands are not recommended (and running "prosodyctl reload" manually will even print a big warning). Running prosodyctl to start prosody also has the unfortunate effect of letting prosody drop privileges itself, and preventing any systemd unit hardening.

```
WARNING: Use of prosodyctl start/stop/restart/reload is not recommended
if Prosody is managed by an init system - use that directly instead.
e.g. systemctl reload prosody
```

The prosody-hg AUR package takes a different approach that is more integrated with systemd: https://aur.archlinux.org/cgit/aur.git/tree/prosody.service?h=prosody-hg

Additional info:
* package version(s): 0.11.8-1 (all of them)


Steps to reproduce:

* Install prosody
* Try to harden a bit the runtime conditions and fail
This task depends upon

Closed by  Sergej Pupykin (sergej)
Saturday, 26 June 2021, 13:54 GMT
Reason for closing:  Fixed
Comment by Mathieu Pasquet (mathieui) - Saturday, 24 April 2021, 16:46 GMT
Additionally, there is a -F flag to avoid daemonization regardless of the config, which is good to have in the unit file as well: https://hg.prosody.im/debian/rev/96817efcb53a
Comment by Maxime Buquet (ppjet6) - Friday, 18 June 2021, 11:19 GMT
I recently started using this package for another project and I've got the warning as well. Any news on this front?

I actually took the service file for prosody-hg from upstream directly, https://hg.prosody.im/debian/file/tip/prosody.service, if that's of any help.
Comment by Sergej Pupykin (sergej) - Saturday, 19 June 2021, 21:21 GMT
please try prosody-1:0.11.9-2

Loading...