Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Sep 2015 05:52:44 +0900 (JST)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        mat@FreeBSD.org
Cc:        sunpoet@freebsd.org, ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   Re: svn commit: r397042 - in head/dns: bind910 bind910/files bind99 bind99/files
Message-ID:  <20150919.055244.524304251928393785.hrs@allbsd.org>
In-Reply-To: <764DEDB75374004DDD927366@ogg.in.absolight.net>
References:  <DA0B191C8CF71DE1BD469AB2@ogg.in.absolight.net> <20150918.115537.1252503353168547542.hrs@allbsd.org> <764DEDB75374004DDD927366@ogg.in.absolight.net>

next in thread | previous in thread | raw e-mail | index | archive | help
----Security_Multipart0(Sat_Sep_19_05_52_44_2015_223)--
Content-Type: Multipart/Mixed;
 boundary="--Next_Part(Sat_Sep_19_05_52_44_2015_280)--"
Content-Transfer-Encoding: 7bit

----Next_Part(Sat_Sep_19_05_52_44_2015_280)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Mathieu Arnold <mat@FreeBSD.org> wrote
  in <764DEDB75374004DDD927366@ogg.in.absolight.net>:

ma> |  The attached patch should fix it.  I confirmed it built with
ma> |  GSSAPI_BASE or GSSAPI_HEIMDAL.  Patch for configure is the same as
ma> |  one in PR 193912.
ma>
ma> Ok, so, I tried that, well, a slight variation of it[1], as the patch from
ma> the PR did not apply any more.
ma>
ma> It builds fine, for both ports on 10, but does not on 9, it fails, for
ma> both, with:

 Grr, I forgot that some old releases had broken krb5-config.  A
 workaround has been added to gssapi.mk just now.  I confirmed that
 the attached patch (updated) for bind99 and bind910 worked on 9.X,
 too.

-- Hiroki

----Next_Part(Sat_Sep_19_05_52_44_2015_280)--
Content-Type: Text/X-Patch; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="dns_bind99_gssapi.20150919-1.diff"

Index: dns/bind99/Makefile
===================================================================
--- dns/bind99/Makefile	(revision 397292)
+++ dns/bind99/Makefile	(working copy)
@@ -147,13 +147,13 @@

 GSSAPI_BASE_USES=	gssapi
 GSSAPI_BASE_CONFIGURE_ON= \
-	--with-gssapi=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS}
+	--with-gssapi=${GSSAPIBASEDIR} KRB5CONFIG="${KRB5CONFIG}"
 GSSAPI_HEIMDAL_USES=	gssapi:heimdal
 GSSAPI_HEIMDAL_CONFIGURE_ON= \
-	--with-gssapi=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS}
+	--with-gssapi=${GSSAPIBASEDIR} KRB5CONFIG="${KRB5CONFIG}"
 GSSAPI_MIT_USES=	gssapi:mit
 GSSAPI_MIT_CONFIGURE_ON= \
-	--with-gssapi=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS}
+	--with-gssapi=${GSSAPIBASEDIR} KRB5CONFIG="${KRB5CONFIG}"
 GSSAPI_NONE_CONFIGURE_ON=	--without-gssapi

 .include <bsd.port.options.mk>
