From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1524F158020 for ; Tue, 15 Nov 2022 09:07:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 498CEE0963; Tue, 15 Nov 2022 09:07:20 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2C70CE0963 for ; Tue, 15 Nov 2022 09:07:20 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DB79B340CC0 for ; Tue, 15 Nov 2022 09:07:18 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2A139738 for ; Tue, 15 Nov 2022 09:07:17 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1668503149.8628153ddde353e830573c4569c99f9c23ea6eb1.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/dropbear/, net-misc/dropbear/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-misc/dropbear/dropbear-2022.82.ebuild net-misc/dropbear/files/dropbear-2022.82-tests.patch X-VCS-Directories: net-misc/dropbear/files/ net-misc/dropbear/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 8628153ddde353e830573c4569c99f9c23ea6eb1 X-VCS-Branch: master Date: Tue, 15 Nov 2022 09:07:17 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: aa5c9f5e-dfe7-4788-a4e3-6ca677f1ae6f X-Archives-Hash: a72229f70903e6c72f5dd590b455c77b commit: 8628153ddde353e830573c4569c99f9c23ea6eb1 Author: Sam James gentoo org> AuthorDate: Tue Nov 15 09:02:53 2022 +0000 Commit: Sam James gentoo org> CommitDate: Tue Nov 15 09:05:49 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8628153d net-misc/dropbear: work towards fixing tests Restrict for now as they end up wanting interactive input. Closes: https://bugs.gentoo.org/836990 Signed-off-by: Sam James gentoo.org> net-misc/dropbear/dropbear-2022.82.ebuild | 36 ++++++++++++++++++++-- .../dropbear/files/dropbear-2022.82-tests.patch | 25 +++++++++++++++ 2 files changed, 58 insertions(+), 3 deletions(-) diff --git a/net-misc/dropbear/dropbear-2022.82.ebuild b/net-misc/dropbear/dropbear-2022.82.ebuild index 2538b0bcfa84..e9746bf468b8 100644 --- a/net-misc/dropbear/dropbear-2022.82.ebuild +++ b/net-misc/dropbear/dropbear-2022.82.ebuild @@ -3,8 +3,9 @@ EAPI=7 +PYTHON_COMPAT=( python3_{8..11} ) VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/dropbear.asc -inherit savedconfig pam verify-sig +inherit savedconfig pam python-any-r1 verify-sig DESCRIPTION="Small SSH 2 client/server designed for small memory environments" HOMEPAGE="https://matt.ucc.asn.au/dropbear/dropbear.html" @@ -18,7 +19,8 @@ SRC_URI+=" verify-sig? ( LICENSE="MIT GPL-2" # (init script is GPL-2 #426056) SLOT="0" KEYWORDS="~alpha ~amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" -IUSE="bsdpty minimal multicall pam +shadow static +syslog zlib" +IUSE="bsdpty minimal multicall pam +shadow static +syslog test zlib" +RESTRICT="!test? ( test ) test" LIB_DEPEND=" virtual/libcrypt[static-libs(+)] @@ -39,13 +41,28 @@ DEPEND=" static? ( ${LIB_DEPEND} ) " RDEPEND+=" pam? ( >=sys-auth/pambase-20080219.1 )" -BDEPEND="verify-sig? ( sec-keys/openpgp-keys-dropbear )" +BDEPEND=" + test? ( + $(python_gen_any_dep ' + dev-python/attrs[${PYTHON_USEDEP}] + dev-python/iniconfig[${PYTHON_USEDEP}] + dev-python/packaging[${PYTHON_USEDEP}] + dev-python/pluggy[${PYTHON_USEDEP}] + dev-python/py[${PYTHON_USEDEP}] + dev-python/pyparsing[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + dev-python/psutil[${PYTHON_USEDEP}] + ') + ) + verify-sig? ( sec-keys/openpgp-keys-dropbear ) +" REQUIRED_USE="pam? ( !static )" PATCHES=( "${FILESDIR}"/${PN}-0.46-dbscp.patch "${FILESDIR}"/${PN}-2022.82-x11.patch + "${FILESDIR}"/${PN}-2022.82-tests.patch ) set_options() { @@ -58,7 +75,20 @@ set_options() { ) } +python_check_deps() { + python_has_version "dev-python/attrs[${PYTHON_USEDEP}]" && \ + python_has_version "dev-python/iniconfig[${PYTHON_USEDEP}]" && \ + python_has_version "dev-python/packaging[${PYTHON_USEDEP}]" && \ + python_has_version "dev-python/pluggy[${PYTHON_USEDEP}]" && \ + python_has_version "dev-python/py[${PYTHON_USEDEP}]" && \ + python_has_version "dev-python/pyparsing[${PYTHON_USEDEP}]" && \ + python_has_version "dev-python/pytest[${PYTHON_USEDEP}]" && \ + python_has_version "dev-python/psutil[${PYTHON_USEDEP}]" +} + pkg_setup() { + use test && python-any-r1_pkg_setup + if use static ; then ewarn "Using bundled copies of libtommath and libtomcrypt" fi diff --git a/net-misc/dropbear/files/dropbear-2022.82-tests.patch b/net-misc/dropbear/files/dropbear-2022.82-tests.patch new file mode 100644 index 000000000000..6619e6c07551 --- /dev/null +++ b/net-misc/dropbear/files/dropbear-2022.82-tests.patch @@ -0,0 +1,25 @@ +--- a/test/Makefile.in ++++ b/test/Makefile.in +@@ -4,18 +4,13 @@ SHELL=bash + + all: test + +-test: venv/bin/pytest fakekey +- (source ./venv/bin/activate; pytest --hostkey=fakekey --dbclient=../dbclient --dropbear=../dropbear $(srcdir) ) ++test: fakekey ++ pytest --hostkey=fakekey --dbclient=../dbclient --dropbear=../dropbear $(srcdir) + +-one: venv/bin/pytest fakekey +- (source ./venv/bin/activate; pytest --hostkey=fakekey --dbclient=../dbclient --dropbear=../dropbear $(srcdir) -k exit) ++one: fakekey ++ pytest --hostkey=fakekey --dbclient=../dbclient --dropbear=../dropbear $(srcdir) -k exit + + fakekey: + ../dropbearkey -t ecdsa -f $@ + +-venv/bin/pytest: $(srcdir)/requirements.txt +- python3 -m venv init venv +- ./venv/bin/pip install --upgrade pip +- ./venv/bin/pip install -r $(srcdir)/requirements.txt +- + .PHONY: test