xbps-src: quote properly some vars in the strip/verifyrdeps code.
This commit is contained in:
parent
f2bd4e603b
commit
1c8e866f9d
2 changed files with 12 additions and 7 deletions
|
@ -56,9 +56,8 @@ strip_files_real()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_normal "Package '$pkgname ($lver)': stripping files, please wait..."
|
msg_normal "Package '$pkgname ($lver)': stripping files, please wait..."
|
||||||
find ${DESTDIR} -type f | while read f
|
find ${DESTDIR} -type f | while read f; do
|
||||||
do
|
case "$(file -bi "$f")" in
|
||||||
case "$(file -biz $f)" in
|
|
||||||
application/x-executable*)
|
application/x-executable*)
|
||||||
strip "$f" && \
|
strip "$f" && \
|
||||||
echo " Stripped executable: $(basename $f)";;
|
echo " Stripped executable: $(basename $f)";;
|
||||||
|
|
|
@ -59,8 +59,12 @@ verify_rundeps()
|
||||||
[ -n "$noarch" -o -n "$noverifyrdeps" ] && return 0
|
[ -n "$noarch" -o -n "$noverifyrdeps" ] && return 0
|
||||||
msg_normal "Package '$pkgname ($lver)': verifying required run dependencies, please wait..."
|
msg_normal "Package '$pkgname ($lver)': verifying required run dependencies, please wait..."
|
||||||
|
|
||||||
find ${PKG_DESTDIR} -type f | while read f
|
depsftmp=$(mktemp -t xbps_src_depstmp.XXXXXXXXXX) || exit 1
|
||||||
do
|
find ${PKG_DESTDIR} -type f -perm -u+w > $depsftmp 2>/dev/null
|
||||||
|
|
||||||
|
exec 3<&0 # save stdin
|
||||||
|
exec < $depsftmp
|
||||||
|
while read f; do
|
||||||
# Don't check dirs specified in ignore_vdeps_dir.
|
# Don't check dirs specified in ignore_vdeps_dir.
|
||||||
for j in ${ignore_vdeps_dir}; do
|
for j in ${ignore_vdeps_dir}; do
|
||||||
if grep -q ${j} "${f}"; then
|
if grep -q ${j} "${f}"; then
|
||||||
|
@ -71,9 +75,9 @@ verify_rundeps()
|
||||||
[ -n "$igndir" ] && continue
|
[ -n "$igndir" ] && continue
|
||||||
unset igndir
|
unset igndir
|
||||||
|
|
||||||
case "$(file -biz $f)" in
|
case "$(file -bi "$f")" in
|
||||||
application/x-executable*|application/x-sharedlib*)
|
application/x-executable*|application/x-sharedlib*)
|
||||||
for nlib in $(objdump -p $f|grep NEEDED|awk '{print $2}'); do
|
for nlib in $(objdump -p "$f"|grep NEEDED|awk '{print $2}'); do
|
||||||
# Strip major version
|
# Strip major version
|
||||||
nlib="$(echo $nlib|sed -e 's|\.[0-9]$||')"
|
nlib="$(echo $nlib|sed -e 's|\.[0-9]$||')"
|
||||||
if [ -z "$verify_deps" ]; then
|
if [ -z "$verify_deps" ]; then
|
||||||
|
@ -93,6 +97,8 @@ verify_rundeps()
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
exec 0<&3 # restore stdin
|
||||||
|
rm -f $depsftmp
|
||||||
|
|
||||||
# Now verify that those required libs are added into package's
|
# Now verify that those required libs are added into package's
|
||||||
# template via Add_dependency.
|
# template via Add_dependency.
|
||||||
|
|
Loading…
Reference in a new issue