From 43ea916f2fc8a6a5146f5a4fdfd9f10c95d05110 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 22 May 2018 23:01:41 +0200 Subject: [PATCH] find-debuginfo.sh: Handle application/x-pie-executable Resolves: #1581224 --- 4.14.1-find-debuginfo-pie.patch | 29 +++++++++++++++++++++++++++++ rpm.spec | 10 +++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 4.14.1-find-debuginfo-pie.patch diff --git a/4.14.1-find-debuginfo-pie.patch b/4.14.1-find-debuginfo-pie.patch new file mode 100644 index 0000000..b92c6b1 --- /dev/null +++ b/4.14.1-find-debuginfo-pie.patch @@ -0,0 +1,29 @@ +commit 7145bd4d6edd1622585d7b18b8bba9a71cd41e2b +Author: Mark Wielaard +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 + +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 diff --git a/rpm.spec b/rpm.spec index 9c05a38..b91b2f5 100644 --- a/rpm.spec +++ b/rpm.spec @@ -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 - 4.14.1-9 +- find-debuginfo.sh: Handle application/x-pie-executable (#1581224) + * Tue Feb 20 2018 Igor Gnatenko - 4.14.1-8 - Split rpm-build-libs to one more subpackage rpm-sign-libs