diff options
author | Sam James <sam@gentoo.org> | 2022-11-15 09:02:53 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-11-15 09:05:49 +0000 |
commit | 8628153ddde353e830573c4569c99f9c23ea6eb1 (patch) | |
tree | a727092595b75cfb6ba27957cdc1bb614bceda50 /net-misc/dropbear | |
parent | dev-vcs/pre-commit: drop ebuilds depending on dev-python/toml (diff) | |
download | gentoo-8628153ddde353e830573c4569c99f9c23ea6eb1.tar.gz gentoo-8628153ddde353e830573c4569c99f9c23ea6eb1.tar.bz2 gentoo-8628153ddde353e830573c4569c99f9c23ea6eb1.zip |
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 <sam@gentoo.org>
Diffstat (limited to 'net-misc/dropbear')
-rw-r--r-- | net-misc/dropbear/dropbear-2022.82.ebuild | 36 | ||||
-rw-r--r-- | net-misc/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 |