Bug#1026027: graphical installer: using nano in a installer shell fails

2023-02-18 Thread Philip Hands
Control: tags -1 + pending

Sven Joachim  writes:
...
> I have attached the obvious patch.

Here's your patch:

  https://salsa.debian.org/philh/debian-installer-utils/-/tree/sven-bug/102602

which generates this mini ISO:

  
https://salsa.debian.org/installer-team/debian-installer/-/jobs/3960725/artifacts/file/public/gtk-mini.iso

wherein the bug is fixed.

That being the case, I've pushed it into the master branch.

Cheers, Phil.
-- 
|)|  Philip Hands  [+44 (0)20 8530 9560]  HANDS.COM Ltd.
|-|  http://www.hands.com/http://ftp.uk.debian.org/
|(|  Hugo-Klemm-Strasse 34,   21075 Hamburg,GERMANY



Bug#1026027: graphical installer: using nano in a installer shell fails

2023-02-18 Thread Sven Joachim
Control: reassign -1 di-utils-terminfo
Control: tags -1 + patch

On 2023-02-17 09:29 +0100, Benno Schulenberg wrote:

>> Philip Hands  (2022-12-15):
>>> Perhaps the presence of the termcap file is irrelevant, or could it be
>>> that nano used to be able to make use of that, and more recently only
>>> supports terminfo?
>
> This is the explanation, I think.  Nano removed support for Slang in
> version 5.5.  The nano-udeb (5.4) that is in Bullseye was still linked
> against Slang, which has its own ideas about what which terminals do.
>
> The nano-udeb (7.2) that is in Bookworm links against ncurses, and
> ncurses wants TERM to be set to something valid -- something for
> which a terminfo file is available.

Indeed.  The error message mentioned in Holger's initial report comes
from the ncurses initscr() function which nano (and other curses
applications) calls early.  If no terminfo entry for $TERM can be found,
initscr() exits the program.

I have attached the obvious patch.

Cheers,
   Sven

From 949bd770d7fd0d80ba0457f61c03b18d352b08dd Mon Sep 17 00:00:00 2001
From: Sven Joachim 
Date: Sat, 18 Feb 2023 09:09:31 +0100
Subject: [PATCH] di-utils-terminfo: Include xterm terminfo entry

Closes: #1026027
---
 debian/rules | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/rules b/debian/rules
index 703d210..50ab30c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,14 +17,14 @@ export DEB_CFLAGS_MAINT_APPEND := -Wall -W -Os -fomit-frame-pointer
 CFLAGS := $(shell dpkg-buildflags --get CPPFLAGS; dpkg-buildflags --get CFLAGS)
 LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)

-TERMNAMES = a/ansi d/dumb s/screen
+TERMNAMES = a/ansi d/dumb s/screen x/xterm

 ifeq ($(DEB_HOST_ARCH_OS),linux)
 TERMNAMES += l/linux
 endif

 ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
-TERMNAMES += c/cons25 x/xterm
+TERMNAMES += c/cons25
 endif

 ifeq ($(DEB_HOST_ARCH_OS),hurd)
--
2.39.2



Bug#1026027: graphical installer: using nano in a installer shell fails

2023-02-17 Thread Benno Schulenberg



Philip Hands  (2022-12-15):

Perhaps the presence of the termcap file is irrelevant, or could it be
that nano used to be able to make use of that, and more recently only
supports terminfo?


This is the explanation, I think.  Nano removed support for Slang in
version 5.5.  The nano-udeb (5.4) that is in Bullseye was still linked
against Slang, which has its own ideas about what which terminals do.

The nano-udeb (7.2) that is in Bookworm links against ncurses, and
ncurses wants TERM to be set to something valid -- something for
which a terminfo file is available.

Benno



OpenPGP_signature
Description: OpenPGP digital signature


Bug#1026027: graphical installer: using nano in a installer shell fails

2023-02-16 Thread Cyril Brulebois
cc += nano maintainers

Long story short: nano no longer starts in the graphical installer when
started from the menu (meaning integrated via VTE), but does start fine
when started from a console.

