# Updated ansible.spec for ansible-4.9.0 and ansible-5.0.1

**URL:** <https://forum.ansible.com/t/updated-ansible-spec-for-ansible-4-9-0-and-ansible-5-0-1/36103>\
**Category:** Ansible Project\
**Tags:** rhel, fedora, galaxy-ng\
**Created:** [December 11, 2021, 11:17am UTC](https://forum.ansible.com/t/updated-ansible-spec-for-ansible-4-9-0-and-ansible-5-0-1/36103 "2021-12-11T11:17:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nico\_Kadel-Garcia](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/nico_kadel-garcia/32/9998_2.png) [@Nico\_Kadel-Garcia](https://forum.ansible.com/u/Nico_Kadel-Garcia)\
**Post date:** [December 11, 2021, 11:17am UTC](https://forum.ansible.com/t/updated-ansible-spec-for-ansible-4-9-0-and-ansible-5-0-1/36103/1 "2021-12-11T11:17:56Z")

</div>

I've been working with ansible.spec files to support backporting  
ansible 4.9.0 and ansible 5.0.1 to RHEL 7 and 8, and also be  
compatible with Fedora releases. I've borrowed a few ideas from

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[https://src.fedoraproject.org/rpms/ansible/pull-request/19](https://src.fedoraproject.org/rpms/ansible/pull-request/19)

My work is over at:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;https:/github.com/nkadel/ansiblerepo/

I tried to add comments there, but one fedora login page says "your  
account name is nkadelgarcia22, but the other says "no, we won't let  
you change your password, there is no such account.The Fedora  
authentication system is its own difficulty for users.

I previously reported the "path stripping" of multiple "%doc  
foo/README.md bar/README.md" to drop only one README.md file in  
/usr/share/doc/%{name}-%{version}/README.md, and rpm complaining about  
it. I've inserted a pre-staging step to use a legible rsync command to  
copy all the README.md files into a local 'docs' directory, and all  
the license files to a local 'licenses' directory. The rsync is  
\*much\* faster than writing a find and a shell script wrapper.

This creates for ansible-5.0.rpms:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ansible-4.9.0-0.1.el7.x86\_64.rpm: /usr/share/doc/ansible-5.0.1/licenses/  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ansible-doc-4.9.0-0.1.el7.x86\_64.rpm: /usr/share/doc/ansible-5.0.1/docs/

It's a bit awkward, but it correctly publishes the more than 140  
licenses and the more than 300 readme files.

I've also had a word with the dependencies for ansible 5.0.1, which  
has a quite spurious "BuildRequires" and "Requires" of "ansible-core

> = 2.12.0" or python 3.8 ansible-core 2.11.6 with python 3.6 seems to

work quite well with it, and permitting this older ansible-core  
provides an update path for EPEL to use the latest "ansible" packages.

This sort of incompatible dependency is why I worry about "pip  
install", especially when people casually run it as the root user. The  
dependency chains can get strange. So far, nothing from ansible galaxy  
published in the new "ansible" tarball seems to actually need python  
3.8 or ansible-core greater than 2.11. I've tried to provide the  
option of install ansible-4.9.0 for folks who don't trust the  
ansible-5.0.1 with the announced but apparently incorrect requirements  
for ansible-core 2.12 and python 3.8.

Nico Kadel-Garcia
