From c4ebcb795bdb5cffdb537e22bdd6c5b992cede7c Mon Sep 17 00:00:00 2001 From: Steve Youngs Date: Wed, 23 Jun 2021 08:57:13 +1000 Subject: [PATCH] Fix -- list_package not finding all deps. If a binary is built as a "Position Independent Executable" (-fPIC) the dependency miner would fail because it wasn't testing for that MIME type. This change fixes that. * usr/bin/list_package (categorise): Test executables against 'x-(pie-)?(executable|sharedlib)' Signed-off-by: Steve Youngs --- usr/bin/list_package | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/bin/list_package b/usr/bin/list_package index 51ef12d..c6736cb 100755 --- a/usr/bin/list_package +++ b/usr/bin/list_package @@ -234,7 +234,7 @@ categorise() if [[ -f ${PKGASSETS[$i]} && -x ${PKGASSETS[$i]} ]]; then UBINS[$U]=$(basename ${PKGASSETS[$i]}) # add to the list of all execs (not scripts) - if [[ $(file -i ${PKGASSETS[$i]}) =~ x-executable ]]; then + if [[ $(file -i ${PKGASSETS[$i]}) =~ x-(pie-)?(executable|sharedlib) ]]; then AEXEC[$A]=${PKGASSETS[$i]} A=$((($A + 1))) fi @@ -248,7 +248,7 @@ categorise() -x ${PKGASSETS[$i]} ]]; then EBINS[$E]=${PKGASSETS[$i]} # add to the list of all execs (not scripts) - if [[ $(file -i ${EBINS[$E]}) =~ x-(executable|sharedlib) ]]; then + if [[ $(file -i ${EBINS[$E]}) =~ x-(pie-)?(executable|sharedlib) ]]; then AEXEC[$A]=${EBINS[$E]} A=$((($A + 1))) fi -- 2.25.1