aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2002-12-24 18:40:10 +0800
committerdinoex <dinoex@FreeBSD.org>2002-12-24 18:40:10 +0800
commitb65478ba6526fdb008877134739a56497144c8f0 (patch)
tree2a85aecb97a024faee41effc820ea155cc6ec615
parentb6762454237b4253595fbaa8e0c3282bb0831009 (diff)
downloadfreebsd-ports-gnome-b65478ba6526fdb008877134739a56497144c8f0.tar.gz
freebsd-ports-gnome-b65478ba6526fdb008877134739a56497144c8f0.tar.zst
freebsd-ports-gnome-b65478ba6526fdb008877134739a56497144c8f0.zip
- Fix build with threads
- Fix build under current - Fix build with krb5
-rw-r--r--security/lsh/Makefile27
-rw-r--r--security/lsh/distinfo2
-rw-r--r--security/lsh/files/patch-Makefile.in11
-rw-r--r--security/lsh/files/patch-argp-help.c19
-rw-r--r--security/lsh/files/patch-configure11
-rw-r--r--security/lsh/files/patch-des-compat.c32
-rw-r--r--security/lsh/files/patch-lsh-authorize50
-rw-r--r--security/lsh/files/patch-nettle-benchmark.c70
-rw-r--r--security/lsh/pkg-plist42
9 files changed, 215 insertions, 49 deletions
diff --git a/security/lsh/Makefile b/security/lsh/Makefile
index 2dd212cf64c5..9670dccb9d57 100644
--- a/security/lsh/Makefile
+++ b/security/lsh/Makefile
@@ -5,7 +5,7 @@
# $FreeBSD$
PORTNAME= lsh
-PORTVERSION= 1.0
+PORTVERSION= 1.4.2
CATEGORIES= security ipv6
MASTER_SITES= ftp://ftp.lysator.liu.se/pub/security/lsh/%SUBDIR%/
MASTER_SITE_SUBDIR= . old
@@ -13,29 +13,36 @@ DISTNAME= ${PORTNAME}-${PORTVERSION}
MAINTAINER= dinoex@FreeBSD.org
+BUILD_DEPENDS+= ${LOCALBASE}/include/gmp.h:${PORTSDIR}/math/libgmp4
+LIB_DEPENDS+= oop:${PORTSDIR}/devel/liboop
+
RESTRICTED= "Crypto; export-controlled"
GNU_CONFIGURE= yes
+USE_GMAKE= yes
INSTALL_TARGET= install
MAN1= lsh_writekey.1 lsh_keygen.1 lsh.1
MAN5= DSA.5 secsh.5 SHA.5 SPKI.5
MAN8= lshd.8
+CONFIGURE_ARGS+= --with-include-path=${LOCALBASE}/include
+CONFIGURE_ARGS+= --with-lib-path=${LOCALBASE}/lib
+LDFLAGS+= ${PTHREAD_LIBS}
+CFLAGS+= ${PTHREAD_CFLAGS:S=""==}
+CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}"
+FIXME= src/nettle/x86/aes.asm
+.if defined(KRB5_HOME) && exists(${KRB5_HOME})
+PLIST_SUB+= KRB=""
+.else
+PLIST_SUB+= KRB="@comment "
+.endif
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 400014
CONFIGURE_ARGS+= --without-ipv6
.endif
-.if ${OSVERSION} >= 500000
-BUILD_DEPENDS+= ${LOCALBASE}/include/gmp.h:${PORTSDIR}/math/libgmp4
-CONFIGURE_ARGS+= --with-include-path=${LOCALBASE}/include
-CONFIGURE_ARGS+= --with-lib-path=${LOCALBASE}/lib
-.endif
-.if ${OSVERSION} >= 500043
-BROKEN= conflicts with /usr/include/getopt.h
-.endif
post-install:
-.for BIN in lsh lsh_keygen lsh_writekey sexp-conv srp-gen lsh-decode-key
+.for BIN in lsh lsh-keygen lsh-writekey sexp-conv srp-gen lsh-decode-key
strip ${PREFIX}/bin/${BIN}
.endfor
.for SBIN in lshd lsh_proxy
diff --git a/security/lsh/distinfo b/security/lsh/distinfo
index 5da1d48c51a5..1f87b6e96308 100644
--- a/security/lsh/distinfo
+++ b/security/lsh/distinfo
@@ -1 +1 @@
-MD5 (lsh-1.0.tar.gz) = 2fc3ddc6b107d03e90e4d80a3c87bf53
+MD5 (lsh-1.4.2.tar.gz) = ed9b090f375830c219141098b7f25555
diff --git a/security/lsh/files/patch-Makefile.in b/security/lsh/files/patch-Makefile.in
new file mode 100644
index 000000000000..51fa9ba88e05
--- /dev/null
+++ b/security/lsh/files/patch-Makefile.in
@@ -0,0 +1,11 @@
+--- src/testsuite/Makefile.in.orig Thu Jun 27 20:50:33 2002
++++ src/testsuite/Makefile.in Wed Dec 18 07:26:20 2002
+@@ -122,7 +122,7 @@
+ noinst_PROGRAMS = $(TS_PROGS)
+
+ LDADD = testutils.o ../liblsh.a ../nettle/libnettle.a \
+- $(addprefix ../,@LIBARGP@)
++ ../@LIBARGP@
+
+
+ EXTRA_DIST = testutils.c testutils.h $(TS_SH) $(TS_MORE_SH) \
diff --git a/security/lsh/files/patch-argp-help.c b/security/lsh/files/patch-argp-help.c
index ea25b96b774f..5def26afdc0b 100644
--- a/security/lsh/files/patch-argp-help.c
+++ b/security/lsh/files/patch-argp-help.c
@@ -1,6 +1,6 @@
---- src/argp/argp-help.c.orig Wed Feb 2 15:14:31 2000
-+++ src/argp/argp-help.c Tue Dec 17 13:08:02 2002
-@@ -56,7 +56,9 @@
+--- src/argp/argp-help.c.orig Tue Jan 2 22:36:35 2001
++++ src/argp/argp-help.c Wed Dec 18 05:22:38 2002
+@@ -50,7 +50,9 @@
#include <string.h>
#include <assert.h>
#include <stdarg.h>
@@ -9,8 +9,8 @@
+#endif
#include <ctype.h>
- #ifndef _
-@@ -182,7 +184,7 @@
+
+@@ -196,7 +198,7 @@
{ "header-col", 0, offsetof (struct uparams, header_col) },
{ "usage-indent", 0, offsetof (struct uparams, usage_indent) },
{ "rmargin", 0, offsetof (struct uparams, rmargin) },
@@ -19,3 +19,12 @@
};
/* Read user options from the environment, and fill in UPARAMS appropiately. */
+@@ -1114,7 +1116,7 @@
+ int old_wm = __argp_fmtstream_wmargin (stream);
+ /* PEST is a state block holding some of our variables that we'd like to
+ share with helper functions. */
+-#ifdef __GNUC__
++#if defined(__GNUC__) && !defined(__FreeBSD__)
+ struct pentry_state pest = { entry, stream, hhstate, 1, state };
+ #else /* !__GNUC__ */
+ /* Decent initializers are a GNU extension */
diff --git a/security/lsh/files/patch-configure b/security/lsh/files/patch-configure
new file mode 100644
index 000000000000..18c05027ecf2
--- /dev/null
+++ b/security/lsh/files/patch-configure
@@ -0,0 +1,11 @@
+--- configure.orig Thu Jun 27 20:05:45 2002
++++ configure Wed Dec 18 07:15:14 2002
+@@ -1980,7 +1980,7 @@
+ fi;
+
+ if test x$with_lib_path != x ; then
+- LDFLAGS="-L `echo $with_lib_path | sed 's/:/ -L /g'`"
++ LDFLAGS="$LDFLAGS -L `echo $with_lib_path | sed 's/:/ -L /g'`"
+ fi
+
+ echo "$as_me:$LINENO: checking for -R flag" >&5
diff --git a/security/lsh/files/patch-des-compat.c b/security/lsh/files/patch-des-compat.c
new file mode 100644
index 000000000000..04bd0bdd2f9f
--- /dev/null
+++ b/security/lsh/files/patch-des-compat.c
@@ -0,0 +1,32 @@
+--- src/nettle/des-compat.c.orig Tue Sep 25 19:22:10 2001
++++ src/nettle/des-compat.c Wed Dec 18 05:27:13 2002
+@@ -61,7 +61,14 @@
+ des_key_schedule k1, des_key_schedule k2,
+ des_key_schedule k3, int enc)
+ {
++#ifndef __FreeBSD__
+ struct des_compat_des3 keys = { { k1, k2, k3 } };
++#else
++ struct des_compat_des3 keys;
++ keys.keys[1] = k1;
++ keys.keys[2] = k1;
++ keys.keys[3] = k3;
++#endif
+
+ ((enc == DES_ENCRYPT) ? des_compat_des3_encrypt : des_compat_des3_decrypt)
+ (&keys, DES_BLOCK_SIZE, *dst, *src);
+@@ -142,7 +149,14 @@
+ des_cblock *iv,
+ int enc)
+ {
++#ifndef __FreeBSD__
+ struct des_compat_des3 keys = { { k1, k2, k3 } };
++#else
++ struct des_compat_des3 keys;
++ keys.keys[1] = k1;
++ keys.keys[2] = k1;
++ keys.keys[3] = k3;
++#endif
+
+ switch (enc)
+ {
diff --git a/security/lsh/files/patch-lsh-authorize b/security/lsh/files/patch-lsh-authorize
index fd367474558e..e8f46c7c132c 100644
--- a/security/lsh/files/patch-lsh-authorize
+++ b/security/lsh/files/patch-lsh-authorize
@@ -1,5 +1,5 @@
---- src/lsh-authorize.orig Tue Jul 11 13:56:07 2000
-+++ src/lsh-authorize Tue Jul 11 14:00:58 2000
+--- src/lsh-authorize.orig Tue Mar 26 16:40:49 2002
++++ src/lsh-authorize Wed Dec 18 05:01:48 2002
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/sh
@@ -15,27 +15,22 @@
if mkdir $1 2>/dev/null; then
echo Created $1
chmod $2 $1 || exit 1
-@@ -37,26 +37,27 @@
- }
+@@ -40,23 +40,25 @@
+ create_dir $HOME/.lsh 0700
+ create_dir $HOME/.lsh/authorized_keys_sha1 0700
- # Create directories
--create_dir ~/.lsh 0700
--create_dir ~/.lsh/authorized_keys_sha1 0700
-+create-dir ~/.lsh 0700
-+create-dir ~/.lsh/authorized_keys_sha1 0700
-
--if type sexp-conv ; then
-- SEXP_CONV=sexp_conv
+-if type sexp-conv >/dev/null 2>&1 ; then
+- SEXP_CONV=sexp-conv
-else
-- SEXP_CONV=./sexp_conv
+- SEXP_CONV=./sexp-conv
-fi
+PATH=$PATH:`dirname $0`
--if ! type $SEXP_CONV ; then
-- echo "Can't find the sexp_conv program"
+-if type $SEXP_CONV >/dev/null 2>&1 ; then : ; else
+- echo "Can't find the sexp-conv program"
- exit 1
-fi
-+SEXP_CONV="sexp_conv"
++SEXP_CONV="sexp-conv"
while [ $# != 0 ]; do
- hash=`$SEXP_CONV < $1 --once --hash sha1 --raw-hash`
@@ -43,18 +38,19 @@
- echo $0: File $1 not found.
- else
+ if [ -f $1 ]; then
-+ hash=`$SEXP_CONV < $1 --once --hash sha1 --raw-hash`
-+ if [ $? = 127 ]; then
-+ echo "Can't find the sexp_conv program"
-+ exit 1
-+ fi
-+ if [ -z "$hash" ] ; then
-+ echo $0: File $1 not readable
-+ else
- $SEXP_CONV < $1 -f canonical --once > ~/.lsh/authorized_keys_sha1/$hash
-+ fi
++ hash=`$SEXP_CONV < $1 --once --hash sha1 --raw-hash`
++ if [ $? = 127 ]; then
++ echo "Can't find the sexp_conv program"
++ exit 1
++ fi
++ if [ -z "$hash" ] ; then
++ echo $0: File $1 not readable
++ else
+ $SEXP_CONV < $1 -f canonical --once > $HOME/.lsh/authorized_keys_sha1/$hash
++ fi
+ else
-+ echo $0: File $1 not found.
++ echo $0: File $1 not found.
fi
shift
done
++
diff --git a/security/lsh/files/patch-nettle-benchmark.c b/security/lsh/files/patch-nettle-benchmark.c
new file mode 100644
index 000000000000..6c9e881d190a
--- /dev/null
+++ b/security/lsh/files/patch-nettle-benchmark.c
@@ -0,0 +1,70 @@
+--- src/nettle/examples/nettle-benchmark.c.orig Fri Feb 15 11:09:13 2002
++++ src/nettle/examples/nettle-benchmark.c Wed Dec 18 05:34:29 2002
+@@ -169,8 +169,15 @@
+ init_data(data);
+
+ {
++#ifndef __FreeBSD__
+ struct bench_cipher_info info
+ = { ctx, cipher->encrypt, data };
++#else
++ struct bench_cipher_info info;
++ info.ctx = ctx;
++ info.crypt = cipher->encrypt;
++ info.data = data;
++#endif
+
+ init_key(cipher->key_size, key);
+ cipher->set_encrypt_key(ctx, cipher->key_size, key);
+@@ -180,8 +187,15 @@
+ }
+
+ {
++#ifndef __FreeBSD__
+ struct bench_cipher_info info
+ = { ctx, cipher->decrypt, data };
++#else
++ struct bench_cipher_info info;
++ info.ctx = ctx;
++ info.crypt = cipher->decrypt;
++ info.data = data;
++#endif
+
+ init_key(cipher->key_size, key);
+ cipher->set_decrypt_key(ctx, cipher->key_size, key);
+@@ -196,8 +210,17 @@
+
+ /* Do CBC mode */
+ {
++#ifndef __FreeBSD__
+ struct bench_cbc_info info
+ = { ctx, cipher->encrypt, data, cipher->block_size, iv };
++#else
++ struct bench_cbc_info info;
++ info.ctx = ctx;
++ info.crypt = cipher->encrypt;
++ info.data = data;
++ info.block_size = cipher->block_size;
++ info.iv = iv;
++#endif
+
+ memset(iv, 0, sizeof(iv));
+
+@@ -208,8 +231,17 @@
+ }
+
+ {
++#ifndef __FreeBSD__
+ struct bench_cbc_info info
+ = { ctx, cipher->decrypt, data, cipher->block_size, iv };
++#else
++ struct bench_cbc_info info;
++ info.ctx = ctx;
++ info.crypt = cipher->decrypt;
++ info.data = data;
++ info.block_size = cipher->block_size;
++ info.iv = iv;
++#endif
+
+ memset(iv, 0, sizeof(iv));
+
diff --git a/security/lsh/pkg-plist b/security/lsh/pkg-plist
index a1f851d10b86..63698455124a 100644
--- a/security/lsh/pkg-plist
+++ b/security/lsh/pkg-plist
@@ -1,13 +1,43 @@
+bin/lsftp
bin/lsh
-bin/lsh_keygen
-bin/lsh_writekey
-bin/sexp-conv
bin/lsh-authorize
-bin/srp-gen
bin/lsh-decode-key
+bin/lsh-export-key
+bin/lsh-keygen
+bin/lsh-make-seed
+bin/lsh-writekey
+bin/lshg
+bin/sexp-conv
+bin/srp-gen
bin/ssh-conv
-sbin/lshd
-sbin/lsh_proxy
+include/nettle/aes.h
+include/nettle/arcfour.h
+include/nettle/base64.h
+include/nettle/blowfish.h
+include/nettle/cast128.h
+include/nettle/cbc.h
+include/nettle/des-compat.h
+include/nettle/des.h
+include/nettle/hmac.h
+include/nettle/knuth-lfib.h
+include/nettle/md5-compat.h
+include/nettle/md5.h
+include/nettle/nettle-meta.h
+include/nettle/rsa.h
+include/nettle/serpent.h
+include/nettle/sha.h
+include/nettle/twofish.h
+include/nettle/yarrow.h
@unexec install-info --delete %D/info/lsh.info %D/info/dir
info/lsh.info
+info/nettle.info
+info/nettle.info-1
+info/nettle.info-2
@exec install-info --section="Miscellaneous" --entry="* LSH: (lsh). lsh secure remote shell documentation." %D/info/lsh.info %D/info/dir
+lib/libnettle.a
+sbin/lsh-execuv
+%%KRB%%sbin/lsh-krb-checkpw
+sbin/lsh-pam-checkpw
+sbin/lsh_proxy
+sbin/lshd
+sbin/sftp-server