forked from tgrabiec/osv-apps
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an "unknown-term" package which provides /usr/share/terminfo/u/unknown, i.e., a terminal definition for the TERM=unknown. Note that although ncurses defaults to TERM=unknown even if TERM is unset (as it is by default, in OSv), unfortunately some applications such as python don't an unset TERM well, and so TERM needs to be set to "unknown" explicitly. Signed-off-by: Nadav Har'El <nyh@scylladb.com>
- Loading branch information
Showing
3 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.PHONY: module | ||
module: | ||
infocmp xterm | sed 's/cud1=\(^J\|\\n\),/cud1=\\E[B,/; s/ind=\(^J\|\\n\),/ind=\\E[S,/; s/xterm/unknown/' | tic -o terminfo - | ||
clean: | ||
rm -rf terminfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
This package provides terminfo definition for the "unknown" terminal type, | ||
which is ncurses's default if TERM is missing. | ||
|
||
Currently, we copy the host's "xterm" definition, as that is a fairly | ||
common terminal nowadays and will "probably" work for a user with a modern | ||
Linux terminal, although perhaps we should choose a more bare-bones VT100 | ||
definition instead. | ||
|
||
However, QEMU has a long-standing (11 years!) bug which wrongly translates | ||
a bare linefeed sent by the guest \n\r - see | ||
https://bugs.launchpad.net/qemu/+bug/1407813 | ||
https://bugs.launchpad.net/qemu/+bug/1715296 | ||
|
||
So we need to modify the host's terminfo files use to avoid using \n for | ||
moving the cursor directly down - because in qemu it doesn't (the extra | ||
\r causes the cursor to move to the *beginning* of that line). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/usr/share/terminfo/u/unknown: ${MODULE_DIR}/terminfo/u/unknown |