Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Nov 2009 22:50:03 -0500 (EST)
From:      Sahil Tandon <sahil@tandon.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        miwi@FreeBSD.org
Subject:   ports/141045: [PATCH] mail/postfix: fix build with Kerberos5 on 8.0/9.0
Message-ID:  <20091201035003.E203617137@spartan.hamla.org>
Resent-Message-ID: <200912010400.nB1405ph019595@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         141045
>Category:       ports
>Synopsis:       [PATCH] mail/postfix: fix build with Kerberos5 on 8.0/9.0
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 01 04:00:05 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Sahil Tandon
>Release:        FreeBSD 7.2-RELEASE i386
>Organization:
>Environment:

	
>Description:
- Fix build with Kerberbos5 on 8.0 and 9.0 which have new Heimdal
- A similar fix will be required for repocopies of older Postfix versions as well as postfix-current; I will work on those later this week
>How-To-Repeat:
- Set WITH_SASLKRB5=true in environment and try building mail/postfix; you will see:
/usr/lib/libkrb5.so: undefined reference to `hx509_certs_init'
/usr/lib/libkrb5.so: undefined reference to `hx509_cert_get_serialnumber'
/usr/lib/libkrb5.so: undefined reference to `hx509_cert_find_subjectAltName_otherName'
/usr/lib/libkrb5.so: undefined reference to `hx509_certs_find'
/usr/lib/libkrb5.so: undefined reference to `hx509_verify_attach_anchors'
/usr/lib/libkrb5.so: undefined reference to `hx509_query_alloc'
/usr/lib/libkrb5.so: undefined reference to `hx509_get_error_string'
/usr/lib/libkrb5.so: undefined reference to `hx509_cms_unenvelope'
/usr/lib/libkrb5.so: undefined reference to `hx509_lock_add_password'
/usr/lib/libkrb5.so: undefined reference to `hx509_revoke_init'
/usr/lib/libkrb5.so: undefined reference to `hx509_verify_hostname'
/usr/lib/libkrb5.so: undefined reference to `hx509_cms_unwrap_ContentInfo'

... so on and so forth.
>Fix:
Patch is attached; tested on 7.2, 8.0 and 9.0.


--- postfix.diff begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/mail/postfix/Makefile,v
retrieving revision 1.152
diff -u -r1.152 Makefile
--- Makefile	18 Sep 2009 13:05:53 -0000	1.152
+++ Makefile	1 Dec 2009 03:43:15 -0000
@@ -83,6 +83,10 @@
 HTML1=	SOHO_README.html body_checks.5.html bounce.5.html postfix-power.png \
 	scache.8.html tlsmgr.8.html
 
+.if ${OSVERSION} >= 800037
+KRB5_EXTR=-lhx509
+.endif
+
 .if !defined(DEBUG)
 MAKEFILEFLAGS+=	DEBUG=
 .endif
@@ -137,7 +141,7 @@
 .if defined(WITH_SASLKRB) || defined(WITH_SASLKMIT)
 BROKEN=			Select only one SASL Kerberos option
 .endif
-POSTFIX_AUXLIBS+=	-lkrb5 -lcrypto -lcrypt -lcom_err -lasn1 -lroken
+POSTFIX_AUXLIBS+=	-lkrb5 ${KRB5_EXTR} -lcrypto -lcrypt -lcom_err -lasn1 -lroken
 .endif
 
 .if defined(WITH_SASLKMIT)
--- postfix.diff ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091201035003.E203617137>