#35 Update to 6.3.0.
Closed 2 years ago by gotmax23. Opened 2 years ago by gotmax23.

Fix FTI
Maxwell G • 2 years ago  
file modified
+10
@@ -115,3 +115,13 @@ 

  /ansible-5.2.0.tar.gz

  /ansible-5.3.0.tar.gz

  /ansible-5.4.0.tar.gz

+ /ansible-5.5.0.tar.gz

+ /ansible-5.6.0.tar.gz

+ /ansible-5.7.0.tar.gz

+ /ansible-5.8.0.tar.gz

+ /ansible-5.9.0.tar.gz

+ /ansible-6.0.0rc1.tar.gz

+ /ansible-6.0.0.tar.gz

+ /ansible-6.1.0.tar.gz

+ /ansible-6.2.0.tar.gz

+ /ansible-6.3.0.tar.gz

file modified
+2 -3
@@ -1,5 +1,4 @@ 

- addFilter("E: non-executable-script")

  addFilter("W: files-duplicate")

+ addFilter("E: files-duplicated-waste")

  addFilter("W: name-repeated-in-summary")

- # This is not egrep, it's "find -regextype posix-egrep"

- addFilter("W: deprecated-grep")

+ addFilter("W: cross-directory-hard-link")

file modified
+160 -34
@@ -1,28 +1,67 @@ 

  # TODO: Re-enable docs and tests once possible

- %global with_docs 0

- %global with_tests 0

+ %bcond_with docs

+ %bcond_with tests

  %global ansible_licensedir %{_defaultlicensedir}/ansible

  %global ansible_docdir %{_defaultdocdir}/ansible

  

+ # This should be updated after each release to match upstream's metadata

+ # We manually specify this in order to workaround RHEL 8's deficient

+ # python-rpm-generators and lack of dynamic BR support.

+ # https://github.com/ansible-community/community-topics/issues/84

+ %global ansible_core_version 2.13.3

+ %global ansible_core_next_version 2.14

+ %global ansible_core_requires (ansible-core >= %{ansible_core_version} with ansible-core < %{ansible_core_next_version})

+ 

+ %if 0%{?rhel} == 8

+ # RHEL 8's ansible-core package is built using Python 3.8, which is not the default version.

+ %define python3_pkgversion 39

+ BuildRequires:  python%{python3_pkgversion}-rpm-macros

+ 

+ # RHEL 8's RPM Python dependency generator ignores the version constraints, so we manually specify the dependency.

+ Requires:       %{ansible_core_requires}

+ %endif

+ 

+ %global uversion %(tr -d '~' <<< %{version})

+ 

  Name:           ansible

  Summary:        Curated set of Ansible collections included in addition to ansible-core

- Version:        5.4.0

+ Version:        6.3.0

  Release:        1%{?dist}

  

- License:        GPLv3+

- Source0:        %{pypi_source}

+ # In addition to GPL-3.0-or-later, the following licenses apply.

+ # License text that solely exists in file headers were not considered.

+ # Instead, the overall license was determined by searching for license files

+ # This is the only the practical way to handle license scanning for a project

+ # of this size.

+ # All collections must be primarily licensed under GPL-3.0-or-later, so top

+ # level license files are excluded.

+ # find /usr/share/licenses/ansible -type f | grep -vEe '(COPYING|LICENSE)(\.(txt|md))?$' -e 'GPL' | xargs -n1 basename | sort -u

+ #

+ # Apache-2.0.txt

+ # Apache-license.txt

+ # BSD-2-Clause.txt

+ # BSD-3-Clause.txt

+ # MIT.txt

+ # MPL-2.0.txt

+ # PSF-2.0.txt

+ # PSF-license.txt

+ License:        GPL-3.0-or-later AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT AND MPL-2.0 AND PSF-2.0

+ Source0:        %{pypi_source %{name} %{uversion}}

  Url:            https://ansible.com

  BuildArch:      noarch

  

+ BuildRequires:  dos2unix

  BuildRequires:  findutils

- BuildRequires:  python3-devel

- BuildRequires:  python3-setuptools

+ BuildRequires:  hardlink

