NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: misc/59965 (terminfo(5): missing rxvt-unicode)



The following reply was made to PR misc/59965; it has been noted by GNATS.

From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: Roy Marples <roy%marples.name@localhost>
Cc: gnats-bugs%netbsd.org@localhost, roy%netbsd.org@localhost,
	misc-bug-people%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost,
	gnats-admin%netbsd.org@localhost
Subject: Re: misc/59965 (terminfo(5): missing rxvt-unicode)
Date: Thu, 12 Feb 2026 23:07:58 +0000

 > Date: Thu, 12 Feb 2026 17:28:20 +0000
 > From: Roy Marples <roy%marples.name@localhost>
 > 
 > OK, so I have some local patches that work great for the following:
 > 
 > mkdir -p /usr/pkg/share/terminfo
 > tic -x -o /usr/pkg/share/terminfo rxvt-unicode
 > 
 > If the path to -o is a directory then NetBSD's tic will work similar
 > to ncurses and spit our r/rxvt-unicode.cdb libterminfo as been
 > adjusted to pickup /usr/pkg/share/terminfo if $TERMINFO_DIRS is not
 > supplied.
 > 
 > This then allows us to adjust pkgsrc to adopt tic as a tool and
 > depend on it accordingly.  rxvt-unicode can then use the tic tool
 > and pass the terminfo definitions to it.
 
 Thanks!  Can you share the patches?
 
 Let me see if I understand correctly what you mean:
 
 1. rxvt-unicode will be extended with an INSTALL script that will
    cause the following command to be run at package installation time
    (pkg_add):
 
 	tic -x -o ${PREFIX}/share/terminfo \
 	    ${PREFIX}/share/examples/rxvt-unicode/rxvt-unicode.terminfo
 
    => So ${PREFIX}/share/terminfo is a cdb file, not a source file?
       Should it be called ${PREFIX}/share/terminfo.cdb, like we have
       /usr/share/misc/terminfo and /usr/share/misc/terminfo.cdb?
 
    => And presumably other packages providing terminfo descriptions
       will do something similar, so that ${PREFIX}/share/terminfo
       takes the union of all of them?
 
    => Ideally, it would be a single command line we can run to gather
       all packages' installed terminfo files -- that way, after
       installing a _batch_ of packages, we can run a single tic
       invocation to generate the .cdb file in O(#packages) time,
       instead of running it once for each package taking
       O(#packages^2) time.
 
       (pkg_add(8) doesn't currently have a mechanism to do this, but
       there's a strong need for it to grow such a mechanism, e.g. for
       TeX packages to run mktexlsr or regenerate font databases, and I
       have a plan implement it.)
 
 2. Once libterminfo is patched, applications linked against
    libterminfo will automatically search for terminfo entries in
    either:
 
 	(a) $TERMINFO, if it is set; or
 	(b) $TERMCAP, if it is set; or
 	(c) the first path with a match in $TERMINFO_DIRS,
 	    colon-separated; or
 	(d) the first path with a match in:
 
 		~/.terminfo.cdb
 		~/.terminfo
 		/usr/share/misc/terminfo.cdb
 		/usr/share/misc/terminfo
 		/usr/pkg/share/terminfo.cdb (?)
 		/usr/pkg/share/terminfo
 
 I wonder whether we should have something like a _single_
 /var/db/terminfo.cdb (and maybe terminfo.cdb), populated by a list of
 sources, like /etc/man.conf's _default list for populating
 /var/db/man.db or /etc/ssl/certs.conf's path list for populating
 /etc/ssl/certs.  That way:
 
 (a) we don't have /usr/pkg baked into libterminfo.so (e.g., mine will
     be in /pkg/20xxQy), but
 (b) we keep the logic for actually using the database simple, and
 (c) we can easily take the union of various inputs --
     /usr/share/misc/terminfo, /opt/pkg/share/examples/rxvt-unicode,
     whatever.
 
 But maybe this is too much indirection.
 
 > Once done, all you would have to do is pkg_add rxvt-unicode to get
 > the terminfo definitions added to the base system automatically.
 > Which just saves you the step of following the existing package
 > message of adding it yourself ;)
 
 There's one more step: the terminfo description needs to be installed
 on _remote_ hosts, which don't have anything graphical in them.  So
 ideally we would have a separate rxvt-unicode-terminfo package that
 doesn't pull in X the way the rxvt-unicode package does.
 
 > Would this satisfy this issue?
 
 Well, I was hoping we could just ship a rxvt-terminfo description in
 NetBSD out of the box without having to install any packages!  But
 this is good too -- we should, after all, have a way to install
 packages for new terminfo descriptions and have everything in the
 system just work with them.
 


Home | Main Index | Thread Index | Old Index