Make brp-strip* not strip debug objects
Add a _enable_debug_packages macro (commented out)
This commit is contained in:
parent
f3e01161c3
commit
27ac1446b0
@ -6,6 +6,7 @@ fi
|
||||
|
||||
# Strip ELF binaries
|
||||
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
|
||||
strip -g $f || :
|
||||
|
@ -7,6 +7,7 @@ fi
|
||||
# Strip .comment and .note sections (the latter only if it is not allocated)
|
||||
# for already stripped elf files in the build root
|
||||
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" | \
|
||||
sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped/\1/p'`; do
|
||||
note="-R .note"
|
||||
if objdump -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \
|
||||
|
@ -11,6 +11,7 @@ fi
|
||||
# Please note we don't restrict our search to executable files because
|
||||
# our libraries are not (should not be, at least) +x.
|
||||
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
|
||||
strip --strip-unneeded $f
|
||||
|
6
macros
6
macros
@ -21,6 +21,8 @@
|
||||
|
||||
%_defaultdocdir %{_usr}/share/doc
|
||||
|
||||
#%_enable_debug_packages 1
|
||||
|
||||
#==============================================================================
|
||||
# ---- configure and makeinstall.
|
||||
#
|
||||
@ -92,7 +94,9 @@
|
||||
|
||||
|
||||
# Bad hack to set $LANG to C during all RPM builds
|
||||
%prep %%prep\
|
||||
%prep \
|
||||
%{?_enable_debug_packages:%{debug_package}}\
|
||||
%%prep\
|
||||
LANG=C\
|
||||
export LANG\
|
||||
%{nil}
|
||||
|
Loading…
Reference in New Issue
Block a user