From 55d93153829060ffb2e537387665bcf49afba302 Mon Sep 17 00:00:00 2001 From: Johannes Kastl Date: Fri, 25 Nov 2022 08:04:25 +0000 Subject: [PATCH 1/2] Accepting request 1038038 from home:ojkastl_buildservice:Branch_systemsmanagement_ansible update to 7.0.0 OBS-URL: https://build.opensuse.org/request/show/1038038 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:ansible/ansible?expand=0&rev=6 --- ansible-6.6.0.tar.gz | 3 --- ansible-7.0.0.tar.gz | 3 +++ ansible.changes | 36 ++++++++++++++++++++++++++++++++++++ ansible.spec | 20 ++++++++++++-------- 4 files changed, 51 insertions(+), 11 deletions(-) delete mode 100644 ansible-6.6.0.tar.gz create mode 100644 ansible-7.0.0.tar.gz diff --git a/ansible-6.6.0.tar.gz b/ansible-6.6.0.tar.gz deleted file mode 100644 index c0168ba..0000000 --- a/ansible-6.6.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e1b940a8d4f412123ede3c14b25cb99c3c8a4d535fd040aabf8e4fb7b0e4f092 -size 35620748 diff --git a/ansible-7.0.0.tar.gz b/ansible-7.0.0.tar.gz new file mode 100644 index 0000000..58115fb --- /dev/null +++ b/ansible-7.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:73144e7e602715fab623005d2e71e503dddae86185e061fed861b2449c5618ea +size 35494124 diff --git a/ansible.changes b/ansible.changes index eab91aa..197c278 100644 --- a/ansible.changes +++ b/ansible.changes @@ -1,3 +1,39 @@ +------------------------------------------------------------------- +Wed Nov 23 07:27:47 UTC 2022 - Johannes Kastl + +- update to 7.0.0: + Ansible 7.0.0 will include ansible-core 2.14.0 as well as a curated set of + Ansible collections to provide a vast number of modules and plugins. + This is a major version update from Ansible 6.x which included + ansible-core 2.13 and there may be backwards incompatibilities in the + core playbook language. + + * What's new in Ansible 7 + - Ansible 7 requires Python 3.9 on the controller, same as ansible-core 2.14. + - Variables are now evaluated lazily; only when they are actually used. For + example, in ansible-core 2.14 an expression ``{{ defined_variable or + undefined_variable }}`` does not fail on ``undefined_variable`` if the + first part of ``or`` is evaluated to ``True`` as it is not needed to + evaluate the second part. + + * Collections added to Ansible 7: + - ibm.spectrum_virtualize (version 1.9.0) + - inspur.ispim (version 1.0.1) + - purestorage.fusion (version 1.1.1) + - vultr.cloud (version 1.1.0) + + * The previously deprecated servicenow.servicenow collection has been removed. + + * NOTE: Read the full Ansible 7 porting guide at + https://github.com/ansible/ansible/blob/devel/docs/docsite/rst/porting_guides/porting_guide_7.rst + for complete details. + - The changelog for ansible-core 2.14 installed by this release of + ansible is available here: + https://github.com/ansible/ansible/blob/stable-2.14/changelogs/CHANGELOG-v2.14.rst + - Collections which have opted into being a part of the Ansible-7 + unified changelog will have an entry on this page: + https://github.com/ansible-community/ansible-build-data/blob/main/7/CHANGELOG-v7.rst + ------------------------------------------------------------------- Wed Nov 16 08:27:00 UTC 2022 - Johannes Kastl diff --git a/ansible.spec b/ansible.spec index 3c7fd65..97a3ffb 100644 --- a/ansible.spec +++ b/ansible.spec @@ -15,26 +15,30 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # +%define pythons %primary_python + Name: ansible -Version: 6.6.0 +Version: 7.0.0 Release: 0 Summary: Radically simple IT automation License: GPL-3.0+ URL: https://ansible.com/ Source: https://files.pythonhosted.org/packages/source/a/ansible/ansible-%{version}.tar.gz Source99: ansible-rpmlintrc -BuildRequires: python3-rpm-macros -BuildRequires: python3-setuptools +BuildRequires: python-rpm-macros +BuildRequires: %{python_module base >= 3.9} +BuildRequires: %{python_module setuptools} BuildRequires: fdupes # required to fix the azure collection line endings BuildRequires: dos2unix # SECTION test requirements -BuildRequires: ansible-core >= 2.13.6 +BuildRequires: ansible-core >= 2.14.0 # /SECTION -Requires: ansible-core >= 2.13.6 +Requires: %{primary_python}-base >= 3.9 +Requires: ansible-core >= 2.14.0 BuildArch: noarch %description @@ -73,14 +77,14 @@ find ./ansible_collections/azure -type f -exec dos2unix {} \; rm -rf ./ansible_collections/lowlydba/sqlserver/ %build -python3 setup.py build +%python_build %install -python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install %fdupes %{buildroot}/%{python_sitelib}/ansible_collections/ %files -%doc CHANGELOG-v6.rst README.rst +%doc CHANGELOG-v7.rst README.rst %license COPYING %{_bindir}/ansible-community %{python_sitelib}/* From d100b1f4de439182e7413e948ae904d16c29c9ab Mon Sep 17 00:00:00 2001 From: Johannes Kastl Date: Fri, 2 Dec 2022 07:21:29 +0000 Subject: [PATCH 2/2] Accepting request 1039495 from home:ojkastl_buildservice:Branch_systemsmanagement_ansible - rework spec file to define %ansible_python version, which is the python version, that ansible is built against, as well as %ansible_python_sitelib and %ansible_python_executable OBS-URL: https://build.opensuse.org/request/show/1039495 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:ansible/ansible?expand=0&rev=7 --- ansible.changes | 7 +++++++ ansible.spec | 28 ++++++++++++++++++++-------- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/ansible.changes b/ansible.changes index 197c278..1197430 100644 --- a/ansible.changes +++ b/ansible.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Nov 25 07:03:33 UTC 2022 - Johannes Kastl + +- rework spec file to define %ansible_python version, which is the + python version, that ansible is built against, as well as + %ansible_python_sitelib and %ansible_python_executable + ------------------------------------------------------------------- Wed Nov 23 07:27:47 UTC 2022 - Johannes Kastl diff --git a/ansible.spec b/ansible.spec index 97a3ffb..f9d93d8 100644 --- a/ansible.spec +++ b/ansible.spec @@ -15,7 +15,19 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # -%define pythons %primary_python +%if 0%{?suse_version} < 1550 +# Leap15, SLES15 +%define pythons python310 +%define ansible_python python310 +%define ansible_python_executable python3.10 +%define ansible_python_sitelib %python310_sitelib +%else +# Tumbleweed +%define pythons python3 +%define ansible_python python3 +%define ansible_python_executable python3 +%define ansible_python_sitelib %python3_sitelib +%endif Name: ansible Version: 7.0.0 @@ -26,8 +38,8 @@ URL: https://ansible.com/ Source: https://files.pythonhosted.org/packages/source/a/ansible/ansible-%{version}.tar.gz Source99: ansible-rpmlintrc BuildRequires: python-rpm-macros -BuildRequires: %{python_module base >= 3.9} -BuildRequires: %{python_module setuptools} +BuildRequires: %{ansible_python}-base >= 3.9 +BuildRequires: %{ansible_python}-setuptools BuildRequires: fdupes # required to fix the azure collection line endings @@ -37,7 +49,7 @@ BuildRequires: dos2unix BuildRequires: ansible-core >= 2.14.0 # /SECTION -Requires: %{primary_python}-base >= 3.9 +Requires: %{ansible_python}-base >= 3.9 Requires: ansible-core >= 2.14.0 BuildArch: noarch @@ -56,14 +68,14 @@ for file in .git_keep .travis.yml ; do done # fix for wrong shebang: -sed -i 's|/Users/kbreit/Documents/Programming/ansible_collections/cisco/meraki/venv/bin/python|%{_bindir}/python3|g' ansible_collections/cisco/meraki/scripts/sublime-build/build.py.generic +sed -i 's|/Users/kbreit/Documents/Programming/ansible_collections/cisco/meraki/venv/bin/python|%{_bindir}/%{ansible_python_executable}|g' ansible_collections/cisco/meraki/scripts/sublime-build/build.py.generic # Replace all #!/usr/bin/env lines to use #!/usr/bin/$1 directly. find ./ -type f -exec \ sed -i '1s|^#!%{_bindir}/env |#!%{_bindir}/|' {} \; find ./ -type f -exec \ - sed -i '1s|python$|python3|' {} \; + sed -i '1s|python$|%{ansible_python_executable}|' {} \; # remove .keep and .gitignore files find ./ansible_collections/ -iname .gitignore -delete @@ -81,12 +93,12 @@ rm -rf ./ansible_collections/lowlydba/sqlserver/ %install %python_install -%fdupes %{buildroot}/%{python_sitelib}/ansible_collections/ +%fdupes %{buildroot}/%{ansible_python_sitelib}/ansible_collections/ %files %doc CHANGELOG-v7.rst README.rst %license COPYING %{_bindir}/ansible-community -%{python_sitelib}/* +%{ansible_python_sitelib}/ %changelog