From 06373c535aa0581ed2f0c91db5c3cb4ac4227b3a Mon Sep 17 00:00:00 2001 From: Gene Carlson Date: Tue, 24 Dec 2024 18:05:55 +0900 Subject: [PATCH] linting is in. --- ChangeLog/index.md | 1 + development/index.md | 7 ++++++- man/post-release/sbocheck.1.md | 4 ++++ man/post-release/sboclean.1.md | 4 ++++ man/post-release/sboconfig.1.md | 13 +++++++------ man/post-release/sbofind.1.md | 4 ++++ man/post-release/sboinstall.1.md | 4 ++++ man/post-release/sboremove.1.md | 4 ++++ man/post-release/sbosnap.1.md | 4 ++++ man/post-release/sbotools.conf.5.md | 27 ++++++++++++++++----------- man/post-release/sboupgrade.1.md | 4 ++++ 11 files changed, 58 insertions(+), 18 deletions(-) diff --git a/ChangeLog/index.md b/ChangeLog/index.md index 83e65757..668e54b9 100644 --- a/ChangeLog/index.md +++ b/ChangeLog/index.md @@ -1,6 +1,7 @@ # ChangeLog * Post-Release * *sboconfig*: Lint **REPO**; allow versions "X.Y+" and "current"; more informative error messages + * Exit with invalid *sbotools.conf* parameters (breaking: If a URL, **REPO** needs either rsync:// or .git) * 3.2.1 - 2024-12-20 * Bugfix: *sboinstall*, *sboupgrade* GPG check for custom repositories (removed unneeded conditional) diff --git a/development/index.md b/development/index.md index 5d813b74..0beffbdd 100644 --- a/development/index.md +++ b/development/index.md @@ -14,6 +14,11 @@ These features may be added in the future: * Rebuild a reverse dependency queue * Detect an existing local repository more correctly -* More extensive pre-run configuration linting (currently, this is only done for `SBO_HOME`) The above list is non-exhaustive and nothing on it is guaranteed to appear in `sbotools`. + +## Incoming Features + +To arrive in the next version: + +* More extensive pre-run configuration linting (currently, this is only done for `SBO_HOME`) diff --git a/man/post-release/sbocheck.1.md b/man/post-release/sbocheck.1.md index fbaf1245..0cc3b388 100644 --- a/man/post-release/sbocheck.1.md +++ b/man/post-release/sbocheck.1.md @@ -45,6 +45,10 @@ has the same effect. Passing both **\--gpg-verify** and **\--nopull** verifies the repo in-place without fetching. Only rsync repositories can be verified on Slackware 14.0 and Slackware 14.1. +If an invalid configuration is detected in +*/etc/sbotools/sbotools.conf*, the script will exit with a diagnostic +message. + ## OPTIONS **-g\|\--gpg-verify** diff --git a/man/post-release/sboclean.1.md b/man/post-release/sboclean.1.md index e2bd92ed..996ab30c 100644 --- a/man/post-release/sboclean.1.md +++ b/man/post-release/sboclean.1.md @@ -34,6 +34,10 @@ distfiles and/or */tmp/SBo* (or *\$TMP*) directories and any with extreme prejudice. One of **\--dist**, **\--work** or **\--option** must be specified for this script to do anything. +If an invalid configuration is detected in +*/etc/sbotools/sbotools.conf*, the script will exit with a diagnostic +message. + ## OPTIONS **-h\|\--help** diff --git a/man/post-release/sboconfig.1.md b/man/post-release/sboconfig.1.md index b89961bf..a1fece01 100644 --- a/man/post-release/sboconfig.1.md +++ b/man/post-release/sboconfig.1.md @@ -131,12 +131,13 @@ the one specified in */etc/slackware-version*. **-r\|\--repo (FALSE\|url)** -**REPO**: If set to a git or rsync **URL**, use that repository instead -of the **sbotools** default for your **SLACKWARE_VERSION**. The default -repositories are under rsync://slackbuilds.org/slackbuilds if -**RSYNC_DEFAULT** is **TRUE** and for Slackware versions prior to 14.2, -and otherwise. The repository must -be laid out in the same manner as one found at +**REPO**: If set to a git or rsync **URL** (rsync:// or ending with +.git), use that repository instead of the **sbotools** default for your +**SLACKWARE_VERSION**. The default repositories are under +rsync://slackbuilds.org/slackbuilds if **RSYNC_DEFAULT** is **TRUE** +and for Slackware versions prior to 14.2, and + otherwise. The repository must be +laid out in the same manner as one found at such that SlackBuild directories are under the category directories. diff --git a/man/post-release/sbofind.1.md b/man/post-release/sbofind.1.md index bf6e9df5..57b8005c 100644 --- a/man/post-release/sbofind.1.md +++ b/man/post-release/sbofind.1.md @@ -34,6 +34,10 @@ and version information. This is equivalent to running on a FreeBSD system. If the repository includes a *TAGS.txt* file, that will be used to find additional results. +If an invalid configuration is detected in +*/etc/sbotools/sbotools.conf*, the script will exit with a diagnostic +message. + ## OPTIONS **-h\|\--help** diff --git a/man/post-release/sboinstall.1.md b/man/post-release/sboinstall.1.md index 5569efe4..5019f49f 100644 --- a/man/post-release/sboinstall.1.md +++ b/man/post-release/sboinstall.1.md @@ -59,6 +59,10 @@ from as a fallback measure. **GPG_VERIFY** is **TRUE**. Only rsync repositories can be verified on Slackware 14.0 and Slackware 14.1. +If an invalid configuration is detected in +*/etc/sbotools/sbotools.conf*, the script will exit with a diagnostic +message. + ## OPTIONS **-h\|\--help** diff --git a/man/post-release/sboremove.1.md b/man/post-release/sboremove.1.md index 1fc20952..f577e9ed 100644 --- a/man/post-release/sboremove.1.md +++ b/man/post-release/sboremove.1.md @@ -38,6 +38,10 @@ performing any removal operations. No option exists to enable **sboremove** to uninstall packages without confirmation prompts, and there are no plans to add that functionality in the future. +If an invalid configuration is detected in +*/etc/sbotools/sbotools.conf*, the script will exit with a diagnostic +message. + ## OPTIONS **-h\|\--help** diff --git a/man/post-release/sbosnap.1.md b/man/post-release/sbosnap.1.md index 9e76ea4f..2597c15d 100644 --- a/man/post-release/sbosnap.1.md +++ b/man/post-release/sbosnap.1.md @@ -36,6 +36,10 @@ for rsync repositories, and **git** is used for git repositories. **GPG_VERIFY** is **TRUE**. Only rsync repositories can be verified on Slackware 14.0 and Slackware 14.1. +If an invalid configuration is detected in +*/etc/sbotools/sbotools.conf*, the script will exit with a diagnostic +message. + ## OPTIONS **-h\|\--help** diff --git a/man/post-release/sbotools.conf.5.md b/man/post-release/sbotools.conf.5.md index 12f3e582..528fa349 100644 --- a/man/post-release/sbotools.conf.5.md +++ b/man/post-release/sbotools.conf.5.md @@ -17,6 +17,9 @@ */etc/sbotools/sbotools.conf* contains *KEY=VALUE* configuration parameters, and is read by all **sbotools** commands. +If an invalid configuration is detected (or requested with +[sboconfig(1)](sboconfig.1.md)), the script will exit with a diagnostic message. + The current configuration keys are as follows: **CLASSIC=(FALSE\|TRUE)** @@ -34,10 +37,11 @@ Source archives are otherwise retained in */usr/sbo/distfiles* (with *SBO_HOME=/usr/sbo*) by default. If **PKG_DIR** is set, package archives will be saved there regardless of **DISTCLEAN**. -**GPG_VERIFY**: If **TRUE**, use **gpg** to verify the contents of the -local repository when running [sbosnap(1)](sbosnap.1.md), [sbocheck(1)](sbocheck.1.md), -[sboinstall(1)](sboinstall.1.md) and [sboupgrade(1)](sboupgrade.1.md). Missing public keys are -detected, and a download from +**GPG_VERIFY=(FALSE\|TRUE)** + +If **TRUE**, use **gpg** to verify the contents of the local repository +when running [sbosnap(1)](sbosnap.1.md), [sbocheck(1)](sbocheck.1.md), [sboinstall(1)](sboinstall.1.md) and +[sboupgrade(1)](sboupgrade.1.md). Missing public keys are detected, and a download from [keyserver.ubuntu.com](keyserver.ubuntu.com) on port 80 will be offered if available. Only rsync repositories can be verified on Slackware 14.0 and Slackware 14.1. @@ -92,14 +96,15 @@ If set to a **version number**, use the **slackbuilds.org** repository for that version of Slackware rather than the one specified in */etc/slackware-version*. -**REPO=(FALSE\|url)** +**REPO=(FALSE\|url\|/path)** -If set to a git or rsync **URL**, use that repository instead of the -**sbotools** default for your **SLACKWARE_VERSION**. The default -repositories are under rsync://slackbuilds.org/slackbuilds if -**RSYNC_DEFAULT** is **TRUE** and for Slackware versions prior to 14.2, -and otherwise. The repository must -be laid out in the same manner as one found at +If set to a git or rsync **URL** (rsync:// or ending in .git), use that +repository instead of the **sbotools** default for your +**SLACKWARE_VERSION**. The default repositories are under +rsync://slackbuilds.org/slackbuilds if **RSYNC_DEFAULT** is **TRUE** +and for Slackware versions prior to 14.2, and + otherwise. The repository must be +laid out in the same manner as one found at such that SlackBuild directories are under the category directories. diff --git a/man/post-release/sboupgrade.1.md b/man/post-release/sboupgrade.1.md index 974df833..a3c87e61 100644 --- a/man/post-release/sboupgrade.1.md +++ b/man/post-release/sboupgrade.1.md @@ -55,6 +55,10 @@ simultaneously. **GPG_VERIFY** is **TRUE**. Only rsync repositories can be verified on Slackware 14.0 and Slackware 14.1. +If an invalid configuration is detected in +*/etc/sbotools/sbotools.conf*, the script will exit with a diagnostic +message. + ## OPTIONS **-h\|\--help**