summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authormarkd <markd@pkgsrc.org>2012-10-10 19:45:49 +0000
committermarkd <markd@pkgsrc.org>2012-10-10 19:45:49 +0000
commit5c8da10d871154a4e721d1268254f3ac04b84f65 (patch)
tree9cadccaf1123494b92113d61ac6142a6a58b69d0 /mail
parent336db80df7bf541feb1a82f2ce472473074ed286 (diff)
downloadpkgsrc-5c8da10d871154a4e721d1268254f3ac04b84f65.tar.gz
Add heimdal support patches from imap-uw package.
Diffstat (limited to 'mail')
-rw-r--r--mail/alpine/Makefile4
-rw-r--r--mail/alpine/distinfo5
-rw-r--r--mail/alpine/options.mk21
-rw-r--r--mail/alpine/patches/patch-imap_src_c-client_auth_gss.c60
-rw-r--r--mail/alpine/patches/patch-imap_src_osdep_unix_Makefile.gss22
-rw-r--r--mail/alpine/patches/patch-imap_src_osdep_unix_kerb_mit.c25
-rw-r--r--mail/re-alpine/Makefile3
-rw-r--r--mail/re-alpine/distinfo5
-rw-r--r--mail/re-alpine/options.mk21
-rw-r--r--mail/re-alpine/patches/patch-imap_src_c-client_auth_gss.c60
-rw-r--r--mail/re-alpine/patches/patch-imap_src_osdep_unix_Makefile.gss22
-rw-r--r--mail/re-alpine/patches/patch-imap_src_osdep_unix_kerb_mit.c25
12 files changed, 254 insertions, 19 deletions
diff --git a/mail/alpine/Makefile b/mail/alpine/Makefile
index e65b83d61bb..89e8f14b4f4 100644
--- a/mail/alpine/Makefile
+++ b/mail/alpine/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.29 2012/10/08 12:19:02 asau Exp $
+# $NetBSD: Makefile,v 1.30 2012/10/10 19:45:49 markd Exp $
#
DISTNAME= alpine-2.00
-PKGREVISION= 6
+PKGREVISION= 7
CATEGORIES= mail
MASTER_SITES= ftp://ftp.cac.washington.edu/alpine/
DIST_SUBDIR= alpine-2.00a
diff --git a/mail/alpine/distinfo b/mail/alpine/distinfo
index d1b352c292f..2e44821a121 100644
--- a/mail/alpine/distinfo
+++ b/mail/alpine/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.17 2010/12/11 20:32:32 abs Exp $
+$NetBSD: distinfo,v 1.18 2012/10/10 19:45:49 markd Exp $
SHA1 (alpine-2.00a/alpine-2.00.tar.bz2) = dcbd3c5419954f484ccf706feaba31ce48cdebc4
RMD160 (alpine-2.00a/alpine-2.00.tar.bz2) = 9e67704b23b3973d8b878e65ad9e6f5026c10d13
@@ -14,3 +14,6 @@ RMD160 (alpine-2.00a/searchheader.patch.gz) = cc1b2c3cf4cbceaf62e1c0378f5edf6bee
Size (alpine-2.00a/searchheader.patch.gz) = 1708 bytes
SHA1 (patch-aa) = c306613a297d61591d577b6968a31fc85b03f852
SHA1 (patch-ab) = f0983d8c0123b06a2970eb2736b04afad1502450
+SHA1 (patch-imap_src_c-client_auth_gss.c) = 622b18f03074f87036f5469323125b4c855d9ce5
+SHA1 (patch-imap_src_osdep_unix_Makefile.gss) = ca09bc26a139c68afe8ac1f99be54bd1fc0e77f0
+SHA1 (patch-imap_src_osdep_unix_kerb_mit.c) = c77d5ee1e8aee30811c2df0562caa375ed270c0e
diff --git a/mail/alpine/options.mk b/mail/alpine/options.mk
index fa865cef94b..11a6c94ae52 100644
--- a/mail/alpine/options.mk
+++ b/mail/alpine/options.mk
@@ -1,8 +1,8 @@
-# $NetBSD: options.mk,v 1.3 2011/05/10 01:33:12 obache Exp $
+# $NetBSD: options.mk,v 1.4 2012/10/10 19:45:49 markd Exp $
#
PKG_OPTIONS_VAR= PKG_OPTIONS.alpine
-PKG_SUPPORTED_OPTIONS= fancythreads ldap maildir pinepwd alpinesearchheader
+PKG_SUPPORTED_OPTIONS= fancythreads ldap kerberos maildir pinepwd alpinesearchheader
PKG_SUGGESTED_OPTIONS= pinepwd
.include "../../mk/bsd.options.mk"
@@ -13,11 +13,18 @@ PATCHFILES+= fancy.patch.gz
PATCH_DIST_STRIP= -p1
.endif
-# not tested
-#.if !empty(PKG_OPTIONS:Mkerberos)
-#CONFIGURE_ARGS+= --with-krb5
-#.include "../../mk/krb5.buildlink3.mk"
-#.endif
+.if !empty(PKG_OPTIONS:Mkerberos)
+CONFIGURE_ARGS+= --with-krb5
+.include "../../mk/krb5.buildlink3.mk"
+MAKE_ENV+= KRB5_TYPE=${KRB5_TYPE}
+MAKE_FLAGS+= EXTRAAUTHENTICATORS=gss
+EXTRASPECIALS+= GSSDIR=${KRB5BASE}
+CFLAGS.heimdal= -DHEIMDAL_KRB5
+CFLAGS+= ${CFLAGS.${KRB5_TYPE}}
+MAKE_FLAGS+= EXTRALDFLAGS=${LDFLAGS:Q}
+MAKE_FLAGS+= EXTRACFLAGS=${CFLAGS:Q}
+MAKE_FLAGS+= EXTRASPECIALS=${EXTRASPECIALS:Q}
+.endif
.if !empty(PKG_OPTIONS:Mldap)
CONFIGURE_ARGS+= --with-ldap-dir=${BUILDLINK_PREFIX.openldap-client}
diff --git a/mail/alpine/patches/patch-imap_src_c-client_auth_gss.c b/mail/alpine/patches/patch-imap_src_c-client_auth_gss.c
new file mode 100644
index 00000000000..241d06eff71
--- /dev/null
+++ b/mail/alpine/patches/patch-imap_src_c-client_auth_gss.c
@@ -0,0 +1,60 @@
+$NetBSD: patch-imap_src_c-client_auth_gss.c,v 1.1 2012/10/10 19:45:49 markd Exp $
+
+heimdal support from imap-uw package.
+
+--- imap/src/c-client/auth_gss.c.orig 2008-06-04 18:18:34.000000000 +0000
++++ imap/src/c-client/auth_gss.c
+@@ -26,6 +26,17 @@
+ * Last Edited: 30 August 2006
+ */
+
++#ifdef HEIMDAL_KRB5
++#include <gssapi/gssapi.h>
++#ifdef GSSAPI_GSSAPI_H_ /* older heimdals use GSSAPI_H_ */
++#include <gssapi/gssapi_krb5.h>
++#endif
++#include <krb5.h>
++#define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE
++#else
++#include <gssapi/gssapi_generic.h>
++#include <gssapi/gssapi_krb5.h>
++#endif
+
+ long auth_gssapi_valid (void);
+ long auth_gssapi_client (authchallenge_t challenger,authrespond_t responder,
+@@ -64,15 +75,32 @@ long auth_gssapi_valid (void)
+ OM_uint32 smn;
+ gss_buffer_desc buf;
+ gss_name_t name;
++ krb5_context ctx;
++ krb5_keytab kt;
++ krb5_kt_cursor csr;
++
++ /* make a context */
++ if (krb5_init_context (&ctx))
++ return NIL;
+ /* make service name */
+ sprintf (tmp,"%s@%s",(char *) mail_parameters (NIL,GET_SERVICENAME,NIL),
+ mylocalhost ());
+ buf.length = strlen (buf.value = tmp);
+ /* see if can build a name */
+ if (gss_import_name (&smn,&buf,GSS_C_NT_HOSTBASED_SERVICE,&name) !=
+- GSS_S_COMPLETE) return NIL;
+- /* remove server method if no keytab */
+- if (!kerberos_server_valid ()) auth_gss.server = NIL;
++ GSS_S_COMPLETE) {
++ krb5_free_context (ctx); /* finished with context */
++ return NIL;
++ }
++
++ /* get default keytab */
++ if (!krb5_kt_default (ctx,&kt)) {
++ /* can do server if have good keytab */
++ if (!krb5_kt_start_seq_get (ctx,kt,&csr))
++ auth_gss.server = auth_gssapi_server;
++ krb5_kt_close (ctx,kt); /* finished with keytab */
++ }
++ krb5_free_context (ctx); /* finished with context */
+ gss_release_name (&smn,&name);/* finished with name */
+ return LONGT;
+ }
diff --git a/mail/alpine/patches/patch-imap_src_osdep_unix_Makefile.gss b/mail/alpine/patches/patch-imap_src_osdep_unix_Makefile.gss
new file mode 100644
index 00000000000..d27738c814b
--- /dev/null
+++ b/mail/alpine/patches/patch-imap_src_osdep_unix_Makefile.gss
@@ -0,0 +1,22 @@
+$NetBSD: patch-imap_src_osdep_unix_Makefile.gss,v 1.1 2012/10/10 19:45:49 markd Exp $
+
+heimdal support from imap-uw package.
+
+--- imap/src/osdep/unix/Makefile.gss.orig 2007-04-05 02:20:04.000000000 +0000
++++ imap/src/osdep/unix/Makefile.gss
+@@ -29,11 +29,13 @@
+ GSSDIR=/usr/local
+ GSSINCLUDE=$(GSSDIR)/include
+ GSSLIB=$(GSSDIR)/lib
+-GSSCFLAGS= -I$(GSSINCLUDE) -DGSS_C_NT_HOSTBASED_SERVICE=gss_nt_service_name -DKRB5_DEPRECATED=1
++GSSCFLAGS= -I$(GSSINCLUDE) -I$(GSSDIR)/include/krb5
+ GSSOLDLDFLAGS= -L$(GSSLIB) -lgssapi_krb5 -lkrb5 -lcrypto -lcom_err
+ GSSNEWLDFLAGS= -L$(GSSLIB) -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err
+
+ gss: # GSSAPI Kerberos V flags
+ echo $(GSSCFLAGS) >> OSCFLAGS
+- sh -c '(test -f $(GSSLIB)/libk5crypto.a) && echo $(GSSNEWLDFLAGS) || echo $(GSSOLDLDFLAGS)' >> LDFLAGS
++ sh -c '(test -f $(GSSLIB)/libk5crypto.a) && echo $(GSSNEWLDFLAGS) || echo $(GSSOLDLDFLAGS)' >> LDFLAGS.gss1
++ sh -c '(test -z "$(KRB5_CONFIG)") || $(KRB5_CONFIG) --libs gssapi' > LDFLAGS.gss2
++ sh -c '(test -z "$(KRB5_CONFIG)") && cat LDFLAGS.gss1 || cat LDFLAGS.gss2' >> LDFLAGS
+ echo "#include \"kerb_mit.c\"" >> auths.c
diff --git a/mail/alpine/patches/patch-imap_src_osdep_unix_kerb_mit.c b/mail/alpine/patches/patch-imap_src_osdep_unix_kerb_mit.c
new file mode 100644
index 00000000000..02a8a1f8bdd
--- /dev/null
+++ b/mail/alpine/patches/patch-imap_src_osdep_unix_kerb_mit.c
@@ -0,0 +1,25 @@
+$NetBSD: patch-imap_src_osdep_unix_kerb_mit.c,v 1.1 2012/10/10 19:45:49 markd Exp $
+
+heimdal support from imap-uw package.
+
+--- imap/src/osdep/unix/kerb_mit.c.orig 2008-06-04 18:18:34.000000000 +0000
++++ imap/src/osdep/unix/kerb_mit.c
+@@ -26,9 +26,18 @@
+ * Last Edited: 30 August 2006
+ */
+
++#ifdef HEIMDAL_KRB5
++#include <gssapi/gssapi.h>
++#ifdef GSSAPI_GSSAPI_H_ /* older heimdals use GSSAPI_H_ */
++#include <gssapi/gssapi_krb5.h>
++#endif
++#include <krb5.h>
++#define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE
++#else
+ #define PROTOTYPE(x) x
+ #include <gssapi/gssapi_generic.h>
+ #include <gssapi/gssapi_krb5.h>
++#endif
+
+
+ long kerberos_server_valid (void);
diff --git a/mail/re-alpine/Makefile b/mail/re-alpine/Makefile
index 117840a61e8..3e32cfd12d1 100644
--- a/mail/re-alpine/Makefile
+++ b/mail/re-alpine/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.7 2012/10/08 12:19:30 asau Exp $
+# $NetBSD: Makefile,v 1.8 2012/10/10 19:49:07 markd Exp $
#
DISTNAME= re-alpine-2.02
+PKGREVISION= 1
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=re-alpine/}
EXTRACT_SUFX= .tar.bz2
diff --git a/mail/re-alpine/distinfo b/mail/re-alpine/distinfo
index fa534ecd8d6..f3b6d84a10f 100644
--- a/mail/re-alpine/distinfo
+++ b/mail/re-alpine/distinfo
@@ -1,6 +1,9 @@
-$NetBSD: distinfo,v 1.2 2012/04/18 20:50:21 wiz Exp $
+$NetBSD: distinfo,v 1.3 2012/10/10 19:49:07 markd Exp $
SHA1 (re-alpine-2.02.tar.bz2) = 9c2f13dbc7ca75e7a09f81df607db84694b10fa6
RMD160 (re-alpine-2.02.tar.bz2) = ef7fc5b46315ec2d32ef4b4a60abd5ac1be16752
Size (re-alpine-2.02.tar.bz2) = 5589414 bytes
+SHA1 (patch-imap_src_c-client_auth_gss.c) = 622b18f03074f87036f5469323125b4c855d9ce5
+SHA1 (patch-imap_src_osdep_unix_Makefile.gss) = ca09bc26a139c68afe8ac1f99be54bd1fc0e77f0
+SHA1 (patch-imap_src_osdep_unix_kerb_mit.c) = c77d5ee1e8aee30811c2df0562caa375ed270c0e
SHA1 (patch-pith_smkeys.c) = 6b60a00910850e257f770c80a988230f73cc6d21
diff --git a/mail/re-alpine/options.mk b/mail/re-alpine/options.mk
index 6a8e60f8dbc..8d412dff5b1 100644
--- a/mail/re-alpine/options.mk
+++ b/mail/re-alpine/options.mk
@@ -1,17 +1,24 @@
-# $NetBSD: options.mk,v 1.1.1.1 2009/09/15 23:27:05 reed Exp $
+# $NetBSD: options.mk,v 1.2 2012/10/10 19:49:07 markd Exp $
#
PKG_OPTIONS_VAR= PKG_OPTIONS.alpine
-PKG_SUPPORTED_OPTIONS= ldap pinepwd
+PKG_SUPPORTED_OPTIONS= ldap kerberos pinepwd
PKG_SUGGESTED_OPTIONS= pinepwd
.include "../../mk/bsd.options.mk"
-# not tested
-#.if !empty(PKG_OPTIONS:Mkerberos)
-#CONFIGURE_ARGS+= --with-krb5
-#.include "../../mk/krb5.buildlink3.mk"
-#.endif
+.if !empty(PKG_OPTIONS:Mkerberos)
+CONFIGURE_ARGS+= --with-krb5
+.include "../../mk/krb5.buildlink3.mk"
+MAKE_ENV+= KRB5_TYPE=${KRB5_TYPE}
+MAKE_FLAGS+= EXTRAAUTHENTICATORS=gss
+EXTRASPECIALS+= GSSDIR=${KRB5BASE}
+CFLAGS.heimdal= -DHEIMDAL_KRB5
+CFLAGS+= ${CFLAGS.${KRB5_TYPE}}
+MAKE_FLAGS+= EXTRALDFLAGS=${LDFLAGS:Q}
+MAKE_FLAGS+= EXTRACFLAGS=${CFLAGS:Q}
+MAKE_FLAGS+= EXTRASPECIALS=${EXTRASPECIALS:Q}
+.endif
.if !empty(PKG_OPTIONS:Mldap)
CONFIGURE_ARGS+= --with-ldap
diff --git a/mail/re-alpine/patches/patch-imap_src_c-client_auth_gss.c b/mail/re-alpine/patches/patch-imap_src_c-client_auth_gss.c
new file mode 100644
index 00000000000..3287d854a5a
--- /dev/null
+++ b/mail/re-alpine/patches/patch-imap_src_c-client_auth_gss.c
@@ -0,0 +1,60 @@
+$NetBSD: patch-imap_src_c-client_auth_gss.c,v 1.1 2012/10/10 19:49:07 markd Exp $
+
+heimdal support from imap-uw package.
+
+--- imap/src/c-client/auth_gss.c.orig 2008-06-04 18:18:34.000000000 +0000
++++ imap/src/c-client/auth_gss.c
+@@ -26,6 +26,17 @@
+ * Last Edited: 30 August 2006
+ */
+
++#ifdef HEIMDAL_KRB5
++#include <gssapi/gssapi.h>
++#ifdef GSSAPI_GSSAPI_H_ /* older heimdals use GSSAPI_H_ */
++#include <gssapi/gssapi_krb5.h>
++#endif
++#include <krb5.h>
++#define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE
++#else
++#include <gssapi/gssapi_generic.h>
++#include <gssapi/gssapi_krb5.h>
++#endif
+
+ long auth_gssapi_valid (void);
+ long auth_gssapi_client (authchallenge_t challenger,authrespond_t responder,
+@@ -64,15 +75,32 @@ long auth_gssapi_valid (void)
+ OM_uint32 smn;
+ gss_buffer_desc buf;
+ gss_name_t name;
++ krb5_context ctx;
++ krb5_keytab kt;
++ krb5_kt_cursor csr;
++
++ /* make a context */
++ if (krb5_init_context (&ctx))
++ return NIL;
+ /* make service name */
+ sprintf (tmp,"%s@%s",(char *) mail_parameters (NIL,GET_SERVICENAME,NIL),
+ mylocalhost ());
+ buf.length = strlen (buf.value = tmp);
+ /* see if can build a name */
+ if (gss_import_name (&smn,&buf,GSS_C_NT_HOSTBASED_SERVICE,&name) !=
+- GSS_S_COMPLETE) return NIL;
+- /* remove server method if no keytab */
+- if (!kerberos_server_valid ()) auth_gss.server = NIL;
++ GSS_S_COMPLETE) {
++ krb5_free_context (ctx); /* finished with context */
++ return NIL;
++ }
++
++ /* get default keytab */
++ if (!krb5_kt_default (ctx,&kt)) {
++ /* can do server if have good keytab */
++ if (!krb5_kt_start_seq_get (ctx,kt,&csr))
++ auth_gss.server = auth_gssapi_server;
++ krb5_kt_close (ctx,kt); /* finished with keytab */
++ }
++ krb5_free_context (ctx); /* finished with context */
+ gss_release_name (&smn,&name);/* finished with name */
+ return LONGT;
+ }
diff --git a/mail/re-alpine/patches/patch-imap_src_osdep_unix_Makefile.gss b/mail/re-alpine/patches/patch-imap_src_osdep_unix_Makefile.gss
new file mode 100644
index 00000000000..75f0fd16943
--- /dev/null
+++ b/mail/re-alpine/patches/patch-imap_src_osdep_unix_Makefile.gss
@@ -0,0 +1,22 @@
+$NetBSD: patch-imap_src_osdep_unix_Makefile.gss,v 1.1 2012/10/10 19:49:07 markd Exp $
+
+heimdal support from imap-uw package.
+
+--- imap/src/osdep/unix/Makefile.gss.orig 2007-04-05 02:20:04.000000000 +0000
++++ imap/src/osdep/unix/Makefile.gss
+@@ -29,11 +29,13 @@
+ GSSDIR=/usr/local
+ GSSINCLUDE=$(GSSDIR)/include
+ GSSLIB=$(GSSDIR)/lib
+-GSSCFLAGS= -I$(GSSINCLUDE) -DGSS_C_NT_HOSTBASED_SERVICE=gss_nt_service_name -DKRB5_DEPRECATED=1
++GSSCFLAGS= -I$(GSSINCLUDE) -I$(GSSDIR)/include/krb5
+ GSSOLDLDFLAGS= -L$(GSSLIB) -lgssapi_krb5 -lkrb5 -lcrypto -lcom_err
+ GSSNEWLDFLAGS= -L$(GSSLIB) -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err
+
+ gss: # GSSAPI Kerberos V flags
+ echo $(GSSCFLAGS) >> OSCFLAGS
+- sh -c '(test -f $(GSSLIB)/libk5crypto.a) && echo $(GSSNEWLDFLAGS) || echo $(GSSOLDLDFLAGS)' >> LDFLAGS
++ sh -c '(test -f $(GSSLIB)/libk5crypto.a) && echo $(GSSNEWLDFLAGS) || echo $(GSSOLDLDFLAGS)' >> LDFLAGS.gss1
++ sh -c '(test -z "$(KRB5_CONFIG)") || $(KRB5_CONFIG) --libs gssapi' > LDFLAGS.gss2
++ sh -c '(test -z "$(KRB5_CONFIG)") && cat LDFLAGS.gss1 || cat LDFLAGS.gss2' >> LDFLAGS
+ echo "#include \"kerb_mit.c\"" >> auths.c
diff --git a/mail/re-alpine/patches/patch-imap_src_osdep_unix_kerb_mit.c b/mail/re-alpine/patches/patch-imap_src_osdep_unix_kerb_mit.c
new file mode 100644
index 00000000000..39789f57052
--- /dev/null
+++ b/mail/re-alpine/patches/patch-imap_src_osdep_unix_kerb_mit.c
@@ -0,0 +1,25 @@
+$NetBSD: patch-imap_src_osdep_unix_kerb_mit.c,v 1.1 2012/10/10 19:49:08 markd Exp $
+
+heimdal support from imap-uw package.
+
+--- imap/src/osdep/unix/kerb_mit.c.orig 2008-06-04 18:18:34.000000000 +0000
++++ imap/src/osdep/unix/kerb_mit.c
+@@ -26,9 +26,18 @@
+ * Last Edited: 30 August 2006
+ */
+
++#ifdef HEIMDAL_KRB5
++#include <gssapi/gssapi.h>
++#ifdef GSSAPI_GSSAPI_H_ /* older heimdals use GSSAPI_H_ */
++#include <gssapi/gssapi_krb5.h>
++#endif
++#include <krb5.h>
++#define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE
++#else
+ #define PROTOTYPE(x) x
+ #include <gssapi/gssapi_generic.h>
+ #include <gssapi/gssapi_krb5.h>
++#endif
+
+
+ long kerberos_server_valid (void);