+ BuildRequires:  python%{python3_pkgversion}-devel

+ BuildRequires:  python%{python3_pkgversion}-setuptools

+ BuildRequires:  %{ansible_core_requires}

  

- %if 0%{?with_tests}

+ %if %{with tests}

  # TODO build-requires

  %endif

  

- %if 0%{?with_docs}

+ %if %{with docs}

  # TODO build-requires

  %endif

  
@@ -37,24 +76,31 @@ 

  to ansible-core.

  

  %prep

- %autosetup

+ %autosetup -p1 -n %{name}-%{uversion}

+ 

+ # Fix wrong-script-end-of-line-encoding in azure.azcollection

+ find ansible_collections/azure/azcollection -type f -print -exec dos2unix -k '{}' \;

+ 

+ find ansible_collections/community/mongodb/roles/*/{files,templates} -type f ! -executable -name '*.sh*' \

+     -print -exec chmod a+x '{}' \;

+ 

+ sed -i -e '1{\@^#!.*@d}' ansible_collections/cyberark/conjur/Jenkinsfile

  

  # Remove unnecessary files and directories included in the Ansible collection release tarballs

  # Tracked upstream in part by: https://github.com/ansible-community/community-topics/issues/29

  echo "[START] Delete unnecessary files and directories"

  

  # Collection tarballs contain a lot of hidden files and directories

- hidden_pattern=".*\.(DS_Store|all-contributorsrc|ansible-lint|azure-pipelines|circleci|codeclimate.yml|flake8|galaxy_install_info|gitattributes|github|gitignore|gitkeep|gitlab-ci.yml|idea|keep|mypy_cache|nojekyll|orig|plugin-cache.yaml|pre-commit-config.yaml|project|pydevproject|pytest_cache|pytest_cache|readthedocs.yml|settings|swp|travis.yml|vscode|yamllint|yamllint.yaml|zuul.d|zuul.yaml)$"

- find ansible_collections -regextype posix-egrep -regex "${hidden_pattern}" -print -depth -exec rm -rf {} \;

+ hidden_pattern=".*\.(DS_Store|all-contributorsrc|ansible-lint|azure-pipelines|circleci|codeclimate.yml|flake8|galaxy_install_info|gitattributes|github|gitignore|gitkeep|gitlab-ci.yml|idea|keep|mypy_cache|nojekyll|orig|plugin-cache.yaml|pre-commit-config.yaml|project|pydevproject|pytest_cache|pytest_cache|readthedocs.yml|settings|swp|travis.yml|vscode|yamllint|yamllint.yaml|zuul.d|zuul.yaml|rstcheck.cfg|placeholder)$"

+ find ansible_collections -depth -regextype posix-egrep -regex "${hidden_pattern}" -print -exec rm -r {} \;

  

- # TODO: Delete (bulky) tests for now but we should run sanity and unit tests soon.

- find ansible_collections -type d -wholename "*tests/integration" -print -depth -exec rm -rf {} \;

- find ansible_collections -type d -wholename "*tests/unit" -print -depth -exec rm -rf {} \;

- find ansible_collections -type d -wholename "*tests/sanity" -print -depth -exec rm -rf {} \;

- find ansible_collections -type d -wholename "*tests/regression" -print -depth -exec rm -rf {} \;

+ # Not needed for runtime and has

+ # /Users/kbreit/Documents/Programming/ansible_collections/cisco/meraki/venv/bin/python shebang

+ rm -r ansible_collections/cisco/meraki/scripts

  

- # https://github.com/ansible-collections/kubernetes.core/pull/298

- rm -rf ansible_collections/kubernetes/core/molecule

+ # Not needed for runtime

+ rm -r ansible_collections/netbox/netbox/hacking

+ rm -r ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests

  

  # rpmlint W: pem-certificate

  find ansible_collections/cyberark/conjur -type f -name "*.pem" -print -delete
@@ -62,9 +108,22 @@ 

  # rpmlint E: zero-length

  find -type f -name "*requirements.txt" -size 0 -print -delete

  rm -f ansible_collections/community/zabbix/roles/zabbix_agent/files/win_sample/doSomething.ps1

+ rm -f ansible_collections/community/docker/meta/ee-bindep.txt

  

  echo "[END] Delete unnecessary files and directories"

  

+ # Remove shebangs instead of hardocding to %%__python3 to avoid unexpected issues

+ # from https://github.com/ansible/ansible/commit/9142be2f6cabbe6597c9254c5bb9186d17036d55.

+ # Upstream, ansible-core has also removed shebangs from its modules.

+ find -type f ! -executable -name '*.py' -print -exec sed -i -e '1{\@^#!.*@d}' '{}' \;

+ 

+ # This ensures that %%ansible_core_requires is set properly, when %%pyproject_buildrequires is defined.

+ # It also ensures that dependencies remain consistent.

+ %if %{undefined el8}

+ %generate_buildrequires

+ %pyproject_buildrequires

+ %endif

+ 

  %build

  # disable the python -s shbang flag as we want to be able to find non system modules

  %global py3_shbang_opts %{nil}
@@ -76,29 +135,47 @@ 

  

  # Install docs and licenses

  (

-   mkdir -p "%{buildroot}%{ansible_docdir}" "%{buildroot}%{ansible_licensedir}"

-   cd ansible_collections

-   # This finds the license file for each collection, copies it to

-   # `%%{ansible_licensedir}/collection_namespace/collection_name`, and then adds

-   # `%%license /path/to/license` to the %%files list. See `man find` for more info.

-   # The extra percent signs are needed to escape RPM.

-   find . -mindepth 3 -type f \( -name LICENSE -o -name COPYING \) \

-          -exec cp -p --parents '{}' '%{buildroot}%{ansible_licensedir}' \; \

-          -printf '%%%%license %%%%{ansible_licensedir}/%%P\n'  | tee -a ../files.list

-   # This does the same thing, but for READMEs.

-   find . -mindepth 3 -type f -name 'README.*' \

-          -exec cp -p --parents '{}' '%{buildroot}%{ansible_docdir}' \; \

-          -printf '%%%%doc %%%%{ansible_docdir}/%%P\n' | tee -a ../files.list

+     mkdir -p "%{buildroot}%{ansible_docdir}" "%{buildroot}%{ansible_licensedir}"

+     cd %{buildroot}%{python3_sitelib}/ansible_collections

+     # This finds the license file for each collection, moves it to

+     # `%%{ansible_licensedir}/collection_namespace/collection_name`, and then adds

+     # `%%license /path/to/license` to the %%files list.

+     # `-printf '%%P\n'` removes the trailing `./`.

+     for f in $(find . -mindepth 3 -type f \( -iname '*LICENSE*' -o -iname '*COPYING*' \) -not -name '*.py' -not -name '*.pyc' -printf '%%P\n' | grep -v '\.license$'); do

+         dirname="$(dirname %{buildroot}%{ansible_licensedir}/${f})"

+         mkdir -p "${dirname}"

+         mv "${f}" "${dirname}"

+         tee -a %{_builddir}/files.list << EOF

+ %%license %%{ansible_licensedir}/${f}

+ EOF

+     done

+     for f in $(find -mindepth 3 -iname 'LICENSES' -type d); do

+         cp -rfp --parents ${f} %{buildroot}%{ansible_licensedir}

+         echo "%%license %%{ansible_licensedir}/${f}" >> %{_builddir}/files.list

+     done

+ 

+     # This does the same thing, but for READMEs.

+     for f in $(find . -mindepth 3 -type f -name 'README*' -printf '%%P\n'); do

+         dirname="$(dirname %{buildroot}%{ansible_docdir}/${f})"

+         mkdir -p "${dirname}"

+         mv "${f}" "${dirname}"

+         tee -a %{_builddir}/files.list << EOF

+ %%doc %%{ansible_docdir}/${f}

+ EOF

+     done

  )

+ hardlink -v %{buildroot}%{python3_sitelib}/ansible_collections

+ hardlink -v %{buildroot}%{ansible_licensedir}

  

  %check

  %if 0%{?with_tests}

  # TODO: Run tests

  %endif

  

- %files -f files.list

+ %files -f %{_builddir}/files.list

  %license COPYING

- %doc README.rst PKG-INFO porting_guide_5.rst CHANGELOG-v5.rst

+ %doc README.rst PKG-INFO porting_guide_6.rst CHANGELOG-v6.rst

+ %{_bindir}/ansible-community

  # Note (dmsimard): This ansible package installs collections to the python sitelib to mirror the UX

  # when installing the ansible package from PyPi.

  # This allows users to install individual collections manually with ansible-galaxy (~/.ansible/collections/ansible_collections)
@@ -108,6 +185,55 @@ 

  %{python3_sitelib}/*egg-info

  

  %changelog

+ * Tue Aug 23 2022 Maxwell G <gotmax@e.email> - 6.3.0-1

+ - Update to 6.3.0.

+ 

+ * Tue Aug 02 2022 Maxwell G <gotmax@e.email> - 6.2.0-1

+ - Update to 6.2.0.

+ 

+ * Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.0-3

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

+ 

+ * Fri Jul 15 2022 Maxwell G <gotmax@e.email> - 6.1.0-2

+ - Fix FTI (rhbz#2107532).

+ 

+ * Thu Jul 14 2022 Maxwell G <gotmax@e.email> - 6.1.0-1

+ - Update to 6.1.0.

+ 

+ * Wed Jun 22 2022 Maxwell G <gotmax@e.email> - 6.0.0-1

+ - Update to 6.0.0.

+ 

+ * Wed Jun 22 2022 Maxwell G <gotmax@e.email> - 6.0.0~rc1-1

+ - Update to 6.0.0~rc1.

+ - Stop duplicating docs and licenses.

+ - Don't remove tests in %%prep that are now handled by setup.py.

+ - Hardlink duplicated files and fix rpmlint errors

+ 

+ * Thu Jun 16 2022 Python Maint <python-maint@redhat.com> - 5.9.0-2

+ - Rebuilt for Python 3.11

+ 

+ * Wed Jun 08 2022 Maxwell G <gotmax@e.email> - 5.9.0-1

+ - Update to 5.9.0.

+ 

+ * Thu May 19 2022 Maxwell G <gotmax@e.email> - 5.8.0-1

+ - Update to 5.8.0.

+ - Remove fortinet.fortios patch.

+ 

+ * Wed Apr 27 2022 Maxwell G <gotmax@e.email> - 5.7.0-1

+ - Update to 5.7.0.

+ - Fix SyntaxError in fortinet.fortios collection.

+ - Fix rpmlint errors

+ 

+ * Mon Apr 25 2022 Maxwell G <gotmax@e.email> - 5.6.0-2

+ - Ensure correct version of ansible-core is available at buildtime.

+ - Implement support for epel8.

+ 

+ * Wed Apr 06 2022 Kevin Fenzi <kevin@scrye.com> - 5.6.0-1

+ - Update to 5.6.0.

+ 

+ * Tue Mar 15 2022 David Moreau-Simard <moi@dmsimard.com> - 5.5.0-1

+ - Update to latest upstream release

+ 

  * Tue Feb 22 2022 David Moreau-Simard <moi@dmsimard.com> - 5.4.0-1

  - Update to latest upstream release

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (ansible-5.4.0.tar.gz) = 7065c7d16a3bb13db27a3ec99c33c48e9d4abb4bec8267751e3d8df89da7d0948a8415b50b8fabd05f6a97fba661714f08f8473ae145fcb323dd83f6c7349a6d

+ SHA512 (ansible-6.3.0.tar.gz) = 3832159065d6400caade84de1ff5f31d64d7b5d9c3a61ae9bb2ad207e410166dac3537c68d0ec3df7c4b8aec61ee48cc4b690e3117a987efa9306c6cbee534e0

RHEL 8.7 has rebased ansible-core from 2.12 to 2.13, so we need to update ansible to the corresponding version. CI will fail until the EPEL buildroot is updated.

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging src.fedoraproject.org/rpms/ansible for 35,10415a9

Pull-Request has been closed by gotmax23

2 years ago