From e809cd1952ba28415697df9fc654c72051e30e86 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 14 Sep 2026 22:29:53 -0400 Subject: sbolint: doinst.sh must not use chmod or refer to $PKG. --- sbolint | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sbolint') diff --git a/sbolint b/sbolint index 65bd0bd..f96f365 100755 --- a/sbolint +++ b/sbolint @@ -322,6 +322,9 @@ to config() or preserve_perms() must end with a B<.new> suffix. If doinst.sh calls B, the existence of the cache must be checked before this command is run. ++=item - ++doinst.sh must not use chmod or refer to the build-time $PKG directory. + =back =item - @@ -1823,7 +1826,11 @@ sub check_doinst { s,\s*$,,; next unless /./; - if(/^config\(\)/) { + if(/chmod/) { + log_error("$file:$lineno: doinst.sh must not use chmod; set file permissions while building the package."); + } elsif(/\$\{?PKG\}?/ || /"\$PKG"/) { + log_error("$file:$lineno: doinst.sh must not use \$PKG; package root is the current directory."); + } elsif(/^config\(\)/) { $config_defined = $lineno; } elsif(/^config\s+/) { # the [\@\$] is intended to skip stuff like $NEW, or a for loop variable, -- cgit v1.2.3