aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-06-17 05:17:10 -0400
committerB. Watson <urchlay@slackware.uk>2023-06-17 05:17:10 -0400
commita154221eab368e21d219479e5e5a715dd14012be (patch)
tree19e91f680eafc0dcac948ab0bfd245876852bf74
parent074e5b4b87f09f7a7ee130d2344a0976abd4ba97 (diff)
downloadsbo-maintainer-tools-a154221eab368e21d219479e5e5a715dd14012be.tar.gz
sbopkglint: spaces in filenames WIP #10.
-rw-r--r--sbopkglint.d/20-arch.t.sh17
1 files changed, 8 insertions, 9 deletions
diff --git a/sbopkglint.d/20-arch.t.sh b/sbopkglint.d/20-arch.t.sh
index 6ad2d72..de13ad7 100644
--- a/sbopkglint.d/20-arch.t.sh
+++ b/sbopkglint.d/20-arch.t.sh
@@ -30,9 +30,6 @@ case "$ARCH" in
*) warn "ARCH isn't noarch, i?86, x86_64, arm, or aarch64. don't know how to check binaries." ;;
esac
-INWRONGDIR=""
-WRONGARCH=""
-NOTSTRIPPED=""
if [ -n "$WRONGDIR" ]; then
find * -type f -print0 | \
xargs -0 file -m /etc/file/magic/elf | \
@@ -47,7 +44,7 @@ if [ -n "$WRONGDIR" ]; then
# had to relax this check; it was too strict.
$WRONGDIR/*/*|usr/$WRONGDIR/*/*) continue ;;
$WRONGDIR/*|usr/$WRONGDIR/*)
- INWRONGDIR+="$file " ;;
+ ls -lb "$file" >> .inwrongdir.$$ ;;
esac
# 64-bit packages can contain 2 types of 32-bit binaries:
@@ -64,20 +61,22 @@ if [ -n "$WRONGDIR" ]; then
# in 64-bit and 32-bit varieties, they must be in the correct
# directory.
if ! echo "$filetype" | grep -q -e "$CPU" -e 'no machine'; then
- WRONGARCH+="$file "
+ ls -lb "$file" >> .wrongarch.$$
fi
# don't check "no machine" ELF objects for being stripped.
# our strip command doesn't know how to strip them!
if ! echo "$filetype" | grep -q 'no machine'; then
if echo "$filetype" | grep -q "not stripped"; then
- NOTSTRIPPED+="$file "
+ ls -lb "$file" >> .notstripped.$$
fi
fi
done < .tmp.$$
rm -f .tmp.$$
fi
-[ -n "$INWRONGDIR" ] && warn "shared lib(s) in wrong dir for ARCH:" && ls -l $INWRONGDIR
-[ -n "$WRONGARCH" ] && warn "ELF object(s) with wrong arch (should be $CPU):" && ls -l $WRONGARCH
-[ -n "$NOTSTRIPPED" ] && warn "ELF object(s) not stripped:" && ls -l $NOTSTRIPPED
+[ -s .inwrongdir.$$ ] && warn "shared lib(s) in wrong dir for ARCH:" && cat .inwrongdir.$$
+[ -s .wrongarch.$$ ] && warn "ELF object(s) with wrong arch (should be $CPU):" && cat .wrongarch.$$
+[ -s .notstripped.$$ ] && warn "ELF object(s) not stripped:" && cat .notstripped.$$
+
+rm -f .inwrongdir.$$ .wrongarch.$$ .notstripped.$$