-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ncurses: patch wrong st-0.7 terminfo #44811
Conversation
Has this patch been submitted/accepted by ncurses upstream? Is there an upstream ncurses issue we can reference?
Sounds like a rather specific combination of things is needed to trigger this bug. I'm not sure whether this warrants using an unofficial patch for such a crucial package. |
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec { | |||
sha256 = "05qdmbmrrn88ii9f66rkcmcyzp1kb1ymkx7g040lfkd1nkp7w1da"; | |||
}; | |||
|
|||
patches = lib.optional (!stdenv.cc.isClang) ./clang.patch; | |||
patches = [ ./st-0.7.patch ] ++ lib.optional (!stdenv.cc.isClang) ./clang.patch; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also send this patch upstream?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Someone else already did this.
@xeji The corrected attribute is an extension of the terminfo database by tmux, which is described in the manual page of tmux. As the entry for suckless terminal is corrected you need at least tmux and st to reproduce the issue. neovim is just used to trigger the bug, by using a program, which tries to do something, which yields in tmux using the entry. @xeji @Ma27 I will investigate, wether that patch is already upstream or I try to send it upstream. But here I will need a few hours. |
At least the terminfo database, which can be viewed online, contains the corrected line:
It is the line with Comparing the file
Also in the development source download is the following comment:
So yes, the patch is already upstream. |
Ok. Then please leave a short comment that the patch can be removed with the next upgrade. |
Added the comment, that the patch is only necessary for the 6.1 version of ncurses and needs to be removed, if the ncurses is upgraded. |
Fixing/upgrading terminfo DB sounds good to me!
Not to hijack this PR but if we're eating an ncurses build anyway... :)
https://invisible-island.net/ncurses/NEWS.html#t20180804 IIRC while there are other goodies there is precedent for picking this st fix in particular. I was looking through all this recently re:termite and some issues I was having with screen (and TERM=termite vs TERM=xterm-termite, lol) Anyway LGTM but haven't given any hands-on checking of the result. |
Previously: #28334 |
Hmm well regarding the original issue, doesn't latest st ships a fixed terminfo? If so this might only be fixing things when using st and ssh'ing to a box with ncurses 6.1 but not at installed? |
Arch also ships ncurses 6.1 for a while. Upgrading makes sense then. |
You lost me. So you suggest to update ncurses to some weekly unreleased version? Shipping terminfo db separately should be good in my opinion. Shouldn't it be a runtime dependency only always? Why should it be needed for building? |
@dtzWill Regarding the fixed terminfo that ships with st. That doesn't change anything for me, as tmux only reads the terminfo database from ncurses-6.1. I did some |
Sorry. Somehow I toughed we still have an old version of ncurses. But we already have 6.1. In this case we can just merge this one instead. |
Motivation for this change
ncurses 6.1 has a defective st-0.7 terminfo entry according to
tmux/tmux#1264 (comment)
which resulted in tmux crashing if it is used within st and neovim
is started inside. Which is my use case with nix on debian8. On nixos
the issue can't be reproduced as the terminfo database out of
/run/current-system is also used, which contains ncurses 6.0
on my system.
Of course it is a bit unfortunate that a correction to the terminfo database
necessitates a rebuild of so many packages :(
Things done
Applied the fix stated in the comment above and checked that the crash doesn't
occur any more.
Tested using sandboxing (nix.useSandbox on NixOS, or option
sandbox
innix.conf
on non-NixOS)Built on platform(s)
Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
Tested compilation of all pkgs that depend on this change using
nix-shell -p nox --run "nox-review wip"
Sadly this ate all my ram and was killed by oom.
Tested execution of all binary files (usually in
./result/bin/
)Determined the impact on package closure size (by running
nix path-info -S
before and after)Fits CONTRIBUTING.md.