aboutsummaryrefslogtreecommitdiff
path: root/sbopkglint.d/10-docs.t.sh
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-04-06 12:55:13 -0400
committerB. Watson <yalhcru@gmail.com>2022-04-06 12:55:13 -0400
commit5fb14a3d73b19a81bc4b638feb009ab04c249e3a (patch)
tree3de6ca7e4260ac257929e15a262b85a9efd5ebb1 /sbopkglint.d/10-docs.t.sh
parent6c1acea4bd4a1f1c8329c7160b8d72f5ad2c108c (diff)
downloadsbo-maintainer-tools-5fb14a3d73b19a81bc4b638feb009ab04c249e3a.tar.gz
handle gtk4-update-icon cache and usr/doc/HTML, check for executable docs
Diffstat (limited to 'sbopkglint.d/10-docs.t.sh')
-rw-r--r--sbopkglint.d/10-docs.t.sh19
1 files changed, 14 insertions, 5 deletions
diff --git a/sbopkglint.d/10-docs.t.sh b/sbopkglint.d/10-docs.t.sh
index e1bb8d8..830e850 100644
--- a/sbopkglint.d/10-docs.t.sh
+++ b/sbopkglint.d/10-docs.t.sh
@@ -11,11 +11,12 @@
# be owned by root:root. also checks for empty files or (possibly)
# install instructions.
-
# ideally, we'd require all files under the doc dir to be mode 0644.
-# however, too many existing packages (including core Slackware ones)
-# break that rule. so check for the minimum set of desired permissions:
-# a doc file should be readable by all users (at least 444).
+# however, too many existing packages (including core Slackware
+# ones) break that rule. so check for the minimum set of desired
+# permissions: a doc file should be readable by all users (at least
+# 444), and check that any +x file looks like some kind of script
+# (perl/shell/python/etc).
DOCDIR=usr/doc/$PRGNAM-$VERSION
@@ -29,6 +30,12 @@ if [ -d "$DOCDIR" ]; then
empty="$( find $DOCDIR -mindepth 1 -empty )"
bogus="$( find $DOCDIR -mindepth 1 -maxdepth 1 -type f -a \( -name INSTALL -o -name INSTALL.\* \) )"
+ files="$( find $DOCDIR -type f -perm /111 )"
+ for f in $files; do
+ head -1 $f | grep '^#!' && continue; # script file
+ badpermfiles+=" $f"
+ done
+
[ -n "$badpermfiles" ] && warn "bad file perms (should be 644, or at least 444) in doc dir:" && ls -l $badpermfiles
[ -n "$badpermdirs" ] && warn "bad directory perms (should be 755) in doc dir:" && ls -ld $badpermdirs
[ -n "$badowners" ] && warn "bad ownership (should be root:root) in doc dir:" && ls -ld $badowners
@@ -36,5 +43,7 @@ if [ -d "$DOCDIR" ]; then
[ -n "$bogus" ] && [ -z "$INSTALL_DOCS_OK" ] && warn "useless-looking install instructions in doc dir: $bogus"
fi
-baddocs="$( find usr/doc -mindepth 1 -maxdepth 1 \! -name $PRGNAM-$VERSION )"
+# allow /usr/doc/HTML to exist, though we don't check its contents here.
+# this is the standard location for KDE5 help files.
+baddocs="$( find usr/doc -mindepth 1 -maxdepth 1 \! -name $PRGNAM-$VERSION \! -name HTML )"
[ -n "$baddocs" ] && warn "docs outside of $DOCDIR:" && ls -ld $baddocs