Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 495068 - net-mail/courier-imap - courier-imapd systemd service should start courier-authdaemond service too
Summary: net-mail/courier-imap - courier-imapd systemd service should start courier-au...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: David Heidelberg (okias)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-12-23 00:36 UTC by Christopher Byrne
Modified: 2014-04-24 14:01 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix dependencies of courier-imapd{,-ssl}.service and courier-authdaemond (courier-authdaemond-wanted.patch,1.72 KB, patch)
2013-12-23 00:36 UTC, Christopher Byrne
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Byrne 2013-12-23 00:36:21 UTC
Created attachment 365940 [details, diff]
Fix dependencies of courier-imapd{,-ssl}.service and courier-authdaemond

courier-imap does work right with systemd, no logins work unless courier-authdaemond is manually started. Even if both are enabled explicity it still doesn;t work - courier-authdaemond must be manually started

courier-imapd.service not have a "Wants=courier-authdaemond.service", however, courier-authdaemond DOES have a "WantedBy=courier-imap.service" (which is wrong, it should "WantedBy=courier-imapd.service")

Still I'm not evne sure if THAT is right. First, even with the fix, courier-authdaemond STILL doesn't start unless its explicitly enabled, but it is started with courier-imapd is once applied. This is different than the openrc behavior. Second, this is the only service to use WantedBy on a service, and not a target; while legal it doesn't fit the pattern of the other services which futher reinforces by belief this wasn't the way it was intended to work.

So i've included a patch to make the dependencies work the way the did in openrc, so that starting courier-imap.service (and/or courier-imap-ssl.service) start courier-authdaemond.service without having to explicilty enable courier-authdaemond.service. It also makes enable courier-authdaemond.service start as a standalone service if enabled explicitly (while not very useful, 1) openrc let you do it and 2) it fits teh pattern of all the service systemd services)

mail-mta/courier doesn't have a systemd unit (yet) with futher motivated me to fix up courier-authdaemond.service to work like the other service, as whoever writes will likely look at the units for this package for guidance.
Comment 1 David Heidelberg (okias) 2014-04-24 11:39:47 UTC
Your solution look good! 

I was also having this problem, so I'll retest it on server and then get this change into portage tree.
Comment 2 David Heidelberg (okias) 2014-04-24 12:15:24 UTC
Verified and works. Please get it into tree :)
Comment 3 Manuel Rüger (RETIRED) gentoo-dev 2014-04-24 14:01:33 UTC
Added -r1 service files for that.


*courier-imap-4.15-r1 (24 Apr 2014)

  24 Apr 2014; Manuel Rüger <mrueg@gentoo.org> +courier-imap-4.15-r1.ebuild,
  +files/courier-authdaemond-r1.service, +files/courier-imapd-r1.service,
  +files/courier-imapd-ssl-r1.service, -courier-imap-4.15.ebuild:
  Fix systemd service files. Patch by Salah Coronya. See bug #495068. Cleanup
  old.