Any insight welcome.

Below, latest message on the bug report:

Philip Hands  (2022-12-15):
> Holger Wansing  writes:
> 
> > Hi,
> >
> > Philip Hands  wrote (Tue, 13 Dec 2022 20:34:17 +0100):
> >> On the 11.5 netinst I just tried out, in the Graphical Install's shell,
> >> TERM=xterm so that's obviously not the cause of the issue, but the
> >> difference would appear to be that it has:
> >> 
> >>   /usr/share/vte/termcap-0.0/xterm
> >> 
> >> So I guess the fix for this is either to make sure that that termcap
> >> file gets installed again, or to set TERM in the Graphical Install's
> >> shell to something like 'bterm' or 'vt102'.
> >> 
> >> I suspect restoring the termcap file is the correct fix.
> >
> > /usr/share/vte/termcap-0.0/xterm is there on dailies.
> 
> Oh, so it is.  Hmm, I seem not to have checked that bit, sorry.
> 
> Perhaps the presence of the termcap file is irrelevant, or could it be
> that nano used to be able to make use of that, and more recently only
> supports terminfo?
> 
> > Hmm. Kibi mentioned that this bug comes from ncurses (however I fail to
> > see any details here), should this be redirected to ncurses then?
> 
> Well, ncurses-base provides /lib/terminfo/x/xterm (in normal .deb
> packages), so perhaps that's why, although AFAICS it wasn't including
> that file in the udeb, even when things were working.
> 
> Making it ship a terminfo for xterm in the udeb would probably fix
> things, but I think it would also be quite nice to know why it broke.


Cheers,
-- 
Cyril Brulebois (k...@debian.org)
D-I release manager -- Release team member -- Freelance Consultant


signature.asc
Description: PGP signature


Bug#1026027: graphical installer: using nano in a installer shell fails

2022-12-15 Thread Philip Hands
Holger Wansing  writes:

> Hi,
>
> Philip Hands  wrote (Tue, 13 Dec 2022 20:34:17 +0100):
>> On the 11.5 netinst I just tried out, in the Graphical Install's shell,
>> TERM=xterm so that's obviously not the cause of the issue, but the
>> difference would appear to be that it has:
>> 
>>   /usr/share/vte/termcap-0.0/xterm
>> 
>> So I guess the fix for this is either to make sure that that termcap
>> file gets installed again, or to set TERM in the Graphical Install's
>> shell to something like 'bterm' or 'vt102'.
>> 
>> I suspect restoring the termcap file is the correct fix.
>
> /usr/share/vte/termcap-0.0/xterm is there on dailies.

Oh, so it is.  Hmm, I seem not to have checked that bit, sorry.

Perhaps the presence of the termcap file is irrelevant, or could it be
that nano used to be able to make use of that, and more recently only
supports terminfo?

> Hmm. Kibi mentioned that this bug comes from ncurses (however I fail to
> see any details here), should this be redirected to ncurses then?

Well, ncurses-base provides /lib/terminfo/x/xterm (in normal .deb
packages), so perhaps that's why, although AFAICS it wasn't including
that file in the udeb, even when things were working.

Making it ship a terminfo for xterm in the udeb would probably fix
things, but I think it would also be quite nice to know why it broke.

