summaryrefslogtreecommitdiff
path: root/net-misc/dropbear
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/dropbear')
-rw-r--r--net-misc/dropbear/Manifest8
-rw-r--r--net-misc/dropbear/dropbear-2016.74.ebuild98
-rw-r--r--net-misc/dropbear/files/dropbear-0.46-dbscp.patch20
-rw-r--r--net-misc/dropbear/files/dropbear.conf.d6
-rw-r--r--net-misc/dropbear/files/dropbear.init.d38
-rw-r--r--net-misc/dropbear/metadata.xml31
6 files changed, 201 insertions, 0 deletions
diff --git a/net-misc/dropbear/Manifest b/net-misc/dropbear/Manifest
new file mode 100644
index 000000000000..2f18d6e30c66
--- /dev/null
+++ b/net-misc/dropbear/Manifest
@@ -0,0 +1,8 @@
+AUX dropbear-0.46-dbscp.patch 500 SHA256 b133670f2417a112e06ae0e4ec7fe50eeb76015e44a5c19d4f55a8df3636ed2d SHA512 33596d1b59ba266eade106e8fe058cc9d20d1657db88d51fb11c2111835f7887b3fa5714b3feb9767c48ed94d3af0c539864886e0a2586b6f58a38bb9f741210 WHIRLPOOL d442a66dbbc6aff293ef4b6b358573fe6a08c22cbfc31a02ef8fc9fe0b88e9a80d7f9cf3c1fe3ac6470e922d512054f0543d714e6a1bf07f482e3546e68df045
+AUX dropbear.conf.d 190 SHA256 e891255a49d408eb11514662faa4d724a1df27cc2ee90268507dbd2573b67334 SHA512 83f2c1eaf7687917a4b2bae7d599d4378c4bd64f9126ba42fc5d235f2b3c9a474d1b3168d70ed64bb4101cc251d30bc9ae20604da9b5d819fcd635ee4d0ebb0f WHIRLPOOL 91db627754119bec23cb22b047741699f732a8f23fef84d35cacc1977dc738e16631f936c36ee9f86dafe0a30962c9583dad44b36b798961668875451106b18b
+AUX dropbear.init.d 731 SHA256 d31714f6b09aa87de700ae49b192d2ac63e2935f98a557aa3aa9e0afc1983a0f SHA512 5087cdb36194d55bf6d5ce27852b17f1ebe06840bbed37789cf162a618fb3c56c9dffce01a8a75f8574f8d9800a12fc2e1b725ca35352a836324579c8b704fd8 WHIRLPOOL e76ecf7d9969c295fea63f541b64a65688b352a56cc6b2479a1393f89a7e125f5be794377477dc53279d8ed2bf2ebe7cdd1570d3189377a0af8af50ea5e58205
+DIST dropbear-2016.74.tar.bz2 1622234 SHA256 2720ea54ed009af812701bcc290a2a601d5c107d12993e5d92c0f5f81f718891 SHA512 c0f4ea7840077b8302b48e27b5b588a4babac6583740dfdb845c40f633aa3ec96174d1d2ade81d2c3e23ea99b75e906312c512d8c7580e6e4105b2dbd37e5e22 WHIRLPOOL 7feee8beda0990649c3456350aa16776de92a649f02d368bbdf925f9077db0f3d822a46d2dd5832405a112132990142119e94da26af4fde0dfb954b301a08ae3
+EBUILD dropbear-2016.74.ebuild 2480 SHA256 04dacb3e6748ba75f675838f9f75c3f457f913398eea1aeb0f6354a303d2a587 SHA512 aaf43ba85a8263110a368772d021f47cb876b0e1ac40bd82a3ff0099a07103093593cebb27d2fdd2bf7f6863bfea4992d0f9bcd34ef4e53288e029d014e1dfab WHIRLPOOL 664e4821b03a86f86090498fb8f43f99cc644a17d72912ac17b9b6fa0cb56285fc70f3ff7b997cfef527cee17f6fe927d1c3142ab49b00037f9c7dd0232ef328
+MISC ChangeLog 5364 SHA256 ce0bb83d0d90df62f4b9259378f34d2f5c0d3576055da8cac930294710c567ec SHA512 d0a691b870b70400e5808456c357c0941adff29b0a61ebd12b3ef3616b1d53a609edbb16c7086be920e7dd2dc3994ca56f7d71216253cc7eed0fe8dec8b0a115 WHIRLPOOL 28ae6f5662ed3bdcab336c66c7d1e6c3afefa7043c33e5cd3f18e33e80a608ca5df99e613e82175aad0011c25bd7073e1aa318e3dbde0fb8f2cc6e8b6e45aae2
+MISC ChangeLog-2015 17112 SHA256 f59fa884243280b22c4ad7596a0d5a7b0f2db2da0e22875609a72a4490861385 SHA512 69efb28eeaa36417306f57b0d1a63aff7e8f6a08d1d939b5d0da2c955ec6f622e88f6149b6ea6535408176923d97b013ed5093287e419b9a80984d71035a5851 WHIRLPOOL c3f9e4c65b4d05e10555cdfcc03c1576a477999595c2dc3d0feb30b0968a58de629bdc9e3b965c61ac708bd6d80d91163715df1503e417af2f74a2cb3b334e0f
+MISC metadata.xml 1791 SHA256 8cc475b63ededac9ca283ae966a7833840d2265e8158b19f47da6a5530920c12 SHA512 1f99332f1f194f989838dc5c04fa1c7661e13da3efa7b98fa6392ab3c3e6887a4a9c7319fdb43f102b2fb3cbc0ee70e79792b595c2f49d2bbf4e50be3f362314 WHIRLPOOL 82ec6d9d6ed9581b9c1d9c77fb146aeb858252dc04c67add13ad32636d7bfc082454d670763956268443df6d23258b8a49a1e5f1e9f20d334f5a8c08a69cbd75
diff --git a/net-misc/dropbear/dropbear-2016.74.ebuild b/net-misc/dropbear/dropbear-2016.74.ebuild
new file mode 100644
index 000000000000..ba624f584a3d
--- /dev/null
+++ b/net-misc/dropbear/dropbear-2016.74.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils savedconfig pam user
+
+DESCRIPTION="small SSH 2 client/server designed for small memory environments"
+HOMEPAGE="http://matt.ucc.asn.au/dropbear/dropbear.html"
+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 ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux"
+IUSE="bsdpty minimal multicall pam +shadow static +syslog zlib"
+
+LIB_DEPEND="zlib? ( sys-libs/zlib[static-libs(+)] )
+ dev-libs/libtommath[static-libs(+)]"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ pam? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+RDEPEND+=" pam? ( >=sys-auth/pambase-20080219.1 )"
+
+REQUIRED_USE="pam? ( !static )"
+
+set_options() {
+ progs=(
+ dropbear dbclient dropbearkey
+ $(usex minimal "" "dropbearconvert scp")
+ )
+ makeopts=(
+ MULTI=$(usex multicall 1 0)
+ STATIC=$(usex static 1 0)
+ )
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.46-dbscp.patch
+ sed -i \
+ -e '/SFTPSERVER_PATH/s:".*":"/usr/lib/misc/sftp-server":' \
+ options.h || die
+ sed -i \
+ -e '/pam_start/s:sshd:dropbear:' \
+ svr-authpam.c || die
+ restore_config options.h
+}
+
+src_configure() {
+ # XXX: Need to add libtomcrypt to the tree and re-enable this.
+ # --disable-bundled-libtom
+ econf \
+ $(use_enable zlib) \
+ $(use_enable pam) \
+ $(use_enable !bsdpty openpty) \
+ $(use_enable shadow) \
+ $(use_enable syslog)
+}
+
+src_compile() {
+ set_options
+ emake "${makeopts[@]}" PROGRAMS="${progs[*]}"
+}
+
+src_install() {
+ set_options
+ emake "${makeopts[@]}" PROGRAMS="${progs[*]}" DESTDIR="${D}" install
+ doman *.8
+ 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 right.
+ if use multicall ; then
+ cd "${ED}"/usr/bin
+ local x
+ for x in "${progs[@]}" ; do
+ ln -sf dropbearmulti ${x} || die "ln -s dropbearmulti to ${x} failed"
+ done
+ rm -f dropbear
+ dodir /usr/sbin
+ dosym ../bin/dropbearmulti /usr/sbin/dropbear
+ cd "${S}"
+ fi
+ save_config options.h
+
+ if ! use minimal ; then
+ mv "${ED}"/usr/bin/{,db}scp || die
+ fi
+
+ pamd_mimic system-remote-login dropbear auth account password session
+}
+
+pkg_preinst() {
+ enewgroup sshd 22
+ enewuser sshd 22 -1 /var/empty sshd
+}
diff --git a/net-misc/dropbear/files/dropbear-0.46-dbscp.patch b/net-misc/dropbear/files/dropbear-0.46-dbscp.patch
new file mode 100644
index 000000000000..18873f24c5a6
--- /dev/null
+++ b/net-misc/dropbear/files/dropbear-0.46-dbscp.patch
@@ -0,0 +1,20 @@
+--- dbmulti.c 2005-07-17 07:00:07.000000000 -0400
++++ dbmulti.c 2005-07-17 06:59:35.000000000 -0400
+@@ -60,7 +60,7 @@
+ }
+ #endif
+ #ifdef DBMULTI_scp
+- if (strcmp(progname, "scp") == 0) {
++ if ((strcmp(progname, "scp") == 0) || (strcmp(progname, "dbscp") == 0)) {
+ return scp_main(argc, argv);
+ }
+ #endif
+@@ -81,7 +81,7 @@
+ "'dropbearconvert' - the key converter\n"
+ #endif
+ #ifdef DBMULTI_scp
+- "'scp' - secure copy\n"
++ "'dbscp' - secure copy\n"
+ #endif
+ ,
+ DROPBEAR_VERSION);
diff --git a/net-misc/dropbear/files/dropbear.conf.d b/net-misc/dropbear/files/dropbear.conf.d
new file mode 100644
index 000000000000..555f275d993c
--- /dev/null
+++ b/net-misc/dropbear/files/dropbear.conf.d
@@ -0,0 +1,6 @@
+# /etc/conf.d/dropbear: config file for /etc/init.d/dropbear
+
+# see `dropbear -h` for more information
+# -w disables root logins
+# -p # changes the port number to listen on
+DROPBEAR_OPTS=""
diff --git a/net-misc/dropbear/files/dropbear.init.d b/net-misc/dropbear/files/dropbear.init.d
new file mode 100644
index 000000000000..eaa3ae2919c2
--- /dev/null
+++ b/net-misc/dropbear/files/dropbear.init.d
@@ -0,0 +1,38 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use logger dns
+ need net
+}
+
+check_config() {
+ mkdir -p /etc/dropbear
+
+ local t k
+ for t in dss rsa ecdsa; do
+ k="/etc/dropbear/dropbear_${t}_host_key"
+ if [ ! -e ${k} ] ; then
+ # See if support is enabled for this key type.
+ if dropbearkey -h 2>&1 | grep -q " ${t}$" ; then
+ einfo "Generating ${k} ..."
+ dropbearkey -t ${t} -f ${k} >/dev/null
+ fi
+ fi &
+ done
+ wait
+}
+
+start() {
+ check_config || return 1
+ ebegin "Starting dropbear"
+ dropbear ${DROPBEAR_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping dropbear"
+ start-stop-daemon --stop --pidfile /var/run/dropbear.pid
+ eend $?
+}
diff --git a/net-misc/dropbear/metadata.xml b/net-misc/dropbear/metadata.xml
new file mode 100644
index 000000000000..5133c5c348b6
--- /dev/null
+++ b/net-misc/dropbear/metadata.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>embedded@gentoo.org</email>
+ <name>Embedded Gentoo</name>
+ </maintainer>
+ <longdescription>
+I was looking for a small and secure SSH server to fit on a laptop with 4 megs ram and no hard
+disk, and couldn't find one which was satisfactory. I decided to write my own, and Dropbear is
+the result. It implements most required features of the SSH 2 protocol, and other features such
+as X11, TCP and Authentication Agent forwarding. Dropbear is Open Source software, distributed
+under a MIT-style license.
+</longdescription>
+ <longdescription lang="ja">
+私は 4MB の RAM とハードディスクを搭載しないラップトップ型にぴったりな小さ
+くて安全な SSH サーバを探していました。しかし満足するものは見つけられません
+でした。私は自身で作ろうと決意しました。その結果が Dropbear です。SSH 2 プ
+ロトコルに必要な機能の大半、他にも X11 や TCP、認証エージェント・フォワーデ
+ィングといった機能が実装してあります。Dropbear はオープンソースで、MIT スタ
+イルのライセンス下で配布されます。
+</longdescription>
+ <use>
+ <flag name="bsdpty">Add support for legacy BSD pty's rather than dynamic UNIX pty's -- do not use this flag unless you are absolutely sure you actually want it</flag>
+ <flag name="multicall">Build all the programs as one little binary (to save space)</flag>
+ <flag name="shadow">Enable shadow password support</flag>
+ </use>
+<upstream>
+ <remote-id type="cpe">cpe:/a:matt_johnston:dropbear_ssh_server</remote-id>
+</upstream>
+</pkgmetadata>