| |
@@ -6,7 +6,7 @@
|
| |
|
| |
Summary: Red Hat specific rpm configuration files
|
| |
Name: redhat-rpm-config
|
| |
- Version: 198
|
| |
+ Version: 199
|
| |
Release: 1%{?dist}
|
| |
# No version specified.
|
| |
License: GPL+
|
| |
@@ -116,10 +116,12 @@
|
| |
Requires: (annobin-plugin-clang if clang)
|
| |
|
| |
# for brp-mangle-shebangs
|
| |
+ Requires: %{_bindir}/eu-elfclassify
|
| |
Requires: %{_bindir}/find
|
| |
- Requires: %{_bindir}/file
|
| |
Requires: %{_bindir}/grep
|
| |
Requires: %{_bindir}/sed
|
| |
+
|
| |
+ # for brp-strip-lto
|
| |
Requires: %{_bindir}/xargs
|
| |
|
| |
# for brp-llvm-compile-lto-elf
|
| |
@@ -215,6 +217,10 @@
|
| |
%{_rpmconfigdir}/macros.d/macros.kmp
|
| |
|
| |
%changelog
|
| |
+ * Fri Sep 17 2021 Miro Hrončok <mhroncok@redhat.com> - 199-1
|
| |
+ - Use eu-elfclassify instead of file in brp-mangle-shebangs
|
| |
+ - Fixes: rhbz#1998924
|
| |
+
|
| |
* Mon Aug 30 2021 Florian Weimer <fweimer@redhat.com> - 198-1
|
| |
- ELN: Enable -march=x86-64-v2 for Clang as well
|
| |
|
| |
The brp-mangle-shebangs script should do the following thing:
1) Get all executable files in the buildroot
2) Get all "text" files from those
3a) Mangle shebangs that are "wrong" (e.g. #!/usr/bin/env node)
3b) Remove executable bits from "text" files without shebangs
Detection of "text" files is a tricky business.
The script previously grepped the MIME type detected by file for text/,
however, some obvious text files are reported as application/javascript or similar
and hence were never considered in (2) at all.
OTOH some "binary" files, such as zip archives,
may have shebangs that need mangling.
Now, we reliably detect non-ELF files by eu-elfclassify from the elfuitls package instead.
This is a new dependency, but rpm-build already depends on it,
so it does not pull in additional stuff to the default buildroot.
To my best knowledge, we only support two kinds of executable files:
Executable files with are neither of those are not good.
Technically, a Shell might execute them in itself,
but Shell scripts without shebangs
were already made not executable by the script before this change.
Fixes https://bugzilla.redhat.com/1998924
With the change described above,
we no longer need to grep the output of the file command
and hence we can process all files,
including files with weird characters in paths,
so we use null-terminated paths now.
Thanks to Neal Gompa for reporting this problem.
Thanks to Florian Weimer for suggesting eu-elfclassify.