diff options
authorSam Thursfield <>2015-02-19 16:45:27 +0000
committerSam Thursfield <>2015-02-20 15:31:13 +0000
commitde9f11e3778de703c12c6027fe38ad66f123c8f6 (patch)
parentc5af0789015399dacaaa90d95d029c5434073c86 (diff)
sdk.write: Fix with modern versions of 'find'
The '-perm +111' syntax has been deprecated since 2005 and has been removed from modern versions of GNU Find. Thus, the SDK installer script fails on Fedora 21 (GNU Find 4.5.11) with the following error: find: invalid mode +111 The recommended replacement is '-perm /111' but this isn't supported by the version of Busybox 'find' present in current Baserock 'build' systems. This test is being done purely to find files that are executable, and for this purpose '-perm +u=x' is equivalent (but supported by both versions of 'find').
1 files changed, 1 insertions, 1 deletions
diff --git a/sdk.write b/sdk.write
index 3b07ea9d..31516f56 100755
--- a/sdk.write
+++ b/sdk.write
@@ -227,7 +227,7 @@ patch_elves(){
local linker="$4"
local lib_path="$5"
find "$root" \( -path "$inner_sysroot" -prune \) -o -type f \
- -type f -perm +111 \
+ -type f -perm +u=x \
-exec sh -c 'file "$1" | grep -q "ELF"' - {} \; \
-exec "$linker" --library-path "$lib_path" \
"$patchelf" --set-interpreter "$linker" \