diff options
Diffstat (limited to 'sbopkglint.d/05-basic-sanity.t.sh')
-rw-r--r-- | sbopkglint.d/05-basic-sanity.t.sh | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sbopkglint.d/05-basic-sanity.t.sh b/sbopkglint.d/05-basic-sanity.t.sh index 8267b83..d5d3569 100644 --- a/sbopkglint.d/05-basic-sanity.t.sh +++ b/sbopkglint.d/05-basic-sanity.t.sh @@ -203,8 +203,22 @@ find_warnfiles "package contains broken relative symlinks:" \ # 20230320 bkw: empty directories. this isn't an error, just a note, and # we ignore any empty dirs under /var because lots of packages need these. +# 20241008 bkw: ignore empty bin sbin usr/bin usr/sbin, these are caught below. find_warnfiles --note "package contains empty dirs, are these necessary?" \ - . -type d -a -empty -a \! -path "./var/*" + . -type d -a -empty \ + -a \! -path "./var/*" \ + -a \! -path ./bin \ + -a \! -path ./sbin \ + -a \! -path ./usr/bin \ + -a \! -path ./usr/sbin + +# 20241008 bkw: if any of /bin /sbin /usr/bin or /usr/sbin exists, they must +# not be empty. +for i in bin sbin usr/bin usr/sbin; do + if [ -e $i -a -z "$( ls -bld $i/* 2>/dev/null )" ]; then + warn "package contains empty $i directory, this is probably a bug in the script." + fi +done find_warnfiles "package contains files owned by UID/GID >= 1000" \ . \( -uid +999 -o -gid +999 \) |