[packages/rpm] Do not assume about file output too much

jajcus jajcus at pld-linux.org
Tue Jan 27 11:19:16 CET 2015


commit 0959ed6de3df213414d3b905bd231e859f4713c3
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Tue Jan 27 11:15:57 2015 +0100

    Do not assume about file output too much
    
    'file' output for a not stripped ELF binary not necessarily
    ends with ', not stripped'. icedtea7 build would fail on
    find-debuginfo.sh with current 'file', as file output for 'libjvm.so'
    ends with ', too many notes (256)'.
    
    Release: 9

 rpm-file-output-for-ELF.patch | 34 ++++++++++++++++++++++++++++++++++
 rpm.spec                      |  4 +++-
 2 files changed, 37 insertions(+), 1 deletion(-)
---
diff --git a/rpm.spec b/rpm.spec
index 9ed4fdd..b2f2a3f 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -51,7 +51,7 @@ Summary(ru.UTF-8):	Менеджер пакетов от RPM
 Summary(uk.UTF-8):	Менеджер пакетів від RPM
 Name:		rpm
 Version:	5.4.15
-Release:	8
+Release:	9
 License:	LGPL v2.1
 Group:		Base
 # http://rpm5.org/files/rpm/rpm-5.4/rpm-5.4.15-0.20140824.src.rpm
@@ -173,6 +173,7 @@ Patch83:	%{name}-ignore-missing-macro-files.patch
 Patch84:	x32.patch
 Patch85:	rpm-CVE-2013-6435.patch
 Patch86:	rpm-CVE-2014-8118.patch
+Patch87:	%{name}-file-output-for-ELF.patch
 
 # Patches imported from Mandriva
 
@@ -952,6 +953,7 @@ cd -
 %patch84 -p1
 %patch85 -p1
 %patch86 -p1
+%patch87 -p1
 
 %patch1000 -p1
 %patch1001 -p1
diff --git a/rpm-file-output-for-ELF.patch b/rpm-file-output-for-ELF.patch
new file mode 100644
index 0000000..ea01b4a
--- /dev/null
+++ b/rpm-file-output-for-ELF.patch
@@ -0,0 +1,34 @@
+diff -dur -x '*~' rpm-5.4.15.orig/scripts/brp-strip rpm-5.4.15/scripts/brp-strip
+--- rpm-5.4.15.orig/scripts/brp-strip	2011-09-06 14:53:10.000000000 +0200
++++ rpm-5.4.15/scripts/brp-strip	2015-01-27 11:09:22.000000000 +0100
+@@ -16,6 +16,6 @@
+ for f in `find "$RPM_BUILD_ROOT" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \
+         grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug"  | \
+ 	grep -v ' shared object,' | \
+-	sed -n -e 's/^\(.*\):[ 	]*ELF.*, not stripped/\1/p'`; do
++	sed -n -e 's/^\(.*\):[ 	]*ELF.*, not stripped.*/\1/p'`; do
+ 	$STRIP -g "$f" || :
+ done
+diff -dur -x '*~' rpm-5.4.15.orig/scripts/brp-strip-shared rpm-5.4.15/scripts/brp-strip-shared
+--- rpm-5.4.15.orig/scripts/brp-strip-shared	2012-05-08 05:00:44.000000000 +0200
++++ rpm-5.4.15/scripts/brp-strip-shared	2015-01-27 11:09:41.000000000 +0100
+@@ -21,6 +21,6 @@
+ for f in `find "$RPM_BUILD_ROOT" -type f -a -exec file {} \; | \
+         grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug"  | \
+ 	grep ' shared object,' | \
+-	sed -n -e 's/^\(.*\):[ 	]*ELF.*, not stripped/\1/p'`; do
++	sed -n -e 's/^\(.*\):[ 	]*ELF.*, not stripped.*/\1/p'`; do
+ 	$STRIP --strip-unneeded "$f"
+ done
+diff -dur -x '*~' rpm-5.4.15.orig/scripts/find-debuginfo.sh rpm-5.4.15/scripts/find-debuginfo.sh
+--- rpm-5.4.15.orig/scripts/find-debuginfo.sh	2015-01-27 11:10:52.000000000 +0100
++++ rpm-5.4.15/scripts/find-debuginfo.sh	2015-01-27 11:09:54.000000000 +0100
+@@ -194,7 +194,7 @@
+ find "$RPM_BUILD_ROOT" ! -path "${debugdir}/*.debug" -type f \
+      		     \( -perm -0100 -or -perm -0010 -or -perm -0001 \) \
+ 		     -print | LANG=C sort |
+-file -N -f - | sed -n -e 's/^\(.*\):[ 	]*.*ELF.*, not stripped/\1/p' |
++file -N -f - | sed -n -e 's/^\(.*\):[ 	]*.*ELF.*, not stripped.*/\1/p' |
+ xargs --no-run-if-empty stat -c '%h %D_%i %n' |
+ while read nlinks inum f; do
+   [ -n "$EXCLUDE_REGEXP" ] && grep -E -q "$EXCLUDE_REGEXP" <<< "$f" && \
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/0959ed6de3df213414d3b905bd231e859f4713c3



More information about the pld-cvs-commit mailing list