Upstream released sesh 2.27.0 while misc/sesh was still at 2.26.1. I added the package earlier this year, but this was the first time I upgraded a package written in Go, so I made some notes about the Go-specific steps. The general pkgsrc update procedure applies as usual; the new part is go-modules.mk, the file listing all the Go module distfiles fetched from the module proxy.
Makefile
This is what one would typically check:
DISTNAME— bumped tosesh-2.27.0PKGREVISION— deleted (version bumped already)GO_BUILD_PATTERN— checked against themoduleline ingo.modGO_VERSION_REQD— checked against thegoline ingo.mod
I checked the new go.mod for the last two. The module line was still github.com/joshmedeski/sesh/v2, so GO_BUILD_PATTERN did not need updating. The go line — the minimum Go version required to build the module, mandatory since Go 1.21 — now says 1.25.0. Packages built with go-module.mk use whatever lang/go points to (currently go126), so nothing was needed; had the default been too old, GO_VERSION_REQD in the Makefile selects a specific Go version.
The distinfo dance
The module list cannot be computed until the new source is extracted, and the new modules cannot be checksummed until the list exists, so make distinfo runs twice:
make distinfo make patch make show-go-modules > go-modules.mk.new diff go-modules.mk{,.new} mv go-modules.mk{.new,} make distinfo
The first pass fetches the new release distfile and records its checksum. It also fetches the modules still listed in the stale go-modules.mk — harmless, as their checksums have not changed. The patch target extracts the source, after which show-go-modules runs the Go toolchain against the new go.mod and go.sum and emits the updated module list. The second pass then fetches any new modules and rewrites distinfo with the current set. (Regenerating the file after make patch is the documented practice; see Benny Siegert’s write-up on Go modules in pkgsrc.)
In this case show-go-modules produced a file identical to the old one (apart from the unexpanded $NetBSD$ header) so I did not actually replace the old one (no mv).
Build and verify
make clean make package pkglint
I compared make print-PLIST output against the existing PLIST (no change) and checked that the installed binary reports its version. The Makefile embeds the version with GO_LDFLAGS (-X main.version=...), so if upstream renames that variable, the package silently reverts to reporting dev. It did not.
Commit message
The release notes are auto-generated and attribute every change with an @-mention. Pasting them into the commit message as is would notify all the contributors when the commit reaches the GitHub mirror of pkgsrc — mentions in commit messages trigger notifications on push, mirrors included. I stripped the by @user in <PR> trailers, the New Contributors section, and the compare link, keeping only the list of changes.
The release notes also revealed that this update skips a release: pkgsrc had 2.26.1 and upstream compares 2.27.0 against 2.26.2. The commit message should summarize both.