On Tue, Nov 01, 2016 at 10:30:22AM +0100, Jeremie Courreges-Anglas wrote:
> Using only your diff I can't get gssapi detected.  I suspect you have
> local changes somewhere, perhaps in krb5-config?

Could it be caused by shlib_dirs="/usr/local/heimdal/lib" in my rc.conf.local?

> Using the following heimdal diff, I have curl detect both gssapi and
> libssl.
> 
> - krb5-config --libs should pass -R/usr/local/heimdal/libs to help ld.so
>   find heimdal libs at runtime
> - krb5-config --libs should pass -L/usr/local/lib because that's where
>   libcom_err is.  If we add only -R/usr/local/heimdal/lib, later tests
>   for functions in libcrypto/libssl fail because libcom_err isn't in the
>   library search path.
> 
> Robert, any opinion regarding the following patch?

With the path and my original path I was able to build curl with
gssapi and ssl:

$ curl -V
curl 7.50.3 (x86_64-unknown-openbsd6.0) libcurl/7.50.3 LibreSSL/2.0.0 
zlib/1.2.3 libidn/1.33 nghttp2/1.16.0
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb 
smbs smtp smtps telnet tftp
Features: IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz 
HTTP2 UnixSockets

Although I still have some issues to tested in our krb env.

Thanks!

j.


> Index: Makefile
> ===================================================================
> RCS file: /d/cvs/ports/security/heimdal/Makefile,v
> retrieving revision 1.17
> diff -u -p -r1.17 Makefile
> --- Makefile  11 Mar 2016 20:28:30 -0000      1.17
> +++ Makefile  1 Nov 2016 02:12:38 -0000
> @@ -12,7 +12,7 @@ PKGNAME-devel-docs= heimdal-devel-docs-$
>  PKGNAME-libs=                heimdal-libs-${V}
>  
>  REVISION-main=               1
> -REVISION-libs=               0
> +REVISION-libs=               1
>  
>  CATEGORIES=          security net
>  
> @@ -132,6 +132,9 @@ RM_MAN=                   man1/afslog.1 \
>                       man8/ftpd.8 \
>                       man8/kxd.8 \
>                       man8/push.8
> +
> +post-patch:
> +     sed -i 's,%%LOCALBASE%%,${LOCALBASE},g' ${WRKSRC}/tools/krb5-config.in
>  
>  post-install:
>       ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/heimdal
> Index: patches/patch-tools_krb5-config_in
> ===================================================================
> RCS file: patches/patch-tools_krb5-config_in
> diff -N patches/patch-tools_krb5-config_in
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-tools_krb5-config_in        1 Nov 2016 02:49:49 -0000
> @@ -0,0 +1,16 @@
> +$OpenBSD$
> +
> +- help ld.so(1) find libs out of its default search path
> +- help ld(1) find libcom_err in ${LOCALBASE}
> +
> +--- tools/krb5-config.in.orig        Tue Nov  1 02:23:30 2016
> ++++ tools/krb5-config.in     Tue Nov  1 02:23:53 2016
> +@@ -120,7 +120,7 @@ if test "$print_exec_prefix" = "yes"; then
> + fi
> + 
> + if test "$do_libs" = "yes"; then
> +-    lib_flags="-L${libdir}"
> ++    lib_flags="-L${libdir} -R${libdir} -L%%LOCALBASE%%/lib"
> +     case $library in
> +     gssapi)
> +     lib_flags="$lib_flags -lgssapi -lheimntlm"
> 
> 
> 
> -- 
> jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE
> 

Reply via email to