Skip to content

Commit

Permalink
Don't strip ELF files with "no machine"
Browse files Browse the repository at this point in the history
as strip fails on them (if they are Guile object files).
This adds another layer of protection as *.go files are already filtered
out.

Resolves:  rpm-software-management#1765
  • Loading branch information
ffesti committed Sep 28, 2021
1 parent ee5d150 commit 3161ce3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/brp-strip
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ esac

# Strip ELF binaries
find "$RPM_BUILD_ROOT" -type f \! -regex "${RPM_BUILD_ROOT}/*usr/lib/debug.*" \! -name "*.ko" \! -name "*.go" -print0 | \
xargs -0 -r -P$NCPUS -n32 sh -c "file \"\$@\" | sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped.*/\1/p' | xargs -I\{\} $STRIP -g \{\}" ARG0
xargs -0 -r -P$NCPUS -n32 sh -c "file \"\$@\" | sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped.*/\1/p' | grep -v 'no machine' | xargs -I\{\} $STRIP -g \{\}" ARG0

0 comments on commit 3161ce3

Please sign in to comment.