Skip to content

Commit

Permalink
[plan-build] Fix file discovery in do_default_strip
Browse files Browse the repository at this point in the history
The previous invocation of find passed the `-perm` argument `u+w` which
would only match files whose mode was exactly 0200. Because of this,
almost no packages were shipping stripped executables. Changing this to
`-u+w` will find any files where the mode has the user write bit set.

Fixes #1066

Signed-off-by: Steven Danna <[email protected]>

Closes: #1085
Approved by: reset
  • Loading branch information
stevendanna authored and thesentinels committed Jul 21, 2016
1 parent 874a307 commit 8e8ab12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/plan-build/bin/hab-plan-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2051,7 +2051,7 @@ do_strip() {
# Default implementation for the `do_strip()` phase.
do_default_strip() {
build_line "Stripping unneeded symbols from binaries and libraries"
find $pkg_prefix -type f -perm u+w -print0 2> /dev/null \
find $pkg_prefix -type f -perm -u+w -print0 2> /dev/null \
| while read -rd '' f; do
case "$(file -bi "$f")" in
*application/x-executable*) strip --strip-all "$f";;
Expand Down

0 comments on commit 8e8ab12

Please sign in to comment.