Cheers, Phil.
-- 
|)|  Philip Hands  [+44 (0)20 8530 9560]  HANDS.COM Ltd.
|-|  http://www.hands.com/http://ftp.uk.debian.org/
|(|  Hugo-Klemm-Strasse 34,   21075 Hamburg,GERMANY


signature.asc
Description: PGP signature


Bug#1026027: graphical installer: using nano in a installer shell fails

2022-12-15 Thread Holger Wansing
Hi,

Philip Hands  wrote (Tue, 13 Dec 2022 20:34:17 +0100):
> On the 11.5 netinst I just tried out, in the Graphical Install's shell,
> TERM=xterm so that's obviously not the cause of the issue, but the
> difference would appear to be that it has:
> 
>   /usr/share/vte/termcap-0.0/xterm
> 
> So I guess the fix for this is either to make sure that that termcap
> file gets installed again, or to set TERM in the Graphical Install's
> shell to something like 'bterm' or 'vt102'.
> 
> I suspect restoring the termcap file is the correct fix.

/usr/share/vte/termcap-0.0/xterm is there on dailies.
And the packages which ships it (libvte-common) did not receive any
updates since buster. So there's no change there I guess.

And on the other side: on debian-11 installer, TERM is also set to
'xterm' as it is now on the dailies, so also no changing here.
But in debian-11 it works nevertheless! 


Hmm. Kibi mentioned that this bug comes from ncurses (however I fail to
see any details here), should this be redirected to ncurses then?


Holger


-- 
Holger Wansing 
PGP-Fingerprint: 496A C6E8 1442 4B34 8508  3529 59F1 87CA 156E B076



Bug#1026027: graphical installer: using nano in a installer shell fails

2022-12-13 Thread Cyril Brulebois
Holger Wansing  (2022-12-13):
> I just noticed that nano cannot be used anymore in the installer shell
> (graphical installer):
> 
> - start the installer 
> - choose 'Graphical expert install'
> - 'Execute a shell'
> - call 'nano /etc/fstab'
> ---> Error opening terminal: xterm.
> 
> 
> This works in Bullseye installer, but fails in every bookworm dailies
> I have here (2022-01 - today).
> No problem in text installer.
> 
> Not sure, which package is responsible for this though (is this busybox?)

nano is shipped by nano-udeb, that error seems to come from ncurses
though (https://sources.debian.org/ is wonderful).


Cheers,
-- 
Cyril Brulebois (k...@debian.org)
D-I release manager -- Release team member -- Freelance Consultant


signature.asc
Description: PGP signature


Bug#1026027: graphical installer: using nano in a installer shell fails

2022-12-13 Thread Philip Hands
Holger Wansing  writes:

> - start the installer 
> - choose 'Graphical expert install'
> - 'Execute a shell'
> - call 'nano /etc/fstab'
> ---> Error opening terminal: xterm.

That would seem to be because $TERM is set to 'xterm', whereas there's
no terminfo file available for xterm.

Under /lib/terminfo/*/ we have:

  ansi  dumb  linux  screen  vt102

and there's also /usr/share/terminfo/b/bterm

In the F1-F3 consoles it's set to 'linux' (as expected), in the text
installer, TERM is set to 'bterm' -- these work.

So as a workaround, one can set e.g: TERM=bterm and then nano works in
the graphical install's shell.

On the 11.5 netinst I just tried out, in the Graphical Install's shell,
TERM=xterm so that's obviously not the cause of the issue, but the
difference would appear to be that it has:

  /usr/share/vte/termcap-0.0/xterm

So I guess the fix for this is either to make sure that that termcap
file gets installed again, or to set TERM in the Graphical Install's
shell to something like 'bterm' or 'vt102'.

I suspect restoring the termcap file is the correct fix.

Cheers, Phil.
-- 
|)|  Philip Hands  [+44 (0)20 8530 9560]  HANDS.COM Ltd.
|-|  http://www.hands.com/http://ftp.uk.debian.org/
|(|  Hugo-Klemm-Strasse 34,   21075 Hamburg,GERMANY



Bug#1026027: graphical installer: using nano in a installer shell fails

2022-12-13 Thread Holger Wansing
Package: debian-installer
Severity: normal


Hi,

I just noticed that nano cannot be used anymore in the installer shell
(graphical installer):

- start the installer 
- choose 'Graphical expert install'
- 'Execute a shell'
- call 'nano /etc/fstab'
---> Error opening terminal: xterm.


This works in Bullseye installer, but fails in every bookworm dailies I have
here (2022-01 - today).
No problem in text installer.


Not sure, which package is responsible for this though (is this busybox?)


Holger


-- 
Holger Wansing 
PGP-Finterprint: 496A C6E8 1442 4B34 8508  3529 59F1 87CA 156E B076