Blame brp.diff

5b17a5
--- scripts/brp-strip-comment-note.orig	2023-09-19 10:10:10.000000000 +0000
5b17a5
+++ scripts/brp-strip-comment-note	2023-10-09 12:22:27.504732553 +0000
e0a517
@@ -15,7 +15,7 @@ esac
e0a517
 
e0a517
 # Strip .comment and .note sections (the latter only if it is not allocated)
Bernhard M. Wiedemann 1250f9
 # for already stripped elf files in the build root
e0a517
-for f in `find "$RPM_BUILD_ROOT" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -print0 | xargs -0 -r -P$NCPUS -n32 sh -c "file \"\\$@\" | grep -v \"^${RPM_BUILD_ROOT}/\?usr/lib/debug\" | sed -n -e 's/^\(.*\):[ 	]*ELF.*, stripped.*/\1/p'" ARG0`; do
e0a517
+for f in `find "$RPM_BUILD_ROOT" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -print0 | xargs -0 -r -P$NCPUS -n32 sh -c "file \"\\$@\" | grep -v \"^${RPM_BUILD_ROOT}/\?usr/lib/debug\" | grep -v ' shared object,' | grep -v '/lib/modules/' | sed -n -e 's/^\(.*\):[ 	]*ELF.*, stripped.*/\1/p'" ARG0`; do
Bernhard M. Wiedemann 1250f9
 	note="-R .note"
Bernhard M. Wiedemann 1250f9
 	if $OBJDUMP -h $f | grep '^[ 	]*[0-9]*[ 	]*.note[ 	]' -A 1 | \
e0a517
 		grep ALLOC >/dev/null; then
5b17a5
--- scripts/brp-strip.orig	2023-09-19 10:10:10.000000000 +0000
5b17a5
+++ scripts/brp-strip	2023-10-09 12:24:36.920521652 +0000
5b17a5
@@ -35,6 +35,7 @@ strip_elf_binaries()
5b17a5
     ! -regex "${RPM_BUILD_ROOT}/*usr/lib/debug.*" \
5b17a5
     ! -name "*.go" -links "${nlinks}" -print0 | \
5b17a5
     xargs -0 -r -P${nprocs} -n${MAX_ARGS} sh -c "file \"\$@\" | \
5b17a5
+    grep -v ' shared object,' | grep -v '/lib/modules/ | \
5b17a5
     sed -n -e 's/^\(.*\):[ 	]*ELF.*, not stripped.*/\1/p' | \
5b17a5
     grep -v 'no machine' | \
5b17a5
     xargs -I\{\} $STRIP -g \{\}" ARG0