pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mail/fetchmail Rework kerberos V support:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6a3c40b51313
branches:  trunk
changeset: 487891:6a3c40b51313
user:      frueauf <frueauf%pkgsrc.org@localhost>
date:      Fri Jan 21 15:46:39 2005 +0000

description:
Rework kerberos V support:
        - use kerberos instead of kerberos5 as PKG_SUPPORTED_OPTIONS
          to keep compliance with other kerberos aware packages in pkgsrc
        - use the krb5 buildlink environment
Introduce support for gssapi which was also requested in pr pkg/26170 with
the according PKG_SUPPORTED_OPTIONS. gssapi will imply kerberos5.

diffstat:

 mail/fetchmail/distinfo         |    4 +-
 mail/fetchmail/options.mk       |   26 ++-
 mail/fetchmail/patches/patch-ae |  296 +++++++++++++++++++++++++--------------
 3 files changed, 212 insertions(+), 114 deletions(-)

diffs (truncated from 995 to 300 lines):

diff -r 9c857bdf87dd -r 6a3c40b51313 mail/fetchmail/distinfo
--- a/mail/fetchmail/distinfo   Fri Jan 21 15:28:36 2005 +0000
+++ b/mail/fetchmail/distinfo   Fri Jan 21 15:46:39 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.27 2005/01/20 12:59:11 frueauf Exp $
+$NetBSD: distinfo,v 1.28 2005/01/21 15:46:39 frueauf Exp $
 
 SHA1 (fetchmail-6.2.5.tar.gz) = 4656ec4393ccd1c137fe7b331f77cb26b576ac0e
 Size (fetchmail-6.2.5.tar.gz) = 1257376 bytes
@@ -6,5 +6,5 @@
 SHA1 (patch-ab) = 009a97639502365f8b6ec4e854622620391a812f
 SHA1 (patch-ac) = ef0e651807bb0942ca79ed3b10ffc000f71bd330
 SHA1 (patch-ad) = b6bffc59f28992fa0d3de0f9dad250c73bbeffc6
-SHA1 (patch-ae) = 852a18b86dcbd645df233e2b08134064dd9a7b20
+SHA1 (patch-ae) = b3eafbf6201543cdad126ec69ceca23a41f4d392
 SHA1 (patch-af) = 06e7b84566b0d3ed50b56f88baf23f15ae21eb21
diff -r 9c857bdf87dd -r 6a3c40b51313 mail/fetchmail/options.mk
--- a/mail/fetchmail/options.mk Fri Jan 21 15:28:36 2005 +0000
+++ b/mail/fetchmail/options.mk Fri Jan 21 15:46:39 2005 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: options.mk,v 1.6 2005/01/20 12:59:11 frueauf Exp $
+# $NetBSD: options.mk,v 1.7 2005/01/21 15:46:39 frueauf Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.fetchmail
-PKG_SUPPORTED_OPTIONS= inet6 kerberos4 kerberos5 ssl
+PKG_SUPPORTED_OPTIONS= inet6 kerberos4 kerberos gssapi ssl
 
 .if !defined(PKG_OPTIONS.fetchmail)
 PKG_DEFAULT_OPTIONS+=  ssl
@@ -17,10 +17,21 @@
 .endif
 
 ###
-### KPOP (POP3 + Kerberos 4) support.
+### Authentication via GSSAPI (currently only over Kerberos V) support.
+###
+.if !empty(PKG_OPTIONS:Mgssapi)
+PKG_OPTIONS+=          kerberos
+CONFIGURE_ARGS+=       --with-gssapi=${KRB5BASE}
+.else
+CONFIGURE_ARGS+=       --with-gssapi=no
+.endif
+
+###
+### KPOP (POP3 + Kerberos IV) support.
 ###
 .if !empty(PKG_OPTIONS:Mkerberos4)
 CRYPTO+=               uses Kerberos encryption code
+PKG_USE_KERBEROS=      # defined
 CONFIGURE_ARGS+=       --with-kerberos=yes
 .  if empty(MACHINE_PLATFORM:MNetBSD-1.[0-4]*-i386)
 REPLACE_KERBEROS_LIBS= yes
@@ -30,11 +41,12 @@
 .endif
 
 ###
-### Kerberos 5 / GSSAPI support.
+### Kerberos V support.
 ###
-.if !empty(PKG_OPTIONS:Mkerberos5)
-CRYPTO+=                uses Kerberos encryption code
-CONFIGURE_ARGS+=        --with-kerberos5=yes
+.if !empty(PKG_OPTIONS:Mkerberos)
+.  include "../../mk/krb5.buildlink3.mk"
+PKG_USE_KERBEROS=      # defined
+CONFIGURE_ARGS+=        --with-kerberos5=${KRB5BASE}
 .else
 CONFIGURE_ARGS+=        --with-kerberos5=no
 .endif
