Bug 243440

Summary: sysutils/tmux: Add upstream patch to fix bug that utempter doesn't work as is expected
Product: Ports & Packages Reporter: Yasuhiro Kimura <yasu>
Component: Individual Port(s)Assignee: Mathieu Arnold <mat>
Status: Closed FIXED    
Severity: Affects Some People Flags: bugzilla: maintainer-feedback? (mat)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch file none

Description Yasuhiro Kimura freebsd_committer freebsd_triage 2020-01-19 02:28:19 UTC
Created attachment 210853 [details]
Patch file

Add upstream patch to fix bug that utempter doesn't work as is expected.
    
Reference:
https://github.com/tmux/tmux/issues/2022
https://github.com/tmux/tmux/commit/54efe337993b5571728a09b247c7f39d493659a8
Comment 1 Mathieu Arnold freebsd_committer freebsd_triage 2020-01-28 15:23:05 UTC
Can you describe what the problem is exactly?

Neither the issue nor the commit seem to say anything regarding why the fix is needed.
Comment 2 Yasuhiro Kimura freebsd_committer freebsd_triage 2020-01-31 14:13:17 UTC
(In reply to Mathieu Arnold from comment #1)

If configured with --enable-utempter option tmux adds logging record for each pane. So output of 'w' command includes entry for them.

yasu@rolling-vm-freebsd2[2001]% tmux -V
tmux 2.9a
yasu@rolling-vm-freebsd2[2002]% tmux list-sessions
0: 3 windows (created Fri Jan 31 22:52:11 2020) (attached)
yasu@rolling-vm-freebsd2[2003]% ps gxwww
 PID TT  STAT    TIME COMMAND
1907  -  S    0:00.20 sshd: yasu@pts/0 (sshd)
7070  -  Ss   0:00.03 tmux: server (/tmp/tmux-1000/default) (tmux)
1908  0  Is   0:00.19 -zsh (zsh)
7068  0  I+   0:00.00 tmux: client (/tmp/tmux-1000/default) (tmux)
7071  1  Is+  0:00.04 -zsh (zsh)
7075  2  Ss+  0:00.03 -zsh (zsh)
7079  3  Ss   0:00.10 -zsh (zsh)
7169  3  R+   0:00.00 ps gxwww
yasu@rolling-vm-freebsd2[2004]% LANG=C w
10:52PM  up 9 mins, 4 users, load averages: 0.58, 0.27, 0.13
USER       TTY      FROM                       LOGIN@  IDLE WHAT
yasu       pts/0    rolling.home.utahime.org  10:44PM     - tmux: client (/tmp/tmux-1000/default) (tmux)
yasu       pts/1    tmux(7070).%0             10:52PM     - -zsh (zsh)
yasu       pts/2    tmux(7070).%1             10:52PM     - -zsh (zsh)
yasu       pts/3    tmux(7070).%2             10:52PM     - w
yasu@rolling-vm-freebsd2[2005]%

But tmux 3.0 and 3.0a don't add record even if it is configured with --enable-utempter option. So output of 'w' command doesn't include entry for each pane.

yasu@rolling-vm-freebsd2[2016]% tmux -V
tmux 3.0a
yasu@rolling-vm-freebsd2[2017]% tmux list-sessions
0: 3 windows (created Fri Jan 31 23:04:46 2020) (attached)
yasu@rolling-vm-freebsd2[2018]% ps gxwww
  PID TT  STAT    TIME COMMAND
 1907  -  S    0:00.36 sshd: yasu@pts/0 (sshd)
11872  -  Ss   0:00.03 tmux: server (/tmp/tmux-1000/default) (tmux)
 1908  0  Is   0:00.26 -zsh (zsh)
11870  0  I+   0:00.00 tmux: client (/tmp/tmux-1000/default) (tmux)
11873  1  Is+  0:00.04 -zsh (zsh)
11876  2  Is+  0:00.04 -zsh (zsh)
11879  3  Ss   0:00.11 -zsh (zsh)
11975  3  R+   0:00.00 ps gxwww
yasu@rolling-vm-freebsd2[2019]% LANG=C w
11:05PM  up 22 mins, 1 user, load averages: 0.44, 0.32, 0.21
USER       TTY      FROM                       LOGIN@  IDLE WHAT
yasu       pts/0    rolling.home.utahime.org  10:44PM     - tmux: client (/tmp/tmux-1000/default) (tmux)
yasu@rolling-vm-freebsd2[2020]% 

Attached patch fixes this problem.
Comment 3 Mathieu Arnold freebsd_committer freebsd_triage 2020-02-11 13:46:57 UTC
Thank you for the explanation.