tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

krb5 builtin busted ? (was Re: heimdal builtin busted?)



So, I guess the first issue is that native is indeed mit-krb5 and not heimdal.

> richard@alarm:/home/richard/src/pkgsrc/security/p5-GSSAPI$ krb5-config --all
> Version:     Kerberos 5 release 1.13.4
> Vendor:      Massachusetts Institute of Technology
> Prefix:      /usr
> Exec_prefix: /usr

So the "heimdal_version" biz seems to remain the best marker for KRB5_TYPE=heimdal...
that is, no change at all in heimdal/builtin.mk

The problem on the mit-krb5 side is in the builtin check script, the marker
"Massachusetts Institute of Technology" is searched for in krb5.h, but in recent
mit-krb5 this is apparently split across two lines! meaning the test is busted.

So it seems the marker is perhaps better searched for in krb5-config in the --version string.

The following patch to mit-krb5/builtin.mk seems to work on native sun and MIT krb5.
> diff --git a/security/mit-krb5/builtin.mk b/security/mit-krb5/builtin.mk
> index dc839a6..a676bd3 100644
> --- a/security/mit-krb5/builtin.mk
> +++ b/security/mit-krb5/builtin.mk
> @@ -13,7 +13,6 @@ BUILTIN_FIND_HEADERS.H_MIT_KRB5=      kerberosv5/krb5.h
>  .else
>  BUILTIN_FIND_HEADERS.H_MIT_KRB5=       krb5.h
>  .endif
> -BUILTIN_FIND_GREP.H_MIT_KRB5=          Massachusetts Institute of Technology
>  BUILTIN_FIND_FILES_VAR:=               SH_KRB5_CONFIG
>  BUILTIN_FIND_FILES.SH_KRB5_CONFIG=     /usr/bin/krb5-config
>  BUILTIN_FIND_FILES.SH_KRB5_CONFIG+=    /usr/lib/mit/bin/krb5-config
> @@ -28,7 +27,8 @@ BUILTIN_FIND_GREP.SH_KRB5_CONFIG=     ^[      ]*--version)
>  .if !defined(IS_BUILTIN.mit-krb5)
>  IS_BUILTIN.mit-krb5=   no
>  .  if empty(H_MIT_KRB5:M__nonexistent__) && empty(H_MIT_KRB5:M${LOCALBASE}/*)
> -IS_BUILTIN.mit-krb5=   yes
> +IS_BUILTIN.mit-krb5!=  ${SH_KRB5_CONFIG} --version |\
> +       ${GREP} -q 'Kerberos 5 release' && ${ECHO} yes || ${ECHO} no
>  .  endif
>  .endif
>  MAKEVARS+=     IS_BUILTIN.mit-krb5

For the auto-selection based upon native, the following seems to work okay:
> diff --git a/mk/krb5.buildlink3.mk b/mk/krb5.buildlink3.mk
> index 3f1c340..2b447f1 100644
> --- a/mk/krb5.buildlink3.mk
> +++ b/mk/krb5.buildlink3.mk
> @@ -28,9 +28,21 @@ KRB5_BUILDLINK3_MK:= ${KRB5_BUILDLINK3_MK}+
>  .include "../../mk/bsd.prefs.mk"
>  
>  .if !empty(KRB5_BUILDLINK3_MK:M+)
> -KRB5_DEFAULT?= heimdal
>  KRB5_ACCEPTED?=        ${_KRB5_PKGS}
> -
> +# check first to see if there is a native implementation
> +# if KRB5_DEFAULT is not explicitly set
> +.  if !defined(KRB5_DEFAULT)
> +.    for _krb in ${KRB5_ACCEPTED}
> +CHECK_BUILTIN.${_krb}:= yes
> +.include "../../security/${_krb}/builtin.mk"
> +CHECK_BUILTIN.${_krb}:= no
> +.      if !empty(IS_BUILTIN.${_krb}:tl:Myes)
> +KRB5_DEFAULT?= ${_krb5}
> +.      endif
> +.    endfor
> +.  else # use traditional default
> +KRB5_DEFAULT?= heimdal
> +.  endif
>  # This is an exhaustive list of all of the Kerberos 5 implementations
>  # that may be used with krb5.buildlink3.mk, in order of precedence.
>  #

These should get over a bit of confusion and leave setting KRB5_DEFAULT only to
those who expressly wish to force heimdal or mit-krb5...
-- 
Richard PALO



Home | Main Index | Thread Index | Old Index