NetBSD Problem Report #55118
From gson@gson.org Sat Mar 28 09:28:50 2020
Return-Path: <gson@gson.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 493AB1A9217
for <gnats-bugs@gnats.NetBSD.org>; Sat, 28 Mar 2020 09:28:50 +0000 (UTC)
Message-Id: <20200328092845.0955D253F38@guava.gson.org>
Date: Sat, 28 Mar 2020 11:28:45 +0200 (EET)
From: gson@gson.org (Andreas Gustafsson)
Reply-To: gson@gson.org (Andreas Gustafsson)
To: gnats-bugs@NetBSD.org
Subject: Recent change in terminal output breaks anita
X-Send-Pr-Version: 3.95
>Number: 55118
>Category: lib
>Synopsis: Recent change in terminal output breaks anita
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: lib-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Mar 28 09:30:00 +0000 2020
>Closed-Date: Sat Mar 28 21:31:01 +0000 2020
>Last-Modified: Sat Mar 28 21:31:01 +0000 2020
>Originator: Andreas Gustafsson
>Release: NetBSD-current
>Organization:
>Environment:
System: NetBSD
Architecture: x86_64
Machine: amd64
>Description:
Some time yesterday, between source dates 2020.03.27.07.59.50 and
2020.03.27.21.05.03, the terminal output from sysinst changed for the
worse, such that it is now needlessly using multi-byte escape
sequences where a single space would do. For example, where it
previously output the string
Shall we continue?
it now outputs the rather suboptimal
Shall\x1b[m\x1b[C\x1b[37m\x1b[44mwe\x1b[m\x1b[C\x1b[37m\x1b[44mcontinue?
where \x1b represents the ESC character.
Since anita (pkgsrc misc/py-anita) is expecting the former string,
this breaks all anita-based testbeds except for the ARM ones which
install using images rather than sysinst.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: Christos Zoulas <christos@zoulas.com>
To: gnats-bugs@netbsd.org
Cc: lib-bug-people@netbsd.org,
gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: lib/55118: Recent change in terminal output breaks anita
Date: Sat, 28 Mar 2020 11:13:04 -0400
--Apple-Mail=_09EC6E28-303F-4754-A927-C92FC62B9E4D
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=us-ascii
It does:
Shall<reset-attrs><cursor =
right><foreground-white><background-blue>we<reset-attrs><cursor-right><for=
eground-white><background-blue>continue?
I *think* this is because the xterm-color (if I am guessing right) now =
clamps color pair entries instead of truncating them.
Can you try:
1. using a terminal that does not support color.
2. applying this patch
Index: term_private.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/src/lib/libterminfo/term_private.h,v
retrieving revision 1.14
diff -u -p -u -r1.14 term_private.h
--- term_private.h 27 Mar 2020 17:39:53 -0000 1.14
+++ term_private.h 28 Mar 2020 15:11:58 -0000
@@ -273,8 +273,7 @@ static __inline void
_ti_encode_buf_num(TBUF *tbuf, size_t num, int rtype)
{
if (rtype =3D=3D TERMINFO_RTYPE_O1) {
- if (num > SHRT_MAX)
- num =3D SHRT_MAX;
+ num &=3D 0xffff;
_ti_encode_buf_16(tbuf, num);
} else {
_ti_encode_buf_32(tbuf, num);
christos
--Apple-Mail=_09EC6E28-303F-4754-A927-C92FC62B9E4D
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename=signature.asc
Content-Type: application/pgp-signature;
name=signature.asc
Content-Description: Message signed with OpenPGP
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
iF0EARECAB0WIQS+BJlbqPkO0MDBdsRxESqxbLM7OgUCXn9pgAAKCRBxESqxbLM7
OjlvAJ9yxavru76gm2BaJIKGgWzmWYo8HACcCvmw7ZZGL96rR9UbLgWnm2sdtJE=
=24qP
-----END PGP SIGNATURE-----
--Apple-Mail=_09EC6E28-303F-4754-A927-C92FC62B9E4D--
From: Martin Husemann <martin@duskware.de>
To: Christos Zoulas <christos@zoulas.com>
Cc: gnats-bugs@netbsd.org
Subject: Re: lib/55118: Recent change in terminal output breaks anita
Date: Sat, 28 Mar 2020 16:27:46 +0100
I would guess $TERM should be vt100 on most install media (when using
serial console, like qemu/anita do).
Martin
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/55118 CVS commit: src/lib/libterminfo
Date: Sat, 28 Mar 2020 11:45:57 -0400
Module Name: src
Committed By: christos
Date: Sat Mar 28 15:45:56 UTC 2020
Modified Files:
src/lib/libterminfo: compile.c
Log Message:
PR/55118: Andreas Gustafsson: Oops, set the right flag variable.
To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/lib/libterminfo/compile.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Andreas Gustafsson <gson@gson.org>
To: Christos Zoulas <christos@zoulas.com>
Cc: gnats-bugs@netbsd.org
Subject: Re: lib/55118: Recent change in terminal output breaks anita
Date: Sat, 28 Mar 2020 18:19:15 +0200
Christos Zoulas wrote:
> I *think* this is because the xterm-color (if I am guessing right) now
> clamps color pair entries instead of truncating them.
>
> Can you try:
> 1. using a terminal that does not support color.
The hpcmips serial console defaults to vt100, and the hpcmips testbed
did successfully install from 2020.03.28.01.08.42 sources:
http://releng.netbsd.org/b5reports/hpcmips/commits-2020.03.html#2020.03.28.01.08.42
> 2. applying this patch
If you still need me to test this patch, please send it to me directly
as the version forwarded by gnats was corrupted.
--
Andreas Gustafsson, gson@gson.org
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@netbsd.org, lib-bug-people@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
gson@gson.org (Andreas Gustafsson)
Cc:
Subject: Re: lib/55118: Recent change in terminal output breaks anita
Date: Sat, 28 Mar 2020 12:33:27 -0400
On Mar 28, 4:20pm, gson@gson.org (Andreas Gustafsson) wrote:
-- Subject: Re: lib/55118: Recent change in terminal output breaks anita
| The hpcmips serial console defaults to vt100, and the hpcmips testbed
| did successfully install from 2020.03.28.01.08.42 sources:
I fixed it, no worries.
christos
State-Changed-From-To: open->closed
State-Changed-By: gson@NetBSD.org
State-Changed-When: Sat, 28 Mar 2020 21:31:01 +0000
State-Changed-Why:
Confirmed fixed, thanks.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.