Bug 90987 - patch: Exim port patch to allow changeing CYRUS_SASLAUTHD_SOCKET
Summary: patch: Exim port patch to allow changeing CYRUS_SASLAUTHD_SOCKET
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Kirill Ponomarev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-27 19:00 UTC by alexander
Modified: 2005-12-27 22:41 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alexander 2005-12-27 19:00:14 UTC
When building mail/exim on a machine that uses a different directory layout than the default exim will fail to find the correct saslauthd socket.
Exim itself has a build time knob to set this path, but the port does not allow to set this.

Fix: 

A possible fix would be another build time knob, WITH_SASLAUTHD_SOCKET like this:

369,373c369
< .if defined(WITH_SASLAUTHD_SOCKET)
< SEDLIST+=     -e 's,^\# (CYRUS_SASLAUTHD_SOCKET=).*,\1${WITH_SASLAUTHD_SOCKET},'
< .else
< SEDLIST+=     -e 's,^\# (CYRUS_SASLAUTHD_SOCKET=),\1,'
< .endif
---
> SEDLIST+=     -e 's,^\# (CYRUS_SASLAUTHD_SOCKET=).*,\1$,'
How-To-Repeat: Build and run mail/exim while running saslauthd with a socket in different location than /var/state/saslauthd/mux => exim will fail to connect to the default socket
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2005-12-27 19:50:55 UTC
Responsible Changed
From-To: freebsd-ports-bugs->krion

Over to maintainer
Comment 2 Kirill Ponomarev freebsd_committer freebsd_triage 2005-12-27 19:57:57 UTC
State Changed
From-To: open->feedback

What is wrong if you use -DWITH_SASLAUTHD while building exim ? 
Please do use 'diff -u' output to send patches in the future.
Comment 3 alexander 2005-12-27 21:32:15 UTC
Unless I overlooked something the problem with -DWITH_SASLAUTHD is that 
it just turns on or off sasauthd code in exim (it is either yes or no). 
Exim will use the default location to connect with saslauthd 
(/var/state/saslauthd/mux). If you have a different directory layout the 
exact path of the socket saslauthd listens on has to be given at compile 
time (/var/run/saslauthd/mux in my case). This cannot be done with a 
yes/no switch. Therefor I suggested another switch to set the saslauthd 
path, if neccessary.
Comment 4 alexander 2005-12-27 22:03:07 UTC
Sorry! I just posted a response, but after looking into the 
seccurity/cyrus-sasl2 webCVS I found the reason for the problem: the 
last commit message (Dec. 26, 2005) states:

"change /var/state/saslauthd to /var/run/saslauthd as respect hier(7).
PR:        ports/90810"

Thus the sasl2 port does not use the (rather weired) default location 
for saslauthd anymore but uses a more appropriate one for FreeBSD. 
Therefore the provided default location (CYRUS_SASLAUTHD_SOCKET) in the 
exim build time configuration file (it's called src/EDITME in the 
original exim tar ball) is wrong and breaks things after "portupgrade -a".
Given this I suspect it would be best to change my suggested patch to:

--- Makefile.old Tue Dec 27 23:01:29 2005
+++ Makefile.new Tue Dec 27 23:01:24 2005
@@ -366,7 +366,8 @@
 
 .if defined(WITH_SASLAUTHD)
 RUN_DEPENDS+=  
${LOCALBASE}/sbin/saslauthd:${PORTSDIR}/security/cyrus-sasl2-saslauthd
-SEDLIST+=      -e 's,^\# (CYRUS_SASLAUTHD_SOCKET=),\1,'
+SASLAUTHD_SOCKET ?= /var/run/saslauthd/mux
+SEDLIST+=      -e 's,^\# 
(CYRUS_SASLAUTHD_SOCKET=).*,\1${SASLAUTHD_SOCKET},'
 .endif
 
 .if defined(WITH_PWCHECK)

This way people using exim+saslauthd can just install both ports and 
things will work just as they should.

Just to clarify things: Right now the exim port is "broken" with respect 
to the sasl2 port, this is not a matter of my particular directory 
layout as I stated in the original PR.
Comment 5 Kirill Ponomarev freebsd_committer freebsd_triage 2005-12-27 22:41:01 UTC
State Changed
From-To: feedback->closed

I got your idea, thank you :) The update is committed.