Index: dns/bind99/files/patch-configure
===================================================================
--- dns/bind99/files/patch-configure	(revision 397292)
+++ dns/bind99/files/patch-configure	(working copy)
@@ -1,11 +1,81 @@
---- configure.orig	2015-09-09 02:23:50 UTC
-+++ configure
-@@ -14289,6 +14289,8 @@ done
- 		    "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv" \
- 		    "-lgssapi" \
- 		    "-lgssapi -lkrb5 -ldes -lcrypt -lasn1 -lroken -lcom_err" \
-+		    "-lkrb5 -lgssapi_krb5 -lkrb5support -lk5crypto -lcom_err" \
-+		    "-lgssapi -lkrb5 -lgssapi_krb5 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \
- 		    "-lgssapi -lkrb5 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \
- 		    "-lgssapi -lkrb5 -lgssapi_krb5 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \
- 		    "-lgssapi -lkrb5 -lhx509 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \
+--- configure.orig	2015-09-09 11:23:50.000000000 +0900
++++ configure	2015-09-13 10:08:38.000000000 +0900
+@@ -14284,27 +14284,9 @@
+ 		# problems start to show up.
+ 		saved_libs="$LIBS"
+ 		for TRY_LIBS in \
+-		    "-lgssapi_krb5" \
+-		    "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err" \
+-		    "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv" \
+-		    "-lgssapi" \
+-		    "-lgssapi -lkrb5 -ldes -lcrypt -lasn1 -lroken -lcom_err" \
+-		    "-lgssapi -lkrb5 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \
+-		    "-lgssapi -lkrb5 -lgssapi_krb5 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \
+-		    "-lgssapi -lkrb5 -lhx509 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \
+-		    "-lgss -lkrb5"
++		    "$($KRB5CONFIG gssapi --libs)"; \
+ 		do
+-		    # Note that this does not include $saved_libs, because
+-		    # on FreeBSD machines this configure script has added
+-		    # -L/usr/local/lib to LIBS, which can make the
+-		    # -lgssapi_krb5 test succeed with shared libraries even
+-		    # when you are trying to build with KTH in /usr/lib.
+-		    if test "$use_gssapi" = "/usr"
+-		    then
+-			    LIBS="$TRY_LIBS"
+-		    else
+-			    LIBS="-L$use_gssapi/lib $TRY_LIBS"
+-		    fi
++		    LIBS="$TRY_LIBS"
+ 		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking linking as $TRY_LIBS" >&5
+ $as_echo_n "checking linking as $TRY_LIBS... " >&6; }
+ 		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+@@ -14347,47 +14329,7 @@
+ 		no) as_fn_error $? "could not determine proper GSSAPI linkage" "$LINENO" 5 ;;
+ 		esac
+
+-		#
+-		# XXXDCL Major kludge.  Tries to cope with KTH in /usr/lib
+-		# but MIT in /usr/local/lib and trying to build with KTH.
+-		# /usr/local/lib can end up earlier on the link lines.
+-		# Like most kludges, this one is not only inelegant it
+-		# is also likely to be the wrong thing to do at least as
+-		# many times as it is the right thing.  Something better
+-		# needs to be done.
+-		#
+-		if test "$use_gssapi" = "/usr" -a \
+-			-f /usr/local/lib/libkrb5.a; then
+-		    FIX_KTH_VS_MIT=yes
+-		fi
+-
+-		case "$FIX_KTH_VS_MIT" in
+-		yes)
+-		    case "$enable_static_linking" in
+-		    yes) gssapi_lib_suffix=".a"  ;;
+-		    *)   gssapi_lib_suffix=".so" ;;
+-		    esac
+-
+-		    for lib in $LIBS; do
+-			case $lib in
+-			-L*)
+-			    ;;
+-			-l*)
+-			    new_lib=`echo $lib |
+-				     sed -e s%^-l%$use_gssapi/lib/lib% \
+-					 -e s%$%$gssapi_lib_suffix%`
+-			    NEW_LIBS="$NEW_LIBS $new_lib"
+-			    ;;
+-			*)
+-			   as_fn_error $? "KTH vs MIT Kerberos confusion!" "$LINENO" 5
+-			    ;;
+-			esac
+-		    done
+-		    LIBS="$NEW_LIBS"
+-		    ;;
+-		esac
+-
+-		DST_GSSAPI_INC="-I$use_gssapi/include"
++		DST_GSSAPI_INC="$($KRB5CONFIG gssapi --cflags)"
+ 		DNS_GSSAPI_LIBS="$LIBS"
+
+ 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using GSSAPI from $use_gssapi/lib and $use_gssapi/include" >&5

----Next_Part(Sat_Sep_19_05_52_44_2015_280)--
Content-Type: Text/X-Patch; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="dns_bind910_gssapi.20150919-1.diff"

Index: dns/bind910/Makefile
===================================================================
--- dns/bind910/Makefile	(revision 397292)
+++ dns/bind910/Makefile	(working copy)
@@ -172,13 +172,13 @@

 GSSAPI_BASE_USES=	gssapi
 GSSAPI_BASE_CONFIGURE_ON= \
-	--with-gssapi=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS}
+	--with-gssapi=${GSSAPIBASEDIR} KRB5CONFIG="${KRB5CONFIG}"
 GSSAPI_HEIMDAL_USES=	gssapi:heimdal
 GSSAPI_HEIMDAL_CONFIGURE_ON= \
-	--with-gssapi=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS}
+	--with-gssapi=${GSSAPIBASEDIR} KRB5CONFIG="${KRB5CONFIG}"
 GSSAPI_MIT_USES=	gssapi:mit
 GSSAPI_MIT_CONFIGURE_ON= \
-	--with-gssapi=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS}
+	--with-gssapi=${GSSAPIBASEDIR} KRB5CONFIG="${KRB5CONFIG}"
 GSSAPI_NONE_CONFIGURE_ON=	--without-gssapi

 .include <bsd.port.options.mk>