diff -r 9c857bdf87dd -r 6a3c40b51313 mail/fetchmail/patches/patch-ae
--- a/mail/fetchmail/patches/patch-ae   Fri Jan 21 15:28:36 2005 +0000
+++ b/mail/fetchmail/patches/patch-ae   Fri Jan 21 15:46:39 2005 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ae,v 1.13 2005/01/20 12:59:11 frueauf Exp $
+$NetBSD: patch-ae,v 1.14 2005/01/21 15:46:39 frueauf Exp $
 
 --- configure.in.orig  Fri Oct 10 10:36:57 2003
-+++ configure.in       Thu Jan 20 13:02:54 2005
-@@ -434,6 +434,13 @@
++++ configure.in       Fri Jan 21 15:50:47 2005
+@@ -434,10 +434,21 @@
    AC_DEFINE(KERBEROS_V5)
    CEFLAGS="$CEFLAGS -I/usr/include/kerberosV"
    LIBS="$LIBS -lasn1 -lkrb5 -lcom_err -lkafs"
@@ -16,25 +16,68 @@
  else
    if test "$with_kerberos5" != "yes" 
    then
-@@ -700,13 +707,13 @@
-   fi
-   if test "$with_gssapi" != "yes" -a -n "$with_gssapi"
-   then
--    CFLAGS="$CFLAGS -I$with_gssapi/include"
-+    CFLAGS="$CFLAGS -I$with_gssapi/include/gssapi"
+       LDEFLAGS="$LDEFLAGS -L${with_kerberos5}/lib"
++      if test `uname` = "NetBSD"
++      then
++      CEFLAGS="$CEFLAGS -I/usr/include/krb5"
++      fi
+       searchdirs="$with_kerberos5"
+   else
+       searchdirs="/usr/kerberos /usr/local/krb5 /usr/athena /usr"
+@@ -445,12 +456,17 @@
+   with_kerberos5=
+   for dir in $searchdirs
+   do AC_MSG_CHECKING([for Kerberos V in $dir])
+-     if test -f "$dir/include/krb5.h"
++     if test -f "$dir/include/krb5.h" || test -f "$dir/include/krb5/krb5.h"
+      then
+         ac_krblibs=
+-        if test -f "$dir/include/roken.h"
++        if test -f "$dir/include/roken.h" || test -f "$dir/include/krb5/roken.h"
+         then
+-           ac_krblibs="-lasn1 -lroken -lcom_err"
++           if test `uname` = "NetBSD"
++           then
++             ac_krblibs="-lasn1 -lroken -lcom_err -ldes"
++           else
++             ac_krblibs="-lasn1 -lroken -lcom_err"
++         fi
+            AC_MSG_RESULT([Heimdal found])
+           dnl Attempt to detect if we need to -ldb2 to link Heimdal
+           dnl we assume we do if it is available
+@@ -704,9 +720,14 @@
      LDFLAGS="$LDFLAGS -L$with_gssapi/lib"
    fi
  
 -  if test -f "$with_gssapi/include/roken.h"
-+  if test -f "$with_gssapi/include/krb5/roken.h"
++  if test -f "$with_gssapi/include/roken.h" || test -f "$with_gssapi/include/krb5/roken.h"
    then
 -     LIBS="$LIBS -lkrb5 -lasn1 -ldes -lroken -ldb -ldl"
-+     LIBS="$LIBS -lkrb5 -lasn1 -ldes -lroken"
++     if test `uname` = "NetBSD"
++     then
++       LIBS="$LIBS -lkrb5 -lasn1 -ldes -lroken"
++     else
++       LIBS="$LIBS -lkrb5 -lasn1 -ldes -lroken -ldb -ldl"
++     fi
       AC_CHECK_LIB(gssapi, gss_init_sec_context,LIBS="$LIBS -lgssapi",
                    AC_MSG_ERROR([could not find libgssapi which is needed for GSSAPI support]), )
       AC_DEFINE(HEIMDAL)
+@@ -716,7 +737,12 @@
+   fi
+   AC_DEFINE(GSSAPI)
+   save_CPPFLAGS=$CPPFLAGS
+-  CPPFLAGS="-I$with_gssapi/include"
++  if test `uname` = "NetBSD"
++  then
++    CPPFLAGS="-I$with_gssapi/include -I$with_gssapi/include/krb5"
++  else
++    CPPFLAGS="-I$with_gssapi/include"
++  fi
+   AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h gssapi/gssapi_generic.h)
+   if test "$ac_cv_header_gssapi_h" = "yes"; then
+     AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi.h, AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE))
 --- configure.orig     Fri Oct 10 10:39:54 2003
-+++ configure  Thu Jan 20 13:04:41 2005
++++ configure  Fri Jan 21 15:53:40 2005
 @@ -1,9 +1,8 @@
  #! /bin/sh
  # Guess values for system-dependent variables and create Makefiles.
@@ -6047,7 +6090,7 @@
  ## ------------------------------------ ##
  _ASBOX
      ) |
-@@ -12796,6 +13902,20 @@
+@@ -12796,10 +13902,28 @@
  
    CEFLAGS="$CEFLAGS -I/usr/include/kerberosV"
    LIBS="$LIBS -lasn1 -lkrb5 -lcom_err -lkafs"
@@ -6068,7 +6111,36 @@
  else
    if test "$with_kerberos5" != "yes"
    then
