commit: 0e9e9af2ff2ab8d6544c6bff14e6802ce4645de6 Author: idealseal <realidealseal <AT> protonmail <DOT> com> AuthorDate: Thu Jul 3 11:13:15 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Jul 5 10:48:56 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e9e9af2
app-admin/ansible-core: backport increase resolvelib upper bound Increase the requirement for resolvelib to <2.0.0. Multiple packages require resolvelib >1.0.0,<2.0.0 while ansible-2.18 forces <1.0.0 at the moment preventing updates. Bug: https://bugs.gentoo.org/848486 Signed-off-by: idealseal <realidealseal <AT> protonmail.com> Part-of: https://github.com/gentoo/gentoo/pull/42851 Closes: https://github.com/gentoo/gentoo/pull/42851 Signed-off-by: Sam James <sam <AT> gentoo.org> .../ansible-core/ansible-core-2.18.6-r1.ebuild | 50 +++++++ ...-core-2.18.6-resolvelib-upper-bound-2.0.0.patch | 166 +++++++++++++++++++++ 2 files changed, 216 insertions(+) diff --git a/app-admin/ansible-core/ansible-core-2.18.6-r1.ebuild b/app-admin/ansible-core/ansible-core-2.18.6-r1.ebuild new file mode 100644 index 000000000000..01859c846135 --- /dev/null +++ b/app-admin/ansible-core/ansible-core-2.18.6-r1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517="setuptools" +PYTHON_COMPAT=( python3_{11..14} ) + +inherit distutils-r1 + +DESCRIPTION="Model-driven deployment, config management, and command execution framework" +HOMEPAGE="https://www.ansible.com/" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/ansible/ansible.git" + EGIT_BRANCH="devel" +else + inherit pypi + KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86 ~x64-macos" +fi + +LICENSE="GPL-3" +SLOT="0" + +# Upstream runs tests via the ansible-test command, which requires the package +# to be installed prior to testing. Running the test via pytest in non-trivial +# due to the amount of flags that need to be passed. +RESTRICT="test" + +RDEPEND=" + >=dev-python/paramiko-3.5.1[${PYTHON_USEDEP}] + dev-python/jinja2[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/cryptography[${PYTHON_USEDEP}] + dev-python/httplib2[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + dev-python/netaddr[${PYTHON_USEDEP}] + dev-python/pexpect[${PYTHON_USEDEP}] + >=dev-python/resolvelib-0.5.3[${PYTHON_USEDEP}] + <dev-python/resolvelib-2.0.0[${PYTHON_USEDEP}] + net-misc/sshpass + virtual/ssh +" + +BDEPEND=">=dev-python/packaging-16.6[${PYTHON_USEDEP}]" + +PATCHES=( + "${FILESDIR}/${P}-resolvelib-upper-bound-2.0.0.patch" +) diff --git a/app-admin/ansible-core/files/ansible-core-2.18.6-resolvelib-upper-bound-2.0.0.patch b/app-admin/ansible-core/files/ansible-core-2.18.6-resolvelib-upper-bound-2.0.0.patch new file mode 100644 index 000000000000..268462af56a7 --- /dev/null +++ b/app-admin/ansible-core/files/ansible-core-2.18.6-resolvelib-upper-bound-2.0.0.patch @@ -0,0 +1,166 @@ +From d4085a56e00a6f9059e7df6e4a16eef4f5737501 Mon Sep 17 00:00:00 2001 +From: s-hertel <19572925+s-her...@users.noreply.github.com> +Date: Fri, 1 Nov 2024 11:49:04 -0400 +Subject: [PATCH 1/2] Bump ansible-galaxy's resolvelib requirement upperbound + to 1.2.0 + +Test against the newest resolvelib release 1.1.0 + +Only test the oldest supported resolvelib version, latest minor release, +and releases that offer additional coverage +--- + changelogs/fragments/update-resolvelib-lt-1_2_0.yml | 2 ++ + lib/ansible/galaxy/dependency_resolution/providers.py | 2 +- + requirements.txt | 2 +- + .../targets/ansible-galaxy-collection/vars/main.yml | 11 +++++------ + test/lib/ansible_test/_data/requirements/ansible.txt | 2 +- + 5 files changed, 10 insertions(+), 9 deletions(-) + create mode 100644 changelogs/fragments/update-resolvelib-lt-1_2_0.yml + +diff --git a/changelogs/fragments/update-resolvelib-lt-1_2_0.yml b/changelogs/fragments/update-resolvelib-lt-1_2_0.yml +new file mode 100644 +index 00000000000000..461f436339b4c5 +--- /dev/null ++++ b/changelogs/fragments/update-resolvelib-lt-1_2_0.yml +@@ -0,0 +1,2 @@ ++minor_changes: ++ - ansible-galaxy - support ``resolvelib >= 0.5.3, < 1.2.0`` (https://github.com/ansible/ansible/issues/84217). +diff --git a/lib/ansible/galaxy/dependency_resolution/providers.py b/lib/ansible/galaxy/dependency_resolution/providers.py +index 7578cae785c100..f0f30c9cc4be58 100644 +--- a/lib/ansible/galaxy/dependency_resolution/providers.py ++++ b/lib/ansible/galaxy/dependency_resolution/providers.py +@@ -39,7 +39,7 @@ class AbstractProvider: # type: ignore[no-redef] + + # TODO: add python requirements to ansible-test's ansible-core distribution info and remove the hardcoded lowerbound/upperbound fallback + RESOLVELIB_LOWERBOUND = SemanticVersion("0.5.3") +-RESOLVELIB_UPPERBOUND = SemanticVersion("1.1.0") ++RESOLVELIB_UPPERBOUND = SemanticVersion("1.2.0") + RESOLVELIB_VERSION = SemanticVersion.from_loose_version(LooseVersion(resolvelib_version)) + + +diff --git a/requirements.txt b/requirements.txt +index 5eaf9f2cbc2911..e0126172e5e39e 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -12,4 +12,4 @@ packaging + # NOTE: Ref: https://github.com/sarugaku/resolvelib/issues/69 + # NOTE: When updating the upper bound, also update the latest version used + # NOTE: in the ansible-galaxy-collection test suite. +-resolvelib >= 0.5.3, < 1.1.0 # dependency resolver used by ansible-galaxy ++resolvelib >= 0.5.3, < 1.2.0 # dependency resolver used by ansible-galaxy +diff --git a/test/integration/targets/ansible-galaxy-collection/vars/main.yml b/test/integration/targets/ansible-galaxy-collection/vars/main.yml +index 066d2678bca56e..abbc40cbc1eff4 100644 +--- a/test/integration/targets/ansible-galaxy-collection/vars/main.yml ++++ b/test/integration/targets/ansible-galaxy-collection/vars/main.yml +@@ -4,13 +4,12 @@ gpg_homedir: "{{ galaxy_dir }}/gpg" + + offline_server: https://test-hub.demolab.local/api/galaxy/content/api/ + ++# Test oldest and most recently supported, and versions with notable changes + supported_resolvelib_versions: +- - "0.5.3" # Oldest supported +- - "0.6.0" +- - "0.7.0" +- - "0.8.0" +- - "0.9.0" +- - "1.0.1" ++ - "0.5.3" # test CollectionDependencyProvider050 ++ - "0.6.0" # test CollectionDependencyProvider060 ++ - "0.7.0" # test CollectionDependencyProvider070 ++ - "1.1.0" # test CollectionDependencyProvider080 + + unsupported_resolvelib_versions: + - "0.2.0" # Fails on import +diff --git a/test/lib/ansible_test/_data/requirements/ansible.txt b/test/lib/ansible_test/_data/requirements/ansible.txt +index 5eaf9f2cbc2911..e0126172e5e39e 100644 +--- a/test/lib/ansible_test/_data/requirements/ansible.txt ++++ b/test/lib/ansible_test/_data/requirements/ansible.txt +@@ -12,4 +12,4 @@ packaging + # NOTE: Ref: https://github.com/sarugaku/resolvelib/issues/69 + # NOTE: When updating the upper bound, also update the latest version used + # NOTE: in the ansible-galaxy-collection test suite. +-resolvelib >= 0.5.3, < 1.1.0 # dependency resolver used by ansible-galaxy ++resolvelib >= 0.5.3, < 1.2.0 # dependency resolver used by ansible-galaxy + +From 659042e85509da0192b8afd8429d6ad5c31af20c Mon Sep 17 00:00:00 2001 +From: s-hertel <19572925+s-her...@users.noreply.github.com> +Date: Tue, 5 Nov 2024 17:09:36 -0500 +Subject: [PATCH 2/2] Update the upperbound to 2.0.0 since minor SemVer + releases should not contain breaking changes + +Add a better code comment about the resolvelib versions tested against +--- + ...olvelib-lt-1_2_0.yml => update-resolvelib-lt-2_0_0.yml} | 2 +- + lib/ansible/galaxy/dependency_resolution/providers.py | 2 +- + requirements.txt | 2 +- + .../targets/ansible-galaxy-collection/vars/main.yml | 7 +++++-- + test/lib/ansible_test/_data/requirements/ansible.txt | 2 +- + 5 files changed, 9 insertions(+), 6 deletions(-) + rename changelogs/fragments/{update-resolvelib-lt-1_2_0.yml => update-resolvelib-lt-2_0_0.yml} (50%) + +diff --git a/changelogs/fragments/update-resolvelib-lt-1_2_0.yml b/changelogs/fragments/update-resolvelib-lt-2_0_0.yml +similarity index 50% +rename from changelogs/fragments/update-resolvelib-lt-1_2_0.yml +rename to changelogs/fragments/update-resolvelib-lt-2_0_0.yml +index 461f436339b4c5..10c4f1a0838b91 100644 +--- a/changelogs/fragments/update-resolvelib-lt-1_2_0.yml ++++ b/changelogs/fragments/update-resolvelib-lt-2_0_0.yml +@@ -1,2 +1,2 @@ + minor_changes: +- - ansible-galaxy - support ``resolvelib >= 0.5.3, < 1.2.0`` (https://github.com/ansible/ansible/issues/84217). ++ - ansible-galaxy - support ``resolvelib >= 0.5.3, < 2.0.0`` (https://github.com/ansible/ansible/issues/84217). +diff --git a/lib/ansible/galaxy/dependency_resolution/providers.py b/lib/ansible/galaxy/dependency_resolution/providers.py +index f0f30c9cc4be58..d336c3441e2e1d 100644 +--- a/lib/ansible/galaxy/dependency_resolution/providers.py ++++ b/lib/ansible/galaxy/dependency_resolution/providers.py +@@ -39,7 +39,7 @@ class AbstractProvider: # type: ignore[no-redef] + + # TODO: add python requirements to ansible-test's ansible-core distribution info and remove the hardcoded lowerbound/upperbound fallback + RESOLVELIB_LOWERBOUND = SemanticVersion("0.5.3") +-RESOLVELIB_UPPERBOUND = SemanticVersion("1.2.0") ++RESOLVELIB_UPPERBOUND = SemanticVersion("2.0.0") + RESOLVELIB_VERSION = SemanticVersion.from_loose_version(LooseVersion(resolvelib_version)) + + +diff --git a/requirements.txt b/requirements.txt +index e0126172e5e39e..45c9c01b803647 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -12,4 +12,4 @@ packaging + # NOTE: Ref: https://github.com/sarugaku/resolvelib/issues/69 + # NOTE: When updating the upper bound, also update the latest version used + # NOTE: in the ansible-galaxy-collection test suite. +-resolvelib >= 0.5.3, < 1.2.0 # dependency resolver used by ansible-galaxy ++resolvelib >= 0.5.3, < 2.0.0 # dependency resolver used by ansible-galaxy +diff --git a/test/integration/targets/ansible-galaxy-collection/vars/main.yml b/test/integration/targets/ansible-galaxy-collection/vars/main.yml +index abbc40cbc1eff4..c865871c4fe692 100644 +--- a/test/integration/targets/ansible-galaxy-collection/vars/main.yml ++++ b/test/integration/targets/ansible-galaxy-collection/vars/main.yml +@@ -4,12 +4,15 @@ gpg_homedir: "{{ galaxy_dir }}/gpg" + + offline_server: https://test-hub.demolab.local/api/galaxy/content/api/ + +-# Test oldest and most recently supported, and versions with notable changes ++# Test oldest and most recently supported, and versions with notable changes. ++# The last breaking change for a feature ansible-galaxy uses was in 0.8.0. ++# It would be redundant to test every minor version since 0.8.0, so we just test against the latest minor release. ++# NOTE: If ansible-galaxy incorporates new resolvelib features, this matrix should be updated to verify the features work on all supported versions. + supported_resolvelib_versions: + - "0.5.3" # test CollectionDependencyProvider050 + - "0.6.0" # test CollectionDependencyProvider060 + - "0.7.0" # test CollectionDependencyProvider070 +- - "1.1.0" # test CollectionDependencyProvider080 ++ - "<2.0.0" # test CollectionDependencyProvider080 + + unsupported_resolvelib_versions: + - "0.2.0" # Fails on import +diff --git a/test/lib/ansible_test/_data/requirements/ansible.txt b/test/lib/ansible_test/_data/requirements/ansible.txt +index e0126172e5e39e..45c9c01b803647 100644 +--- a/test/lib/ansible_test/_data/requirements/ansible.txt ++++ b/test/lib/ansible_test/_data/requirements/ansible.txt +@@ -12,4 +12,4 @@ packaging + # NOTE: Ref: https://github.com/sarugaku/resolvelib/issues/69 + # NOTE: When updating the upper bound, also update the latest version used + # NOTE: in the ansible-galaxy-collection test suite. +-resolvelib >= 0.5.3, < 1.2.0 # dependency resolver used by ansible-galaxy ++resolvelib >= 0.5.3, < 2.0.0 # dependency resolver used by ansible-galaxy