Subject: Jabberd2 start failture on devuan

From: Leonid <[email-masked]>
Date: Tue, 1 Nov 2022 12:28:46 +0500

Package: jabberd2
Version: 2.7.0-2
Hello, dear Devuan developers!
I can't fix this bug:
I try run jabberd2 service, it doesn't work.

```
root@hostname~# service jabberd2 start
Starting Jabber services: router smstart-stop-daemon: missing group name
<Failed> s2sstart-stop-daemon: missing group name
<Failed> c2sstart-stop-daemon: missing group name
<Failed>.
```
What do you think about this problem?

P.S.:
I'm using Devuan 4.
5.10.74-v8 aarch64 GNU/Linux
-- 
Devuan user,
Leonid

---

From: Mark Hindley <[email-masked]>
Date: Wed, 2 Nov 2022 09:24:03 +0000

Control: tags -1 moreinfo
Control: tags -1 debian

Leonid,

>    I try run jabberd2 service, it doesn't work.

Thanks for this. In general jabberd2 is not forked in Devuan and we use Debian's
packages directly without recompilation. So any bug should be reported to
Debian's BTS.

Looking at Debian's tracker[1], I don't see any significant recent changes. You
will need to provide more information.

 - What group is jabber trying to run as? It looks[2] as if it should be
   jabber. Does the group exist? It should be created in the preinst[3]
 
Mark

[1]  https://tracker.debian.org/pkg/jabberd2

[2]  https://salsa.debian.org/xmpp-team/jabberd2/-/blob/master/debian/init#L18

[3]  https://salsa.debian.org/xmpp-team/jabberd2/-/blob/master/debian/preinst#L38

---

From: Mark Hindley <[email-masked]>
Date: Wed, 11 Jan 2023 19:39:48 +0000

Control: tags -1 patch

>    jabber. Does the group exist? It should be created in the preinst[3]

I have had a quick look at this and the USER and GROUP environment variables
need to be exported so that they are passed to the scripts in
/etc/jabberd2/component.d.

USER is already an exported variable, so actually works either way, but GROUP
isn't so fails.

Try this.

diff -u /home/mark/Downloads/jabberd2.init /home/mark/Downloads/jabberd2.init.new
--- /home/mark/Downloads/jabberd2.init	2023-01-11 19:36:24.104716244 +0000
+++ /home/mark/Downloads/jabberd2.init.new	2023-01-11 19:37:12.319574513 +0000
@@ -14,8 +14,8 @@
 set -e
 
 # user and group
-USER=jabber
-GROUP=jabber
+export USER=jabber
+export GROUP=jabber
 test -f /etc/default/jabberd2 && . /etc/default/jabberd2
 
 COMPONENTDPATH=/etc/jabberd2/component.d

Diff finished.  Wed Jan 11 19:38:28 2023