Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Feb 2021 15:37:14 +0100
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        Cy Schubert <Cy.Schubert@cschubert.com>
Cc:        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:  <20210226143714.k24aacsrjnnhkktc@aniel.nours.eu>
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

--dqdw63fwvislrgvy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Feb 26, 2021 at 06:20:19AM -0800, Cy Schubert wrote:
> In message <202102251327.11PDR4eC083842@gitrepo.freebsd.org>, Baptiste=20
> Daroussi
> n writes:
> > The branch main has been updated by bapt:
> >
> > URL: https://cgit.FreeBSD.org/src/commit/?id=3D2a50a9de8340f08bd876e9e5=
993332ae
> > 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
> >    =20
> >     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=3D	${_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=3D	runtime
> > +
> > +.PATH: ${SRCTOP}/contrib/ncurses/misc
> > +TINFOBUILDDIR=3D	${.OBJDIR}/builddir
> > +CLEANDIRS+=3D	builddir
> > +
> > +.include <src.tools.mk>
> > +
> > +.if !defined(_SKIP_BUILD)
> > +all: terminfo
> > +.endif
> > +META_TARGETS+=3D	terminfo install-terminfo
> > +
> > +terminfo: terminfo.src
> > +	mkdir -p ${TINFOBUILDDIR}
> > +	${TIC_CMD} -x -o ${TINFOBUILDDIR} ${.ALLSRC}
> > +
> > +.if make(*install*)
> > +TINFOS!=3D	 cd ${TINFOBUILDDIR} && find * -type f | LC_ALL=3DC sort
> > +TINFOSDIRS=3D	${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>
> > +
> >
>=20
> I think this had some unintended consequences, a POLA violation that shou=
ld=20
> be documented. Our termcap didn't support alternate screen buffers while=
=20
> terminfo does. Termcap did through t_te and t_ti but we didn't use them.=
=20
> Terminfo as delivered from the ncurses factory does supply rmcup and smcu=
p;=20
> our fullscreen apps such as nvi and top see them and use the alternate=20
> screen buffer.
>=20
> The use of the alternate screen buffer is one of the things I hate about=
=20
> Linux. After running vi or top I expect the output to remain on the scree=
n=20
> so I can use some bit of information in my next command. We now have this=
=20
> behaviour too.
>=20
> The alternate screen buffer was added to xterm an ice age ago. Most moder=
n=20
> terminal emulators support it. As much as I feel the need to yank out rmc=
up=20
> an smcup from our terminfo database, we are using a feature, as distastef=
ul=20
> as it may feel. This change probably needs a relnotes=3Dyes and an UPDATI=
NG=20
> entry advising users that they can either change $TERM to xterm1, vt100, =
or=20
> some other terminal definition that doesn't support rmcup and smcup, or=
=20
> learn to like it.
>=20
> OTOH, maybe this is something we as a community don't really want and we=
=20
> remove the rmcup and smcup definitions from our terminfo database.=20
> Personally, I believe this is progress -- progress I'm not particularly=
=20
> enamoured with but progress nonetheless. But I think we need to discuss,=
=20
> come to some sort of decision and document it.
>=20
> Thoughts?

I agree about UPDATING and RELNOTES. I planned to do it in a couple of days=
 for
UPDATING, as for rmcup/smcup there have been so many people asking for it, =
that
I didn't think people will hate it, so yes we could/should add en entry in
UPDATING.

I was planning to MFC it to 13.1, I don't know how much this change is a PO=
LA
violation or not, imho all the other benefice of terminfo over termcap for =
end
users are worth the MFC, but if most people vote against, I won't MFC it.

Bapt

--dqdw63fwvislrgvy
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAmA5B5cACgkQY4mL3PG3
PloPoA/7BlnKX+E4HfJihQJNSxGWo7sSsMQSdLrLMYk0QnVyf5vXUa00gr6yn5B1
SOPGe83JfhyOoUJXzDVAqCV0vUQtGsIkBNQJHVJZQnP5Xxm0vg5V1y/lmaBbYKNG
AKGVzXdWQhQWRyNAxscKOijcVNZh4+PPpIGjubNnp8ct5xxjJdhDMLFy27D5xjN6
+4wxpDSnycinaS36EtpBU0EX9I/+5aHIxpcprIQEBEocrfFmeIcR+h2TfFpr7N8r
YrQ9Mq0yTFeFFJjwJqcvRG8sbyrFf/kuq9pAuMAxyt4Ud17kY0KcgQMWUDSS+oJ/
h41/3hGDgpvTKiJaUbW15b+Z9eqnQLEOmvbDeguv2vz+GrZfp1SMkn+524rBqjEa
TetukmkZDSh6mqXhbMXy9hsROwAA+yt530xunYTiMP2+wURGcfsYUifJkro7emsA
WfphIOo7l8jo85jdUL92UOQX6l3ja0IMC+cXCRhN2A240SOJztqUMvkwo9XJW15g
RsVfirPf3tSbsO5K7Xk8m4GlfUahCtMUqJBnO9Aw7bWFJzTMwcxvgscrlnz8UbNZ
EpWPMX0MpzTlgW5mNwJ1SbJ49rt18/ORpHGi+rmDXg8xd7COouteVFObYhrTbKUS
ROb4XodI7kTezP072DS/3dTz0yXfXFJxGxWzA1cO1PKaZ3iCIeY=
=huCu
-----END PGP SIGNATURE-----

--dqdw63fwvislrgvy--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210226143714.k24aacsrjnnhkktc>