From a6159df32caeeca2fcef08ed95db98918630ad3b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 26 Jun 2024 08:25:11 +0200 Subject: Merging debian version 24.6.1-1. Signed-off-by: Daniel Baumann --- debian/changelog | 16 +++++++++++ debian/control | 23 ++++++++------- debian/patches/deb-testing.patch | 36 +++++++++++------------ debian/patches/remove_version_check.patch | 18 ++++++++---- debian/patches/ruamel-yaml-0.18.5.patch | 48 ------------------------------- debian/patches/series | 1 - debian/rules | 10 ++++++- 7 files changed, 67 insertions(+), 85 deletions(-) delete mode 100644 debian/patches/ruamel-yaml-0.18.5.patch (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index ea9fdda..2bf78ba 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,19 @@ +ansible-lint (24.6.1-1) unstable; urgency=medium + + * Team upload. + * New upstream version 24.6.1 (Closes: #1070194) + * d/control: + - Add some required dependencies + - Update version constraint on black and python3-ansible-compat + - Bump Standards-Version to 4.7.0 + - Run wrap-and-sort + * d/patches: + - Drop ruamel-yaml-0.18.5.patch + - Refresh remaining patches + * d/rules: Skip some failing tests + + -- Vincent Blut Sun, 23 Jun 2024 16:50:49 +0200 + ansible-lint (6.17.2-3~progress7.99u1) graograman-backports; urgency=medium * Uploading to graograman-backports, remaining changes: diff --git a/debian/control b/debian/control index 6f2c517..2d8ae57 100644 --- a/debian/control +++ b/debian/control @@ -7,24 +7,27 @@ XSBC-Original-Uploaders: Samuel Henrique , Bugs: mailto:maintainers@lists.progress-linux.org Section: misc Priority: optional -Build-Depends: debhelper-compat (= 13), +Build-Depends: black (>= 24.3.0) , + debhelper-compat (= 13), dh-sequence-python3, + git , pybuild-plugin-pyproject, python3-all, - python3-setuptools, - python3-setuptools-scm, + python3-ansible-compat (>= 24.5.0) , + python3-filelock (>= 3.3.0) , + python3-importlib-metadata , + python3-jmespath , + python3-license-expression (>= 30.3.0) , python3-pytest , python3-pytest-mock , python3-pytest-xdist , - python3-ansible-compat (>= 4.0.5) , - python3-filelock (>= 3.3.0) , python3-rich (>= 12.0.0) , python3-ruamel.yaml (>= 0.18.5) , + python3-setuptools, + python3-setuptools-scm, python3-wcmatch , - black (>= 22.8.0) , - git , yamllint (>= 1.30.0) -Standards-Version: 4.6.2 +Standards-Version: 4.7.0 Vcs-Browser: https://git.progress-linux.org/packages/graograman-backports/ansible-lint Vcs-Git: https://git.progress-linux.org/packages/graograman-backports/ansible-lint XSBC-Original-Vcs-Browser: https://salsa.debian.org/python-team/packages/ansible-lint @@ -36,9 +39,9 @@ Testsuite: autopkgtest-pkg-pybuild Package: ansible-lint Architecture: all Depends: ansible-core, - black (>= 22.8.0), + black (>= 24.3.0), git, - python3-ansible-compat (>= 4.0.5), + python3-ansible-compat (>= 24.5.0), python3-filelock (>= 3.3.0), python3-jinja2, python3-jsonschema (>= 4.10.0), diff --git a/debian/patches/deb-testing.patch b/debian/patches/deb-testing.patch index 7556c4f..52aaf42 100644 --- a/debian/patches/deb-testing.patch +++ b/debian/patches/deb-testing.patch @@ -1,18 +1,20 @@ Author: Michael R. Crusoe Description: Debian-specific changes for running the tests offline during the build Forwarded: not-needed +Index: ansible-lint/conftest.py +=================================================================== --- ansible-lint.orig/conftest.py +++ ansible-lint/conftest.py -@@ -15,7 +15,7 @@ - +@@ -17,7 +17,7 @@ if Path.cwd() != Path(__file__).parent: # checking if user is running pytest without installing test dependencies: - missing = [] --for module in ["ansible", "black", "mypy", "pylint"]: -+for module in ["ansible", "black"]: - if not importlib.util.find_spec(module): - missing.append(module) + missing = [ + module +- for module in ["ansible", "black", "mypy", "pylint"] ++ for module in ["ansible", "black"] + if not importlib.util.find_spec(module) + ] if missing: -@@ -30,18 +30,6 @@ +@@ -32,18 +32,6 @@ def pytest_configure(config: pytest.Conf """Ensure we run preparation only on master thread when running in parallel.""" if is_help_option_present(config): return @@ -31,21 +33,17 @@ Forwarded: not-needed def is_help_option_present(config: pytest.Config) -> bool: +Index: ansible-lint/test/test_schemas.py +=================================================================== --- ansible-lint.orig/test/test_schemas.py +++ ansible-lint/test/test_schemas.py -@@ -10,7 +10,6 @@ - from unittest.mock import DEFAULT, MagicMock, patch - - import pytest --import spdx.config - - from ansiblelint.file_utils import Lintable - from ansiblelint.schemas import __file__ as schema_module -@@ -18,7 +17,6 @@ +@@ -20,9 +20,6 @@ from ansiblelint.schemas.__main__ import from ansiblelint.schemas.main import validate_file_schema schema_path = Path(schema_module).parent --spdx_config_path = Path(spdx.config.__file__).parent +-spdx_config_path = ( +- Path(license_expression.__file__).parent / "data" / "scancode-licensedb-index.json" +-) - def test_refresh_schemas() -> None: + def urlopen_side_effect(*_args: Any, **kwargs: Any) -> DEFAULT: diff --git a/debian/patches/remove_version_check.patch b/debian/patches/remove_version_check.patch index c68c8aa..f55abd5 100644 --- a/debian/patches/remove_version_check.patch +++ b/debian/patches/remove_version_check.patch @@ -1,9 +1,11 @@ Description: Remove version check at runtime Author: Samuel Henrique Forwarded: not-needed +Index: ansible-lint/src/ansiblelint/config.py +=================================================================== --- ansible-lint.orig/src/ansiblelint/config.py +++ ansible-lint/src/ansiblelint/config.py -@@ -265,53 +265,5 @@ +@@ -296,55 +296,5 @@ def get_deps_versions() -> dict[str, Ver def get_version_warning() -> str: @@ -11,6 +13,11 @@ Forwarded: not-needed - # 0.1dev1 is special fallback version - if __version__ == "0.1.dev1": # pragma: no cover - return "" +- pip = guess_install_method() +- # If we do not know how to upgrade, we do not want to show any warnings +- # about version. +- if not pip: +- return "" - - msg = "" - data = {} @@ -51,17 +58,16 @@ Forwarded: not-needed - msg = "[dim]You are using a pre-release version of ansible-lint.[/]" - elif current_version < new_version: - msg = f"""[warning]A new release of ansible-lint is available: [red]{current_version}[/] → [green][link={html_url}]{new_version}[/][/][/]""" -- -- pip = guess_install_method() -- if pip: -- msg += f" Upgrade by running: [info]{pip}[/]" +- msg += f" Upgrade by running: [info]{pip}[/]" - - return msg + """Patched on Debian to not download release information from third parties""" + return "" +Index: ansible-lint/test/test_main.py +=================================================================== --- ansible-lint.orig/test/test_main.py +++ ansible-lint/test/test_main.py -@@ -48,7 +48,7 @@ +@@ -50,7 +50,7 @@ def test_call_from_outside_venv(expected warning_found = "PATH altered to include" in proc.stderr assert warning_found is expected_warning diff --git a/debian/patches/ruamel-yaml-0.18.5.patch b/debian/patches/ruamel-yaml-0.18.5.patch deleted file mode 100644 index aaf29c6..0000000 --- a/debian/patches/ruamel-yaml-0.18.5.patch +++ /dev/null @@ -1,48 +0,0 @@ -From: Sorin Sbarnea -Date: Fri, 3 Nov 2023 12:59:04 +0000 -Subject: Require ruamel.yaml >= 0.18.5 -Origin: upstream,https://github.com/ansible/ansible-lint/pull/3880 -Forwarded: not-needed - -Backported from upstream for version 6.17.2 - ---- ansible-lint.orig/.config/requirements.in -+++ ansible-lint/.config/requirements.in -@@ -10,7 +10,7 @@ - pathspec>=0.10.3 # Mozilla Public License 2.0 (MPL 2.0) - pyyaml>=5.4.1 # MIT (centos 9 has 5.3.1) - rich>=12.0.0 # MIT --ruamel.yaml>=0.17.0,<0.18,!=0.17.29,!=0.17.30 # MIT, next version is planned to have breaking changes -+ruamel.yaml>=0.18.5 # MIT - requests>=2.31.0 # Apache-2.0 (indirect, but we want newer version for security reasons) - subprocess-tee>=0.4.1 # MIT, used by ansible-compat - yamllint >= 1.30.0 # GPLv3 ---- ansible-lint.orig/src/ansiblelint/yaml_utils.py -+++ ansible-lint/src/ansiblelint/yaml_utils.py -@@ -795,7 +795,7 @@ - """ - # Default to reading/dumping YAML 1.1 (ruamel.yaml defaults to 1.2) - self._yaml_version_default: tuple[int, int] = (1, 1) -- self._yaml_version: str | tuple[int, int] = self._yaml_version_default -+ self._yaml_version: tuple[int, int] = self._yaml_version_default - - super().__init__(typ=typ, pure=pure, output=output, plug_ins=plug_ins) - -@@ -898,7 +898,7 @@ - return cast(dict[str, Union[bool, int, str]], config) - - @property # type: ignore[override] -- def version(self) -> str | tuple[int, int]: -+ def version(self) -> tuple[int, int]: - """Return the YAML version used to parse or dump. - - Ansible uses PyYAML which only supports YAML 1.1. ruamel.yaml defaults to 1.2. -@@ -909,7 +909,7 @@ - return self._yaml_version - - @version.setter -- def version(self, value: str | tuple[int, int] | None) -> None: -+ def version(self, value: tuple[int, int] | None) -> None: - """Ensure that yaml version uses our default value. - - The yaml Reader updates this value based on the ``%YAML`` directive in files. diff --git a/debian/patches/series b/debian/patches/series index 6aa9c8a..faba802 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,2 @@ -ruamel-yaml-0.18.5.patch remove_version_check.patch deb-testing.patch diff --git a/debian/rules b/debian/rules index 6cf51fc..d857432 100755 --- a/debian/rules +++ b/debian/rules @@ -4,7 +4,7 @@ export LC_ALL=C.UTF-8 export PYBUILD_BEFORE_TEST=cp --recursive {dir}/examples {dir}/conftest.py {dir}/.pre-commit-config.yaml {dir}/.ansible-lint {build_dir}/ export PYBUILD_AFTER_TEST=rm -Rf {build_dir}/examples {build_dir}/conftest.py {build_dir}/.pre-commit-config.yaml {build_dir}/.ansible-lint -export PYBUILD_TEST_ARGS=-n auto -k "not (test_spdx or test_args_module_pass or test_risky_file_permissions or test_fqcn_builtin_fail or test_fqcn_builtin_pass or test_transformer or test_call_from_outside_venv or test_schema_moves or test_rules_id_format or test_yamllint or test_example or test_example_custom_module or test_verbosity or test_task_hook_import_playbook or test_request_timeouterror_handling or test_requests_uses_timeout or test_schema_refresh_cli or test_refresh_schemas)" +export PYBUILD_TEST_ARGS=-n auto -k "not (test_spdx or test_args_module_pass or test_risky_file_permissions or test_fqcn_builtin_fail or test_fqcn_builtin_pass or test_transformer or test_call_from_outside_venv or test_schema_moves or test_rules_id_format or test_yamllint or test_example or test_example_custom_module or test_verbosity or test_task_hook_import_playbook or test_request_timeouterror_handling or test_requests_uses_timeout or test_schema_refresh_cli or test_refresh_schemas or test_jinja_transform or test_no_tabs_rule or test_nodeps[1] or test_nodeps[2] or test_import_playbook_from_collection or test_broken_ansible_cfg or test_find_children_in_module or test_args_module_relative_import)" # test_spdx: requires the yet-to-be-packaged https://pypi.org/project/spdx/ # test_args_module_pass: require internet access # test_risky_file_permissions: requires internet access @@ -23,6 +23,14 @@ export PYBUILD_TEST_ARGS=-n auto -k "not (test_spdx or test_args_module_pass or # test_requests_uses_timeout: works during the build, but not as an autopkgtest # test_schema_refresh_cli: works during the build, but not as an autopkgtest # test_refresh_schemas: works during the build, but not as an autopkgtest +# test_jinja_transform: requires internet access +# test_no_tabs_rule: requires internet access +# test_nodeps[1]: requires /usr/bin/ansible-lint +# test_nodeps[2]: requires /usr/bin/ansible-lint +# test_import_playbook_from_collection: requires internet access +# test_broken_ansible_cfg: requires /usr/bin/ansible-lint +# test_find_children_in_module: unknown +# test_args_module_relative_import: unknown %: dh $@ --buildsystem=pybuild -- cgit v1.2.3