Johannes Kastl 2025-01-29 08:10:56 +00:00 committed by Git OBS Bridge
commit 8d8a668337
22 changed files with 2286 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,87 @@
From 771f7ad29ca4d259761eaa88673c2e32f6412bbe Mon Sep 17 00:00:00 2001
From: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
Date: Wed, 6 Nov 2024 10:20:26 -0500
Subject: [PATCH] update ansible-galaxy resolvelib requirement to >= 0.5.3, <
2.0.0 (#84218)
* Update resolvelib upperbound to 2.0.0
Minor SemVer releases should not contain breaking changes
* Test the latest minor release and reduce number of resolvelib versions tested for efficiency
---
.../fragments/update-resolvelib-lt-2_0_0.yml | 2 ++
.../galaxy/dependency_resolution/providers.py | 2 +-
requirements.txt | 2 +-
.../ansible-galaxy-collection/vars/main.yml | 14 ++++++++------
.../ansible_test/_data/requirements/ansible.txt | 2 +-
5 files changed, 13 insertions(+), 9 deletions(-)
create mode 100644 changelogs/fragments/update-resolvelib-lt-2_0_0.yml
diff --git a/changelogs/fragments/update-resolvelib-lt-2_0_0.yml b/changelogs/fragments/update-resolvelib-lt-2_0_0.yml
new file mode 100644
index 00000000000000..10c4f1a0838b91
--- /dev/null
+++ b/changelogs/fragments/update-resolvelib-lt-2_0_0.yml
@@ -0,0 +1,2 @@
+minor_changes:
+ - 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 7578cae785c100..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.1.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 5eaf9f2cbc2911..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.1.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 066d2678bca56e..c865871c4fe692 100644
--- a/test/integration/targets/ansible-galaxy-collection/vars/main.yml
+++ b/test/integration/targets/ansible-galaxy-collection/vars/main.yml
@@ -4,13 +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.
+# 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" # 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
+ - "<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 5eaf9f2cbc2911..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.1.0 # dependency resolver used by ansible-galaxy
+resolvelib >= 0.5.3, < 2.0.0 # dependency resolver used by ansible-galaxy

4
_service Normal file
View File

@ -0,0 +1,4 @@
<services>
<service name="download_files" mode="manual">
</service>
</services>

1895
ansible-core.changes Normal file

File diff suppressed because it is too large Load Diff

244
ansible-core.spec Normal file
View File

@ -0,0 +1,244 @@
#
# spec file for package ansible-core
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define ansible_core_major_minor_version 2.18
%{?sle15_python_module_pythons}
%if 0%{?suse_version} < 1550
# Leap15, SLES15
%if %pythons == "python310"
%define ansible_python python310
%define ansible_python_version 3.10
%define ansible_python_executable python3.10
%define ansible_python_sitelib %python310_sitelib
%endif
%if %pythons == "python311"
%define ansible_python python311
%define ansible_python_version 3.11
%define ansible_python_executable python3.11
%define ansible_python_sitelib %python311_sitelib
%endif
%else
# Tumbleweed
%define pythons python3
%define ansible_python python3
%define ansible_python_version %python3_version
%define ansible_python_executable python3
%define ansible_python_sitelib %python3_sitelib
%endif
Name: ansible-core
Version: 2.18.2
Release: 0
Summary: Radically simple IT automation
License: GPL-3.0-or-later
URL: https://ansible.com/
Source0: https://files.pythonhosted.org/packages/source/a/ansible-core/ansible_core-%{version}.tar.gz#/ansible_core-%{version}.tar.gz
Source1: ansible_core-%{version}.tar.gz.sha256
# PATCH-FIX-UPSTREAM fix resolvelib dependency
Patch1: https://github.com/ansible/ansible/commit/771f7ad29ca4d259761eaa88673c2e32f6412bbe.patch
BuildArch: noarch
# cannot be installed with ansible < 3 or ansible-base
Conflicts: ansible < 3
Conflicts: ansible-base
# cannot be installed with a lower or higher 2.X version
Conflicts: ansible-core < %{ansible_core_major_minor_version}
Conflicts: ansible-core > %{ansible_core_major_minor_version}
# https://github.com/ansible/ansible/blob/stable-2.18/pyproject.toml#L6
BuildRequires: %{ansible_python}-base >= 3.11
BuildRequires: %{ansible_python}-pip
BuildRequires: %{ansible_python}-setuptools
BuildRequires: %{ansible_python}-wheel
# https://github.com/ansible/ansible/blob/stable-2.18/requirements.txt
BuildRequires: %{ansible_python}-Jinja2 >= 3.0.0
BuildRequires: %{ansible_python}-PyYAML >= 5.1
BuildRequires: %{ansible_python}-cryptography
BuildRequires: %{ansible_python}-packaging
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: (%{ansible_python}-resolvelib >= 0.5.3 with %{ansible_python}-resolvelib < 2.0.0)
# SECTION test requirements
BuildRequires: %{ansible_python}-botocore
BuildRequires: %{ansible_python}-curses
BuildRequires: %{ansible_python}-passlib
BuildRequires: %{ansible_python}-pytest
BuildRequires: %{ansible_python}-pytest-mock
BuildRequires: %{ansible_python}-pytest-xdist
BuildRequires: %{ansible_python}-pytz
BuildRequires: git-core
BuildRequires: openssh
# /SECTION
# SECTION docs
BuildRequires: %{ansible_python}-docutils
# /SECTION
Requires: %{ansible_python}-Jinja2 >= 3.0.0
Requires: %{ansible_python}-PyYAML >= 5.1
Requires: %{ansible_python}-cryptography
Requires: %{ansible_python}-packaging
Requires: (%{ansible_python}-resolvelib >= 0.5.3 with %{ansible_python}-resolvelib < 2.0.0)
# ansible-documentation is a separate package since 2.15.3
Recommends: ansible-documentation
%description
Ansible is a radically simple IT automation system. It handles configuration
management, application deployment, cloud provisioning, ad-hoc task execution,
network automation, and multi-node orchestration. Ansible makes complex changes
like zero-downtime rolling updates with load balancers easy. More information
on the Ansible website <https://ansible.com/>.
%package -n ansible-test
Summary: Tool for testing ansible plugin and module code
Requires: %{name} = %{version}
BuildRequires: %{ansible_python}-virtualenv
Requires: %{ansible_python}-virtualenv
# cannot be installed with a lower or higher 2.X version
Conflicts: ansible-test < %{ansible_core_major_minor_version}
Conflicts: ansible-test > %{ansible_core_major_minor_version}
%description -n ansible-test
This package installs the ansible-test command for testing modules and plugins
developed for ansible.
Ansible is a radically simple model-driven configuration management, multi-node
deployment, and remote task execution system. Ansible works over SSH and does
not require any software or daemons to be installed on remote nodes. Extension
modules can be written in any language and are transferred to managed machines
automatically.
%prep
%autosetup -p 1 -n ansible_core-%{version}
for file in .git_keep .travis.yml ; do
find . -name "$file" -delete
done
# Replace all #!/usr/bin/env lines to use #!/usr/bin/$1 directly.
find ./ -type f -exec \
sed -i '1s|^#!%{_bindir}/env |#!%{_bindir}/|' {} \;
# Replace all #!/usr/bin/python lines to use %{ansible_python_executable} directly.
find ./ -type f -exec \
sed -i '1s|^#!%{_bindir}/python$|#!%{_bindir}/%{ansible_python_executable}|' {} \;
# fix shebangs in scripts
sed -i "1{/python3/d;}" ./lib/ansible/cli/*.py
sed -i "1{/python3/d;}" ./lib/ansible/cli/scripts/ansible_connection_cli_stub.py
sed -i "1{/python3/d;}" ./lib/ansible/modules/hostname.py
%build
%pyproject_wheel
mkdir man1
%{ansible_python_executable} packaging/cli-doc/build.py man --output-dir ./man1
%install
%pyproject_install
%fdupes %{buildroot}%{ansible_python_sitelib}
mkdir -p %{buildroot}%{_sysconfdir}/ansible/
mkdir -p %{buildroot}/%{_mandir}/man1/
mkdir -p %{buildroot}/%{_datadir}/ansible
# Create system directories that Ansible defines as default locations in
# ansible/config/base.yml
DATADIR_LOCATIONS='%{_datadir}/ansible/collections
%{_datadir}/ansible/plugins/doc_fragments
%{_datadir}/ansible/plugins/action
%{_datadir}/ansible/plugins/become
%{_datadir}/ansible/plugins/cache
%{_datadir}/ansible/plugins/callback
%{_datadir}/ansible/plugins/cliconf
%{_datadir}/ansible/plugins/connection
%{_datadir}/ansible/plugins/filter
%{_datadir}/ansible/plugins/httpapi
%{_datadir}/ansible/plugins/inventory
%{_datadir}/ansible/plugins/lookup
%{_datadir}/ansible/plugins/modules
%{_datadir}/ansible/plugins/module_utils
%{_datadir}/ansible/plugins/netconf
%{_datadir}/ansible/roles
%{_datadir}/ansible/plugins/strategy
%{_datadir}/ansible/plugins/terminal
%{_datadir}/ansible/plugins/test
%{_datadir}/ansible/plugins/vars'
UPSTREAM_DATADIR_LOCATIONS=$(grep -ri default lib/ansible/config/base.yml| tr ':' '\n' | grep '%{_datadir}/ansible')
if [ "$SYSTEM_LOCATIONS" != "$UPSTREAM_SYSTEM_LOCATIONS" ] ; then
echo "The upstream Ansible datadir locations have changed. Spec file needs to be updated"
exit 1
fi
mkdir -p %{buildroot}%{_datadir}/ansible/plugins/
for location in $DATADIR_LOCATIONS ; do
mkdir %{buildroot}"$location"
done
mkdir -p %{buildroot}%{_sysconfdir}/ansible/
mkdir -p %{buildroot}%{_sysconfdir}/ansible/roles/
# fix for https://github.com/ansible/ansible/pull/24381
# resp. https://bugzilla.opensuse.org/show_bug.cgi?id=1137479
mkdir -p %{buildroot}%{ansible_python_sitelib}/ansible/galaxy/data/default/role/{files,templates}
mkdir -p %{buildroot}/%{_mandir}/man1/
cp -v ./man1/*.1 %{buildroot}/%{_mandir}/man1/
%check
export PYTHONPATH=%{ansible_python_sitelib}:$PWD
mkdir bin
cd bin
ln -s ../test/lib/ansible_test/_util/target/cli/ansible_test_cli_stub.py ./ansible-test
cd ..
%{ansible_python_executable} bin/ansible-test units -v --python %{ansible_python_version}
%files
%doc changelogs/CHANGELOG-v%{ansible_core_major_minor_version}.rst changelogs/changelog.yaml
%license COPYING licenses/Apache-License.txt licenses/MIT-license.txt licenses/PSF-license.txt licenses/simplified_bsd.txt
%{_bindir}/ansible
%{_bindir}/ansible-config
%{_bindir}/ansible-console
%{_bindir}/ansible-doc
%{_bindir}/ansible-galaxy
%{_bindir}/ansible-inventory
%{_bindir}/ansible-playbook
%{_bindir}/ansible-pull
%{_bindir}/ansible-vault
%{ansible_python_sitelib}/ansible
%{ansible_python_sitelib}/ansible_core-%{version}*-info
%{_mandir}/man1/ansible.1%{?ext_man}*
%{_mandir}/man1/ansible-config.1%{?ext_man}*
%{_mandir}/man1/ansible-console.1%{?ext_man}*
%{_mandir}/man1/ansible-doc.1%{?ext_man}*
%{_mandir}/man1/ansible-galaxy.1%{?ext_man}*
%{_mandir}/man1/ansible-inventory.1%{?ext_man}*
%{_mandir}/man1/ansible-playbook.1%{?ext_man}*
%{_mandir}/man1/ansible-pull.1%{?ext_man}*
%{_mandir}/man1/ansible-vault.1%{?ext_man}*
%dir %{_sysconfdir}/ansible
%{_datadir}/ansible/
%files -n ansible-test
%{_bindir}/ansible-test
%{ansible_python_sitelib}/ansible_test
%changelog

View File

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

View File

@ -0,0 +1 @@
59e4aa40ed5acdb4ef9bbf3d058918fff93f66a149373d8159c8a29604410bda ansible_core-2.16.8.tar.gz

View File

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

View File

@ -0,0 +1 @@
3dfa15249069ea0d001257902c968ddf9bb71d965769b8802bce85187556c5d8 ansible_core-2.17.2.tar.gz

View File

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

View File

@ -0,0 +1 @@
917557065339fe36e7078e9bea47eefab6d6877f3bd435fa5f0d766d04c58485 ansible_core-2.17.3.tar.gz

View File

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

View File

@ -0,0 +1 @@
44a1f30076796536ba2455cad18d36e62870f04e632e3ca2ebe970d7beacf24d ansible_core-2.17.4.tar.gz

BIN
ansible_core-2.17.6.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
3e53970b7cebfe2adb39b711c1e2f8bbfcbedac828da51dc0357a19070638e95 ansible_core-2.17.6.tar.gz

View File

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

View File

@ -0,0 +1 @@
87fbebbfe8d961e9b153e84b4438ba3a327dbfdcd4ad05a6065d9ff5d9d02e7b ansible_core-2.18.0.tar.gz

View File

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

View File

@ -0,0 +1 @@
14cac1f92bbdae881cb0616eddeb17925e8cb507e486087975e724533d9de74f ansible_core-2.18.1.tar.gz

View File

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

View File

@ -0,0 +1 @@
725b047d35942304eb322eb934b98cc5442ac3f49d33827d97171c238c4b69b9 ansible_core-2.18.2.tar.gz