From owner-freebsd-current@freebsd.org Thu May 7 17:01:11 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7CDBC2DE3E7 for ; Thu, 7 May 2020 17:01:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 49J0930pH6z4QKG for ; Thu, 7 May 2020 17:01:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mailman.nyi.freebsd.org (Postfix) id 1B71B2DE3E6; Thu, 7 May 2020 17:01:11 +0000 (UTC) Delivered-To: current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B37A2DE3E5 for ; Thu, 7 May 2020 17:01:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49J0916RFvz4QK4 for ; Thu, 7 May 2020 17:01:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72b.google.com with SMTP id k81so6861711qke.5 for ; Thu, 07 May 2020 10:01:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0Bc5Q2AfLEL/SjpjHLVSTj+cATQyVNnLYMxyRZZSbko=; b=MolNqRb7E2Lu+lXitnWC5le1ZyIkc1qu8lZoHbczFz8SgEHI54t06zorDvrdWhlwuh lcToqAyRrSb4cwn/cFybDDDwRM8NLIpOP2NEPWg3MgmJ2Yv4Rh0QerEn6Y6ffAOZgF/F 7MeR3Pk04OmNu9DsBVj6UFlA1QZYRuZbfVK/jsCL9QXcL5AWEa/wj+SuQQsch59uv8dy NGGw+a+ERsFACNjWyL57/jFQsJwiFZak9iGqzRHkAkEd2br0WRSczd52lnREzkM71M1k taZXnfWlwu56jRPvhGi3eVIy4hDawWKkIZS3lP/6yY0/sQ7rLCv/WVyrj94SyQL5Rcdd 3C9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0Bc5Q2AfLEL/SjpjHLVSTj+cATQyVNnLYMxyRZZSbko=; b=swaJhtss/hb3irIm2m4Z/WdZdCoR8BgQxrWsAC2amqhTpm9tkBBh1XXwsK+ivC96f0 b3hMF6NpWq6A2qx1zArrtLlOjDrMUhJpfUSsbrTNblRIkblvezF3/oMmxwWvssEiCxx1 A4pta4P3hpDAAwhtXVSMs+uTMZEqGamJQHYrumh7r5RDgkIwqdB02kLHNe+Hzr6x9Da3 bI2gAYRLRQSTcDmvfJaeDyNiU1fWtQY+TKDw8C4rWR7KW0Gz8VVRXsrBGyDjEfVzIdO6 X2IH7igBTdvawiZmXg9eHEPfh3BY4GzVrSlfTlLw9mHhHXcF6IGrBJsWZpKZTVit3r09 WeMQ== X-Gm-Message-State: AGi0PuYYlIrezX5HBparWxRJXPZkiGPEn3J7n6JVPY1hMw8KBKd4n46i CvMln52GiQkHPwg3lsJ1uNp1938aSciamkkNlOcR+aPpjlo= X-Google-Smtp-Source: APiQypJH1UJ7xoCC5pujG5Flb7yArP2SFZFv8FHRfuE5oJM/tH0uDamZoFwSIp1ch9W4GhdD3fnnElBkIrR8cmvp4DU= X-Received: by 2002:a37:4955:: with SMTP id w82mr14199872qka.240.1588870868832; Thu, 07 May 2020 10:01:08 -0700 (PDT) MIME-Version: 1.0 References: <20200507124126.g4z5op4cyv45pmxn@ivaldir.net> <202005071635.047GZGC3048718@gndrsh.dnsmgr.net> In-Reply-To: <202005071635.047GZGC3048718@gndrsh.dnsmgr.net> From: Warner Losh Date: Thu, 7 May 2020 11:00:56 -0600 Message-ID: Subject: Re: Move from termcap(5) to terminfo(5) To: "Rodney W. Grimes" Cc: Baptiste Daroussin , FreeBSD Current X-Rspamd-Queue-Id: 49J0916RFvz4QK4 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=MolNqRb7; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::72b) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-4.02 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[current@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[b.2.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.02)[ip: (-9.30), ipnet: 2607:f8b0::/32(-0.33), asn: 15169(-0.43), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.30 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2020 17:01:11 -0000 On Thu, May 7, 2020 at 10:35 AM Rodney W. Grimes < freebsd-rwg@gndrsh.dnsmgr.net> wrote: > > Hello everyone, > > > > I can't find any proper rationale in our history (maybe I missed it) > which > > explains why our ncurses is stuck on using termcap(5) instead of > terminfo(5) > > Except an argument in the Makefile that builds ncurses: > > "Used instead of the hideous read_termcap.c abomination." > > > > Which I do not find really useful. > > > > I would like to make the move from termcap to terminfo which would give > us the > > bonus to be able to track terminfo sources from upstream aka ncurses and > to > > add and use tic(1). > > > > Given the very few people that are actually maintaining the termcap > database. I > > don't think there is a good rationale at keeping our own format (as far > as I > > know everyone moved to terminfo(5)) and parser. > > > > Without any strong arguments against it I will start working on that > move by > > next week. > > > > If you have some knowledge you want to share: "be careful about this or > that" I > > would be more than happy to collect it, to make sure the transition is > as smooth > > as possible. > > The feedback I have from the few people that *are* effected by our > lack of use of terminfo is positive on this change. > Our use of termcap is a pain for them, especially with the base vs > ports issues. > There are a number of people, though, that have custom TERMCAP entries in their environment, or that do special things with /etc/termcap that will need to be consulted. The TERMCAP env variable is likely the hardest to convert, though they work around various bugs that have been in various flavors of ncurses over the years. The impact here is likely small, but likely non-zero as some of the bugs are worked around in other ways these days (eg screen save/restore: bug or feature). nanobsd used to deploy a tiny termcap file for space reasons. There's a number of other custom image building scripts in the community that I'm aware of that do this too, though I don't think any are publicly available. The reworking isn't super hard for nanobsd, so long as tic produced target independent binaries. There may be some work needed in nanobsd if the tic files are big in aggregate to trim them down to vt100/xterm/cons25. > As far as I am aware the termcap vs terminfo is simply historical in > nature with no strong reason to change it. It use to be that both > had pretty close shares of the supported by software segment. That > historical precedence has worn thin, as there is very little support > for termcap today. > terminfo was AT&T System V and very jealously guarded at the start of the project. Given the other issues the project had in the early days with USL, poking the bear by switching to terminfo, even one that was clean room done, was simply not an option. It was BSD and there has been zero pressure to change until this thread (though I see others have brushed up against this issue before now)... As with other deprecations of user facing interfaces, announcing the timeline, etc should be done here. It's not a huge deal, assuming tic produces sensible binaries that are platform neutral. If it doesn't, then the transition will be harder... Warner