diff options
author | jlam <jlam@pkgsrc.org> | 2004-11-19 23:16:02 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-11-19 23:16:02 +0000 |
commit | 69edfa87aa58d54daedcbe636781fb2565d2afbb (patch) | |
tree | d2a0d368e4ecdf5e812bcd5c77c91ef977bc2a59 /security/heimdal | |
parent | 8c853e6234983b24bdd6f18535024221f4ab3232 (diff) | |
download | pkgsrc-69edfa87aa58d54daedcbe636781fb2565d2afbb.tar.gz |
Correctly detect the old DES API in the OpenSSL in NetBSD's base
install. This prevents Heimdal from building and installing its own
DES library and headers. Bump the PKGREVISION.
Diffstat (limited to 'security/heimdal')
-rw-r--r-- | security/heimdal/Makefile | 20 | ||||
-rw-r--r-- | security/heimdal/buildlink3.mk | 4 | ||||
-rw-r--r-- | security/heimdal/distinfo | 4 | ||||
-rw-r--r-- | security/heimdal/patches/patch-ad | 132 |
4 files changed, 152 insertions, 8 deletions
diff --git a/security/heimdal/Makefile b/security/heimdal/Makefile index 135199c0784..12a25e4a039 100644 --- a/security/heimdal/Makefile +++ b/security/heimdal/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.27 2004/11/15 14:56:36 jlam Exp $ +# $NetBSD: Makefile,v 1.28 2004/11/19 23:16:02 jlam Exp $ DISTNAME= heimdal-0.6.3 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= security MASTER_SITES= ftp://ftp.pdc.kth.se/pub/heimdal/src/ \ ftp://ftp.sunet.se/pub/unix/admin/mirror-pdc/heimdal/src/ @@ -98,6 +98,22 @@ SUBST_SED.heimdal= \ -e "/PATH_RSH/s,/rsh,/${KRB5_PREFIX}rsh,g" \ -e "/PATH_LOGIN/s,/login,/${KRB5_PREFIX}login,g" +# The configure script only groks the OpenSSL 0.9.6 DES API, so make the +# newer OpenSSL releases look more like the old one. +# +post-buildlink: + if ${GREP} -q des_cblock ${SSLBASE}/include/openssl/des.h 2>/dev/null; then \ + : ; \ + else \ + ${MKDIR} -p ${BUILDLINK_DIR}/include/openssl; \ + if [ -f ${SSLBASE}/include/openssl/des_old.h ]; then \ + src="${SSLBASE}/include/openssl/des_old.h"; \ + else \ + src="${SSLBASE}/include/des.h"; \ + fi; \ + ${LN} -fs $$src ${BUILDLINK_DIR}/include/openssl; \ + fi + pre-configure: cd ${WRKSRC}; for file in lib/hdb/hdb.h; do \ ${SED} -e "s|/var/heimdal|${HEIMDAL_STATEDIR}|g" \ diff --git a/security/heimdal/buildlink3.mk b/security/heimdal/buildlink3.mk index 8045d50f555..76258d44153 100644 --- a/security/heimdal/buildlink3.mk +++ b/security/heimdal/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.19 2004/10/03 00:18:09 tv Exp $ +# $NetBSD: buildlink3.mk,v 1.20 2004/11/19 23:16:02 jlam Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ HEIMDAL_BUILDLINK3_MK:= ${HEIMDAL_BUILDLINK3_MK}+ @@ -14,7 +14,7 @@ BUILDLINK_PACKAGES+= heimdal .if !empty(HEIMDAL_BUILDLINK3_MK:M+) BUILDLINK_DEPENDS.heimdal+= heimdal>=0.4e -BUILDLINK_RECOMMENDED.heimdal+= heimdal>=0.6.3nb1 +BUILDLINK_RECOMMENDED.heimdal+= heimdal>=0.6.3nb2 BUILDLINK_PKGSRCDIR.heimdal?= ../../security/heimdal BUILDLINK_INCDIRS.heimdal?= include/krb5 .endif # HEIMDAL_BUILDLINK3_MK diff --git a/security/heimdal/distinfo b/security/heimdal/distinfo index b6e2b002301..9dd5e550d47 100644 --- a/security/heimdal/distinfo +++ b/security/heimdal/distinfo @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.6 2004/10/06 17:18:32 gavan Exp $ +$NetBSD: distinfo,v 1.7 2004/11/19 23:16:02 jlam Exp $ SHA1 (heimdal-0.6.3.tar.gz) = 91863a1bd9f8a55063a09c28a5f41985b7a31145 Size (heimdal-0.6.3.tar.gz) = 3333604 bytes SHA1 (patch-ab) = 400a9ac3a76ac7e8b4dcc230e0bdf7fc5222fbb7 SHA1 (patch-ac) = 121961811f559822c6a4f3d7f7e4646b16908942 -SHA1 (patch-ad) = e14359cb79eba9a3742f5cb7df4b85befc59db75 +SHA1 (patch-ad) = 72cb2bb0a92a7ddbaf02b4cedc09f7225949c578 SHA1 (patch-ae) = 518eabed07d4fc69e86ace3f02d23ca3064d4bd1 diff --git a/security/heimdal/patches/patch-ad b/security/heimdal/patches/patch-ad index 02fbccf3566..0d45845d408 100644 --- a/security/heimdal/patches/patch-ad +++ b/security/heimdal/patches/patch-ad @@ -1,6 +1,6 @@ -$NetBSD: patch-ad,v 1.2 2004/09/14 14:41:34 jlam Exp $ +$NetBSD: patch-ad,v 1.3 2004/11/19 23:16:02 jlam Exp $ ---- configure.orig Mon Sep 13 08:27:10 2004 +--- configure.orig 2004-09-13 08:27:10.000000000 -0400 +++ configure @@ -3176,9 +3176,6 @@ fi @@ -12,3 +12,131 @@ $NetBSD: patch-ad,v 1.2 2004/09/14 14:41:34 jlam Exp $ # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +@@ -22413,6 +22410,127 @@ rm -f conftest.err conftest.$ac_objext \ + LIBS="$save_LIBS" + fi + ++if test "$crypto_lib" = "unknown" -a "$with_openssl" != "no"; then ++ save_CFLAGS="$CFLAGS" ++ save_LIBS="$LIBS" ++ INCLUDE_des= ++ LIB_des= ++ if test "$with_openssl_include" != ""; then ++ INCLUDE_des="-I${with_openssl_include}" ++ fi ++ if test "$with_openssl_lib" != ""; then ++ LIB_des="-L${with_openssl_lib}" ++ fi ++ CFLAGS="-DHAVE_OPENSSL ${INCLUDE_des} ${CFLAGS}" ++ saved_LIB_des="$LIB_des" ++ for lres in "" "-lnsl -lsocket"; do ++ LIB_des="${saved_LIB_des} -ldes -lcrypto $lres" ++ LIB_des_a="$LIB_des" ++ LIB_des_so="$LIB_des" ++ LIB_des_appl="$LIB_des" ++ LIBS="${LIBS} ${LIB_des}" ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++ #undef KRB5 /* makes md4.h et al unhappy */ ++ #ifdef HAVE_OPENSSL ++ #include <openssl/md4.h> ++ #include <openssl/md5.h> ++ #include <openssl/sha.h> ++ #define OPENSSL_DES_LIBDES_COMPATIBILITY ++ #include <openssl/des.h> ++ #include <openssl/rc4.h> ++ #include <openssl/rand.h> ++ #else ++ #include <md4.h> ++ #include <md5.h> ++ #include <sha.h> ++ #include <des.h> ++ #include <rc4.h> ++ #endif ++ #ifdef OLD_HASH_NAMES ++ typedef struct md4 MD4_CTX; ++ #define MD4_Init(C) md4_init((C)) ++ #define MD4_Update(C, D, L) md4_update((C), (D), (L)) ++ #define MD4_Final(D, C) md4_finito((C), (D)) ++ typedef struct md5 MD5_CTX; ++ #define MD5_Init(C) md5_init((C)) ++ #define MD5_Update(C, D, L) md5_update((C), (D), (L)) ++ #define MD5_Final(D, C) md5_finito((C), (D)) ++ typedef struct sha SHA_CTX; ++ #define SHA1_Init(C) sha_init((C)) ++ #define SHA1_Update(C, D, L) sha_update((C), (D), (L)) ++ #define SHA1_Final(D, C) sha_finito((C), (D)) ++ #endif ++ ++int ++main () ++{ ++ ++ void *schedule = 0; ++ MD4_CTX md4; ++ MD5_CTX md5; ++ SHA_CTX sha1; ++ ++ MD4_Init(&md4); ++ MD5_Init(&md5); ++ SHA1_Init(&sha1); ++ #ifdef HAVE_OPENSSL ++ RAND_status(); ++ #endif ++ ++ des_cbc_encrypt(0, 0, 0, schedule, 0, 0); ++ RC4(0, 0, 0, 0); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ++ crypto_lib=libcrypto openssl=yes ++ echo "$as_me:$LINENO: result: libcrypto" >&5 ++echo "${ECHO_T}libcrypto" >&6 ++ ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++fi ++rm -f conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ if test "$crypto_lib" = libcrypto ; then ++ break; ++ fi ++ done ++ CFLAGS="$save_CFLAGS" ++ LIBS="$save_LIBS" ++fi ++ + if test "$crypto_lib" = "unknown"; then + + DIR_des='des' |