diff --git a/ansible-core.spec b/ansible-core.spec index fc8786a..7c099b6 100644 --- a/ansible-core.spec +++ b/ansible-core.spec @@ -147,6 +147,16 @@ make PYTHON=%{python3} docs %pyproject_install %pyproject_save_files ansible ansible_test +# These files are executable when they shouldn't be. +# Only the actual "binaries" in %%{_bindir} need to be executable +# and have shebangs. +while read -r file; do + sed -i -e '1{\@^#!.*@d}' "${file}" +done < <(find \ + %{buildroot}%{python3_sitelib}/ansible/cli/*.py \ + %{buildroot}%{python3_sitelib}/ansible/cli/scripts/ansible_connection_cli_stub.py \ + -type f ! -executable) + install -Dpm 0644 bash_completions/* -t %{buildroot}%{bash_completions_dir} install -Dpm 0644 fish_completions/* -t %{buildroot}%{fish_completions_dir}