Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 482444

Summary: net-im/ejabberd: add systemd unit
Product: Gentoo Linux Reporter: Andrius Štikonas <andrius>
Component: Current packagesAssignee: Tim Harder <radhermit>
Status: RESOLVED FIXED    
Severity: normal CC: net-im, systemd
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 482446    
Bug Blocks: 448882    
Attachments: ejabberd.service

Description Andrius Štikonas 2013-08-25 18:42:24 UTC
Created attachment 356996 [details]
ejabberd.service

net-im/ejabberd should provide systemd unit file.
Comment 1 Pacho Ramos gentoo-dev 2013-08-25 19:06:21 UTC
Does ejabberdctl has any option to not fork? (and, then, allowing the usage of "Type=simple")
Comment 2 Andrius Štikonas 2013-08-26 12:50:14 UTC
(In reply to Pacho Ramos from comment #1)
> Does ejabberdctl has any option to not fork? (and, then, allowing the usage
> of "Type=simple")

I don't think so. I've looked at the source code of ejabberdctl and the only options are --node --config-dir --config --logs --spool.
Comment 3 Pacho Ramos gentoo-dev 2013-08-26 12:53:21 UTC
In that case, no problem then :)
Comment 4 Andrius Štikonas 2013-08-27 09:15:55 UTC
epmd unit file was committed as template. Should this ejabberd.service be adjusted as well? I don't know how to do it.
Comment 5 Pacho Ramos gentoo-dev 2013-08-31 07:37:39 UTC
(In reply to Andrius Štikonas from comment #4)
> epmd unit file was committed as template. Should this ejabberd.service be
> adjusted as well? I don't know how to do it.

I don't follow you (probably lost the other bug mail), can you elaborate a bit please. Thanks
Comment 6 Andrius Štikonas 2013-08-31 08:27:04 UTC
(In reply to Pacho Ramos from comment #5)
> (In reply to Andrius Štikonas from comment #4)
> > epmd unit file was committed as template. Should this ejabberd.service be
> > adjusted as well? I don't know how to do it.
> 
> I don't follow you (probably lost the other bug mail), can you elaborate a
> bit please. Thanks

I've submitted epmd.service file in bug #482446 which is a dependency of ejabberd. However, that file got committed as epmd@.service (but this wasn't explained in that bug). This might be right by I don't know systemd well enough yet to understand it.

However, the attached ejabberd.service still looks for epmd.service file and prints

Cannot add dependency job for unit epmd.service, ignoring: Unit epmd.service failed to load. No su...details.

So I thought that ejabberd.service file has to be modified as well to take into account epmd.service -> epmd@.service change.
Comment 7 Pacho Ramos gentoo-dev 2013-09-08 13:00:39 UTC
+*ejabberd-2.1.13-r1 (08 Sep 2013)
+
+  08 Sep 2013; Pacho Ramos <pacho@gentoo.org> +ejabberd-2.1.13-r1.ebuild,
+  +files/ejabberd.service, +files/ejabberd.tmpfiles.conf:
+  Add unit file (#482444 by Andrius Štikonas)
+

But different than you, this one is much more similar to Fedora, Mageia and Arch service files
Comment 8 Andrius Štikonas 2013-09-08 21:44:58 UTC
(In reply to Pacho Ramos from comment #7)
> +*ejabberd-2.1.13-r1 (08 Sep 2013)
> +
> +  08 Sep 2013; Pacho Ramos <pacho@gentoo.org> +ejabberd-2.1.13-r1.ebuild,
> +  +files/ejabberd.service, +files/ejabberd.tmpfiles.conf:
> +  Add unit file (#482444 by Andrius Štikonas)
> +
> 
> But different than you, this one is much more similar to Fedora, Mageia and
> Arch service files

Doesn't Gentoo systemd guidelines say that only one service should be started by a unit file? Now ejabberdctl launches epmd itself (since ejabberd.service does not depend on epmd.service).
Comment 9 Pacho Ramos gentoo-dev 2013-09-08 21:50:21 UTC
I think it's being started by ejabberdctl, as it was done in init.d script and as it's done in the other distributions I have seen