summaryrefslogtreecommitdiffstats
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/deb-testing.patch36
-rw-r--r--debian/patches/remove_version_check.patch18
-rw-r--r--debian/patches/ruamel-yaml-0.18.5.patch48
-rw-r--r--debian/patches/series1
4 files changed, 29 insertions, 74 deletions
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 <crusoe@debian.org>
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 <samueloph@debian.org>
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 <ssbarnea@redhat.com>
-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