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

Bug 587454

Summary: net-im/ejabberd: should use upstream's systemd unit
Product: Gentoo Linux Reporter: Craig Andrews <candrews>
Component: Current packagesAssignee: Amadeusz Żołnowski (RETIRED) <aidecoe>
Status: RESOLVED FIXED    
Severity: normal CC: candrews, hanno
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Craig Andrews gentoo-dev 2016-06-28 21:09:39 UTC
ejabberd includes a systemd service definition, so Gentoo should use that instead of creating and maintaining its own.

So I believe that this file should be deleted:
https://github.com/gentoo/gentoo/blob/master/net-im/ejabberd/files/ejabberd.service

and the ebuild should install the systemd service that the ejabberd build system produces instead.

It looks like Gentoo will have to patch upstream's systemd unit a little bit:
* Gentoo uses a different username (User=) than upstream (Gentoo uses "jabber", upstream uses "ejabberd")
* In ExecStart, Gentoo passes a couple of command line options that upstream does not pass: --config /etc/jabber/ejabberd.cfg --ctl-config /etc/jabber ejabberdctl.cfg --logs "/var/log/jabber" --spool "/var/spool/jabber"

a bit of sed magic should take care of that, though.
Comment 1 Amadeusz Żołnowski (RETIRED) gentoo-dev 2016-07-02 22:20:42 UTC
Is this just a matter of ejabberd.service maintenance or ejabberd.service provided by Gentoo is actually broken? I wonder whether revbump ejabberd-16.04.
Comment 2 Craig Andrews gentoo-dev 2016-07-02 23:16:29 UTC
(In reply to Amadeusz Żołnowski from comment #1)
> Is this just a matter of ejabberd.service maintenance or ejabberd.service
> provided by Gentoo is actually broken? I wonder whether revbump
> ejabberd-16.04.

Upstream and Gentoo are the same (right now) so this is a maintainability issue.

Note that I'm trying to get upstream to improve their service with additional hardening, so hopefully they won't be the same for long :-) https://github.com/processone/ejabberd/pull/1178
Comment 3 Craig Andrews gentoo-dev 2016-07-03 00:26:16 UTC
Sorry, I want to make it clear that there are some differences as I said in the description - they are *mostly* currently the same.
Comment 4 Amadeusz Żołnowski (RETIRED) gentoo-dev 2016-07-03 07:45:45 UTC
I have fixed it in ejabberd-16.04.ebuild. Please test. I don't have any systemd setup.
Comment 5 Craig Andrews gentoo-dev 2016-07-03 19:24:31 UTC
(In reply to Amadeusz Żołnowski from comment #4)
> I have fixed it in ejabberd-16.04.ebuild. Please test. I don't have any
> systemd setup.

https://github.com/gentoo/gentoo/commit/f888bec998225e36910b02954e40593aff2bd15e works nicely - thank you!
Comment 6 Amadeusz Żołnowski (RETIRED) gentoo-dev 2016-07-03 21:53:41 UTC
Thanks for testing.