Index: dns/bind910/files/patch-configure
===================================================================
--- dns/bind910/files/patch-configure	(revision 397292)
+++ dns/bind910/files/patch-configure	(working copy)
@@ -1,10 +1,81 @@
---- configure.orig	2015-09-09 02:23:40 UTC
-+++ configure
-@@ -14105,6 +14105,7 @@ done
- 		    "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv" \
- 		    "-lgssapi" \
- 		    "-lgssapi -lkrb5 -ldes -lcrypt -lasn1 -lroken -lcom_err" \
-+		    "-lkrb5 -lgssapi_krb5 -lkrb5support -lk5crypto -lcom_err" \
- 		    "-lgssapi -lkrb5 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \
- 		    "-lgssapi -lkrb5 -lgssapi_krb5 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \
- 		    "-lgssapi -lkrb5 -lhx509 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \
+--- configure.orig	2015-09-09 11:23:40.000000000 +0900
++++ configure	2015-09-19 03:52:05.021434000 +0900
+@@ -14100,27 +14100,9 @@
+ 		# problems start to show up.
+ 		saved_libs="$LIBS"
+ 		for TRY_LIBS in \
+-		    "-lgssapi_krb5" \
+-		    "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err" \
+-		    "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv" \
+-		    "-lgssapi" \
+-		    "-lgssapi -lkrb5 -ldes -lcrypt -lasn1 -lroken -lcom_err" \
+-		    "-lgssapi -lkrb5 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \
+-		    "-lgssapi -lkrb5 -lgssapi_krb5 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \
+-		    "-lgssapi -lkrb5 -lhx509 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \
+-		    "-lgss -lkrb5"
++		    "$($KRB5CONFIG gssapi --libs)"; \
+ 		do
+-		    # Note that this does not include $saved_libs, because
+-		    # on FreeBSD machines this configure script has added
+-		    # -L/usr/local/lib to LIBS, which can make the
+-		    # -lgssapi_krb5 test succeed with shared libraries even
+-		    # when you are trying to build with KTH in /usr/lib.
+-		    if test "$use_gssapi" = "/usr"
+-		    then
+-			    LIBS="$TRY_LIBS"
+-		    else
+-			    LIBS="-L$use_gssapi/lib $TRY_LIBS"
+-		    fi
++		    LIBS="$TRY_LIBS"
+ 		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking linking as $TRY_LIBS" >&5
+ $as_echo_n "checking linking as $TRY_LIBS... " >&6; }
+ 		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+@@ -14163,47 +14145,7 @@
+ 		no) as_fn_error $? "could not determine proper GSSAPI linkage" "$LINENO" 5 ;;
+ 		esac
+
+-		#
+-		# XXXDCL Major kludge.  Tries to cope with KTH in /usr/lib
+-		# but MIT in /usr/local/lib and trying to build with KTH.
+-		# /usr/local/lib can end up earlier on the link lines.
+-		# Like most kludges, this one is not only inelegant it
+-		# is also likely to be the wrong thing to do at least as
+-		# many times as it is the right thing.  Something better
+-		# needs to be done.
+-		#
+-		if test "$use_gssapi" = "/usr" -a \
+-			-f /usr/local/lib/libkrb5.a; then
+-		    FIX_KTH_VS_MIT=yes
+-		fi
+-
+-		case "$FIX_KTH_VS_MIT" in
+-		yes)
+-		    case "$enable_static_linking" in
+-		    yes) gssapi_lib_suffix=".a"  ;;
+-		    *)   gssapi_lib_suffix=".so" ;;
+-		    esac
+-
+-		    for lib in $LIBS; do
+-			case $lib in
+-			-L*)
+-			    ;;
+-			-l*)
+-			    new_lib=`echo $lib |
+-				     sed -e s%^-l%$use_gssapi/lib/lib% \
+-					 -e s%$%$gssapi_lib_suffix%`
+-			    NEW_LIBS="$NEW_LIBS $new_lib"
+-			    ;;
+-			*)
+-			   as_fn_error $? "KTH vs MIT Kerberos confusion!" "$LINENO" 5
+-			    ;;
+-			esac
+-		    done
+-		    LIBS="$NEW_LIBS"
+-		    ;;
+-		esac
+-
+-		DST_GSSAPI_INC="-I$use_gssapi/include"
++		DST_GSSAPI_INC="$($KRB5CONFIG gssapi --cflags)"
+ 		DNS_GSSAPI_LIBS="$LIBS"
+
+ 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using GSSAPI from $use_gssapi/lib and $use_gssapi/include" >&5

----Next_Part(Sat_Sep_19_05_52_44_2015_280)----

----Security_Multipart0(Sat_Sep_19_05_52_44_2015_223)--
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEABECAAYFAlX8eZwACgkQTyzT2CeTzy300gCdGiWu+ipqMPzGJjcnRrLPTmds
3HQAoLA8jsMaIgaof65QBHb0dTs2c6Zw
=GkLs
-----END PGP SIGNATURE-----

----Security_Multipart0(Sat_Sep_19_05_52_44_2015_223)----



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