osc copypac from project:home:ojkastl_buildservice:Systemsmanagement_Ansible package:ansible-lint revision:5, using expand

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:ansible/ansible-lint?expand=0&rev=1
This commit is contained in:
Johannes Kastl 2022-07-21 17:55:21 +00:00 committed by Git OBS Bridge
parent 0ec682c0bc
commit 1c9af39c0b
5 changed files with 100 additions and 71 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:735c22e074b9be1c3a7e133de7db2af781c0ddae6c91cba035c0d89de964e462
size 349353

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f57f520ae5d810ce062157dc7d633990ad2fbec81bbbb34ccc4ce3a0c21fcd38
size 281546

View File

@ -1,3 +1,86 @@
-------------------------------------------------------------------
Mon Jul 18 15:51:37 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- update to 6.3.0:
* Minor Changes
- Improve bare variable detection (#2203) @ssbarnea
- Modify VariableHasSpacesRule to check for spaces around filters (#2180) @nirmal-j-patel
* Bugfixes
- Updated schemas (#2206) @ssbarnea
- Avoid load-failure with nested task imports (#2202) @ssbarnea
- Mark load-failure violation as unskippable (#2201) @ssbarnea
- Require jsonschema>=4.6.0 (#2200) @ssbarnea
- Ensure we require ansible-compat>=2.1.0 (#2199) @ssbarnea
- Update dependencies (#2193) @ssbarnea
- Don't yield only-builtins on nested tasks like block (#2187) @evgeni
- Update schemas (#2192) @ssbarnea
- update to 6.2.2:
* Bugfixes
- Accept shell when executable is set (#2176) @nkakouros
- Updated JSON Schemas (#2177) @ssbarnea
- Avoid runtime warnings from ansible-playbook --syntax-check (#2167) @ssbarnea
- Fix duplicated is_nested_task() (#2162) @nishipy
- update to 6.2.1:
* Bugfixes
- Avoid using meta schema on ansible-test integration tests (#2156) @felixfontein
- Update schemas (#2158, #2160) @ssbarnea
- update to 6.2.0:
* Minor Changes
- Add rule to check key order (#2108) @jeefberkey
- Improve yamllint messages and documentation (#2148) @ssbarnea
- Convert rules documentation to markdown (#2144) @ssbarnea
- schema: enable validation of playbook and tasks files (#2133) @ssbarnea
- schema: add validation of argument_specs.yml files (#2131) @ssbarnea
- schema: add support for ansible-navigator config files (#2128) @ssbarnea
- schema: add ability to recognize ansible-lint config files (#2127) @ssbarnea
- schema: add ability to recognize yaml inventory files (#2126) @ssbarnea
- schema: add ability to recognize meta/runtime.yml files (#2125) @ssbarnea
- schema: add support for execution-environments (#2124) @ssbarnea
* Bugfixes
- Properly raise load-failure when utf-8 decoding fails (#2152) @ssbarnea
- Fix codeclimate description output (#2149) @ssbarnea
- Recognize tower requirements.txt files (#2147) @ssbarnea
- Bump test dependencies (#2145) @ssbarnea
- Update to append skipped rules for nested task (#2113) @nishipy
- Convert main README to markdown (#2141) @ssbarnea
- Include schemas inside the wheel (#2142) @ssbarnea
- Convert documentation to markdown (#2137) @ssbarnea
- Change custom yamllint config logging to debug (#2139) @ssbarnea
- Update JSON Schemas (#2138 #2146) @ssbarnea
- Avoid altering PATH when not needed (#2129) @ssbarnea
- Fix offline mode (#2115) @ssbarnea
- Allow use of empty files as valid config files (#2119) @ssbarnea
- update to 6.1.0:
* Minor Changes
- Implement JSON Schema verification for several known file types (#2035) @ssbarnea
- Improve cli argument handling (#2099) @ziegenberg
- Add no-prompting rule as experimental (#2093) @ziegenberg
- Add only-builtins rule to check compatibility with core (#2060) @evgeni
- Add native SARIF output support (#2062) @yongyan-gh
- --write: Optionally pass rule names to --write in cli (#2051) @cognifloyd
- --write: Allow Transforms to mark MatchErrors as fixed (#2041) @cognifloyd
* Bugfixes
- Fix support for block tasks in unnamed-task rule (#2107) @nishipy
- Make sure all tasks get evaluated by matchtask including block/always/rescue and nested tasks (#2031) @nishipy
- Ensure tags are escaped when printed (#2096) @ssbarnea
- Detect role argument_specs files as a lintable kind (#2091) @ziegenberg
- Fix var-naming rule to show line numbers and apply noqa (#2090) @notok
- --write: Do not rewrite zero 0 as octal 00 (#2092) @ziegenberg
- Relax the yamllint rules on spaces inside braces for flow mappings (#2077) @ziegenberg
- Update test and typing deps and remove special code paths for py < 3.8 (#2087) @ziegenberg
- Update package metadata for setuptools (#2086) @ziegenberg
- Apply var-spacing tests to vars files (#2063) @notok
- Add philosophy section to the documentation (#2017) @ssbarnea
- Propagate error message to user on systemexit (#2058) @wbh1
- Fix loading ansible-lint.yml in git projects (#2059) @evgeni
-------------------------------------------------------------------
Wed Jun 22 18:00:04 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- change BuildRequires/Requires for ansible to 2.12 which is only provided
by the new ansible-core package
- remove patch deprecated-pytest-hook.patch
-------------------------------------------------------------------
Sun May 29 11:07:05 UTC 2022 - Sebastian Wagner <sebix+novell.com@sebix.at>

View File

@ -20,13 +20,12 @@
%global lib_name ansiblelint
%{?python_enable_dependency_generator}
Name: ansible-lint
Version: 5.4.0
Version: 6.3.0
Release: 1%{?dist}
Summary: Best practices checker for Ansible
License: MIT
URL: https://github.com/ansible-community/ansible-lint
Source0: https://github.com/ansible-community/ansible-lint/archive/v%{version}/ansible-lint-%{version}.tar.gz
Patch0: https://github.com/ansible/ansible-lint/commit/aa6c1c6577f8178643591ddc06996a5d5588cb9a.patch#/deprecated-pytest-hook.patch
BuildArch: noarch
BuildRequires: python-rpm-macros
BuildRequires: python3-PyYAML
@ -38,17 +37,24 @@ BuildRequires: python3-pytest-xdist
BuildRequires: python3-flaky
BuildRequires: python3-packaging
BuildRequires: python3-tenacity
BuildRequires: python3-yamllint
BuildRequires: python3-yamllint >= 1.25.0
#BuildRequires: git
BuildRequires: python3-enrich >= 1.2.6
BuildRequires: ansible
BuildRequires: python3-ansible-compat >= 2.0.2
BuildRequires: python3-black
BuildRequires: python3-flake8
BuildRequires: python3-mypy
BuildRequires: python3-pylint
BuildRequires: python3-pytest-cov
BuildRequires: python3-rich >= 9.5.1
BuildRequires: python3-ruamel.yaml >= 0.15.37
BuildRequires: python3-wcmatch >= 7.0
# /SECTION
BuildRequires: ansible-core >= 2.12
BuildRequires: fdupes
Requires: ansible
Requires: ansible-core >= 2.12
Requires: python3-PyYAML
Requires: python3-ansible-compat >= 2.0.2
Requires: python3-enrich >= 1.2.6
Requires: python3-packaging
Requires: python3-rich >= 9.5.1
@ -56,13 +62,13 @@ Requires: python3-ruamel.yaml >= 0.15.37
Requires: python3-six
Requires: python3-tenacity
Requires: python3-wcmatch >= 7.0
Requires: python3-yamllint >= 1.25.0
%description
Checks playbooks for practices and behavior that could potentially be improved.
%prep
%setup -n ansible-lint-%{version}
%patch0 -p1
sed -ri 's/(\[metadata\])/\1\nversion = %{version}/' setup.cfg
sed -i '1{/\/usr\/bin\/env python/d;}' src/ansiblelint/__main__.py
@ -77,15 +83,9 @@ python3 -O -m compileall %{buildroot}/%{python3_sitelib}
%fdupes -s %{buildroot}/%{python3_sitelib}
%check
# exclude some tests depending on internet access (galaxy modules)
# exclude test_cli_auto_detect which depends on a local git repository
# exclude test_co and test_call_from_outside_venv because of https://github.com/ansible-community/ansible-lint/issues/1885 FIXED!
PYTHONPATH=${PYTHONPATH:+$PYTHONPATH:}%{buildroot}/%{python3_sitelib} PATH=${PATH:+$PATH:}%{buildroot}/%{_bindir} PYTHONDONTWRITEBYTECODE=1 pytest -v -k 'not (test_prerun_reqs_v1 or test_prerun_reqs_v2 or test_install_collection or test_require_collection_wrong_version or test_cli_auto_detect or test_eco or test_call_from_outside_venv)'
%files
%doc README.rst
%license LICENSE
%doc README.md
%license COPYING
%{_bindir}/ansible-lint
%{python3_sitelib}/%{lib_name}/
%{python3_sitelib}/ansible_lint-%{version}.dist-info/

View File

@ -1,54 +0,0 @@
From aa6c1c6577f8178643591ddc06996a5d5588cb9a Mon Sep 17 00:00:00 2001
From: Sorin Sbarnea <ssbarnea@redhat.com>
Date: Sun, 13 Feb 2022 13:21:49 +0000
Subject: [PATCH] Remove deprecated pytest hook (#1891)
---
conftest.py | 22 ----------------------
tox.ini | 1 +
2 files changed, 1 insertion(+), 22 deletions(-)
diff --git a/conftest.py b/conftest.py
index 303e87302..f93a957af 100644
--- a/conftest.py
+++ b/conftest.py
@@ -1,27 +1,5 @@
"""PyTest Fixtures."""
import os
-import re
-import sys
-from typing import List
os.environ["NO_COLOR"] = "1"
pytest_plugins = ["ansiblelint.testing.fixtures"]
-
-
-def pytest_cmdline_preparse(args: List[str]) -> None:
- """Pytest hook."""
- # disable xdist when called with -k args (filtering)
- # https://stackoverflow.com/questions/66407583/how-to-disable-pytest-xdist-only-when-pytest-is-called-with-filters
- if "xdist" in sys.modules and "-k" in args:
- for i, arg in enumerate(args):
- # remove -n # option
- if arg == "-n":
- del args[i]
- del args[i]
- break
- # remove -n# option
- if re.match(r"-n\d+", arg):
- del args[i]
- break
-
- args[:] = ["-n0"] + args
diff --git a/tox.ini b/tox.ini
index 4ffa9d99e..fb0525be6 100644
--- a/tox.ini
+++ b/tox.ini
@@ -28,6 +28,7 @@ commands =
{envpython} -m pytest \
--junitxml "{toxworkdir}/junit.{envname}.xml" \
{posargs:\
+ -n0 \
-m "not eco" \
-p pytest_cov \
--cov ansiblelint \