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.

Cheers,
       Sven

Reply via email to