Description of problem: Setuid binaries are ignored when building debuginfo package Version-Release number of selected component (if applicable): rpm-build-4.2.1-0.11 How reproducible: Every time Steps to Reproduce: 1. Build a package with a setuid binary included, such as aegis Actual results: debug info for the setuid binary is not stripped out into the debuginfo package, nor are its sources included in the debuginfo package Expected results: setuid binaries should be treated just like other binaries Additional info: Patch: --- /usr/lib/rpm/find-debuginfo.sh~ 2003-06-05 18:00:55.000000000 +0100 +++ /usr/lib/rpm/find-debuginfo.sh 2003-07-28 03:46:26.000000000 +0100 @@ -13,7 +13,7 @@ # Strip ELF binaries for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \ - sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'` + sed -n -e 's/^\(.*\):[ ]*.*ELF.* executable.*, not stripped/\1/p'` do BASEDIR=`dirname $f | sed -n -e "s#^$RPM_BUILD_ROOT#/#p"` [ "$BASEDIR" = "/usr/lib/debug" ] && continue;
Just an FYI, this patch causes find-debuginfo to no longer be able to find libraries.
Oops, that was silly of me. I introduced a new bug by adding "executable" to the regular expression. All that was needed was to add a .* but I chose to also add something totally irrelevant and, as it turned out, harmful. D'oh!
I've changed the sed line to: sed -n -e 's/^\(.*\):[ ]*.*ELF.*, not stripped/\1/p'` to handle the "setuid" lead-in. Added to rpm-4_4, should be in rpm-4.4.2-0.8 when built. Thanks for the patch and comment.
*** Bug 147795 has been marked as a duplicate of this bug. ***