Date: Fri, 26 Feb 2021 19:04:00 +0300 From: Yuri Pankov <yuripv@yuripv.dev> To: Cy Schubert <Cy.Schubert@cschubert.com>, Baptiste Daroussin <bapt@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 2a50a9de8340 - main - terminfo: add terminfo database Message-ID: <68cc80bb-04fe-ef23-6f5a-2bc77db54feb@yuripv.dev> In-Reply-To: <202102261420.11QEKJoX006569@slippy.cwsent.com> References: <202102251327.11PDR4eC083842@gitrepo.freebsd.org> <202102261420.11QEKJoX006569@slippy.cwsent.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Cy Schubert wrote: > In message <202102251327.11PDR4eC083842@gitrepo.freebsd.org>, Baptiste > Daroussi > n writes: >> The branch main has been updated by bapt: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=2a50a9de8340f08bd876e9e5993332ae >> 14376f80 >> >> commit 2a50a9de8340f08bd876e9e5993332ae14376f80 >> Author: Baptiste Daroussin <bapt@FreeBSD.org> >> AuthorDate: 2021-02-23 16:17:32 +0000 >> Commit: Baptiste Daroussin <bapt@FreeBSD.org> >> CommitDate: 2021-02-25 13:25:32 +0000 >> >> terminfo: add terminfo database >> >> Tested by: manu, jbeich >> --- >> share/Makefile | 1 + >> share/terminfo/Makefile | 34 ++++++++++++++++++++++++++++++++++ >> 2 files changed, 35 insertions(+) >> >> diff --git a/share/Makefile b/share/Makefile >> index c4e12b05f7db..d6854b230ae5 100644 >> --- a/share/Makefile >> +++ b/share/Makefile >> @@ -26,6 +26,7 @@ SUBDIR= ${_colldef} \ >> ${_syscons} \ >> tabset \ >> termcap \ >> + terminfo \ >> ${_timedef} \ >> ${_vt} \ >> ${_zoneinfo} >> diff --git a/share/terminfo/Makefile b/share/terminfo/Makefile >> new file mode 100644 >> index 000000000000..7bb11f3fdf24 >> --- /dev/null >> +++ b/share/terminfo/Makefile >> @@ -0,0 +1,34 @@ >> +PACKAGE= runtime >> + >> +.PATH: ${SRCTOP}/contrib/ncurses/misc >> +TINFOBUILDDIR= ${.OBJDIR}/builddir >> +CLEANDIRS+= builddir >> + >> +.include <src.tools.mk> >> + >> +.if !defined(_SKIP_BUILD) >> +all: terminfo >> +.endif >> +META_TARGETS+= terminfo install-terminfo >> + >> +terminfo: terminfo.src >> + mkdir -p ${TINFOBUILDDIR} >> + ${TIC_CMD} -x -o ${TINFOBUILDDIR} ${.ALLSRC} >> + >> +.if make(*install*) >> +TINFOS!= cd ${TINFOBUILDDIR} && find * -type f | LC_ALL=C sort >> +TINFOSDIRS= ${TINFOS:C/(.).*/\1/g:O:u} >> +.endif >> + >> +beforeinstall: install-terminfo >> +install-terminfo: >> + mkdir -p ${DESTDIR}/usr/share/terminfo >> + cd ${DESTDIR}/usr/share/terminfo; mkdir -p ${TINFOSDIRS} >> +.for f in ${TINFOS} >> + ${INSTALL} ${TAG_ARGS} \ >> + -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ >> + ${TINFOBUILDDIR}/${f} ${DESTDIR}/usr/share/terminfo/${f} >> +.endfor >> + >> +.include <bsd.prog.mk> >> + >> > > I think this had some unintended consequences, a POLA violation that should > be documented. Our termcap didn't support alternate screen buffers while > terminfo does. Termcap did through t_te and t_ti but we didn't use them. > Terminfo as delivered from the ncurses factory does supply rmcup and smcup; > our fullscreen apps such as nvi and top see them and use the alternate > screen buffer. I don't think this is correct, it's 'ti' and 'te' for termcap and we use those a lot in our database, e.g. xterm-clear or even default screen and tmux entries, so it's always there for me being tmux user. > The use of the alternate screen buffer is one of the things I hate about > Linux. After running vi or top I expect the output to remain on the screen > so I can use some bit of information in my next command. We now have this > behaviour too. It's matter of taste, yes, and I like it. > The alternate screen buffer was added to xterm an ice age ago. Most modern > terminal emulators support it. As much as I feel the need to yank out rmcup > an smcup from our terminfo database, we are using a feature, as distasteful > as it may feel. This change probably needs a relnotes=yes and an UPDATING > entry advising users that they can either change $TERM to xterm1, vt100, or > some other terminal definition that doesn't support rmcup and smcup, or > learn to like it. > > OTOH, maybe this is something we as a community don't really want and we > remove the rmcup and smcup definitions from our terminfo database. > Personally, I believe this is progress -- progress I'm not particularly > enamoured with but progress nonetheless. But I think we need to discuss, > come to some sort of decision and document it. Removing those entirely will break POLA which started this discussion; to not break POLA we should rather "fix" the xterm entry to exclude smcup/rmcup to be the same as termcap equivalent.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?68cc80bb-04fe-ef23-6f5a-2bc77db54feb>