On Sun, Jun 14, 2026 at 08:46:40AM +0200, Sven Joachim wrote:
> On 2026-06-11 19:10 +0200, Sven Joachim wrote:
> 
> > Source: unibilium
> > Version: 2.1.1-2
> > Severity: important
> > Tags: forky sid
> >
> > Yesterday I uploaded a new ncurses patchlevel to experimental, and the
> > unibilium autopkgtest fails with ncurses-base 6.6+20260608-1, see [1]:
> >
> > ,----
> > | 41s # Parsing /usr/share/terminfo/x/xterm ...
> > | 41s not ok - db entry for xterm is too small to be valid
> > | 41s # Parsing /usr/share/terminfo/x/xterm-256color ...
> > | 41s not ok - db entry for xterm-256color is too small to be valid
> > `----
> >
> > I have not looked at the details yet, but I suspect that the problem is
> > just the opposite of what the error message claims, namely that the
> > entries are too _large_ to be considered valid.  The two terminfo
> > entries exceed the size of 4096 bytes, and libunibilium apparently has a
> > problem with that.
> 
> Looking at the source now, this is indeed the problem.  The test calls
> unibi_from_file() on the terminfo entries, and that function calls
> unibi_from_fd() on the file descriptor for the file which
> unibi_from_file() just opened.
> 
> As mentioned in the documentation (see doc/unibi_from_fd.pod),
> unibi_from_fd(fd) reads up to 4096 bytes from fd, and that is not enough
> if the terminfo entry is larger.
> 
> > Note that with the new format introduced in ncurses
> > 6.1, compiled terminfo entries may be up to 32768 bytes.
> 
> I suspect the solution is to enlarge MAX_BUF from 4096 to 32768 in
> uniutil.c (and adjust the documentation in doc/unibi_from_fd.pod), I
> leave it up to the maintainer to test that.
> 
> I also did a quick test on neovim with TERM=xterm-256color.  The good
> news is that it starts up and seems to work, but there might be subtle
> bugs because unibilium did not read in the complete file.

The likely problem would be that some of the extended capabilities are
not read.

I don't have a test case, but suppose it would be in this chunk:

        kPrint7=\E[25;7~, kRIT3=\E[1;3C, kRIT4=\E[1;4C,
        kRIT5=\E[1;5C, kRIT6=\E[1;6C, kRIT7=\E[1;7C,
        kScroll=\E[28;2~, kUP=\E[1;2A, kUP3=\E[1;3A,
        kUP4=\E[1;4A, kUP5=\E[1;5A, kUP6=\E[1;6A, kUP7=\E[1;7A,
        ka2=\EOx, kb1=\EOt, kb3=\EOv, kc2=\EOr, kp5=\EOE, kpADD=\EOk,
        kpCMA=\EOl, kpDIV=\EOo, kpDOT=\EOn, kpMUL=\EOj, kpSUB=\EOm,
        kpZRO=\EOp, kxIN=\E[I, kxOUT=\E[O, rmxx=\E[29m,
        rv=\E\\[>41;[1-6][0-9][0-9];0c, smxx=\E[9m,
        xm=\E[<%i%p3%d;%p1%d;%p2%d;%?%p4%tM%em%;,
        xr=\EP>\\|XTerm\\(([1-9][0-9]+)\\)\E\\\\,

(neovim might use rmxx/smxx, but likely hardcodes the various kXXX's)

-- 
Thomas E. Dickey <[email protected]>
https://invisible-island.net

Attachment: signature.asc
Description: PGP signature

Reply via email to