diff options
author | B. Watson <urchlay@slackware.uk> | 2023-05-12 21:12:32 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2023-05-12 21:12:32 -0400 |
commit | 5220f663e45743cefbc94bb31e26509b88c92c8a (patch) | |
tree | 12b3f2c3ef7459b24bf102a1ce90ef5cb402bc74 /sbopkglint.d | |
parent | 18298dc73a71033049ba1a27e0d0b856aef3850c (diff) | |
download | sbo-maintainer-tools-5220f663e45743cefbc94bb31e26509b88c92c8a.tar.gz |
sbolint: check TMP PKG OUTPUT; sbopkglint: check empty man dirs.
Diffstat (limited to 'sbopkglint.d')
-rw-r--r-- | sbopkglint.d/05-basic-sanity.t.sh | 2 | ||||
-rw-r--r-- | sbopkglint.d/30-manpages.t.sh | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/sbopkglint.d/05-basic-sanity.t.sh b/sbopkglint.d/05-basic-sanity.t.sh index cfdf9cd..0600036 100644 --- a/sbopkglint.d/05-basic-sanity.t.sh +++ b/sbopkglint.d/05-basic-sanity.t.sh @@ -165,5 +165,5 @@ brokenlinks="$( find -L . -type l \! -lname '/*' )" # 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. -emptydirs="$( find . -type d -a -empty | grep -v 'var\>' )" +emptydirs="$( find . -type d -a -empty | grep -v '^\./var\>' )" [ -n "$emptydirs" ] && note "package contains empty dirs, are these necessary?" && ls -ld $emptydirs diff --git a/sbopkglint.d/30-manpages.t.sh b/sbopkglint.d/30-manpages.t.sh index 30c3841..7ab56d4 100644 --- a/sbopkglint.d/30-manpages.t.sh +++ b/sbopkglint.d/30-manpages.t.sh @@ -91,6 +91,7 @@ check_locale_dir() { if [ -d usr/man ]; then find usr/man -type f > .manpages.$$ find usr/man -mindepth 1 -type d > .mandirs.$$ + find usr/man -type d -a -empty > .manemptydirs.$$ while read d; do [ "$( stat -c '%a %U %G' "$d" )" != "755 root root" ] && BADDIRPERMS+="$d " @@ -113,7 +114,12 @@ if [ -d usr/man ]; then esac done < .manpages.$$ - rm -f .manpages.$$ .mandirs.$$ + if [ -s .manemptydirs.$$ ]; then + warn "empty dir(s) in /usr/man:" + cat .manemptydirs.$$ + fi + + rm -f .manpages.$$ .mandirs.$$ manemptydirs.$$ [ -n "$BADPERMS" ] && warn "bad man page owner/permissions (should be 0644, root:root)" && ls -ld $BADPERMS [ -n "$BADDIRPERMS" ] && warn "bad man directory owner/permissions (should be 0755, root:root)" && ls -ld $BADDIRPERMS |