Don't put -- into Python shebangs

%py3_shebang_flags should not contain the leading dash, but %py3_shbang_opts does.

The shebengs were:

    #! /usr/bin/python3 --

That worked. By accident. But when we added P to the flags:

    https://fedoraproject.org/wiki/Changes/PythonSafePath

The shebang was:

    #! /usr/bin/python3 --P

And that no longer works.
This commit is contained in:
Miro Hrončok 2022-07-07 16:48:00 +02:00
parent 186a386eed
commit 2c98978654

View File

@ -12,7 +12,7 @@
Name: ansible-core Name: ansible-core
Summary: A radically simple IT automation system Summary: A radically simple IT automation system
Version: 2.13.1 Version: 2.13.1
Release: 1%{?dist} Release: 2%{?dist}
# The main license is GPLv3+. Many of the files in lib/ansible/module_utils # The main license is GPLv3+. Many of the files in lib/ansible/module_utils
# are BSD licensed. There are various files scattered throughout the codebase # are BSD licensed. There are various files scattered throughout the codebase
@ -128,7 +128,7 @@ sed '/^mock$/d' test/lib/ansible_test/_data/requirements/units.txt > ${temp}
%build %build
# disable the python -s shbang flag as we want to be able to find non system modules # disable the python -s shbang flag as we want to be able to find non system modules
%global py3_shebang_flags %(echo %{py3_shbang_opts} | sed 's/s//') %global py3_shebang_flags %(echo %{py3_shebang_flags} | sed 's/s//')
%py3_shebang_fix . %py3_shebang_fix .
# Build manpages # Build manpages
@ -247,6 +247,9 @@ make PYTHON=%{python3} tests-py3
%endif %endif
%changelog %changelog
* Thu Jul 07 2022 Miro Hrončok <mhroncok@redhat.com> - 2.13.1-2
- Don't put -- into Python shebangs
* Wed Jun 22 2022 Maxwell G <gotmax@e.email> - 2.13.1-1 * Wed Jun 22 2022 Maxwell G <gotmax@e.email> - 2.13.1-1
- Update to 2.13.1 (rhbz#2096312). - Update to 2.13.1 (rhbz#2096312).