Lucas Gabriel Vuotto wrote:
On Fri, Oct 16, 2026 at 02:16:00AM +0000, David Uhden Collado wrote:
Hello,

Please find attached a patch for editors/micro 2.0.15, with a
REVISION bump.

The main changes are:

- Changed all the VAR= to VAR =, because white-space change noise makes
   it easier to review (probably)

- Fix the embedded version string by removing the "v" prefix from
   MODGO_VERSION. Micro parses this value using blang/semver at startup,
   which rejects the prefixed version.
- Set WRKDIST explicitly to the Go module extraction directory.

Point your LLM to follow the idiom used in all the other Go ports.

- Use OpenBSD's base-system doas instead of sudo as the default
   privilege escalation command when saving protected files.
- Update the bundled help and configuration example accordingly.

The privilege command remains configurable through the existing
"sucmd" option. No additional runtime dependency is required.

Thank you for your time and consideration.

Best regards,
David.

Index: editors/micro/Makefile
===================================================================
RCS file: /cvs/ports/editors/micro/Makefile,v
diff -u -p -u -p -r1.15 Makefile
--- editors/micro/Makefile      1 Jan 2026 14:44:40 -0000       1.15
+++ editors/micro/Makefile      16 Oct 2026 02:10:07 -0000
@@ -1,23 +1,29 @@
-COMMENT=       modern and intuitive terminal-based text editor
+COMMENT =      modern and intuitive terminal-based text editor
-MODGO_MODNAME= github.com/zyedidia/micro/v2
-MODGO_VERSION= v2.0.15
+MODGO_MODNAME =        github.com/zyedidia/micro/v2
+MODGO_VERSION =        v2.0.15
-DISTNAME= micro-${MODGO_VERSION}
-CATEGORIES=    editors
-HOMEPAGE=      https://micro-editor.github.io/
+DISTNAME =     micro-${MODGO_VERSION}
+REVISION =       0

Ironically, in all the whitespace mess, this line uses spaces instead of
tabs.

+WRKDIST =      ${WRKDIR}/${MODGO_MODNAME}@${MODGO_VERSION}
+CATEGORIES =   editors
+HOMEPAGE =     https://micro-editor.github.io/
# MIT "Expat" License
-PERMIT_PACKAGE=        Yes
+PERMIT_PACKAGE =       Yes
WANTLIB += c pthread -MODULES= lang/go
-MODGO_TYPE=    bin
+MODULES =      lang/go
+MODGO_TYPE =   bin
-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\"").
+MODGO_LDFLAGS =        -X 
github.com/zyedidia/micro/v2/internal/util.Version=${MODGO_VERSION:S/^v//}
-NO_TEST= Yes
+NO_TEST =      Yes
post-install:
        ${INSTALL_DATA} ${WRKSRC}/assets/packaging/micro.1 ${PREFIX}/man/man1/
Index: editors/micro/patches/patch-internal_config_settings_go
===================================================================
RCS file: editors/micro/patches/patch-internal_config_settings_go
diff -N editors/micro/patches/patch-internal_config_settings_go
--- /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.
+
+Index: internal/config/settings.go
+--- internal/config/settings.go.orig
++++ internal/config/settings.go
+@@ -128,7 +128,7 @@
+       "pluginrepos":    []string{},
+       "savehistory":    true,
+       "scrollbarchar":  "|",
+-      "sucmd":          "sudo",
++      "sucmd":          "doas",
+       "tabhighlight":   false,
+       "tabreverse":     true,
+       "xterm":          false,
Index: editors/micro/patches/patch-runtime_help_options_md
===================================================================
RCS file: editors/micro/patches/patch-runtime_help_options_md
diff -N editors/micro/patches/patch-runtime_help_options_md
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ editors/micro/patches/patch-runtime_help_options_md 16 Oct 2026 02:10:07 
-0000
@@ -0,0 +1,23 @@
+Document the OpenBSD port's doas default in the bundled help and example.
+
+Index: runtime/help/options.md
+--- runtime/help/options.md.orig
++++ runtime/help/options.md
+@@ -454,7 +454,7 @@
+    on BSD it can be "doas." This option can be customized and is only used 
when
+    saving with su.
+
+-    default value: `sudo`
++    default value: `doas`
+
+ * `syntax`: enables syntax highlighting.
+
+@@ -624,7 +624,7 @@
+     "statusformatl": "$(filename) $(modified)$(overwrite)($(line),$(col)) 
$(status.paste)| ft:$(opt:filetype) | $(opt:fileformat) | $(opt:encoding)",
+     "statusformatr": "$(bind:ToggleKeyMenu): bindings, $(bind:ToggleHelp): 
help",
+     "statusline": true,
+-    "sucmd": "sudo",
++    "sucmd": "doas",
+     "syntax": true,
+     "tabhighlight": true,
+     "tabmovement": false,

your patches get changes after a `make update-patches`.



For taking into consideration, this is how your Makefile patch looks if
you leave the whitespaces changes out:


diff /usr/ports
path + /usr/ports
commit - 219a7711c5b1b2c38ba9f2b0f5e758af90236864
blob - b2f9ccbc62803523e20da3e6f509906697d90f57
file + editors/micro/Makefile
--- editors/micro/Makefile
+++ editors/micro/Makefile
@@ -4,6 +4,8 @@ MODGO_MODNAME=  github.com/zyedidia/micro/v2
  MODGO_VERSION=        v2.0.15
DISTNAME= micro-${MODGO_VERSION}
+REVISION =       0
+WRKDIST =      ${WRKDIR}/${MODGO_MODNAME}@${MODGO_VERSION}
  CATEGORIES=   editors
  HOMEPAGE=     https://micro-editor.github.io/
@@ -15,7 +17,11 @@ WANTLIB += c pthread
  MODULES=      lang/go
  MODGO_TYPE=   bin
-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\"").
+MODGO_LDFLAGS =        -X 
github.com/zyedidia/micro/v2/internal/util.Version=${MODGO_VERSION:S/^v//}
NO_TEST= Yes
maybe you should also instruct your llm to do its best to optimize the
reviewers time.

It's not the AI's fault, it's mine. I'm a perfectionist to a fault, and I spend way too much time obsessing over insignificant details, like making sure the indentation is consistent. Then, when it's time to generate the diff, I can't be bothered to go back and undo all those unnecessary changes.

Reply via email to