Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 2265038
Summary: | brp-mangle-shebangs breaks with env -S shebangs | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Elliott Sales de Andrade <quantum.analyst> |
Component: | redhat-rpm-config | Assignee: | Miro Hrončok <mhroncok> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 39 | CC: | ajax, awilliam, carl, ffesti, fweimer, igor.raits, j, mhroncok, ngompa13, nickc, pmatilai, sipoyare, torsava |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | AcceptedFreezeException | ||
Fixed In Version: | redhat-rpm-config-285-1.fc41 redhat-rpm-config-285-1.fc40 redhat-rpm-config-266-1.fc39 redhat-rpm-config-257-1.fc38 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2024-03-27 01:36:37 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 2264962, 2264975 |
Description
Elliott Sales de Andrade
2024-02-20 03:28:11 UTC
This sounds like an obvious bug. The code: # Replace "special" env shebang: # /whatsoever/env /whatever/foo → /whatever/foo shebang=$(echo "$shebang" | sed -r -e 's@^(.+)/env /(.+)$@/\2@') # /whatsoever/env foo → /whatsoever/foo shebang=$(echo "$shebang" | sed -r -e 's@^(.+/)env (.+)$@\1\2@') Current problematic behavior: $ echo '/usr/bin/env -S /usr/bin/vd' | sed -r -e 's@^(.+)/env /(.+)$@/\2@' /usr/bin/env -S /usr/bin/vd $ echo '/usr/bin/env -S vd' | sed -r -e 's@^(.+/)env (.+)$@\1\2@' /usr/bin/-S vd Proposed fix: $ echo '/usr/bin/env -S /usr/bin/vd' | sed -r -e 's@^(.+)/env( -[^ ]+)* /(.+)$@/\3@' /usr/bin/vd $ echo '/usr/bin/env -S vd' | sed -r -e 's@^(.+/)env( -[^ ]+)* (.+)$@\1\3@' /usr/bin/vd Works even without env flags: $ echo '/usr/bin/env /usr/bin/vd' | sed -r -e 's@^(.+)/env( -[^ ]+)* /(.+)$@/\3@' /usr/bin/vd $ echo '/usr/bin/env vd' | sed -r -e 's@^(.+/)env( -[^ ]+)* (.+)$@\1\3@' /usr/bin/vd Or with multiple env flags: $ echo '/usr/bin/env -X -y /usr/bin/vd' | sed -r -e 's@^(.+)/env( -[^ ]+)* /(.+)$@/\3@' /usr/bin/vd $ echo '/usr/bin/env -X -yabc -Z vd' | sed -r -e 's@^(.+/)env( -[^ ]+)* (.+)$@\1\3@' /usr/bin/vd FEDORA-2024-edbda6f051 (redhat-rpm-config-285-1.fc41) has been submitted as an update to Fedora 41. https://bodhi.fedoraproject.org/updates/FEDORA-2024-edbda6f051 FEDORA-2024-edbda6f051 (redhat-rpm-config-285-1.fc41) has been pushed to the Fedora 41 stable repository. If problem still persists, please make note of it in this bug report. Reopening, this affects all Fedoras (as well as RHEL). FEDORA-2024-19fc022649 (redhat-rpm-config-285-1.fc40) has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2024-19fc022649 Backports further down: https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/288 https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/289 RHEL report: https://issues.redhat.com/browse/RHEL-26961 FEDORA-2024-19fc022649 has been pushed to the Fedora 40 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-19fc022649` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-19fc022649 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. I nominate this a s a freeze exception. For the following reasons: - it blocks bz2264975 which is an installation failure -- we want that fixed ASAP - due to the nature of this package, it is unlikely to receive much testing unless pushed to stable and used in Koji FEDORA-2024-f83e42dd48 (redhat-rpm-config-266-1.fc39) has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2024-f83e42dd48 FEDORA-2024-f83e42dd48 has been pushed to the Fedora 39 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-f83e42dd48` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-f83e42dd48 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. +3 in https://pagure.io/fedora-qa/blocker-review/issue/1487 , marking accepted FE. FEDORA-2024-19fc022649 (redhat-rpm-config-285-1.fc40) has been pushed to the Fedora 40 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2024-b45fa71757 (redhat-rpm-config-257-1.fc38) has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2024-b45fa71757 FEDORA-2024-b45fa71757 has been pushed to the Fedora 38 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-b45fa71757` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-b45fa71757 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2024-f83e42dd48 (redhat-rpm-config-266-1.fc39) has been pushed to the Fedora 39 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2024-b45fa71757 (redhat-rpm-config-257-1.fc38) has been pushed to the Fedora 38 stable repository. If problem still persists, please make note of it in this bug report. |