find-debuginfo.sh: Handle application/x-pie-executable

Resolves: #1581224
This commit is contained in:
Mark Wielaard 2018-05-22 23:01:41 +02:00
parent 99d6687a36
commit 43ea916f2f
2 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,29 @@
commit 7145bd4d6edd1622585d7b18b8bba9a71cd41e2b
Author: Mark Wielaard <mark@klomp.org>
Date: Tue May 22 22:12:11 2018 +0200
find-debuginfo.sh: Handle application/x-pie-executable (file 5.33 output).
A new version of file (5.33) changed the output for PIE executables.
Which are now represented as application/x-pie-executable; charset=binary.
The following change simply recognizes that binary format as one for
which -g applies. This fixes accidental stripping of the .symtab in
glibc (which use -g to keep that symbol table).
https://bugzilla.redhat.com/show_bug.cgi?id=1581224
Signed-off-by: Mark Wielaard <mark@klomp.org>
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
index a7c2db0..90a4494 100755
--- a/scripts/find-debuginfo.sh
+++ b/scripts/find-debuginfo.sh
@@ -235,6 +235,7 @@ strip_to_debug()
$strip_g && case "$(file -bi "$2")" in
application/x-sharedlib*) g=-g ;;
application/x-executable*) g=-g ;;
+ application/x-pie-executable*) g=-g ;;
esac
eu-strip --remove-comment $r $g ${keep_remove_args} -f "$1" "$2" || exit
chmod 444 "$1" || exit

View File

@ -23,7 +23,7 @@
%global rpmver 4.14.1
#global snapver rc2
%global rel 8
%global rel 9
%global srcver %{version}%{?snapver:-%{snapver}}
%global srcdir %{?snapver:testing}%{!?snapver:%{name}-%(echo %{version} | cut -d'.' -f1-2).x}
@ -67,6 +67,11 @@ Patch6: rpm-4.14.1-python-brp-bytecompile.patch
# - https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build
Patch7: rpm-4.14.1-Add-envvar-that-will-be-present-during-RPM-build.patch
# find-debuginfo.sh: Handle application/x-pie-executable (file 5.33 output).
# http://lists.rpm.org/pipermail/rpm-maint/2018-May/007976.html
# https://bugzilla.redhat.com/show_bug.cgi?id=1581224
Patch8: 4.14.1-find-debuginfo-pie.patch
# Patches already upstream:
# These are not yet upstream
@ -600,6 +605,9 @@ make check || cat tests/rpmtests.log
%doc doc/librpm/html/*
%changelog
* Tue May 22 2018 Mark Wielaard <mjw@fedoraproject.org> - 4.14.1-9
- find-debuginfo.sh: Handle application/x-pie-executable (#1581224)
* Tue Feb 20 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.14.1-8
- Split rpm-build-libs to one more subpackage rpm-sign-libs