dropbear: drop old package

This is an old version with known security vulnerabilities.  No one
seems to depend on it, so drop it to avoid accidental usage.  If
anyone wants it in the future, they can upgrade to the latest.

Also drop libtommath as nothing else uses it, and it's old with a
bad license we don't want to support.

BUG=chromium:1107613
TEST=CQ passes

Change-Id: Icd2eb7edbae731a2e399076d2b66a88c8968c9e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/overlays/portage-stable/+/2309183
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
diff --git a/dev-libs/libtommath/Manifest b/dev-libs/libtommath/Manifest
deleted file mode 100644
index 024ea97..0000000
--- a/dev-libs/libtommath/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST ltm-0.42.0.tar.bz2 1968961 SHA256 7b5c258304c34ac5901cfddb9f809b9b3b8ac7d04f700cf006ac766a923eb217 SHA512 c5bb26a260477de4e9abee9f65735754efa69c39c89caa3a06dd8ad3eda9d27fff687a432e91e3410b2bcc6a9e3d59921b6cdf6ca7f1ca6c69ed199a002e5790 WHIRLPOOL dd9879213b64d64f70620f98edfd027565a9cdf68dea03e427b0c1055f58347aa2ce9ad6f29b854b6aa50631e68bef29adc882d9db28cc73cb033ea6f3cae98f
diff --git a/dev-libs/libtommath/files/libtommath-0.42.0-makefile.patch b/dev-libs/libtommath/files/libtommath-0.42.0-makefile.patch
deleted file mode 100644
index b3f1ed6..0000000
--- a/dev-libs/libtommath/files/libtommath-0.42.0-makefile.patch
+++ /dev/null
@@ -1,47 +0,0 @@
---- makefile.shared
-+++ makefile.shared
-@@ -3,7 +3,8 @@
- #Tom St Denis
- VERSION=0:41
- 
--CC = libtool --mode=compile --tag=CC gcc
-+LT	?= libtool
-+LTCOMPILE = $(LT) --mode=compile --tag=CC $(CC)
- 
- CFLAGS  +=  -I./ -Wall -W -Wshadow -Wsign-compare
- 
-@@ -82,21 +83,24 @@
- 
- objs: $(OBJECTS)
- 
-+%.lo: %.c
-+	$(LTCOMPILE) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
-+
--$(LIBNAME):  $(OBJECTS)
--	libtool --mode=link gcc *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION)
-+$(LIBNAME):  $(OBJECTS:.o=.lo)
-+	$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(LDFLAGS) *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION)
- 
- install: $(LIBNAME)
--	install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)
--	libtool --mode=install install -c $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME)
--	install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH)
--	install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH)
-+	install -d $(DESTDIR)$(LIBPATH)
-+	$(LT) --mode=install install -c $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME)
-+	install -d $(DESTDIR)$(INCPATH)
-+	install -m 644 $(HEADERS) $(DESTDIR)$(INCPATH)
- 
- test: $(LIBNAME) demo/demo.o
--	gcc $(CFLAGS) -c demo/demo.c -o demo/demo.o
--	libtool --mode=link gcc -o test demo/demo.o $(LIBNAME_S)
-+	$(CC) $(CFLAGS) $(CPPFLAGS) -c demo/demo.c -o demo/demo.o
-+	$(LT) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o test demo/demo.o $(LIBNAME_S)
- 	
- mtest: test	
--	cd mtest ; gcc $(CFLAGS) mtest.c -o mtest
-+	cd mtest ; $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) mtest.c -o mtest
-         
- timing: $(LIBNAME)
--	gcc $(CFLAGS) -DTIMER demo/timing.c $(LIBNAME_S) -o ltmtest
-+	$(LT) --mode=link $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -DTIMER demo/timing.c $(LIBNAME_S) -o ltmtest
diff --git a/dev-libs/libtommath/libtommath-0.42.0-r1.ebuild b/dev-libs/libtommath/libtommath-0.42.0-r1.ebuild
deleted file mode 100644
index 8e8c9b8..0000000
--- a/dev-libs/libtommath/libtommath-0.42.0-r1.ebuild
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libtommath/libtommath-0.42.0-r1.ebuild,v 1.19 2013/08/16 13:30:06 aballier Exp $
-
-EAPI=4
-
-inherit autotools eutils multilib toolchain-funcs
-
-DESCRIPTION="highly optimized and portable routines for integer based number theoretic applications"
-HOMEPAGE="http://www.libtom.org/"
-SRC_URI="http://www.libtom.org/files/ltm-${PV}.tar.bz2"
-
-LICENSE="WTFPL-2"
-SLOT="0"
-KEYWORDS="*"
-IUSE="doc examples static-libs"
-
-DEPEND="sys-devel/libtool"
-RDEPEND=""
-
-src_prepare() {
-	epatch "${FILESDIR}"/${P}-makefile.patch
-
-	# need libtool for cross compilation. Bug #376643
-	cat <<-EOF > configure.ac
-	AC_INIT(libtommath, 0)
-	AM_INIT_AUTOMAKE
-	LT_INIT
-	AC_CONFIG_FILES(Makefile)
-	AC_OUTPUT
-	EOF
-	touch NEWS README AUTHORS ChangeLog Makefile.am
-	eautoreconf
-	export LT="${S}"/libtool
-}
-
-src_configure() {
-	econf $(use_enable static-libs static)
-}
-
-_emake() {
-	emake CC="$(tc-getCC)" -f makefile.shared \
-		IGNORE_SPEED=1 \
-		LIBPATH="${EPREFIX}/usr/$(get_libdir)" \
-		INCPATH="${EPREFIX}/usr/include" \
-		"$@"
-}
-
-src_compile() {
-	_emake
-}
-
-src_install() {
-	_emake DESTDIR="${ED}" install
-	# We only link against -lc, so drop the .la file.
-	find "${ED}" -name '*.la' -delete
-
-	dodoc changes.txt
-
-	use doc && dodoc *.pdf
-
-	if use examples ; then
-		docinto demo
-		dodoc demo/*.c
-	fi
-}
diff --git a/dev-libs/libtommath/metadata.xml b/dev-libs/libtommath/metadata.xml
deleted file mode 100644
index b02fb88..0000000
--- a/dev-libs/libtommath/metadata.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-  <maintainer>
-    <email>maintainer-needed@gentoo.org</email>
-  </maintainer>
-  <longdescription>
-    LibTomMath is a free open source portable number theoretic multiple-precision 
-    integer library written entirely in C. (phew!). The library is designed to 
-    provide a simple to work with API that provides fairly efficient routines that 
-    build out of the box without configuration.
-
-    The library builds out of the box with GCC 2.95 [and up] as well as Visual C++ 
-    v6.00 [with SP5] without configuration. The source code is arranged to make it 
-    easy to dive into a particular area very quickly. The code is also littered with 
-    comments [This is one of the on going goals] that help explain the algorithms and 
-    their implementations. Ideally the code will serve as an educational tool in the 
-    future for CS students studying number theory.
-
-    The library provides a vast array of highly optimized routines from various 
-    branches of number theory.
-
-      * Simple Algebraic
-            o Addition
-            o Subtraction
-            o Multiplication
-            o Squaring
-            o Division 
-      * Digit Manipulation
-            o Shift left/right whole digits (mult by 2b by moving digits)
-            o Fast multiplication/division by 2 and 2k for k>1
-            o Binary AND, OR and XOR gates 
-      * Modular Reductions
-            o Barrett Reduction (fast for any p)
-            o Montgomery Reduction (faster for any odd p)
-            o DR Reduction (faster for any restricted p see manual)
-            o 2k Reduction (fast reduction modulo 2p - k)
-            o The exptmod logic can use any of the four reduction algorithms when 
-              appropriate with a single function call. 
-      * Number Theoretic
-            o Greatest Common Divisor
-            o Least Common Multiple
-            o Jacobi Symbol Computation (falls back to Legendre for prime moduli)
-            o Multiplicative Inverse
-            o Extended Euclidean Algorithm
-            o Modular Exponentiation
-            o Fermat and Miller-Rabin Primality Tests, utility function such as 
-              is_prime and next_prime 
-      * Miscellaneous
-            o Root finding over Z
-            o Pseudo-random integers
-            o Signed and Unsigned comparisons 
-      * Optimizations
-            o Fast Comba based Multiplier, Squaring and Montgomery routines.
-            o Montgomery, Diminished Radix and Barrett based modular 
-              exponentiation.
-            o Karatsuba and Toom-Cook multiplication algorithms.
-            o Many pointer aliasing optimiztions throughout the entire library. 
-  </longdescription>
-</pkgmetadata>
diff --git a/metadata/md5-cache/dev-libs/libtommath-0.42.0-r1 b/metadata/md5-cache/dev-libs/libtommath-0.42.0-r1
deleted file mode 100644
index 0648dae..0000000
--- a/metadata/md5-cache/dev-libs/libtommath-0.42.0-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare
-DEPEND=sys-devel/libtool >=app-portage/elt-patches-20170815 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=highly optimized and portable routines for integer based number theoretic applications
-EAPI=4
-HOMEPAGE=http://www.libtom.org/
-IUSE=doc examples static-libs
-KEYWORDS=*
-LICENSE=WTFPL-2
-SLOT=0
-SRC_URI=http://www.libtom.org/files/ltm-0.42.0.tar.bz2
-_eclasses_=autotools	d0e5375d47f4c809f406eb892e531513	eutils	06133990e861be0fe60c2b428fd025d9	libtool	f143db5a74ccd9ca28c1234deffede96	multilib	2477ebe553d3e4d2c606191fe6c33602	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
-_md5_=8679e8576f320dd87cc68b0b0ec81c0b
diff --git a/metadata/md5-cache/net-misc/dropbear-2015.67 b/metadata/md5-cache/net-misc/dropbear-2015.67
deleted file mode 100644
index 1a2cfc4..0000000
--- a/metadata/md5-cache/net-misc/dropbear-2015.67
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare
-DEPEND=!static? ( zlib? ( sys-libs/zlib ) dev-libs/libtommath ) pam? ( virtual/pam ) static? ( zlib? ( sys-libs/zlib[static-libs(+)] ) dev-libs/libtommath[static-libs(+)] ) sys-apps/baselayout
-DESCRIPTION=small SSH 2 client/server designed for small memory environments
-EAPI=4
-HOMEPAGE=http://matt.ucc.asn.au/dropbear/dropbear.html
-IUSE=bsdpty minimal multicall pam +shadow static syslog zlib savedconfig
-KEYWORDS=*
-LICENSE=MIT
-RDEPEND=!static? ( zlib? ( sys-libs/zlib ) dev-libs/libtommath ) pam? ( virtual/pam ) pam? ( >=sys-auth/pambase-20080219.1 ) sys-apps/baselayout
-REQUIRED_USE=pam? ( !static )
-SLOT=0
-SRC_URI=http://matt.ucc.asn.au/dropbear/releases/dropbear-2015.67.tar.bz2 http://matt.ucc.asn.au/dropbear/testing/dropbear-2015.67.tar.bz2
-_eclasses_=eutils	06133990e861be0fe60c2b428fd025d9	flag-o-matic	5d5921a298e95441da2f85be419894c0	multilib	2477ebe553d3e4d2c606191fe6c33602	pam	3f746974e1cc47cabe3bd488c08cdc8e	portability	536c5e70c5fb252ed3b769e04aa3f05b	savedconfig	973a6df1a0949eba28a185eac79de815	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb	user	7c566af8c48023219fd63246e88d6621
-_md5_=d156149bbdce46f4c6c04d526256ad96
diff --git a/net-misc/dropbear/Manifest b/net-misc/dropbear/Manifest
deleted file mode 100644
index 360eedb..0000000
--- a/net-misc/dropbear/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST dropbear-2015.67.tar.bz2 1606312 SHA256 7e690594645dfde5787065c78a5d2e4d15e288babfa06e140197ce05f698c8e5 SHA512 6a23f7dbe8ccd39683488a16ce4db39cdba529e9d302165742eb818d3cf520a3793660ff6c8ce0520ddb87dcac726ff34ed3dbcb7efa83115deafad2c6c0a5f3 WHIRLPOOL c1103be19c86a0b40ca262715646244911032e97aba52279be1f7a0382367554c34455497b604dacacb69da0873fd26d3d457abeb7d265e6ca6bdff8938dc065
diff --git a/net-misc/dropbear/dropbear-2015.67.ebuild b/net-misc/dropbear/dropbear-2015.67.ebuild
deleted file mode 100644
index d9c148c..0000000
--- a/net-misc/dropbear/dropbear-2015.67.ebuild
+++ /dev/null
@@ -1,99 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dropbear/dropbear-2015.67.ebuild,v 1.1 2015/02/15 09:39:49 vapier Exp $
-
-EAPI="4"
-
-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="*"
-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
deleted file mode 100644
index 18873f2..0000000
--- a/net-misc/dropbear/files/dropbear-0.46-dbscp.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- 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
deleted file mode 100644
index 555f275..0000000
--- a/net-misc/dropbear/files/dropbear.conf.d
+++ /dev/null
@@ -1,6 +0,0 @@
-# /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
deleted file mode 100644
index 3aadfec..0000000
--- a/net-misc/dropbear/files/dropbear.init.d
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dropbear/files/dropbear.init.d,v 1.3 2014/05/30 20:04:55 vapier Exp $
-
-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
deleted file mode 100644
index 5ac579b..0000000
--- a/net-misc/dropbear/metadata.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-  <herd>embedded</herd>
-  <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>