Why brp-strip don't handle that the fc23's executable files?

asked 2015-12-06 11:08:31 -0500

mosquito gravatar image

updated 2015-12-06 23:10:03 -0500

mether gravatar image

Today, i use Copr build some package, but i found some interesting things. See follow:

URL: https://copr.fedoraproject.org/coprs/...

wiznote-beta-2.3.1-1.gitfdd16c9.fc22.x86_64.rpm 6.6M
wiznote-beta-2.3.1-1.gitfdd16c9.fc23.x86_64.rpm 25.1M

PS: I use %global debug_package %{nil} in spec file.

Perhaps you've found out, they are different sizes. In fc22, the rpmbuild using the /usr/lib/rpm/brp-strip symbol stripped for debugging. But the fc23 did not take effect. Why did not take effect???

$ vim /usr/lib/rpm/brp-strip
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" || :
done

It seems no problem. I also look at the executable file.

(fc22)$ file /bin/wiznote-beta
/bin/wiznote-beta: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=xxx, not stripped
(fc22)$ du -sh /bin/wiznote-beta 8.3M
(fc23)$ file /bin/wiznote-beta
/bin/wiznote-beta: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=xxx, not stripped
(fc23)$ du -sh /bin/wiznote-beta 95M

The fc23 executable file is shared object, so brp-strip is not in effect.

There are two ways to solve this problem. Executive strip (/usr/lib/rpm/brp-strip-shared) in the spec file; delete% global debug_package% {nil}statement.

I want to know why this is so (in fc23, shared object), I submit bug (rpm-build) it ? Thanks.

edit retag flag offensive close merge delete