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
jail, ports: Avoid set -e trap in quiet-mode "done" idiom
4cb78962 introduced `[ -n "${quiet}" ] && echo " done"` in the svn/git
checkout and update paths of install_from_vcs() (jail.sh) and ports.sh.
When quiet is unset the test is false, so the statement returns exit 1;
under set -e a bare call to the enclosing function/case arm would abort
the script right after that line runs, as seen with the identical
pattern in image.sh (PR #1378). None of these 8 occurrences are
currently a function's last statement, so they don't trip today, but
the pattern is fragile under refactoring. Use an if/fi block instead,
matching the idiom already used for the preceding header line, so the
statement always returns 0.
This closes #1387
jail: Reject a period in the new name on rename
create_jail() rejects a period in JAILNAME since jail(8) names cannot
contain one, but rename_jail() never validated NEWJAILNAME at all, so
'poudriere jail -r' could rename a jail to a name jail(8) itself would
reject. Apply the same check used at creation.
This closes #1388
pkg: Add trailing ellipsis to repository signing status messages
Each of these msg() calls is immediately followed by an unredirected
injail pkg-repo invocation whose own output streams directly to the
console right after the header, the same shape as other "action
followed by unbuffered command output" status lines that already use
a trailing "...". pkg repo has no quiet/verbose toggle in play here
(PKG_REPO_FLAGS only carries --hash/--symlink), so this is a plain
ellipsis fix, not an idiom conversion.
This closes #1381
image: Use quiet-aware msg idiom for pkgbase install status
install_world_from_pkgbase() always reported "Installing base
packages" / "Base packages installed" as two separate msg() lines,
regardless of PKG_QUIET. Under the default quiet pkg install
(-q, unless -v was passed), nothing prints between them, so treat it
like the other silent/slow operations with msg_n "...done". When -v
clears PKG_QUIET, pkg's own install output streams between the
header and completion, so keep the header on its own line via msg()
with a trailing "..." and skip the redundant "done", matching the
quiet-vs-verbose idiom already used for jail.sh's install_from_vcs().
image: Use msg_n/done idiom for ZFS image build status messages
zfs send/recv, zpool create, and zfs create/snapshot are all silent
on success and can take a noticeable amount of time (especially for
larger images), but were reported via standalone msg() calls with no
completion signal. Switch to the msg_n "...done" idiom used elsewhere
for silent, potentially slow operations.
image: Use msg_n/done idiom for install_world tar status
install_world() reported "Installing world with tar" and "Installing
world done" as two separate msg() lines, even though both the tar
pipeline and make -s are always silent on success and the operation
(copying the full world plus delete-old) can take a while. Switch to
the msg_n "...done" idiom used elsewhere for silent, potentially slow
operations.
jail: Add trailing ellipsis to make/freebsd-update status messages
Each of these msg() calls is immediately followed by an unredirected
external command (make or freebsd-update) whose own real-time output
streams directly to the console right after the header, with no
paired completion message -- the command's own output, or the
err()/msg_warn() on failure, is what signals progress/completion.
Add a trailing "..." so the header reads as in-progress rather than
a standalone statement, consistent with msg_n() callers elsewhere.
image: Use msg_n/done idiom for miniroot creation status
mkminiroot() reported "Making miniroot" as a standalone msg() even
though the function is mostly silent and can take a noticeable
amount of time (copying files, resolving shared library deps, and
running makefs/gzip). Of its steps, only makefs writes unredirected
output to stdout; gzip -9 without -v is already silent. Redirect
makefs's output to /dev/null, matching the same treatment already
used for its sibling make_esp_file(), and switch to the msg_n
"...done" idiom used elsewhere for silent, potentially slow
operations so the whole function reports as one in-progress status
line instead of a header with no matching completion.
build_port: Add trailing ellipsis to shared library dependency check
The readelf/grep output for the NEEDED library list prints directly
after this status line, so it should read as in-progress like other
such messages instead of a standalone statement.
Reject unsafe package names from ports metadata
PKGNAME is used to construct host-side package staging paths. A port
can supply traversal components and cause those paths to escape the
staging directory.
Validate package names when reading port metadata and before a build
worker uses one. This prevents path separators and dot traversal
components from reaching host filesystem operations.
(cherry picked from commit e90c7ba59dbb1b42b9e83029e88c570caf29d632)
Conflicts:
src/share/poudriere/common.sh
Issue #1363
README: point the build badge at SourceHut
Cirrus CI stopped running jobs on 2026-06-01 when Cirrus Labs joined OpenAI,
so the badge no longer renders and its link is dead. SourceHut has been
building poudriere since 2026-05-05 via .builds/freebsd.yml.
Fixes #1331
ports: Fix period check in ports tree name validation
The create-time validation matched "*:*" (colon) but the error
message says "cannot contain a period (.)", citing jail(8)'s
hierarchical dot-separated naming. jail_start()'s equivalent checks
for jailname/ptname/setname (common.sh) correctly use "*.*" -- this
was the only place with the mismatched pattern, so a period in
PTNAME was silently accepted instead of being rejected as documented.