Stuart Henderson wrote:
For the OpenBSD port, I also removed the sysutils/ggrep dependency.
The only remaining GNU grep-specific expression used "\S", which is
replaced by the equivalent POSIX "[^[:space:]]" expression, allowing
the base system grep to be used instead.
I'm not a fan of this. If upstream are only testing against GNU grep
then this adds a burden onto the maintainer to verify any other changes
to search expressions in future updates to the software. I'd prefer to
just use ggrep and be done with it...
GH_ACCOUNT = LukeSmithxyz
GH_PROJECT = mutt-wizard
-GH_TAGNAME = v3.3.1
-
-EPOCH = 0
-REVISION = 0
+GH_COMMIT = b4a28b2548e94c167bb74fcb5e8c44c34d2be842
+DISTNAME = mutt-wizard-3.3.2
where does the 3.3.2 version come from? upstream don't seem to have
tagged any since 3.3.1.
one of 3.3.1pl20260726 or 3.3.2pre20260726 would seem better to me.
--- mail/mutt-wizard/patches/patch-bin_mailsync 13 May 2022 14:49:56 -0000
1.3
+++ mail/mutt-wizard/patches/patch-bin_mailsync 11 Aug 2026 15:13:19 -0000
@@ -1,12 +1,16 @@
+$OpenBSD$
we dropped those across ports in 2022, please don't add them back
Hi Stuart,
Thanks for the review. I've attached a new revision of the patch which
addresses the versioning and patch-header issues, and also includes a
few additional portability changes I found while reviewing the scripts.
The snapshot is now versioned as:
mutt-wizard-3.3.1pl20260726
rather than inventing a 3.3.2 version, and I've kept EPOCH and REVISION
as they were. I also removed the $OpenBSD$ headers that I had
accidentally added back.
I changed the existing mailsync pgrep workaround to use "pgrep -x".
The upstream command uses "-ax", but OpenBSD pgrep does not have "-a";
using an exact process-name match seems closer to what the script is
actually trying to do.
I also made bin/mw run under /bin/sh instead of requiring Bash. There
was only a small amount of Bash-specific syntax involved; for example:
${mbver/\./}
is now expressed using portable parameter expansion. I also removed
PWR from the trap, since OpenBSD does not provide that signal.
Regarding GNU grep, I understand your concern about creating an
additional maintenance burden if upstream only tests with GNU grep.
After going through the current scripts, though, I still think using
the base grep is preferable here.
The GNU-specific uses are very limited. The "\S" expression is replaced
with the equivalent "[^[:space:]]", the existing "ggrep -Eo" invocation
works as "grep -Eo" with OpenBSD grep, and the other uses do not require
GNU-specific behavior. The post-extract substitution and the
sysutils/ggrep dependency can therefore be removed entirely.
Since mw already needs a small portability patch to move it from Bash
to /bin/sh, and the port already carries OpenBSD-specific patches for
these scripts, I don't think keeping these few grep expressions
portable adds much additional maintenance complexity. Future updates
will already require checking that these small portability patches
still apply.
For a collection of relatively small shell scripts, I don't think
adding an additional GNU utility dependency just for a handful of grep
expressions is worthwhile when the required changes are this small and
can use standard expressions understood by the base tools. So I would
prefer to keep the port using the base grep unless there is a stronger
reason to require GNU grep.
Finally, I refreshed the PLIST for the additional templates and the Zsh
completion file present in the current upstream snapshot.
Thanks,
David.Index: mail/mutt-wizard/Makefile
===================================================================
RCS file: /cvs/ports/mail/mutt-wizard/Makefile,v
diff -u -p -u -p -r1.10 Makefile
--- mail/mutt-wizard/Makefile 24 Feb 2023 22:14:17 -0000 1.10
+++ mail/mutt-wizard/Makefile 27 Aug 2026 18:51:59 -0000
@@ -3,7 +3,9 @@ CATEGORIES = mail
GH_ACCOUNT = LukeSmithxyz
GH_PROJECT = mutt-wizard
-GH_TAGNAME = v3.3.1
+GH_COMMIT = b4a28b2548e94c167bb74fcb5e8c44c34d2be842
+
+DISTNAME = mutt-wizard-3.3.1pl20260726
EPOCH = 0
REVISION = 0
@@ -16,17 +18,12 @@ PERMIT_PACKAGE = Yes
RUN_DEPENDS = mail/neomutt,gpgme,sasl,notmuch \
mail/isync \
mail/msmtp \
- security/password-store \
- sysutils/ggrep
+ security/password-store
NO_BUILD = Yes
NO_TEST = Yes
USE_GMAKE = Yes
FAKE_FLAGS = PREFIX=${TRUEPREFIX} MANPREFIX=${PREFIX}/man
-
-post-extract:
- cd ${WRKSRC} && \
- sed -e "s/\<grep\>/ggrep/g" -i bin/mw
.include <bsd.port.mk>
Index: mail/mutt-wizard/distinfo
===================================================================
RCS file: /cvs/ports/mail/mutt-wizard/distinfo,v
diff -u -p -u -p -r1.8 distinfo
--- mail/mutt-wizard/distinfo 13 May 2022 14:49:56 -0000 1.8
+++ mail/mutt-wizard/distinfo 27 Aug 2026 18:51:59 -0000
@@ -1,2 +1,2 @@
-SHA256 (mutt-wizard-3.3.1.tar.gz) = QJH7oFN4bUFDJJ5h3939Z5wV9WHsNK8X8TCjyoDDm1M=
-SIZE (mutt-wizard-3.3.1.tar.gz) = 34813
+SHA256 (mutt-wizard-3.3.1pl20260726-b4a28b25.tar.gz) = vzo20h3NU9AazgpH+wlDGKHczZjvmXTAKUEH0TtIRac=
+SIZE (mutt-wizard-3.3.1pl20260726-b4a28b25.tar.gz) = 37434
Index: mail/mutt-wizard/patches/patch-bin_mailsync
===================================================================
RCS file: /cvs/ports/mail/mutt-wizard/patches/patch-bin_mailsync,v
diff -u -p -u -p -r1.3 patch-bin_mailsync
--- mail/mutt-wizard/patches/patch-bin_mailsync 13 May 2022 14:49:56 -0000 1.3
+++ mail/mutt-wizard/patches/patch-bin_mailsync 27 Aug 2026 18:51:59 -0000
@@ -1,12 +1,15 @@
+# OpenBSD's pgrep does not support the -a option used to print arguments.
+# Match the display server process names without requesting command lines.
+
Index: bin/mailsync
--- bin/mailsync.orig
+++ bin/mailsync
@@ -42,7 +42,7 @@ case "$(uname)" in
- *systemd*|*openrc*) export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus ;;
- esac
- # remember if a display server is running since `ps` doesn't always contain a display
-- pgrepoutput="$(pgrep -a X\(org\|wayland\))"
-+ pgrepoutput="$(pgrep X\(org\|wayland\))"
- displays="$(echo "$pgrepoutput" | grep -wo "[0-9]*:[0-9]\+" | sort -u)"
- notify() { [ -n "$pgrepoutput" ] && for x in ${displays:-0:}; do
- export DISPLAY=$x
+ *systemd*|*openrc*) export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus ;;
+ esac
+ # remember if a display server is running since `ps` doesn't always contain a display
+- pgrepoutput="$(pgrep -ax X\(\|org\|wayland\))"
++ pgrepoutput="$(pgrep -x X\(\|org\|wayland\))"
+ displays="$(echo "$pgrepoutput" | grep -wo "[0-9]*:[0-9]\+" | sort -u)"
+ [ -z "$displays" ] && [ -d /tmp/.X11-unix ] && displays=$(cd /tmp/.X11-unix && for x in X*; do echo ":${x#X}"; done)
+
Index: mail/mutt-wizard/patches/patch-bin_mw
===================================================================
RCS file: /cvs/ports/mail/mutt-wizard/patches/patch-bin_mw,v
diff -u -p -u -p -r1.2 patch-bin_mw
--- mail/mutt-wizard/patches/patch-bin_mw 11 Mar 2022 19:34:43 -0000 1.2
+++ mail/mutt-wizard/patches/patch-bin_mw 27 Aug 2026 18:51:59 -0000
@@ -1,3 +1,7 @@
+# Match and remove the account's generated macro when deleting an account.
+# Use grep's extended matching for the account-number scan on OpenBSD.
+# Build the mailbox list from Maildir directories so it stays up to date.
+
fix account number switch macro
fix account deletion
publish gpg using gpg-wks protocol
@@ -6,26 +10,70 @@ dynamically load mailboxes
Index: bin/mw
--- bin/mw.orig
+++ bin/mw
-@@ -173,7 +173,7 @@ delete() { if [ -z "${fulladdr+x}" ]; then
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ set -a
+
+@@ -37,7 +37,7 @@ mbver="${mbver#* }"
+ mbver="${mbver%.*}"
+ # Comparing two float numbers in bash is a pain in the butt, so we get rid of
+ # dots and turn them into nice integers
+-mbver="${mbver/\./}"
++mbver="${mbver%.*}${mbver#*.}"
+ if [ "${mbver}" -gt 14 ]; then
+ master="Far"
+ slave="Near"
+@@ -64,7 +64,7 @@ checkbasics() {
+ }
+ }
- sed -ibu "/IMAPStore $fulladdr-remote$/,/# End profile/d" "$mbsyncrc" 2>/dev/null ; rm -f "$mbsyncrc"bu
- rm -rf "${cachedir:?}/${fulladdr:?}" "$accdir/$fulladdr.muttrc" "$accdir/"[0-9]-"$fulladdr.muttrc"
-- sed -ibu "/\([0-9]-\)\?$fulladdr.muttrc/d" "$muttrc" 2>/dev/null; rm -f "$muttrc"bu
-+ sed -ibu "/macro.*i[0-9].*$fulladdr.muttrc/d" "$muttrc" 2>/dev/null; rm -f "$muttrc"bu
- sed -ibu "/account $fulladdr$/,/^\(\s*$\|account\)/d" "$msmtprc" 2>/dev/null; rm -f "$msmtprc"bu
- sed -ibu "/account $fulladdr$/,/^\(\s*$\|account\)/d" "$mpoprc" 2>/dev/null; rm -f "$mpoprc"bu
- pass rm -f "$fulladdr" >/dev/null 2>&1
-@@ -224,11 +224,11 @@ getboxes() { if [ -n "${force+x}" ] ; then
- mailboxes="$(echo "$info" | ggrep -v HasChildren | sed "s/.*\" //;s/\"//g" | tr -d '\r')"
+-getaccounts() { accounts="$(find -L "$accdir" -type f 2>/dev/null | grep -o "\S*.muttrc" | sed "s|.*/\([0-9]-\)*||;s/\.muttrc$//" | nl)"; }
++getaccounts() { accounts="$(find -L "$accdir" -type f 2>/dev/null | grep -o "[^[:space:]]*.muttrc" | sed "s|.*/\([0-9]-\)*||;s/\.muttrc$//" | nl)"; }
+
+ list() { getaccounts && [ -n "$accounts" ] && echo "$accounts" || exit 1; }
+
+@@ -152,7 +152,7 @@ delete() {
+ sed -ibu "/IMAPStore $fulladdr-remote$/,/# End profile/d" "$mbsyncrc" 2>/dev/null
+ rm -f "$mbsyncrc"bu
+ rm -rf "${cachedir:?}/${fulladdr:?}" "$accdir/$fulladdr.muttrc" "$accdir/"[0-9]-"$fulladdr.muttrc"
+- sed -ibu "/\([0-9]-\)\?$fulladdr.muttrc/d" "$muttrc" 2>/dev/null
++ sed -ibu "/macro.*i[0-9].*$fulladdr.muttrc/d" "$muttrc" 2>/dev/null
+ rm -f "$muttrc"bu
+ sed -ibu "/account $fulladdr$/,/^\(\s*$\|account\)/d" "$msmtprc" 2>/dev/null
+ rm -f "$msmtprc"bu
+@@ -225,14 +225,11 @@ getboxes() {
+ mailboxes="$(echo "$info" | grep -v HasChildren | sed "s/.*\" //;s/\"//g" | tr -d '\r')"
fi
[ "$type" = "pop" ] && mailboxes="INBOX"
-- for x in $(sed -n "/^macro.* i[0-9] / s/\(^macro.* i\| .*\)//gp " "$muttrc" | sort -u; echo 0); do
-+ for x in $(ggrep -Eo "^macro.* i[0-9] " "$muttrc" | sed "s/^macro.* i//g" | sort -u; echo 0); do
+- for x in $(
+- sed -n "/^macro.* i[0-9] / s/\(^macro.* i\| .*\)//gp " "$muttrc" 2>/dev/null | sort -u
+- echo 0
+- ); do
++ for x in $(grep -Eo "^macro.* i[0-9] " "$muttrc" | sed "s/^macro.* i//g" | sort -u; echo 0); do
idnum=$((idnum + 1))
[ "$idnum" -eq "$x" ] || break
done
-- toappend="mailboxes $(echo "$mailboxes" | sed "s/^/\"=/;s/$/\"/" | paste -sd ' ' - )"
+- toappend="mailboxes $(echo "$mailboxes" | sed "s/^/\"=/;s/$/\"/;s/'/\\\'/g" | paste -sd ' ' -)"
+ toappend="mailboxes \`mdir=$maildir/$fulladdr/; find \$mdir -mindepth 1 -type d -name cur | sed -e 's:/cur\$:\":' -e \"s:\$mdir:\\\"=:\" | sort | tr '\\\n' ' '\`"
}
- finalize() { echo "$toappend" >> "$accdir/$fulladdr.muttrc"
+ finalize() {
+@@ -311,14 +308,14 @@ EOF
+
+ reorder() {
+ tempfile="$(mktemp -u)"
+- trap 'rm -f $tempfile' HUP INT QUIT TERM PWR EXIT
++ trap 'rm -f $tempfile' HUP INT QUIT TERM EXIT
+ echo "# Carefully reorder these accounts with the desired numbers in the first column.
+ # DO NOT reorder rows or rename the accounts in the second column." >"$tempfile"
+ sed -n "
+ / i[0-9] / s?\(.* i\|'<sync.*/\|\.muttrc.*\)??g p
+ " "$muttrc" >>"$tempfile"
+ ${EDITOR:-vim} "$tempfile" || exit 1
+- sed -i -e 's/#.*//' -e '/^$/d' "$tempfile"
++ sed -i '' -e 's/#.*//' -e '/^$/d' "$tempfile"
+ default="$(sort -n "$tempfile" | head -n 1)"
+ default="${default#* }"
+ sed -ibu "
Index: mail/mutt-wizard/patches/patch-share_mutt-wizard_muttrc
===================================================================
RCS file: /cvs/ports/mail/mutt-wizard/patches/patch-share_mutt-wizard_muttrc,v
diff -u -p -u -p -r1.1 patch-share_mutt-wizard_muttrc
--- mail/mutt-wizard/patches/patch-share_mutt-wizard_muttrc 13 May 2022 14:49:56 -0000 1.1
+++ mail/mutt-wizard/patches/patch-share_mutt-wizard_muttrc 27 Aug 2026 18:51:59 -0000
@@ -1,9 +1,11 @@
+# Add Ctrl-L as an additional shortcut for opening the sidebar.
+
add ctrl-l for open, as default ctrl-o is set to discard in shell
Index: share/mutt-wizard.muttrc
--- share/mutt-wizard.muttrc.orig
+++ share/mutt-wizard.muttrc
-@@ -109,6 +109,7 @@ set sidebar_format = '%D%?F? [%F]?%* %?N?%N/? %?S?%S?'
+@@ -114,6 +114,7 @@ set sidebar_format = '%D%?F? [%F]?%* %?N?%N/? %?S?%S?'
bind index,pager \Ck sidebar-prev
bind index,pager \Cj sidebar-next
bind index,pager \Co sidebar-open
Index: mail/mutt-wizard/pkg/PLIST
===================================================================
RCS file: /cvs/ports/mail/mutt-wizard/pkg/PLIST,v
diff -u -p -u -p -r1.5 PLIST
--- mail/mutt-wizard/pkg/PLIST 13 May 2022 14:49:56 -0000 1.5
+++ mail/mutt-wizard/pkg/PLIST 27 Aug 2026 18:51:59 -0000
@@ -6,6 +6,14 @@ lib/mutt-wizard/openfile
@man man/man1/mw.1
share/mutt-wizard/
share/mutt-wizard/domains.csv
+share/mutt-wizard/imapnotify-temp
share/mutt-wizard/mailcap
+share/mutt-wizard/mbsync-temp
+share/mutt-wizard/mpop-temp
+share/mutt-wizard/msmtp-temp
+share/mutt-wizard/mutt-temp
share/mutt-wizard/mutt-wizard.muttrc
+share/mutt-wizard/notmuch-temp
+share/mutt-wizard/online-temp
share/mutt-wizard/switch.muttrc
+share/zsh/site-functions/_mutt-wizard.zsh