diff options
author | Toshio Kuratomi <a.badger@gmail.com> | 2019-09-19 04:12:11 +0200 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2019-09-19 05:27:56 +0200 |
commit | bebb11b918f8ada9cb43e105b660d29bf85d8d82 (patch) | |
tree | 759f05697cb1c15b90e73ae8f3db45bbf93e6e67 /packaging | |
parent | error message updated (#62536) (diff) | |
download | ansible-bebb11b918f8ada9cb43e105b660d29bf85d8d82.tar.xz ansible-bebb11b918f8ada9cb43e105b660d29bf85d8d82.zip |
Disable setting of -s in shebang
RPM builds on Fedora and RHEL create a python shebang line with -s
This is not good for ansible since ansible has a lot of optional
features which need extra dependencies installed. If the user installs
those extra dependencies to their home directory or to /usr/local then
the -s will keep them from being used.
Diffstat (limited to 'packaging')
-rw-r--r-- | packaging/rpm/ansible.spec | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/packaging/rpm/ansible.spec b/packaging/rpm/ansible.spec index 84679d497b..cb0b155aa3 100644 --- a/packaging/rpm/ansible.spec +++ b/packaging/rpm/ansible.spec @@ -4,6 +4,14 @@ # ansible-test munges the shebangs itself. %global __brp_mangle_shebangs_exclude_from /usr/lib/python[0-9]+\.[0-9]+/site-packages/ansible_test/_data/.* +# RHEL and Fedora add -s to the shebang line. We do *not* use -s -E -S or -I +# with ansible because it has many optional features which users need to +# install libraries on their own to use. For instance, paramiko for the +# network connection plugins or winrm to talk to windows hosts. +# Set this to nil to remove -s +%define py_shbang_opts %{nil} +%define py2_shbang_opts %{nil} +%define py3_shbang_opts %{nil} %if 0%{?fedora} || 0%{?rhel} >= 8 %global with_python2 0 @@ -150,7 +158,6 @@ Requires: sshpass %endif - %description Ansible is a radically simple model-driven configuration management, multi-node deployment, and remote task execution system. Ansible works @@ -192,7 +199,7 @@ developed for ansible. %build %if %{with_python2} -%{__python2} setup.py build +%py2_build %endif %if %{with_python3} @@ -260,6 +267,7 @@ for location in $DATADIR_LOCATIONS ; do done mkdir -p %{buildroot}%{_sysconfdir}/ansible/ mkdir -p %{buildroot}%{_sysconfdir}/ansible/roles/ + cp examples/hosts %{buildroot}%{_sysconfdir}/ansible/ cp examples/ansible.cfg %{buildroot}%{_sysconfdir}/ansible/ mkdir -p %{buildroot}/%{_mandir}/man1/ |