From 43f3dbfbe560557feff2f7c80b7ec76bfaa695e3 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 20 Dec 2023 16:39:02 -0500 Subject: sbopkglint: tweak arch check. --- sbopkglint.d/20-arch.t.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sbopkglint.d/20-arch.t.sh b/sbopkglint.d/20-arch.t.sh index 2b8268c..96bb120 100644 --- a/sbopkglint.d/20-arch.t.sh +++ b/sbopkglint.d/20-arch.t.sh @@ -53,9 +53,12 @@ if [ -n "$WRONGDIR" ]; then # 20220414 bkw: only check for libs directly in the dir. # this avoids e.g. lib/udev/ and usr/lib/prgnam/plugins/*.so. # had to relax this check; it was too strict. - $WRONGDIR/*/*|usr/$WRONGDIR/*/*) continue ;; + # 20231216 bkw: don't check opt/ either. + opt/*|$WRONGDIR/*/*|usr/$WRONGDIR/*/*) continue ;; $WRONGDIR/*|usr/$WRONGDIR/*) ls -lb "$file" >> .inwrongdir.$$ ;; + usr/share/*) + ls -lb "$file" >> .insharedir.$$ ;; esac # 64-bit packages can contain 2 types of 32-bit binaries: @@ -91,4 +94,11 @@ fi [ -s .notstripped.$$ ] && warn "ELF object(s) not stripped:" && cat .notstripped.$$ [ -s .nonexec.$$ ] && warn "ELF binaries/libraries should be executable:" && cat .nonexec.$$ +if [ "$WRONGDIR" = "lib64" ]; then + [ -e usr/lib64 ] && warn "32-bit $ARCH package may not contain /usr/lib64" + [ -e lib64 ] && warn "32-bit $ARCH package may not contain /lib64" +elif [ "$WRONGDIR" = "lib" -a -e usr/lib ]; then + note "64-bit $ARCH package contains /usr/lib; this may or may not be a problem." +fi + rm -f .inwrongdir.$$ .wrongarch.$$ .notstripped.$$ .nonexec.$$ -- cgit v1.2.3