Repository navigation
dockhand v0.7.0
Dockhand v0.7.0 expands the port-maintenance workflow with port renames and category moves, recorded decisions on submission holds, richer build comparisons, and concurrent batch checks. It also improves patch handling, local-prefix recovery, GitHub Actions results, and the information available in reports and JSON output.
This release uses commit 47f00138, the same commit as v0.7.0-rc7. Read Upgrading from v0.6.0 before opening an existing database or reusing your configuration.
Port maintenance
Rename ports and move them between categories
Two new commands handle the mechanical parts of reorganizing a port:
dockhand rename <port> <new-name>
dockhand move <port> <category>rename moves the Portfile and files/ directory, updates the port's name, and leaves an obsolete stub with replaced_by at the old location. The stub retains the old version and raises its revision so installed copies can upgrade to the replacement.
The command preserves the upstream source. It reports references to the old name, uses of ${name} or ${subport} that now resolve differently, and dependent ports that may need attention. Review these before proceeding.
move relocates the port to another category and updates the leading category where appropriate.
Checks, commit preparation, and submission recognize these operations as a single change. A renamed port is compared with its original Portfile rather than treated as a new port, and its obsolete stub is not built. Rename and version-update changes can be combined in one commit.
When an upstream project's rename also calls for a port rename, updates raise upstream-renamed-port and suggest dockhand rename. A standing moves = "follow" setting does not bypass this hold. An explicit --follow-moves can still follow the repository rename while retaining the port's existing name.
Update related subports together
update accepts several ports and updates each to its newest release in one branch:
dockhand update kubectl-1.34 kubectl-1.35 --newAn explicit version remains available for a single-port update. Versioned subports look for releases within their own series.
Selections made through update --mine, ship, and serve now group ports sharing one Portfile into one branch. tidy normally creates a commit for each recorded update, in update order. When one commit covers several subports, its subject names them. User-supplied commit messages for Dockhand's edits are preserved.
Select ports by maintainer and category
outdated, update, and ship now accept --maintainer, --category, and --not-maintainer alongside --mine, using MacPorts' selection semantics.
The corresponding service settings are serve.maintainers, serve.categories, and serve.not_maintainers. When neither maintainers nor categories are configured, serve selects your maintained ports.
More useful updates and new-port generation
- Updating to a version MacPorts orders below the installed version raises the epoch and explains why. The new
version-ordercommit rule catches hand edits that omit the necessary epoch change. - Generated update commit bodies identify the previous version and link to an upstream release or comparison page when available.
- Stealth updates report whether the archive's contents changed.
- Assessments identify moved Go
-Xtargets, higher upstream C++ requirements, newly introduced Homebrew library paths, project renames, and repository moves whose old owner name has been reassigned. - An uncertain release candidate is kept uncertain when upstream has changed version schemes or a repository now represents another project.
- A livecheck URL returning 404 produces an explanation and, where applicable, suggests naming the version explicitly.
create go:<module>supports modules below a repository's root, such asgolang.org/x/tools/gopls. Cargo workspace programs are discovered from their members.create --planprints the proposed Portfile without writing it.- Self-hosted GitLab source archives support instance URLs containing a path. GitLab rate limits are reported with their reset time rather than silently waited out.
Patches and Portfile quality
Refresh patches against the new source
Dockhand checks patches in order, applying each to the tree left by its predecessors.
A patch that applies at an offset can be regenerated against the new source while preserving its introductory comment. Hunks already present upstream can be removed. The regenerated patch is checked to ensure it produces the intended result.
Fuzz requires more attention:
- An unattended update holds on
patch-fuzz. - An attended update can regenerate the patch and identifies the fuzzed hunks for review.
- A patch that cannot apply raises
patch-rejectedand stops an unattended ship before spending time on its check.
Patch handling also understands Git's quoted filenames and extract.mkdir yes. Patches affecting only Cargo.lock are described as lockfile refreshes that the new release's own lockfile may make unnecessary.
Fix predictable formatting problems
When writing a Portfile, Dockhand fixes supported lint problems on added or changed lines: trailing whitespace, leading tabs under MacPorts' modeline, malformed continuations that absorb the next option, and maintainers openmaintainer without a maintainer.
Version updates using GitHub-generated tarballs switch to github.tarball_from archive while regenerating checksums, and identify release-provided archives when available.
check applies the same deterministic fixes before capturing its inputs, so the files built match those tidy will commit. Saved tidy plans also handle an untracked patch named by patchfiles correctly.
For deliberate formatting of entire changed Portfiles, use:
dockhand tidy --restyleThis creates a separate whitespace commit. A Portfile is left unchanged if restyling changes its evaluated ports.
Additional review notices
tidy, submission previews, and reviews identify:
- declarations already supplied by a PortGroup (
restated); - dependencies commonly expressed with a
path:alternative (path-style); - Trac references that belong in commit trailers (
ticket-trailer); - SPDX license names that differ from MacPorts' spelling (
license-spdx); - architecture-independent ports with unsuitable platform declarations (
noarch-platforms); - newly added commented-out Tcl (
commented-code); - files added under
files/without a Portfile reference (unreferenced-file).
These notices do not themselves hold submission. Maintainer instructions found in Portfile comments are also quoted for review.
update, ship, and bump accept --closes <ticket> and write the corresponding Closes: trailer.
Upgrade plain-HTTP links where HTTPS works
Updates, new-port creation, and checksum refreshes can switch literal HTTP links in homepage, master_sites, and livecheck.url to HTTPS after checking that the relevant destination answers. Master-site checks verify the distfile URL and preserve site tags and ordering.
This can change links outside the lines otherwise touched by the update. Links expressed through variables or quoted forms are left alone.
Set [update] keep_http = true, or use --keep-http on update, bump, ship, create, or checksums, to skip these probes and preserve HTTP links. serve reads the configuration setting.
Checks and build evidence
Concurrent checks and clearer waits
Tart now uses the Mac's VM capacity instead of a configurable count of checks. It can admit two checks, while each VM still waits for an available slot. Other running VMs count against that capacity, and a slot is released only after macOS has released the VM.
Multi-port ship batches run queued checks concurrently within provider capacity. Each change advances when its own check finishes, including submission when requested. Reports explain which checks can overlap and what a waiting check is waiting for.
A request matching an already-running check follows it when the existing check covers the requested environments, targets, variants, test policy, and freshness. Otherwise, Dockhand explains the mismatch and offers --replace, preserving completed results while replacing the remaining work.
Compare installed results
Successful builds record installed files and library install names. Dockhand compares these with an earlier build in the same environment, or with master's binary archive when no earlier build is available.
Reports identify added or removed files, changed library install names, affected dependents, and changes in configure summaries that may indicate an optional dependency stopped being detected. These findings appear in the check report, detailed status, and pull request description.
A library change can suggest update --revbump-dependents. Rebuild commits are ordered after the library change they depend on, including when that change was made by hand.
A build linking another port's library without a declared depends_lib dependency raises the unattended hold link-undeclared. Libraries belonging to the target's own Portfile are excluded from that notice.
Submission uses the environments explicitly requested
After an explicit --on or --build check covering every changed port, submission requires that selection. A check explicitly run on local no longer also requires Tart's default host environment.
The newest full-scope request for the same files governs the required coverage. A check narrowed with --only contributes results without replacing that request. Relevant failures still need a pass or eligible acceptance.
If you explicitly check a branch prepared by serve, that branch is left for you to submit.
GitHub Actions results are recorded per macOS release
Each macOS release named by MacPorts' workflow has its own environment and result, although a single workflow run builds the matrix.
If GitHub cannot schedule one release, results from the others remain recorded. The missing release stays unchecked, and submission explains the gap using GitHub's annotation. A run in which no job executes is retried once for releases still lacking results.
The workflow always runs its complete matrix, so --on github:15 is refused. Plans also explain when the workflow will not build requested unchanged ports or baseline targets.
Better plans, reports, and diagnostics
- Plans estimate dependency installations and archive availability by environment. These are estimates from the port index and archive listings; the actual build environment decides what must be installed.
- Reports and
status -vshow environment and target durations. - Build failures quote useful tool output preceding MacPorts' final failure message. Failures involving regenerated autotools files include an explanatory note.
- Plans distinguish test policy from whether a target declares tests.
dockhand artifacts [branch]lists archives built by the latest check.check --baseline --of check-Ncompares against a specific earlier check. Baseline requests reject flags they cannot honor.- Queued checks without an active worker explain how to run them.
setupreports whethergo2portandcargo2portare available.- MacPorts version and image probes tolerate stale-port-definitions warnings.
- Evaluation against MacPorts base's master uses the modeled context's SDK, tools, and compiler information.
Review, decisions, and submission
Record a decision on a hold
Use dockhand decide to answer a concern for a particular branch and port:
dockhand decide <rule> -p <port> --because "Reason for accepting this concern"The reason appears in status and in the pull request's Reviewed section. Unattended submission can proceed past that concern.
To record an unresolved dependency or question instead:
dockhand decide <rule> -p <port> --waiting "What must happen first"A waiting decision blocks ordinary submission until replaced or invalidated by changed files.
Decisions lapse when the port's own directory contents change. Decisions about moving sources also bind to the two commits concerned, so a later source movement requires another decision. A decision does not provide build evidence or accept a failed build.
Held output names the rule responsible and suggests the relevant next action. New unattended holds include patch-fuzz, patch-rejected, and link-undeclared; standing exceptions remain available through holds.allow or per-port allow.
New ports receive port lint --nitpick. Their lint warnings hold submission until corrected or explicitly accepted with submit --accept.
Review and check a pull request
dockhand review <pr> --check adopts the pull request and checks its committed head, using Tart by default or another supported environment selected with --on.
Dockhand now identifies whose Portfiles it is evaluating, and refuses local-provider checks of adopted pull requests because those builds would run the contributor's Portfiles as root. The experimental notices on review and adopt --pr have been removed.
More reliable publication and follow-up
- Pull requests are read, reviewed, adopted, and submitted within the correct repository.
- Branches moved beyond their recorded base are protected against accidentally tidying or submitting master's commits.
- Submission previews hold when the fork refuses the configured SSH key. A missing fork can still be shown as a hold within the preview.
- A pull request description edited on GitHub after preview is not silently overwritten.
- Generated descriptions fit GitHub's 65,536-character limit and disclose trimming.
- Descriptions list dependents excluded from revision bumps, including when all were excluded.
- Single-port pull request titles use the version-update commit rather than an earlier formatting commit. Evaluated version changes receive the enhancement classification.
submit --draftreturns an existing ready pull request to draft before pushing.- Status reports merge conflicts and per-port MacPorts CI failures, including an error excerpt.
- Commits made after a pull request's merge can be carried into a new branch with
dockhand start --from <branch>.
Other open pull requests are reported when work starts. Searches are shared within a run and repeated before publication. A failed search does not interrupt an attended update, but it still holds unattended work.
Local checks, cleanup, and background work
dockhand undo check-N restores the active port versions recorded before a local check, including a check kept with --keep or interrupted before restoration. This replaces the earlier advice to use port restore, which did not restore the same active-port state.
Local checks also:
- remove their temporary directories after restoration, reporting removal failures;
- make room for matching inactive, unrequested images left by earlier checks;
- wait for a build program left running by a crashed Dockhand process;
- identify the check holding a prefix in status and wait messages.
Background local checks now invoke the prefix's port-tclsh for every root step. See the sudoers change under Upgrading.
Cleanup recognizes merged changes already present on master and offers leftover fork branches from ended work. clean --delete refuses to remove worktrees holding edits or untracked work and preserves checkouts Dockhand did not create.
Status gathers branch facts together, reducing repeated Git work. serve uses consistent timestamped log lines, omits routine background-fetch messages, and limits submission scans to branches whose checks have finished.
Documentation and automation
The workflow guide is included in the binary:
dockhand usage
dockhand usage checks
dockhand usage recoveryWithout a topic, usage prints the getting-started guide. Available topics are branches, hand-edits, checks, publishing, recovery, batches, unattended, new-port, review, agents, and configuration.
JSON output now carries more of the information shown in text:
- detailed status includes decisions, maintainer instructions, lint, undeclared links, and source movements;
- completed checks include lint, links, and installed-file findings;
- batch results associate each change with its own check and submission;
- local plans include the prefix's archive-compatibility note.
Upgrading from v0.6.0
Configuration and check coverage
- Remove
providers.tart.capacity. Configurations containing it are refused; Tart uses the Mac's VM capacity. - Replace
--build localorbuild.default = "local"withhostwhen you mean Tart on this Mac's macOS release. Use--on localexplicitly when you mean a live MacPorts prefix. - Run a new GitHub check with
--on github. Results from v0.6.0 did not distinguish releases and do not satisfy the new per-release coverage requirements. GitHub profiles listing individual releases, and--on github:<release>, are refused. - Review the automatic HTTP-to-HTTPS behavior described above. Use
update.keep_httpor--keep-httpto retain existing links.
Background local checks and sudo
If you configured v0.6.0's passwordless sudo rule for /usr/bin/true and /usr/bin/env, replace it with the prefix's port-tclsh, using visudo:
<you> ALL=(root) NOPASSWD: /opt/local/bin/port-tclsh
Substitute your username and actual prefix.
This names the command Dockhand now invokes, but it still permits arbitrary Tcl scripts to run as root. It is not a restriction to trusted Portfiles or Dockhand operations. Foreground checks can ask for a password; they do not require a passwordless rule.
Database migration
Opening the database upgrades it through schemas 43–52 and retains a pre-migration copy beside it. After migration, v0.6.0 cannot open the upgraded database. Commands such as status can trigger migration.
To test another build without migrating your working database, make a consistent SQLite backup and point DOCKHAND_DB at the copy. Development and release-candidate builds can migrate an explicitly selected copy without prompting. Migration refusals now identify active older processes and distinguish processes using a copy from those using the original.
Script compatibility
review --check --jsonnow returns the review with the check nested under.check.update --jsonno longer returnsothers_problem.- Moving-source concern subjects now contain both relevant commits:
<checked>..<current>forsource-movedandtag-moved, and<prepared>..<checked>forrelease-movedandassessment-moved.
No flags accepted by v0.6.0 are removed. Flags removed in earlier releases now explain their replacements:
| Earlier flag | Replacement |
|---|---|
update --submit |
ship <port> |
update --check |
ship <port> --to check |
update --outdated |
Maintainer/category selectors, or ship --mine |
| Update's publication and build flags | Use the corresponding ship, submit, or check command |
submit --check |
ship -b <branch> |
submit --on |
ship --on |
submit --passing |
ship --passing |
serve --submit-passing |
serve --ship-to submit or serve.ship_to = "submit" |
serve --no-submit-passing |
serve --ship-to check |
logs --all |
logs --full |
outdated --all |
outdated --current |
diff --archive |
diff --source |
clean --legacy |
No replacement |
Known issues and limitations
- Default coverage may be narrower than MacPorts CI. An ordinary check defaults to this Mac's release. Use
--build macports-ci, or setbuild.default = "macports-ci", to select the releases named by the workflow at the last fetched master. Submission reports coverage gaps. - New macOS releases may require lengthy toolchain builds. Until MacPorts publishes Go or Rust archives for a release, a first Tart check may build those toolchains from source. Dockhand warns before doing so. Check on an earlier release, such as
--on tahoe, or allow the initial build to finish. - Externally killed local build programs are retried. If a local check's build program is killed outside Dockhand, it is treated as an infrastructure failure. Dockhand restores the prefix and may make two further attempts, asking for sudo authentication as necessary. Answer the prompt or interrupt the check. This is fixed on main for v0.8.0.
- A moved-tag explanation can be spurious. A check may compare against a build of another version and incorrectly say the current tag moved before correctly reusing a matching older build. The reuse is valid; the message alone does not require a checksum refresh. This is fixed on main for v0.8.0.
- Symlinked
path:dependencies can produce undeclared-link holds. For example, a declared OpenSSL path can resolve to a library owned byopenssl3, producing a falselink-undeclaredfinding. Keep the correct dependency declaration and record a reasoned decision if unattended work is held. This is fixed on main for v0.8.0.
Build from source
Go 1.27.1 or later is required. Dependencies are vendored.
git clone --branch v0.7.0 https://github.com/herbygillot/dockhand.git
cd dockhand
make buildSee the README for runtime prerequisites and installation guidance.