FS#43600 - makepkg does not strip read-only files
|
Details
Summary and Info:
While trying to build openssl with debugging symbols, I was surprised to find a libcrypto.so.1.0.0 that grew from 2.8M to 9.8M. It turns out that all debug symbols were still present, even when the 'strip' option is set. Somehow OpenSSL thought it would be nice to install libraries with 555 permissions... and they are in the minority of doing this. This results in makepkg skipping this file for strip consideration: find . -type f -perm -u+w -print0 2>/dev/null | while read -rd '' binary ; do case "$(file -bi "$binary")" in Is there actually a use case for not stripping a binary while the "strip" option is given...? Steps to Reproduce: 1. extract the attached tarball 2. makepkg 3. notice that "foo" is missing in the pkg/foo-debug/ dir. |
This task depends upon
Here is a trivial patch that unconditionally makes files have a writable mode for their owner. It probably won't be accepted as-is, but perhaps a discussion can start now?
We can change it to writable for stripping as long as the permissions are reverted afterwards.
I've mentioned this to Bluewind on IRC, and suggested it might be a good idea to try discussing the reasoning of the perl developers in doing things like this. But he did not have sufficient time to chase this down; would you be interested in doing so?
I agree with Allan that it's quite weird for upstream to install files as read-only for root, and we should not mess with this ourselves.