On 9/22/21 4:21 AM, Miro HronĨok wrote:
Hello,
for many releases, Fedora has the brp-mangle-sehbangs BuildRoot Policy Script
that does the following:
1) Gets all executable files in the buildroot
2) Gets all "text" files from those
3a) Mangles shebangs that are "wrong"
(e.g. #!/usr/bin/env node -> #!/usr/bin/node)
3b) Removes executable bits from "text" files without shebangs
While we're at it, can we teach the script to ignore Rust attributes?
They're written like #![attr...], and when that's on the first line some
editors try to be helpful and make the file executable. That's
considered an error with the current script since the "shebang" doesn't
start with '/', but it would be best IMO to have it remove the
executable bit.