-
Bug
-
Resolution: Done-Errata
-
Normal
-
rhel-8.9.0, rhel-8.10, rhel-9.3.0, rhel-9.4, rhel-9.5, rhel-10.0
-
redhat-rpm-config-208-1.el9
-
None
-
None
-
rhel-sst-cs-software-management
-
ssg_core_services
-
21
-
23
-
None
-
False
-
-
No
-
None
-
-
Pass
-
Automated
-
Release Note Not Required
-
-
All
-
None
What were you trying to do that didn't work?
Packaging a script with this shebang:
#!/usr/bin/env -S vd -p
Produces scripts with invalid shebang.
Please provide the package NVR for which bug is seen:
redhat-rpm-config-282-1.el10
redhat-rpm-config-207-1.el9
redhat-rpm-config-201-1.el9
redhat-rpm-config-131-1.el8
How reproducible:
Steps to reproduce
- Build the spec:
Name: reproducer-env-flags
Version: 0
Release: 0%{?dist}
Summary: ...
License: MIT
BuildArch: noarch
%description
...
%prep
%build
%install
mkdir -p %{buildroot}%{_bindir}
echo '#!/usr/bin/env -S vd -p' > %{buildroot}%{_bindir}/xxx
chmod +x %{buildroot}%{_bindir}/xxx
%files
%{_bindir}/xxx
Expected results
+ /usr/lib/rpm/redhat/brp-mangle-shebangs mangling shebang in /usr/bin/xxx from /usr/bin/env -S vd -p to #!/usr/bin/vd -p
Actual results
+ /usr/lib/rpm/redhat/brp-mangle-shebangs mangling shebang in /usr/bin/xxx from /usr/bin/env -S vd -p to #!/usr/bin/-S vd -p
Fix available for backporting in https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/285
- links to
-
RHBA-2024:136685 redhat-rpm-config update