Bug 261272

Summary: distextract: Fails to init with vt100/serial: distextract: Cannot init libbsdialog
Product: Base System Reporter: Tom Jones <thj>
Component: binAssignee: Tom Jones <thj>
Status: Closed FIXED    
Severity: Affects Some People CC: allanjude, asiciliano, bapt, brd
Priority: --- Keywords: needs-qa
Version: CURRENTFlags: koobs: mfc-stable13-
koobs: mfc-stable12-
Hardware: Any   
OS: Any   
URL: https://reviews.freebsd.org/D33920

Description Tom Jones freebsd_committer freebsd_triage 2022-01-17 14:52:14 UTC
With the Jan 6th iso images the installer fails during distextract. 
I have traced this to bsdlibdialog failing when it cannot init color pairs. I can reproduce this on a FreeBSD host with:

$ export TERM=vt100
$ env DISTRIBUTIONS="dafa" /usr/libexec/bsdinstall/distextract










distextract: Cannot init libbsdialog

Setting the terminal type to xterm allows the install to function.
Comment 1 Baptiste Daroussin freebsd_committer freebsd_triage 2022-01-17 15:02:03 UTC
Thank you for reporting
Comment 2 Baptiste Daroussin freebsd_committer freebsd_triage 2022-01-17 15:02:17 UTC
added upstream of bsddialog
Comment 3 Alfonso S. Siciliano freebsd_committer freebsd_triage 2022-01-17 17:54:49 UTC
Thank you for the report, I can reproduce and fix the problem with TERM vt100 in the XFCE Terminal.

https://reviews.freebsd.org/D33920
Comment 4 commit-hook freebsd_committer freebsd_triage 2022-01-19 08:34:11 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=8ea2d22e6d54d492b6b169014841eb27d4617459

commit 8ea2d22e6d54d492b6b169014841eb27d4617459
Author:     Alfonso Siciliano <alfsiciliano@gmail.com>
AuthorDate: 2022-01-19 08:28:42 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2022-01-19 08:28:42 +0000

    bsddialog: Fix for terminals without colours

    When running the installer, in particular disextract (which is so far
    the only part converted to bsddialog), on serial console or vt100 or
    actually any terminal without color support, it failed to start.

    This change makes bsddialog fallback on the black and white theme.

    This is incorporated in newer version of bsddialog which will be
    imported soon.

    PR:             261272
    Reported by:    thj
    Differential Revision:  https://reviews.freebsd.org/D33920

 contrib/bsddialog/lib/libbsddialog.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)
Comment 5 Brad Davis freebsd_committer freebsd_triage 2022-01-19 16:59:59 UTC
@bapt will you MFC?
Comment 6 Brad Davis freebsd_committer freebsd_triage 2022-01-19 17:03:27 UTC
oops, nevermind, I see that isn't needed.