summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2022-11-10 00:04:23 +0000
committerMarek Szuba <marecki@gentoo.org>2022-11-10 00:42:09 +0000
commit09b921071f4a9f34515c93dafc591f1c61099c08 (patch)
tree927a1ffc8a2ed33fd8f11dfebd736ad663923ead /app-admin
parentnet-analyzer/suricata: do not mention version 5 any more (diff)
downloadgentoo-09b921071f4a9f34515c93dafc591f1c61099c08.tar.gz
gentoo-09b921071f4a9f34515c93dafc591f1c61099c08.tar.bz2
gentoo-09b921071f4a9f34515c93dafc591f1c61099c08.zip
app-admin/ansible-lint: add 6.8.6
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/ansible-lint/Manifest1
-rw-r--r--app-admin/ansible-lint/ansible-lint-6.8.6.ebuild79
-rw-r--r--app-admin/ansible-lint/files/ansible-lint-6.8.6_test-module-check.patch59
3 files changed, 139 insertions, 0 deletions
diff --git a/app-admin/ansible-lint/Manifest b/app-admin/ansible-lint/Manifest
index a4e006f9827b..a03c12c2bcb8 100644
--- a/app-admin/ansible-lint/Manifest
+++ b/app-admin/ansible-lint/Manifest
@@ -1,3 +1,4 @@
DIST ansible-lint-6.5.2.gh.tar.gz 248425 BLAKE2B 02fe3f0cb410831ee7913c5f5ae434678ff183f9c60f0355988d69b516324513fd417439f9ceee4a38192c1e593d7bc00c8fd1aafdff6ba904cdb4ba56257657 SHA512 36a8d7b746bbb0c0f4d85a63180432b9165b1e59ff9da07f6b9477aa02d8998c5c682a317a04c4971a08f0691a10f420d9fd0e7d396d7d1b7f49979c7faf41f5
DIST ansible-lint-6.7.0.gh.tar.gz 275573 BLAKE2B 56788efbd44f6c2d8f1dd946d26f4c784c5c9e077355823d143a7b95196a3b5ce672a987639da6f051832320585fe7106d92c293a0707c9886142eebdaa812f5 SHA512 39d5292c5d262a6ee6fe60b41d531d362c95b466fe28524d314c0f2554e50906db050df93c7dc6374b99e6ef283754844e08484d24570bbbaf637d08e0af4ae2
DIST ansible-lint-6.8.2.gh.tar.gz 288616 BLAKE2B 4ae9c344d834a3d69a05689df296c7915e6eb7cb2a85b773f3adcc4efd898c3e1c9f32d8b1efda31afb7a5466d1966aa754cd5529c7dcfd6c1f45517d39e1750 SHA512 101be050772f6df827a697faa5ff9650c98959d9bd6e7a025a19c0ac94faa6b06e114b9122ae8f09f650be565b226189f4706ef8dd0f27548774664adccf3d18
+DIST ansible-lint-6.8.6.gh.tar.gz 293630 BLAKE2B aa43acb9cca21d3cdafebddb18d82781ab708d5696edc51567a8c56cc3eacb3bd96d08f97436eab54e69866f55fa6fc6537eb62e44e4d26eb3ee46ee13e7322d SHA512 0beb16ecff432444a25d3efa70f67eb55437faed593dfbb4bcaf080b06558403e711218f5a021268a2450ceeab1127d8dc8de027d1e4889350f20ca3d9ed9dca
diff --git a/app-admin/ansible-lint/ansible-lint-6.8.6.ebuild b/app-admin/ansible-lint/ansible-lint-6.8.6.ebuild
new file mode 100644
index 000000000000..df6b0f93eebd
--- /dev/null
+++ b/app-admin/ansible-lint/ansible-lint-6.8.6.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+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"
+SRC_URI="https://github.com/ansible/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~riscv"
+
+RDEPEND="
+ >=app-admin/ansible-core-2.12.0[${PYTHON_USEDEP}]
+ >=dev-python/ansible-compat-2.2.4[${PYTHON_USEDEP}]
+ >=dev-python/black-22.1.0[${PYTHON_USEDEP}]
+ dev-python/filelock[${PYTHON_USEDEP}]
+ >=dev-python/jsonschema-4.9.0[${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-mock[${PYTHON_USEDEP}]
+ >=dev-python/pytest-plus-0.2[${PYTHON_USEDEP}]
+ >=dev-python/pytest-xdist-2.5.0[${PYTHON_USEDEP}]
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.8.6_test-module-check.patch
+)
+
+# Skip problematic tests:
+# - test_rules_id_format has been giving an internal error since 6.5.4 or so (TODO: follow this up with upstream)
+# - similar problem with test_example_custom_module and 6.8.6
+# - test_call_from_outside_venv doesn't play nicely with the sandbox
+# - all the others require Internet access, mostly in order to access Ansible Galaxy
+EPYTEST_DESELECT=(
+ test/test_ansiblesyntax.py::test_null_tasks
+ test/test_cli_role_paths.py::test_run_playbook_github
+ test/test_eco.py
+ test/test_examples.py::test_example_custom_module
+ test/test_examples.py::test_custom_kinds
+ test/test_import_playbook.py::test_task_hook_import_playbook
+ test/test_list_rules.py::test_list_rules_includes_opt_in_rules
+ test/test_list_rules.py::test_list_rules_with_format_option
+ test/test_list_rules.py::test_list_tags_includes_opt_in_rules
+ 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_profiles.py::test_profile_listing
+ test/test_rules_collection.py::test_rich_rule_listing
+ test/test_rules_collection.py::test_rules_id_format
+ test/test_skip_inside_yaml.py::test_role_meta
+ test/test_utils.py::test_cli_auto_detect
+ test/test_utils.py::test_template_lookup
+ test/test_verbosity.py::test_default_verbosity
+)
+
+distutils_enable_tests pytest
+
+# Test suite fails to start without this. Bug in the eclass, maybe?
+python_test() {
+ epytest test
+}
diff --git a/app-admin/ansible-lint/files/ansible-lint-6.8.6_test-module-check.patch b/app-admin/ansible-lint/files/ansible-lint-6.8.6_test-module-check.patch
new file mode 100644
index 000000000000..5302a54cc32e
--- /dev/null
+++ b/app-admin/ansible-lint/files/ansible-lint-6.8.6_test-module-check.patch
@@ -0,0 +1,59 @@
+--- a/conftest.py
++++ b/conftest.py
+@@ -7,56 +7,6 @@
+
+ import pytest
+
+-# checking if user is running pytest without installing test dependencies:
+-missing = []
+-for module in ["ansible", "black", "flake8", "flaky", "mypy", "pylint"]:
+- 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)
+-# we need to be sure that we have the requirements installed as some tests
+-# might depend on these.
+-try:
+- from ansible_compat.prerun import get_cache_dir
+-
+- cache_dir = get_cache_dir(".")
+- subprocess.check_output(
+- [
+- "ansible-galaxy",
+- "collection",
+- "install",
+- "-p",
+- f"{cache_dir}/collections",
+- "-r",
+- "requirements.yml",
+- ],
+- stderr=subprocess.PIPE,
+- text=True,
+- )
+-except subprocess.CalledProcessError as exc:
+- print(f"{exc}\n{exc.stderr}\n{exc.stdout}", file=sys.stderr)
+- sys.exit(1)
+-
+-# flake8: noqa: E402
+-from ansible.module_utils.common.yaml import ( # pylint: disable=wrong-import-position
+- HAS_LIBYAML,
+-)
+-
+-if not HAS_LIBYAML and sys.version_info >= (3, 9, 0):
+- # While presence of libyaml is not required for runtime, we keep this error
+- # fatal here in order to be sure that we spot libyaml errors during testing.
+- #
+- # For 3.8.x we do not do this check, as libyaml does not have an arm64 build for py38.
+- print(
+- "FATAL: For testing, we require pyyaml to be installed with its native extension, missing it would make testing 3x slower and risk missing essential bugs.",
+- file=sys.stderr,
+- )
+- sys.exit(1)
+-
+
+ os.environ["NO_COLOR"] = "1"
+