[OmniOS-discuss] Bloody Terminfo problems

Jim Klimov jim at cos.ru
Mon Nov 2 10:48:41 UTC 2015


 Hello all,




 TL;DR: The OmniOS terminfo package seems broken after Oct 22 and delivers too few files. Packaged software does not fall back to other available locations.




 Details:




 A week or two ago, different CLI programs began acting up on my OmniOS box, saying nonsense like this:




 # mc
 Error opening terminal: xterm.




 Same for vt100, vt220, ansi...

 I have terminfo packages installed and up-to-date, and while looking at the system I see 3 locations at least:

 # find /opt -name terminfo -ls
   1124    2 drwxr-xr-x  14 root     root           14 Oct 29 14:45 /opt/local/share/lib/terminfo





 # find /usr -name terminfo -ls
    349    4 drwxr-xr-x  44 root     bin            44 Dec  4  2014 /usr/gnu/share/terminfo
    332    0 lrwxrwxrwx   1 root     root           17 Dec  4  2014 /usr/gnu/lib/terminfo -> ../share/terminfo
  29464    4 drwxr-xr-x  44 root     bin            44 Dec  4  2014 /usr/share/lib/terminfo




 The /usr ones seem similar to OI/Hipster - they contain seemingly equivalent content except most of the files are different at binary level. Apparently, they come from terminfo and ncurses, and maybe should be merged(?) in illumos-gate(?):

 # pkg search xterm
 INDEX      ACTION VALUE                          PACKAGE
 basename   file   usr/gnu/share/terminfo/x/xterm pkg:/library/ncurses at 5.9-0.151015
 basename   file   usr/share/lib/terminfo/x/xterm pkg:/system/data/terminfo at 0.5.11-0.151015





 The /opt location is rather empty in comparison (and `pkg search -r filenames` fails to find what package this should have been, also on older BEs):




 # find /opt | grep terminfo | sort
 /opt/local/share/lib/terminfo
 /opt/local/share/lib/terminfo/d
 /opt/local/share/lib/terminfo/d/dec+pp
 /opt/local/share/lib/terminfo/d/dec+sl
 /opt/local/share/lib/terminfo/g
 /opt/local/share/lib/terminfo/g/gnome-2012
 /opt/local/share/lib/terminfo/i
 /opt/local/share/lib/terminfo/i/iterm
 /opt/local/share/lib/terminfo/l
 /opt/local/share/lib/terminfo/l/linux2.2
 /opt/local/share/lib/terminfo/l/linux2.6
 /opt/local/share/lib/terminfo/l/linux3.0
 /opt/local/share/lib/terminfo/m
 /opt/local/share/lib/terminfo/m/mach-gnu
 /opt/local/share/lib/terminfo/m/mach-gnu-color
 /opt/local/share/lib/terminfo/m/minix-3.0
 /opt/local/share/lib/terminfo/m/mlterm2
 /opt/local/share/lib/terminfo/m/mlterm3
 /opt/local/share/lib/terminfo/n
 /opt/local/share/lib/terminfo/n/netbsd6
 /opt/local/share/lib/terminfo/n/nsterm-256color
 /opt/local/share/lib/terminfo/n/nsterm-build326
 /opt/local/share/lib/terminfo/n/nsterm-build343
 /opt/local/share/lib/terminfo/o
 /opt/local/share/lib/terminfo/o/old-st
 /opt/local/share/lib/terminfo/p
 /opt/local/share/lib/terminfo/p/pccon
 /opt/local/share/lib/terminfo/p/pccon+base
 /opt/local/share/lib/terminfo/p/pccon+colors
 /opt/local/share/lib/terminfo/p/pccon+keys
 /opt/local/share/lib/terminfo/p/pccon+sgr+acs
 /opt/local/share/lib/terminfo/p/pccon+sgr+acs0
 /opt/local/share/lib/terminfo/p/pccon-m
 /opt/local/share/lib/terminfo/p/pccon0
 /opt/local/share/lib/terminfo/p/pccon0-m
 /opt/local/share/lib/terminfo/p/putty+fnkeys
 /opt/local/share/lib/terminfo/p/putty+fnkeys+esc
 /opt/local/share/lib/terminfo/p/putty+fnkeys+linux
 /opt/local/share/lib/terminfo/p/putty+fnkeys+sco
 /opt/local/share/lib/terminfo/p/putty+fnkeys+vt100
 /opt/local/share/lib/terminfo/p/putty+fnkeys+vt400
 /opt/local/share/lib/terminfo/p/putty+fnkeys+xterm
 /opt/local/share/lib/terminfo/p/putty-sco
 /opt/local/share/lib/terminfo/s
 /opt/local/share/lib/terminfo/s/screen+italics
 /opt/local/share/lib/terminfo/s/screen.konsole-256color
 /opt/local/share/lib/terminfo/s/screen.mlterm-256color
 /opt/local/share/lib/terminfo/s/screen.putty
 /opt/local/share/lib/terminfo/s/screen.putty-256color
 /opt/local/share/lib/terminfo/s/screen.vte-256color
 /opt/local/share/lib/terminfo/s/screen.xterm-256color
 /opt/local/share/lib/terminfo/s/simpleterm
 /opt/local/share/lib/terminfo/s/st
 /opt/local/share/lib/terminfo/s/st-16color
 /opt/local/share/lib/terminfo/s/st-256color
 /opt/local/share/lib/terminfo/s/stterm
 /opt/local/share/lib/terminfo/s/stterm-16color
 /opt/local/share/lib/terminfo/s/stterm-256color
 /opt/local/share/lib/terminfo/s/sun+sl
 /opt/local/share/lib/terminfo/t
 /opt/local/share/lib/terminfo/t/teken
 /opt/local/share/lib/terminfo/t/terminator
 /opt/local/share/lib/terminfo/t/terminology
 /opt/local/share/lib/terminfo/t/tmux
 /opt/local/share/lib/terminfo/t/tmux-256color
 /opt/local/share/lib/terminfo/v
 /opt/local/share/lib/terminfo/v/vt520ansi
 /opt/local/share/lib/terminfo/v/vte-2012
 /opt/local/share/lib/terminfo/v/vte-2014
 /opt/local/share/lib/terminfo/x
 /opt/local/share/lib/terminfo/x/xterm+256setaf
 /opt/local/share/lib/terminfo/x/xterm+kbs
 /opt/local/share/lib/terminfo/x/xterm+sm+1002
 /opt/local/share/lib/terminfo/x/xterm+sm+1003
 /opt/local/share/lib/terminfo/x/xterm+sm+1005
 /opt/local/share/lib/terminfo/x/xterm+sm+1006
 /opt/local/share/lib/terminfo/x/xterm+tmux
 /opt/local/share/lib/terminfo/x/xterm+x10mouse
 /opt/local/share/lib/terminfo/x/xterm+x11hilite
 /opt/local/share/lib/terminfo/x/xterm+x11mouse
 /opt/local/share/lib/terminfo/x/xterm-1005
 /opt/local/share/lib/terminfo/x/xterm-1006
 /opt/local/share/lib/terminfo/x/xterm-x10mouse
 /opt/local/share/lib/terminfo/x/xterm-x11hilite
 /opt/local/share/lib/terminfo/x/xterm-x11mouse





 But it is the one searched by software (and no fallbacks to other locations). For example, trussing that "mc" call I see:




 # truss -fl -wall -rall mc 2>&1

 ...

 14731/1:        getuid()                                        = 0 [0]
 14731/1:        ioctl(1, TCGETS, 0x00508360)                    Err#22 EINVAL
 14731/1:        fstat(2, 0xFFFFFD7FFFDFE790)                    = 0
 Cannot get terminal settings: 14731/1:  write(2, 0x004EAD60, 30)                        = 30
 14731/1:           C a n n o t   g e t   t e r m i n a l   s e t t i n g s :
 Invalid argument (22)14731/1:   write(2, 0x00515DC0, 21)                        = 21
 14731/1:           I n v a l i d   a r g u m e n t   ( 2 2 )

 14731/1:        write(2, "\r\n", 2)                             = 2
 14731/1:        sigaction(SIGCLD, 0xFFFFFD7FFFDFFAE0, 0x00000000) = 0
 14731/1:        sigaction(SIGTSTP, 0x00000000, 0x0051AC20)      = 0
 14731/1:        ioctl(1, TCGETA, 0xFFFFFD7FFFDFF9E0)            Err#22 EINVAL
 14731/1:        stat("/root/.terminfo", 0x0054E2D0)             Err#2 ENOENT
 14731/1:        stat("/opt/local/share/lib/terminfo", 0x0054E2D0) = 0
 14731/1:        time()                                          = 1446459993
 14731/1:        access("/opt/local/share/lib/terminfo/x/xterm", R_OK) Err#2 ENOENT
 Error opening terminal: 14731/1:        write(2, 0xFFFFFD7FFD1390DD, 24)                = 24
 14731/1:           E r r o r   o p e n i n g   t e r m i n a l :
 xterm14731/1:   write(2, " x t e r m", 5)                       = 5
 .
 14731/1:        write(2, " .\n", 2)                             = 2
 14731/1:        _exit(1)





 In particular, the larger set of files was there until Oct 22 as I can see in my snapshots, and then thousands of them went AWOL:




 # find postupgrade_pkgips-20151022T174922Z/share/lib/terminfo/ -type f | wc -l
 2616


 # find /opt/local/share/lib/terminfo/ -type f | wc -l
 72





 Jim Klimov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://omniosce.org/ml-archive/attachments/20151102/d0dde493/attachment.html>


More information about the OmniOS-discuss mailing list