From 5d7d78379ac850ce675a21a4831653c00e143432 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sun, 28 May 2023 04:58:49 -0400 Subject: sbolint: tighten up doinst.sh check, tweak docs a bit. --- sbolint | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'sbolint') diff --git a/sbolint b/sbolint index 4711a30..bfa3de6 100755 --- a/sbolint +++ b/sbolint @@ -11,29 +11,31 @@ sbolint - check SlackBuild directories or tarballs for common errors. =head1 SYNOPSIS -B [--help | --man ] | [-a] [-q] [-u] [-n] [build [build ...]] +B [--help | --man | --version ] | [-a] [-q] [-u] [-n] [-r] [-c] [-m] [build [build ...]] =head1 DESCRIPTION -sbolint checks for common errors in SlackBuilds.org scripts. It's -intended for slackbuild authors and maintainers, and can cut down on +B checks for common errors in SlackBuilds.org scripts. It's +intended for SlackBuild authors and maintainers, and can cut down on "There was a problem with your upload" errors from the submission form. The [build] arguments must be either directories or tarballs, each containing a SlackBuild script, slack-desc, README, and .info file. With no [build] arguments, the current directory is checked. -sbolint will flag errors for problems that would prevent the build from -being accepted by the upload form (or by the SBo admins, if if passes -the upload checks). There may also be warnings, which are things that -(probably) won't stop your build from being accepted, but may cause the -SBo admins extra work. +B will flag errors for problems that would prevent the +build from being accepted by the upload form (or by the SBo admins, +if if passes the upload checks). There may also be warnings, which +are things that (probably) won't stop your build from being accepted, +but may cause the SBo admins extra work. There are also notes, which +are things that won't generally do any harm, but might be worth +investigating and cleaning up. -sbolint was not written by the SlackBuilds.org team, and shares no code -with the upload form's submission checker. Lack of errors/warnings from -sbolint does not guarantee that your build will be accepted! +B shares no code with the upload form's submission checker. Lack +of errors/warnings from B does not guarantee that your build +will be accepted! -sbolint doesn't check built packages, and never executes the build +B doesn't check built packages, and never executes the build script. If you want a lint tool for binary Slackware packages, use B. @@ -46,7 +48,8 @@ Do not bundle options. Use e.g. B<-q -r>, not B<-qr>. =item B<-a> Check all builds in the git repository. This must be run from within a -git tree (e.g. one made with "git clone"). +git tree (e.g. one made with "git clone"). This option also turns on +B<-q> (quiet). =item B<-q> @@ -1014,7 +1017,7 @@ sub check_dl_and_md5 { if($url_head) { curl_head_request($file, $u) || do { - warn '$u is '. $u; + #warn '$u is '. $u; log_warning("$file: $dlkey URL '$u' broken?"); }; } elsif($url_download) { @@ -1220,7 +1223,7 @@ sub check_script { if($output !~ m,\$\{OUTPUT:-(?:/tmp|(["'])/tmp\1)\},) { log_error("$file:$lineno: OUTPUT=\${OUTPUT:-/tmp} is required"); } - } elsif(/^[^#]*\$\{?CWD\}?\/doinst\.sh/) { + } elsif(/^[^#]*\$\{?CWD\}?\/doinst\.sh(?:"|'|\s|>)/) { # 20220205 bkw: some scripts don't have a doinst.sh in the # script dir, but they create one with >> (the jack rt audio stuff # does this). -- cgit v1.2.3