From e68d405c5d712af4387159df07e226217bdda049 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 6 Apr 2022 22:33:41 +0100 Subject: gentoo resync : 06.04.2022 --- app-admin/ansible-lint/Manifest | 5 +- app-admin/ansible-lint/ansible-lint-6.0.2.ebuild | 69 ++++++++++++++++++++++ .../ansible-lint-6.0.2_test-module-check.patch | 23 ++++++++ app-admin/ansible-lint/metadata.xml | 4 +- 4 files changed, 98 insertions(+), 3 deletions(-) create mode 100644 app-admin/ansible-lint/ansible-lint-6.0.2.ebuild create mode 100644 app-admin/ansible-lint/files/ansible-lint-6.0.2_test-module-check.patch (limited to 'app-admin/ansible-lint') diff --git a/app-admin/ansible-lint/Manifest b/app-admin/ansible-lint/Manifest index c9cd60992943..cf3d84ee0943 100644 --- a/app-admin/ansible-lint/Manifest +++ b/app-admin/ansible-lint/Manifest @@ -1,3 +1,6 @@ +AUX ansible-lint-6.0.2_test-module-check.patch 689 BLAKE2B 69152c8799165f8efcf44640ad44133147e95945aeb4aee7a5a45aa0e74432fce599040f017ae92fb7264855f74c0bcd71a44e26abf0abebfcce2cbcaea39ada SHA512 01be971c7d33086aa799910ac744cfceb07b4d5041716043c49667075ab8c8579b57f0c14a8094248f96462c93fff3ac110776aa0aa1ea3adf11dc622028ca7e DIST ansible-lint-5.4.0.tar.gz 349353 BLAKE2B 9f41abdf1e9485afa4c8ed9498627b0dcbdcf57916f3b57c9886de8bd806e4e5b34e7e9c2e66b44ac8009a0afcea4d8566900ee8d391eaca61081fa23323c41c SHA512 f1bbbb49eb77991d60b6087646c695a938d328d719bba67707af4ed858de857d383b78490bcf0930cffebd13a0b0abde20269a47e47e4713a37da715a28c5da0 +DIST ansible-lint-6.0.2.tar.gz 195044 BLAKE2B 3334049dd1dc05444c6c362601da8d7e808c6b3473e87613b8892651cecb76058cb0aa370aa5d00cf6bc76ee3b096480fdce52facee4f043c01d6c76084860ba SHA512 a47e79c59dfcf3e36654247bd206581798f2559261142e3943b60e0688d75b5a6332832a9f9127f99b2faa6afff959a33c55fbc80aa5881f064725998420f679 EBUILD ansible-lint-5.4.0.ebuild 1852 BLAKE2B 913794c189a58ed0fa3cd0febde7b0ac4788294bee7b1309eb1d70f5619289d4c80f57a8227a7a834ce299c6a24a7c59285425c737d7b0cbd1e53c47ac570650 SHA512 5ca55f7c4d72b01d95813ecef1f3e984ff92993fb0cbf7e5090d938349dba942b88e695e6e34e022385c5a4d6e1fb457766d19aee606ceddedc458fa84c91bb4 -MISC metadata.xml 581 BLAKE2B b2032b06ec9ebe63385918be612a0ee1c351943bfc05a544670a78d87bb2836eb2143bd80da6542c140ab16d33f4b79fa0f18cce3291833b34e43ffb6fd3e737 SHA512 912848e5c37863ed0b04062210da0e925a2d71f1766dd43bb746e7aa364a86ff501e4a6e9762c584ca6d37d4f38b7418a32f3a02b30a7ee4b3f7b828f84f6646 +EBUILD ansible-lint-6.0.2.ebuild 2259 BLAKE2B 5fecb95420b58fe2892e0f825e935494bc548d8e2b7a89a43b5706c224f13c463b4bb1f95299549dc5974976a3d20ab430c588016e0588065a967e0e40baedc1 SHA512 96383643638ab38ab80a77c1ff513086632e6ccc9e55b79d8e74df1986f8a1af261ca45a0113ab8e0be403bcb3bda6e2573c0e8728405afcacecc0e95f36e7e8 +MISC metadata.xml 561 BLAKE2B 0f55fc4da270c495c445e5afff0a8f7aaedd01abf3640f848cd9dc21e01fa7324c78846ee4bf917e4869b6c377fef61254a2288fa3d572c1bb77279571fb6631 SHA512 bd6bf6b916a0b736a0bfdd633f6569ce3124458169d77ef1cd86d6dda4099774088871560ce0106e11f139a2b48f13445e7a844e03a8669160c7e3fa44be5f36 diff --git a/app-admin/ansible-lint/ansible-lint-6.0.2.ebuild b/app-admin/ansible-lint/ansible-lint-6.0.2.ebuild new file mode 100644 index 000000000000..e8d11233f9d4 --- /dev/null +++ b/app-admin/ansible-lint/ansible-lint-6.0.2.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +DISTUTILS_USE_PEP517=setuptools + +inherit distutils-r1 + +DESCRIPTION="Checks ansible playbooks for practices and behaviour that can be improved" +HOMEPAGE="https://github.com/ansible/ansible-lint" +# PyPI tarballs do not contain all the data files needed by the tests +SRC_URI="https://github.com/ansible/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~riscv" + +# As of 6.0.2, access to Ansible Galaxy (i.e. the Internet) is required even to get +# the test suite started (Bug #836582). TODO: Talk to upstream about how to bypass this. +PROPERTIES="test_network" +RESTRICT="test" + +RDEPEND=" + >=app-admin/ansible-base-2.12.0[${PYTHON_USEDEP}] + >=dev-python/ansible-compat-2.0.2[${PYTHON_USEDEP}] + >=dev-python/enrich-1.2.6[${PYTHON_USEDEP}] + dev-python/packaging[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + >=dev-python/rich-9.5.1[${PYTHON_USEDEP}] + >=dev-python/ruamel-yaml-0.15.37[${PYTHON_USEDEP}] + >=dev-python/wcmatch-7.0[${PYTHON_USEDEP}] + >=dev-util/yamllint-1.25.0[${PYTHON_USEDEP}]" +BDEPEND=" + >=dev-python/setuptools_scm-3.5.0[${PYTHON_USEDEP}] + >=dev-python/setuptools_scm_git_archive-1.0[${PYTHON_USEDEP}] + test? ( + >=dev-python/flaky-3.7.0[${PYTHON_USEDEP}] + >=dev-python/pytest-xdist-2.5.0[${PYTHON_USEDEP}] + )" + +PATCHES=( + "${FILESDIR}"/${PN}-6.0.2_test-module-check.patch +) + +# Skip problematic tests: +# - test_call_from_outside_venv doesn't play nicely with the sandbox +# - all test_eco and some test_prerun tests require Internet access +# - as of 5.4.0, test_cli_auto_detect fails even when run manually with tox +EPYTEST_DESELECT=( + test/test_eco.py + test/test_main.py::test_call_from_outside_venv + test/test_prerun.py::test_install_collection + test/test_prerun.py::test_prerun_reqs_v1 + test/test_prerun.py::test_prerun_reqs_v2 + test/test_prerun.py::test_require_collection_wrong_version + test/test_utils.py::test_cli_auto_detect +) + +distutils_enable_tests pytest + +python_test() { + # As of 6.0.2, without this the test suite gets confused by the presence of ansible-lint modules + # in both ${ED} and ${S}. + cd "${S}" || die + + epytest test +} diff --git a/app-admin/ansible-lint/files/ansible-lint-6.0.2_test-module-check.patch b/app-admin/ansible-lint/files/ansible-lint-6.0.2_test-module-check.patch new file mode 100644 index 000000000000..4288bb897c1e --- /dev/null +++ b/app-admin/ansible-lint/files/ansible-lint-6.0.2_test-module-check.patch @@ -0,0 +1,23 @@ +Let the package managers handle dependencies, m'kay? + +--- a/conftest.py ++++ b/conftest.py +@@ -3,18 +3,6 @@ + import os + import sys + +-# checking if user is running pytest without installing test dependencies: +-missing = [] +-for module in ["ansible", "black", "flake8", "flaky", "mypy", "pylint", "pytest_cov"]: +- if not importlib.util.find_spec(module): +- missing.append(module) +-if missing: +- print( +- f"FATAL: Missing modules: {', '.join(missing)} -- probably you missed installing test requirements with: pip install -e '.[test]'", +- file=sys.stderr, +- ) +- sys.exit(1) +- + + os.environ["NO_COLOR"] = "1" + pytest_plugins = ["ansiblelint.testing.fixtures"] diff --git a/app-admin/ansible-lint/metadata.xml b/app-admin/ansible-lint/metadata.xml index c30f7c5d92bc..094d18cbba43 100644 --- a/app-admin/ansible-lint/metadata.xml +++ b/app-admin/ansible-lint/metadata.xml @@ -11,7 +11,7 @@ ansible-lint - ansible-community/ansible-lint - https://github.com/ansible-community/ansible-lint/issues + ansible/ansible-lint + https://github.com/ansible/ansible-lint/issues -- cgit v1.2.3