ports, jail: Warn instead of erroring on hyphenated PTNAME/JAILNAME
Downgrade the ports-tree hyphen check from a hard err() to a warning,
consistent with the existing SETNAME hyphen warning. Extract the
hyphen check into a shared check_name_hyphen() helper in common.sh and
apply it uniformly at the point each identifier is established:
jail creation, jail rename, and ports tree creation. SETNAME keeps its
existing call in jail_start(), since a set has no separate creation
step -- its first use in a build is effectively its creation.
The warning intentionally doesn't name a specific mechanism (e.g. the
previous "-z" claim for ports tree names): no code path splits a
hyphenated name back into components during normal creation or build
handling. The only place a joined name is ever decomposed is
for_each_build()'s fallback for build logs predating separate
jailname/ptname/setname metadata (2013, a2300607), which no longer
applies to any name established from this point forward. Warning only
at creation time reflects that once a name exists, cautioning about it
again on every later build is not actionable.
[2 lines not shown]
tests: use 14.5-RELEASE for test jail
This fixes `make check`.
(cherry picked from commit a2dbc12484f41cc482f1caa2d0c1cb0e022270f7)
Conflicts:
test/common.bulk.sh
jail.sh: skip repo update when install packages in pkgbase
pkg-install(8) manual states that the command updates pkg repositories
unless it is told not to do so:
- use `-U` flag
- set flag `REPO_AUTOUPDATE=no`
`install_from_pkgbase` first updates the repositories and then installs
base + other packages with pkg-install(8).
This change disables the repository update in pkg-install(8)
NO_ISSUE
jail: When creating or upgrading a pkgbase jail support -v properly
When building a jail via HTTP it is common to use `-v 15.1-RELEASE' to
specify the version in the jail. Prior to this change the pkgbase
method only supported `-v 15' which gave the oldest supported version of
15, which today is 15.0-RELEASE, so it was not easy to install or
upgrade to 15.1-RELEASE.
shash_get: Remove globbing support.
This support is not needed to function and adds complexity for
alternative backends for shash.
Still allow _shash_unset() to use globbing as an implementation detail
of shash_remove_var().
shash: some style changes
- Prefer "set" to match existing styles
- Add some :? to match existing assertions
- Use `|| return` to avoid, and not rely on, `set -e` handler