From 103e0ae1af2275b4abec968ba50332fb9d6b1ccb Mon Sep 17 00:00:00 2001 From: Ned Ludd Date: Tue, 8 Mar 2005 21:10:02 +0000 Subject: - Version bump. Adds support for pam and minimal (Portage version: 2.0.51-r15) --- net-misc/dropbear/ChangeLog | 8 ++- net-misc/dropbear/Manifest | 17 ++---- net-misc/dropbear/dropbear-0.45.ebuild | 63 ++++++++++++++++++++++ net-misc/dropbear/files/digest-dropbear-0.45 | 1 + .../dropbear/files/dropbear-0.45-urandom.patch | 57 ++++++++++++++++++++ 5 files changed, 133 insertions(+), 13 deletions(-) create mode 100644 net-misc/dropbear/dropbear-0.45.ebuild create mode 100644 net-misc/dropbear/files/digest-dropbear-0.45 create mode 100644 net-misc/dropbear/files/dropbear-0.45-urandom.patch (limited to 'net-misc') diff --git a/net-misc/dropbear/ChangeLog b/net-misc/dropbear/ChangeLog index dc4f0b81a516..2a07e1347cde 100644 --- a/net-misc/dropbear/ChangeLog +++ b/net-misc/dropbear/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-misc/dropbear # Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dropbear/ChangeLog,v 1.15 2005/01/11 20:04:35 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/dropbear/ChangeLog,v 1.16 2005/03/08 21:10:02 solar Exp $ + +*dropbear-0.45 (08 Mar 2005) + + 08 Mar 2005; +files/dropbear-0.45-urandom.patch, + +dropbear-0.45.ebuild: + - Version bump. Adds support for pam and minimal support *dropbear-0.44 (11 Jan 2005) diff --git a/net-misc/dropbear/Manifest b/net-misc/dropbear/Manifest index d7616f2ea407..4243475766d5 100644 --- a/net-misc/dropbear/Manifest +++ b/net-misc/dropbear/Manifest @@ -1,18 +1,11 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -MD5 c0d18a4acbaad0241789942573a32957 ChangeLog 2134 +MD5 cedda67b36aa863a680ee0e85d1b8cd0 dropbear-0.45.ebuild 1828 +MD5 8bd2e66c29adf48cfee62e3875a9ba0a dropbear-0.44.ebuild 1426 MD5 eca949c2fcf358c97cbf8071bf15e3ae dropbear-0.43.ebuild 1685 +MD5 653d5cf9e070681ce892e44829e327e7 ChangeLog 2319 MD5 ef25f543b5438ee7595e2ae0f98a5093 metadata.xml 671 -MD5 8bd2e66c29adf48cfee62e3875a9ba0a dropbear-0.44.ebuild 1426 MD5 64abc6b82756a97391c12d730c8da084 files/dropbear.conf.d 352 MD5 34fea1c967596ebcd6d10d38444f2b92 files/dropbear.init.d 913 +MD5 2f5c2ef2e357aa5225c9044f33fa2512 files/dropbear-0.45-urandom.patch 1887 MD5 c3634543250cd9f910161b351bb15ccc files/digest-dropbear-0.43 67 MD5 80f623a0803053ed01024f1419ba608c files/digest-dropbear-0.44 67 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.9.14 (GNU/Linux) - -iD8DBQFB5DHVroRuSHgZdywRAs7UAJ4qTaBz32V3osjv9u70SatplQ8uVgCfX1Di -e6coGoCG+Mt+WmfsuTdPCP0= -=H7EC ------END PGP SIGNATURE----- +MD5 c9381e8354263ae69eda6efabca753ad files/digest-dropbear-0.45 67 diff --git a/net-misc/dropbear/dropbear-0.45.ebuild b/net-misc/dropbear/dropbear-0.45.ebuild new file mode 100644 index 000000000000..ca1a85e53ced --- /dev/null +++ b/net-misc/dropbear/dropbear-0.45.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/dropbear/dropbear-0.45.ebuild,v 1.1 2005/03/08 21:10:02 solar Exp $ + +inherit eutils + +DESCRIPTION="small SSH 2 client/server designed for small memory environments" +HOMEPAGE="http://matt.ucc.asn.au/dropbear/" +SRC_URI="http://matt.ucc.asn.au/dropbear/releases/${P}.tar.bz2 + http://matt.ucc.asn.au/dropbear/testing/${P}.tar.bz2" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~sparc ~sh ~x86" +IUSE="minimal multicall pam static zlib" + +RDEPEND="zlib? ( sys-libs/zlib ) + pam? ( sys-libs/pam )" +DEPEND="${RDEPEND} + >=sys-apps/portage-2.0.51" + +set_options() { + use minimal \ + && progs="dropbear dbclient dropbearkey" \ + || progs="dropbear dbclient dropbearkey dropbearconvert scp" + use multicall && makeopts="${makeopts} MULTI=1" + use static && makeopts="${makeopts} STATIC=1" +} + +src_unpack() { + unpack ${A} + epatch ${FILESDIR}/dropbear-0.45-urandom.patch || die +} + +src_compile() { + local myconf + # --disable-syslog? wouldn't need logger in init.d + use minimal && myconf="--disable-lastlog" + econf ${myconf} $(use_enable zlib) $(use_enable pam) || die + set_options + emake ${makeopts} PROGRAMS="${progs}" || die "make failed" +} + +src_install() { + set_options + make install DESTDIR="${D}" ${makeopts} PROGRAMS="${progs}" || die "make install failed" + newinitd ${FILESDIR}/dropbear.init.d dropbear + newconfd ${FILESDIR}/dropbear.conf.d dropbear + dodoc CHANGES README TODO SMALL MULTI + + # The multi install target does not install the links + if use multicall ; then + cd "${D}"/usr/bin + local x + for x in ${progs} ; do + ln -s dropbearmulti ${x} + done + rm -f dropbear + dodir /usr/sbin + dosym ../bin/dropbearmulti /usr/sbin/dropbear + cd "${S}" + fi +} diff --git a/net-misc/dropbear/files/digest-dropbear-0.45 b/net-misc/dropbear/files/digest-dropbear-0.45 new file mode 100644 index 000000000000..e75165208533 --- /dev/null +++ b/net-misc/dropbear/files/digest-dropbear-0.45 @@ -0,0 +1 @@ +MD5 2bcc46e4c239aec982bf36a723dd0b0e dropbear-0.45.tar.bz2 1268881 diff --git a/net-misc/dropbear/files/dropbear-0.45-urandom.patch b/net-misc/dropbear/files/dropbear-0.45-urandom.patch new file mode 100644 index 000000000000..e45c1ef599d9 --- /dev/null +++ b/net-misc/dropbear/files/dropbear-0.45-urandom.patch @@ -0,0 +1,57 @@ +--- dropbear-0.45.orig/options.h 2005-03-08 14:43:07.000000000 -0500 ++++ dropbear-0.45/options.h 2005-03-08 14:44:41.000000000 -0500 +@@ -148,6 +148,10 @@ + /* prngd must be manually set up to produce output */ + /*#define DROPBEAR_PRNGD_SOCKET "/var/run/dropbear-rng"*/ + ++/* If the normal random source would block for a while, fall back to ++ * the urandom source so that connections don't hang forever. */ ++#define DROPBEAR_URANDOM_DEV "/dev/urandom" ++ + /* Specify the number of clients we will allow to be connected but + * not yet authenticated. After this limit, connections are rejected */ + #ifndef MAX_UNAUTH_CLIENTS +diff -ur dropbear-0.45.orig/random.c dropbear-0.45/random.c +--- dropbear-0.45.orig/random.c 2005-03-08 14:43:07.000000000 -0500 ++++ dropbear-0.45/random.c 2005-03-08 14:57:31.000000000 -0500 +@@ -57,9 +57,14 @@ + struct sockaddr_un egdsock; + char egdcmd[2]; + #endif ++ mode_t readmode = O_RDONLY; ++#ifdef DROPBEAR_URANDOM_DEV ++ unsigned int readtries = 0; ++ readmode |= O_NONBLOCK; ++#endif + + #ifdef DROPBEAR_RANDOM_DEV +- readfd = open(DROPBEAR_RANDOM_DEV, O_RDONLY); ++ readfd = open(DROPBEAR_RANDOM_DEV, readmode); + if (readfd < 0) { + dropbear_exit("couldn't open random device"); + } +@@ -97,6 +102,24 @@ + if (readlen < 0 && errno == EINTR) { + continue; + } ++#ifdef DROPBEAR_URANDOM_DEV ++ /* if the main random source blocked, lets retry a few times, ++ * but then give up and try a constant random source. */ ++ if (readlen < 0 && errno == EAGAIN) { ++ ++readtries; ++ if (readtries < 5) { ++ sleep(1); ++ continue; ++ } else if (readtries == 5) { ++ close (readfd); ++ readfd = open(DROPBEAR_URANDOM_DEV, readmode); ++ if (readfd < 0) { ++ dropbear_exit("couldn't open secondary random device"); ++ } ++ continue; ++ } ++ } ++#endif + dropbear_exit("error reading random source"); + } + readpos += readlen; -- cgit v1.2.3-65-gdbad