aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-06-17 16:43:06 -0400
committerB. Watson <urchlay@slackware.uk>2023-06-17 16:46:50 -0400
commit13e6b643cbb46d1f9a8156e401ff33c78509eb64 (patch)
tree78c5b869d416061da9c064c834583be2987d052a
parent2e67ad795165ab7302ac47bb09e97fd1d9e791bb (diff)
downloadsbo-maintainer-tools-13e6b643cbb46d1f9a8156e401ff33c78509eb64.tar.gz
sbopkglint: check for bins/libs without +x bit set.
-rw-r--r--TODO3
-rw-r--r--sbopkglint.d/20-arch.t.sh6
2 files changed, 7 insertions, 2 deletions
diff --git a/TODO b/TODO
index 6828728..8bd3336 100644
--- a/TODO
+++ b/TODO
@@ -1,8 +1,9 @@
+TODO: sbolint should check that gtk-update-icon-cache is guarded by
+ 'if [ -e usr/share/icons/hicolor/icon-theme.cache'.
TODO: check for "if [ -x /usr/bin/whatever ]" in doinst.sh, warn
if missing. this could be an ill-defined mess.
TODO: sbopkglint could complain if the SlackBuild sets SLKCFLAGS
but there's no native code.
-TODO: check for non-executable shared libs.
Future test ideas:
diff --git a/sbopkglint.d/20-arch.t.sh b/sbopkglint.d/20-arch.t.sh
index de13ad7..bb9fafe 100644
--- a/sbopkglint.d/20-arch.t.sh
+++ b/sbopkglint.d/20-arch.t.sh
@@ -38,6 +38,9 @@ if [ -n "$WRONGDIR" ]; then
while read line; do
file="$( echo $line | cut -d: -f1 )"
filetype="$( echo $line | cut -d: -f2 )"
+
+ [ ! -x "$file" ] && ls -bld "$file" >> .nonexec.$$
+
case "$file" in
# 20220414 bkw: only check for libs directly in the dir.
# this avoids e.g. lib/udev/<executable> and usr/lib/prgnam/plugins/*.so.
@@ -78,5 +81,6 @@ fi
[ -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.$$
+[ -s .nonexec.$$ ] && warn "ELF binaries/libraries should be executable:" && cat .nonexec.$$
-rm -f .inwrongdir.$$ .wrongarch.$$ .notstripped.$$
+rm -f .inwrongdir.$$ .wrongarch.$$ .notstripped.$$ .nonexec.$$