Created attachment 250928 [details] 0001-sysutils-tmux-Fix-crash-when-text-selection-using-mo.patch Since tmux 3.4 is hold off at bug 277041, please consider to apply this patch to fix crash.
It doesn't crash on 14.0-RELEASE but crashes on 14.1-STABLE FreeBSD 14.1-STABLE stable/14-n267784-e85f2ed0950 GENERIC amd64 for me.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=5a77b3ff4c0e9fed2b3dab55023735008cff1e73 commit 5a77b3ff4c0e9fed2b3dab55023735008cff1e73 Author: Koichiro Iwao <meta@FreeBSD.org> AuthorDate: 2024-05-24 18:15:51 +0000 Commit: Koichiro Iwao <meta@FreeBSD.org> CommitDate: 2024-06-14 08:31:54 +0000 sysutils/tmux: Fix crash when text selection using mouse I re-ported a patch originally ported to 3.2a by Tobias Brick, a Microsoft employee to 3.3a. The patch depends on ncurses 6.4-20230423 or later so I bind this port to ncurses:port. See commit message of the patch for detail [1] [1] https://github.com/microsoft/azurelinux/blob/a1f78f2/SPECS/tmux/manual-patch-to-fix-crash-due-to-change-to-ncurses.patch PR: 279276 Approved by: maintainer timeout Obtained from: https://github.com/microsoft/azurelinux/issues/6598 Obtained from: https://github.com/microsoft/azurelinux/pull/6766 sysutils/tmux/Makefile | 4 +- ...-fix-crash-due-to-change-to-ncurses.patch (new) | 63 ++++++++++++++++++++++ 2 files changed, 65 insertions(+), 2 deletions(-)
Committed due to maintainer timeout.
tmux is now crashing for me on 14.1-RELEASE after this patch. It was fine on the previous version.
stable/14 after 1401502 (14.2) and main after 1500020 have ncurces 6.5 - USES=ncurses:port not required anymore, but stable/13 (all 13.x), 14.1- and old 15-CURRENT have 6.2 and still need USES=ncurses:port: diff --git a/sysutils/tmux/Makefile b/sysutils/tmux/Makefile index 9592aef810b5..df99bfd471b2 100644 --- a/sysutils/tmux/Makefile +++ b/sysutils/tmux/Makefile @@ -15,7 +15,7 @@ LICENSE_FILE_GPLv2= ${WRKSRC_bash}/COPYING LICENSE_DISTFILES_ISCL= ${DISTNAME}${EXTRACT_SUFX} LICENSE_DISTFILES_GPLv2= ${DISTFILE_bash} -USES= cpe ncurses:port pkgconfig +USES= cpe pkgconfig CPE_VENDOR= tmux_project @@ -23,7 +23,6 @@ USE_GITHUB= nodefault GH_TUPLE= imomaliev:tmux-bash-completion:8da7f79:bash GNU_CONFIGURE= yes -GNU_CONFIGURE_MANPREFIX=${PREFIX}/share CONFIGURE_ARGS= --enable-utempter \ --sysconfdir=${PREFIX}/etc @@ -49,6 +48,14 @@ LIBEVENT_STATIC_VARS= LESTATIC=${LOCALBASE}/lib/libevent.a UTF8PROC_LIB_DEPENDS= libutf8proc.so:textproc/utf8proc UTF8PROC_CONFIGURE_ENABLE= utf8proc +.include <bsd.port.pre.mk> + +.if ${OPSYS} == FreeBSD && (${OSVERSION} < 1401502 || ${OSVERSION} >= 1500000 && ${OSVERSION} < 1500020) +USES+= ncurses:port +.else +USES+= ncurses +.endif + post-patch: @${REINPLACE_CMD} -e 's|/etc/tmux.conf|${PREFIX}/etc/tmux.conf|g' ${WRKSRC}/CHANGES \ ${WRKSRC}/tmux.h @@ -69,4 +76,4 @@ post-install-EXAMPLES-on: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/example* ${STAGEDIR}${EXAMPLESDIR} -.include <bsd.port.mk> +.include <bsd.port.post.mk> Tested in poudriere 14.1 amd64 and live system 14.2 amd64. P.S. While here remove GNU_CONFIGURE_MANPREFIX.