diff --git a/ansible-core-2.12.4-resolvelib-0.8.1.patch b/ansible-core-2.12.4-resolvelib-0.8.1.patch new file mode 100644 index 0000000..415fafc --- /dev/null +++ b/ansible-core-2.12.4-resolvelib-0.8.1.patch @@ -0,0 +1,101 @@ +From bbadab2515922ef3889f1c4057e9368bd1b717ed Mon Sep 17 00:00:00 2001 +From: Wong Hoi Sing Edison +Date: Tue, 9 Nov 2021 15:13:19 +0800 +Subject: [PATCH] Upgrade `resolvelib>=0.6.0,<1.0.0` + +Since 2021-09-27 `resolvelib` author comment with "issue resolved now" +(see https://github.com/sarugaku/resolvelib/issues/69#issuecomment-927333533). + +Replace `resolvelib` version upper cap with `resolvelib>=0.6.0,<1.0.0` +with corresponding `find_matches()` interface change should now be good +enough. + +Signed-off-by: Wong Hoi Sing Edison +--- + docs/docsite/known_good_reqs.txt | 2 +- + lib/ansible/galaxy/dependency_resolution/providers.py | 3 ++- + requirements.txt | 2 +- + test/lib/ansible_test/_data/requirements/ansible.txt | 2 +- + test/sanity/code-smell/docs-build.requirements.txt | 2 +- + test/sanity/code-smell/package-data.requirements.txt | 2 +- + 6 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/docs/docsite/known_good_reqs.txt b/docs/docsite/known_good_reqs.txt +index 75323d13b02286..89101bab91aec2 100644 +--- a/docs/docsite/known_good_reqs.txt ++++ b/docs/docsite/known_good_reqs.txt +@@ -9,7 +9,7 @@ docutils==0.16 + jinja2==3.0.1 + Pygments==2.9.0 + PyYAML==5.4.1 +-resolvelib==0.5.4 ++resolvelib==0.8.1 + rstcheck==3.3.1 + sphinx==4.0.2 + sphinx-notfound-page==0.7.1 # must be >= 0.6 +diff --git a/lib/ansible/galaxy/dependency_resolution/providers.py b/lib/ansible/galaxy/dependency_resolution/providers.py +index 35b2cedabca41b..2819262b2826f2 100644 +--- a/lib/ansible/galaxy/dependency_resolution/providers.py ++++ b/lib/ansible/galaxy/dependency_resolution/providers.py +@@ -182,7 +182,7 @@ def get_preference( + return float('-inf') + return len(candidates) + +- def find_matches(self, requirements): ++ def find_matches(self, identifier, requirements, incompatibilities): + # type: (List[Requirement]) -> List[Candidate] + r"""Find all possible candidates satisfying given requirements. + +@@ -208,6 +208,7 @@ def find_matches(self, requirements): + # FIXME: its cloned tmp dir. Using only the first one creates + # FIXME: loops that prevent any further dependency exploration. + # FIXME: We need to figure out how to prevent this. ++ requirements = list(requirements[identifier]) + first_req = requirements[0] + fqcn = first_req.fqcn + # The fqcn is guaranteed to be the same +diff --git a/requirements.txt b/requirements.txt +index a732a5951d2190..bf02006697b4e9 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -10,4 +10,4 @@ packaging + # NOTE: resolvelib 0.x version bumps should be considered major/breaking + # NOTE: and we should update the upper cap with care, at least until 1.0 + # NOTE: Ref: https://github.com/sarugaku/resolvelib/issues/69 +-resolvelib >= 0.5.3, < 0.6.0 # dependency resolver used by ansible-galaxy ++resolvelib >= 0.6.0, < 1.0.0 # dependency resolver used by ansible-galaxy +diff --git a/test/lib/ansible_test/_data/requirements/ansible.txt b/test/lib/ansible_test/_data/requirements/ansible.txt +index a732a5951d2190..bf02006697b4e9 100644 +--- a/test/lib/ansible_test/_data/requirements/ansible.txt ++++ b/test/lib/ansible_test/_data/requirements/ansible.txt +@@ -10,4 +10,4 @@ packaging + # NOTE: resolvelib 0.x version bumps should be considered major/breaking + # NOTE: and we should update the upper cap with care, at least until 1.0 + # NOTE: Ref: https://github.com/sarugaku/resolvelib/issues/69 +-resolvelib >= 0.5.3, < 0.6.0 # dependency resolver used by ansible-galaxy ++resolvelib >= 0.6.0, < 1.0.0 # dependency resolver used by ansible-galaxy +diff --git a/test/sanity/code-smell/docs-build.requirements.txt b/test/sanity/code-smell/docs-build.requirements.txt +index 36fc363a0e40cc..19b2958a80396f 100644 +--- a/test/sanity/code-smell/docs-build.requirements.txt ++++ b/test/sanity/code-smell/docs-build.requirements.txt +@@ -1,6 +1,6 @@ + jinja2 == 3.0.1 + pyyaml == 5.4.1 +-resolvelib == 0.5.4 ++resolvelib == 0.8.1 + sphinx == 2.1.2 + sphinx-notfound-page == 0.7.1 + sphinx-ansible-theme == 0.8.0 +diff --git a/test/sanity/code-smell/package-data.requirements.txt b/test/sanity/code-smell/package-data.requirements.txt +index 8055b3c5c701f3..aab0f70cccfbd2 100644 +--- a/test/sanity/code-smell/package-data.requirements.txt ++++ b/test/sanity/code-smell/package-data.requirements.txt +@@ -2,7 +2,7 @@ docutils == 0.17.1 + jinja2 == 3.0.1 + packaging == 21.0 + pyyaml == 5.4.1 # ansible-core requirement +-resolvelib == 0.5.4 # ansible-core requirement ++resolvelib == 0.8.1 # ansible-core requirement + rstcheck == 3.3.1 + straight.plugin == 1.5.0 + antsibull-changelog == 0.9.0 diff --git a/ansible-core.spec b/ansible-core.spec index d7222c0..3dd3fa4 100644 --- a/ansible-core.spec +++ b/ansible-core.spec @@ -1,6 +1,7 @@ +%define with_pyver 310 Name: ansible-core -Version: 2.11.6 -Release: 1mamba +Version: 2.12.4 +Release: 2mamba Summary: A radically simple IT automation system Group: System/Libraries Vendor: openmamba @@ -9,41 +10,46 @@ Packager: Silvan Calarco URL: https://www.ansible.com/ Source: https://pypi.debian.net/ansible-core/ansible-core-%{version}.tar.gz Patch0: ansible-base-2.11.0-upstream-gpg_key-fix-for-binary-keys.patch +Patch1: ansible-core-2.12.4-resolvelib-0.8.1.patch License: GPL ## AUTOBUILDREQ-BEGIN -BuildRequires: libpython3-devel -BuildRequires: python3.7dist(cryptography) -BuildRequires: python3.7dist(jinja2) -BuildRequires: python3.7dist(packaging) -BuildRequires: python3.7dist(pyyaml) -BuildRequires: python3.7dist(resolvelib) +BuildRequires: libpython310-devel +BuildRequires: python3.10dist(cryptography) +BuildRequires: python3.10dist(jinja2) +BuildRequires: python3.10dist(packaging) +BuildRequires: python3.10dist(pyyaml) +BuildRequires: python3.10dist(resolvelib) ## AUTOBUILDREQ-END -Provides: ansible-base -Obsoletes: ansible-base <= 2.11.0-1mamba %description %{summary}. -%if 0%{?with_pyver} +%if 0%{?with_pyver} \ +%define py_requires_append \ +Provides: ansible-base \ +Obsoletes: ansible-base <= 2.11.0-1mamba \ +Provides: ansible-core \ +Obsoletes: ansible-core < 2.12.4-2mamba %pyver_package %endif %prep %setup -q -n ansible-core-%{version} #%patch0 -p1 +%patch1 -p1 -b .resolvelib-0.8.1 %build export ANSIBLE_SKIP_CONFLICT_CHECK=1 -CFLAGS="%{optflags}" %{__python3} setup.py build +CFLAGS="%{optflags}" %{__python} setup.py build %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" export ANSIBLE_SKIP_CONFLICT_CHECK=1 -%{__python3} setup.py install \ +%{__python} setup.py install \ -O1 --skip-build \ --root="%{buildroot}" \ - --install-headers=%{python3_inc} \ - --install-lib=%{python3_sitearch} \ + --install-headers=%{python_inc} \ + --install-lib=%{python_sitearch} \ --record=%{name}.filelist sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist @@ -51,12 +57,17 @@ sed -i "/ /d" %{name}.filelist %files %{?pyappend} -f %{name}.filelist %defattr(-,root,root) -%{python3_sitearch}/ansible_test/_data/injector/ansible-inventory -%dir %{python3_sitearch}/ansible_core-%{version}-py*.egg-info -%{python3_sitearch}/ansible_core-%{version}-py*.egg-info/* +%dir %{python_sitearch}/ansible_core-%{version}-py*.egg-info +%{python_sitearch}/ansible_core-%{version}-py*.egg-info/* %doc COPYING %changelog +* Sat Apr 16 2022 Silvan Calarco 2.12.4-2mamba +- added patch against python-resolvelib 0.8.1 + +* Fri Apr 08 2022 Automatic Build System 2.12.4-1mamba +- automatic version update by autodist + * Tue Oct 12 2021 Automatic Build System 2.11.6-1mamba - automatic version update by autodist