RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1353934 - NT escaping in shebang in easy_install
Summary: NT escaping in shebang in easy_install
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-setuptools
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Python Maintainers
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks: 1343661 1380359 1387561 1393868
TreeView+ depends on / blocked
 
Reported: 2016-07-08 12:46 UTC by Jan Pokorný [poki]
Modified: 2017-03-23 19:06 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1387561 (view as bug list)
Environment:
Last Closed: 2017-02-15 18:42:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1297522 0 unspecified CLOSED Undefined python_provide causes silently missing provides 2021-02-22 00:41:40 UTC

Internal Links: 1297522

Description Jan Pokorný [poki] 2016-07-08 12:46:34 UTC
See
https://github.com/pypa/setuptools/issues/188

This prevents equivalent of
https://pkgs.fedoraproject.org/cgit/rpms/clufter.git/tree/clufter.spec?id=8c9ee7115ce2b5f25eeefc7e0247a1f3128e9662#n127
i.e.,
> # make Python interpreter executation sane (via -Es flags)
> %{__python2} setup.py saveopts -f setup.cfg build_scripts \
>                       "--executable=%{__python2} -Es"

from working properly in RHEL 7, simply because the generated shebang
reads:
> #!"/usr/bin/python2 -Es"
which is indeed invalid.


As an aside, I think it would be reasonable to have setuptools
(and friends) patched to the same effect (as opposed to patching
every and each package defining console_scripts in setup.py)
as a sane (and supportable!) default.

Comment 3 Michal Cyprian 2017-02-07 15:51:26 UTC
Upstream issue https://github.com/pypa/setuptools/issues/188 was finally fixed in version 20.6. There is setuptools 0.9.8 in RHEL 7. easy_install command, specially the part that handles scripts was changed completely since version 0.9.8 (class ScriptWriter). There is not any simple upstream patch, which could be backported.

Comment 4 Charalampos Stratakis 2017-02-15 18:42:39 UTC
Unfortunately as Michal already pointed out there have way too many changes upstream when the fix was implemented, so currently a backport of the fix is impossible without refactoring a lot of the relevant setuptools code.

This would be a very invasive change on the way that shebangs are being generated currently, so in this case there is an elevated risk that the current working shebang generation will break (or break other working corner cases), just to fix this specific corner case.

In this particular situation that you reported it would be preferable that the workaround is being used at the individual components, rather than fixing setuptools itself.

Closing it as WONTFIX.


Note You need to log in before you can comment on or make changes to this bug.