CiscoDevNet/ansible-meraki

`scripts/sublime-build/build.py.generic` with mangling shebang `/Users/kbreit/Documents/Programming/ansible_collections/cisco/meraki/venv/bin/python`

hswong3i opened this issue · 3 comments

#324 introduce the scripts/sublime-build/build.py.generic with following shebang:

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

Although scripts/sublime-build/build.py.generic shebang is add for skipping corresponding shebang check locally, for real world packaging into deb/rpm it will generate hidden error.

I am packaging https://build.opensuse.org/package/show/home:alvistack/ansible-community-ansible-build-data-6.1.0 with CentOS 9 Stream .rpm (https://build.opensuse.org/package/binaries/home:alvistack/ansible-community-ansible-build-data-6.1.0/CentOS_9_Stream), but during install it will generate error message from yum (see https://gitlab.com/alvistack/docker-centos/-/jobs/2726372816#L806):

Depsolve Error occurred: 
Problem: conflicting requests
  - nothing provides /Users/kbreit/Documents/Programming/ansible_collections/cisco/meraki/venv/bin/python needed by ansible-100:6.1.0-1.1.noarch

Finally I need to manually remove this file during packaging (see alvistack/ansible-community-ansible-build-data@8582df9#diff-5c3426ea59b70ac01cacdfa861fd87d4bf1bfa6e4455a27520dc2cf2e562a03aR45):

rm -rf %{buildroot}%{python3_sitelib}/ansible_collections/cisco/meraki/scripts/sublime-build/build.py

Shall we replace it with something like #!/usr/bin/python or #!/usr/bin/env python?

This issue also affected the Fedora ansible package. Thanks for reporting this, @hswong3i!

This issue also affected the Fedora ansible package. Thanks for reporting this, @hswong3i!

Yes it is failing in my GitLab CI, too:

Thanks for reporting this. I wasn't aware how this would affect the packaging process. I've fixed this bug and done a new release of the modules. This should be fixed in v2.10.1.