Stuart Henderson wrote:
+WRKDIST = ${WRKDIR}/${MODGO_MODNAME}@${MODGO_VERSION}
the idiom for this when you need to patch a go port is:
WRKDIST= ${WRKSRC}
please don't add different versions
Thanks for the clarification. Do you know why WRKDIST doesn't point to
the correct directory under WRKDIR in ports that use the Go and Cargo
modules?
-MODGO_LDFLAGS= -X
github.com/zyedidia/micro/v2/internal/util.Version=${MODGO_VERSION}
+# micro parses the embedded version with blang/semver at startup
+# (internal/util/util.go). Upstream's tools/build-version.go emits the numeric
+# form (version.String()), so the Go module "v" prefix must be stripped here or
+# semver rejects it ("Invalid character(s) found in major number \"v2\"").
this is reasonable commit log text but doesn't really belong in a
comment imho
I've committed a simplfied version
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ editors/micro/patches/patch-internal_config_settings_go 16 Oct 2026
02:10:07 -0000
@@ -0,0 +1,15 @@
+Use base-system doas as the default privilege command on OpenBSD.
+Keep upstream sucmd configuration and its save/truncate call sites intact.
I suggest either a configurable version goes upstream (so the user can
set it up to use su, sudo, doas, pkexec or $rust_rewrite_of_the_day),
or leave it as-is.
This is not really a mechanism which promotes doing things safely in
the first place. The mechanism used by sudoedit (copy to tempfile with
privs, edit without privs, copy back with privs) is better (but I
suppose what upstream really want to do here is cope with the common
user mistake of editing a file without thinking about whether they can
write it or not beforehand). People can always switch to another term
and temporarily chown/chmod anyway...
Anyway, having hidden runtime dependencies is not a good thing. They
need to be identified and eliminated.