-@@ -12824,7 +13944,6 @@
+       LDEFLAGS="$LDEFLAGS -L${with_kerberos5}/lib"
++      if test `uname` = "NetBSD"
++      then
++      CEFLAGS="$CEFLAGS -I/usr/include/krb5"
++      fi
+       searchdirs="$with_kerberos5"
+   else
+       searchdirs="/usr/kerberos /usr/local/krb5 /usr/athena /usr"
+@@ -12808,12 +13932,17 @@
+   for dir in $searchdirs
+   do echo "$as_me:$LINENO: checking for Kerberos V in $dir" >&5
+ echo $ECHO_N "checking for Kerberos V in $dir... $ECHO_C" >&6
+-     if test -f "$dir/include/krb5.h"
++     if test -f "$dir/include/krb5.h" || test -f "$dir/include/krb5/krb5.h"
+      then
+         ac_krblibs=
+-        if test -f "$dir/include/roken.h"
++        if test -f "$dir/include/roken.h" || test -f "$dir/include/krb5/roken.h"
+         then
+-           ac_krblibs="-lasn1 -lroken -lcom_err"
++           if test `uname` = "NetBSD"
++           then
++             ac_krblibs="-lasn1 -lroken -lcom_err -ldes"
++           else
++             ac_krblibs="-lasn1 -lroken -lcom_err"
++         fi
+            echo "$as_me:$LINENO: result: Heimdal found" >&5
+ echo "${ECHO_T}Heimdal found" >&6
+                                echo "$as_me:$LINENO: checking for db_open in -ldb2" >&5
+@@ -12824,7 +13953,6 @@
    ac_check_lib_save_LIBS=$LIBS
  LIBS="-ldb2 ${LDEFLAGS} $LIBS"
  cat >conftest.$ac_ext <<_ACEOF
@@ -6076,7 +6148,7 @@
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
-@@ -12848,11 +13967,21 @@
+@@ -12848,11 +13976,21 @@
  _ACEOF
  rm -f conftest.$ac_objext conftest$ac_exeext
  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -6100,7 +6172,7 @@
    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    (eval $ac_try) 2>&5
    ac_status=$?
-@@ -12865,7 +13994,8 @@
+@@ -12865,7 +14003,8 @@
  
  ac_cv_lib_db2_db_open=no
  fi
@@ -6110,7 +6182,7 @@
  LIBS=$ac_check_lib_save_LIBS
  fi
  echo "$as_me:$LINENO: result: $ac_cv_lib_db2_db_open" >&5
-@@ -12882,7 +14012,6 @@
+@@ -12882,7 +14021,6 @@
    ac_check_lib_save_LIBS=$LIBS
  LIBS="-ldes ${LDEFLAGS} ${ac_krblibs} $LIBS"
  cat >conftest.$ac_ext <<_ACEOF
@@ -6118,7 +6190,7 @@
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
-@@ -12906,11 +14035,21 @@
+@@ -12906,11 +14044,21 @@
  _ACEOF
  rm -f conftest.$ac_objext conftest$ac_exeext
  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -6142,7 +6214,7 @@
    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    (eval $ac_try) 2>&5
    ac_status=$?
-@@ -12923,7 +14062,8 @@
+@@ -12923,7 +14071,8 @@
  
  ac_cv_lib_des_des_string_to_key=no
  fi
@@ -6152,7 +6224,7 @@
  LIBS=$ac_check_lib_save_LIBS
  fi
  echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_string_to_key" >&5
-@@ -12940,7 +14080,6 @@
+@@ -12940,7 +14089,6 @@
    ac_check_lib_save_LIBS=$LIBS
  LIBS="-lssl ${LDEFLAGS} ${ac_krblibs} $LIBS"
  cat >conftest.$ac_ext <<_ACEOF
@@ -6160,7 +6232,7 @@
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
-@@ -12964,11 +14103,21 @@
+@@ -12964,11 +14112,21 @@
  _ACEOF
  rm -f conftest.$ac_objext conftest$ac_exeext
  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -6184,7 +6256,7 @@
    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    (eval $ac_try) 2>&5
    ac_status=$?
-@@ -12981,7 +14130,8 @@
+@@ -12981,7 +14139,8 @@
  
  ac_cv_lib_ssl_MD5_Init=no
  fi
@@ -6194,7 +6266,7 @@
  LIBS=$ac_check_lib_save_LIBS
  fi
  echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_MD5_Init" >&5
-@@ -13017,7 +14167,6 @@
+@@ -13017,7 +14176,6 @@
    ac_check_lib_save_LIBS=$LIBS
  LIBS="-lcrypto ${LDEFLAGS} ${ac_krblibs} $LIBS"
  cat >conftest.$ac_ext <<_ACEOF
@@ -6202,7 +6274,7 @@
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
-@@ -13041,11 +14190,21 @@
+@@ -13041,11 +14199,21 @@
  _ACEOF
  rm -f conftest.$ac_objext conftest$ac_exeext
  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -6226,7 +6298,7 @@



Home | Main Index | Thread Index | Old Index