Skip to content
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

Broken with >=ncurses-6.4_p20230408 (OpenRC abuses tparm API) #619

Closed
thesamesam opened this issue Apr 16, 2023 · 2 comments · Fixed by #692
Closed

Broken with >=ncurses-6.4_p20230408 (OpenRC abuses tparm API) #619

thesamesam opened this issue Apr 16, 2023 · 2 comments · Fixed by #692

Comments

@thesamesam
Copy link
Contributor

OpenRC is broken with >=sys-libs/ncurses-6.4_p20230408, like so:

openrc-0.46-build/src/einfo $ ./ewarn hi
 (null)*(null) hi(null)

This was originally reported in Gentoo at https://bugs.gentoo.org/904277. The ncurses maintainer, Thomas Dickey, provided some analysis (see the Gentoo bug for full details):

I see that OpenRC is passing hardcoded strings to tgoto(),
which do not come from the terminal database (when tgoto()
returns a null, indicating a failure for that capability),
and using the output of tgoto() to copy/use other places.

That's a defect in OpenRC. Perhaps they'll fix it.

OpenRC needs to use tputs, printw, etc instead of e.g. printf for strings obtained from ncurses.

Note that newer ncurses is needed to fix some security vulnerabilities (https://bugs.gentoo.org/904247), so there's some urgency to this.

@vapier
Copy link
Member

vapier commented Apr 25, 2023

i don't super care whether we switch to the full curses API or hardcode ANSI sequences. our usage is so low that we can get by with ANSI. all we really need is logic to determine whether we should be using sequences at all (e.g. the "dumb" terminal or a pipe).

@OpenRC OpenRC deleted a comment from deprecated-dot Jul 11, 2023
@bfrg
Copy link

bfrg commented Jan 4, 2024

I'm on Gentoo Linux and because of this "bug" I cannot install newer tmux version, since OpenRC requires the old ncurses version but that conflicts with the latest tmux. This is true for every application that requires a newer ncurses. IMO something as essential as OpenRC should NOT depend on ncurses.

xxc3nsoredxx added a commit to xxc3nsoredxx/openrc that referenced this issue Feb 21, 2024
Remove the curses code and make the HAVE_TERMCAP-gated "fallbacks"
always present.

X-Gentoo-Bug: https://bugs.gentoo.org/904277
Closes: OpenRC#619
xxc3nsoredxx added a commit to xxc3nsoredxx/openrc that referenced this issue Feb 21, 2024
Remove the curses code and make the HAVE_TERMCAP-gated "fallbacks"
always present. This makes an ANSI terminal required for colors.

X-Gentoo-Bug: https://bugs.gentoo.org/904277
Closes: OpenRC#619
williamh pushed a commit that referenced this issue Apr 1, 2024
Remove the curses code and make the HAVE_TERMCAP-gated "fallbacks"
always present. This makes an ANSI terminal required for colors.

X-Gentoo-Bug: https://bugs.gentoo.org/904277
Closes: #619
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants