Description of problem: I'm building Kodi in RPMFusion and encountering a failure in the 'brp-mangle-shebangs' script. Fedora 31 and lower successfully run the script. Starting with the changes in version 144-1 the script is failing with no output. Version-Release number of selected component (if applicable): redhat-rpm-config-146-1.fc32.noarch How reproducible: Always Actual results: [mockbuild@d2e1f9b641fc4411963e18f3a5e11f6a BUILDROOT]$ RPM_BUILD_ROOT=/builddir/build/BUILDROOT/kodi-18.5-1.fc32.x86_64 /usr/lib/rpm/redhat/brp-mangle-shebangs ; echo $? 1 Expected results: [mockbuild@d2e1f9b641fc4411963e18f3a5e11f6a BUILDROOT]$ RPM_BUILD_ROOT=/builddir/build/BUILDROOT/kodi-18.5-1.fc32.x86_64 /usr/lib/rpm/redhat/brp-mangle-shebangs ; echo $? 0 Additional info: Rawhide Build Output: + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/redhat/brp-python-bytecompile /usr/bin/python 1 0 Bytecompiling .py files below /builddir/build/BUILDROOT/kodi-18.5-1.fc32.x86_64/usr/lib/python3.8 using /usr/bin/python3.8 + /usr/lib/rpm/brp-python-hardlink + /usr/lib/rpm/redhat/brp-mangle-shebangs error: Bad exit status from /var/tmp/rpm-tmp.TM5v5v (%install) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.TM5v5v (%install) [mockbuild@d2e1f9b641fc4411963e18f3a5e11f6a BUILDROOT]$ RPM_BUILD_ROOT=/builddir/build/BUILDROOT/kodi-18.5-1.fc32.x86_64 /usr/lib/rpm/redhat/brp-mangle-shebangs ; echo $? 1 If I run the version from Fedora 31 and below (142-1) the script runs successfully with some WARNING output. [mockbuild@d2e1f9b641fc4411963e18f3a5e11f6a BUILDROOT]$ RPM_BUILD_ROOT=/builddir/build/BUILDROOT/kodi-18.5-1.fc32.x86_64 /builddir/build/brp-mangle-shebangs ; echo $? ... *** WARNING: ./usr/lib/python3.8/site-packages/kodi/bt/hid.py is executable but has empty or no shebang, removing executable bit ... 0 Running the Rawhide version 144-1 on the now modified BUILDROOT now runs successfully... [mockbuild@d2e1f9b641fc4411963e18f3a5e11f6a BUILDROOT]$ RPM_BUILD_ROOT=/builddir/build/BUILDROOT/kodi-18.5-1.fc32.x86_64 /usr/lib/rpm/redhat/brp-mangle-shebangs ; echo $? 0
It would be good to provide a reproducer - such as the buildroot or its .src.rpm. You can also try to add -x option to see the last failing command: RPM_BUILD_ROOT=/builddir/build/BUILDROOT/kodi-18.5-1.fc32.x86_64 bash -eux /usr/lib/rpm/redhat/brp-mangle-shebangs ; echo $? Or just add -x to the first line of: /usr/lib/rpm/redhat/brp-mangle-shebangs
Created attachment 1648905 [details] rawhide output I'm attaching the output of a script run on an unmodified BUILDROOT. The file the script stops on has only one line of text content with no newline. $ cat /builddir/build/BUILDROOT/kodi-18.5-1.fc32.x86_64/usr/lib/python3.8/site-packages/kodi/defs.py ICON_PATH="usr/share/pixmaps/kodi/"
If you're interested in the .src.rpm you can grab one from here: http://koji.rpmfusion.org/kojifiles/work/tasks/6535/376535/kodi-18.5-1.fc32.src.rpm FYI: It takes about one hour to compile on a 4C/8T 4GHz x86_64 system.
Created attachment 1648967 [details] Fix. That is 22m28s here on 16C/32T (with clear ccache). :^)
That brp-mangle-shebangs should be really fixed to report the broken file without just silently aborting.
Yes, that is what the previous version of the brp-mangle-shebangs script did. ... *** WARNING: ./usr/lib/python2.7/site-packages/kodi/defs.py is executable but has empty or no shebang, removing executable bit ...
I mean the bug is that the file has no trailing newline. Whether there is really a shebang or not is not a topic for this Bug. This change: redhat-rpm-config-142-1.fc31.noarch read shebang_line < "$f" || : redhat-rpm-config-146-1.fc32.noarch read shebang_line < "$f" It is due to Denys Vlasenko's: brp-mangle-shebangs: fix unsafe/incorrect command expansion https://src.fedoraproject.org/rpms/redhat-rpm-config/c/618362d6fbb29127e443d45187ddc1be102350bb
Any news on this regression? This is affecting many packages in a Copr I maintain, because they contain some data files without a new line.
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle. Changing version to 32.
(In reply to Michael Cronenworth from comment #6) > Yes, that is what the previous version of the brp-mangle-shebangs script did. > > ... > *** WARNING: ./usr/lib/python2.7/site-packages/kodi/defs.py is executable > but has empty or no shebang, removing executable bit > ... The lack of error reporting made me think that it was a problem on my system, wasted about an hour on this... I've added "-x" to the flags at the top of the /usr/lib/rpm/redhat/brp-mangle-shebangs script to find what the problems were in my package.
This message is a reminder that Fedora 32 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '32'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 32 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 32 changed to end-of-life (EOL) status on 2021-05-25. Fedora 32 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.