Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 487844 - sys-libs/ncurses: USE=tinfo changes library ABI
Summary: sys-libs/ncurses: USE=tinfo changes library ABI
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PullRequest
Depends on: tinfo
Blocks:
  Show dependency tree
 
Reported: 2013-10-13 09:10 UTC by Michał Górny
Modified: 2019-07-31 11:34 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ncurses.patch (ncurses.patch,683 bytes, patch)
2014-12-02 19:39 UTC, William Hubbs
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-10-13 09:10:52 UTC
The 'tinfo' USE flag seriously affects libncurses' ABI. Therefore, after switching the flag, all apps linking to ncurses need to rebuilt though neither SONAME, nor sub-slot changes. This is a QA issue.

Please either use.mask the flag, use.force it or remove it completely and do the tinfo switch in some kind of revbump w/ sub-slot change.
Comment 1 SpanKY gentoo-dev 2013-10-15 19:45:49 UTC
yes, we're aware.  going from USE=-tinfo to USE=tinfo doesn't break anything -- ncurses still links against tinfo so all runtime deps are satisfied.  so no, you do not need to run revdep rebuild.

going from USE=tinfo to USE=-tinfo will remove libtinfo, but portage's preserve libs logic keeps it from breaking the system and all the other pieces kick in.  you might need to run revdep-rebuild now, but that's not surprising.
Comment 2 William Hubbs gentoo-dev 2014-12-02 19:39:58 UTC
Created attachment 390808 [details, diff]
ncurses.patch

I am against removing the use flag. However, I feel that a patch like
this one would be helpful. If this is applied, the comment should be
replaced with an appropriate ewarn call.
Comment 3 Mike Gilbert gentoo-dev 2016-12-06 22:29:23 UTC
(In reply to William Hubbs from comment #2)
> I am against removing the use flag.

Why? I cannot see how it serves any useful purpose.
Comment 4 Mike Gilbert gentoo-dev 2016-12-07 16:57:00 UTC
There has been some activity on the gentoo-dev mailing list surrounding this issue.

https://archives.gentoo.org/gentoo-dev/message/66ffa017a4210ac28e6edaa361fa0397

I would like to ask the base-system team (especially vapier) to reconsider this.

Leaving the USE flag in place, and relying on preserved-libs to keep systems from breaking is sort of just brushing the problem under the rug. It does not solve the issue for alternate package managers, and it relies on a feature that not all portage users have enabled.

The only "real" solution that has been presented with the tinfo USE flag in place would be the [tinfo=] use-dep on all reverse dependencies.

From bug 452532, the USE flag was introduced to increase compatibility with binaries built on other distros. That would be more simply achieved in either of two ways:

1. Always enable libtinfo via the --enable-termlib configure option.
2. Always disable libtinfo, but symlink libtinfo.so.{5,6} to libncurses.so.{5,6} to fool the runtime linker/loader.

Either option reduces the complexity of this library/package.

If there is some benefit to leaving this as a USE flag, I would really like to know; currently I just don't see it.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-03-22 08:21:47 UTC
Ok, we have USE=tinfo for a few years now.  USE=tinfo is ABI-compatible with packages built against USE=-tinfo, so the transition should be painless, and we shouldn't lose compatibility with prebuilt software.  On the other hand, reverse transition is painful and there is not much point doing that.  Software should really be updated to support -ltinfo by now.

So I'd like to propose we force tinfo via package.use.force.  If someone really needs USE=-tinfo at this point, it can be restored via /etc/portage/profile.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-04-10 18:02:16 UTC
Ping.
Comment 7 Mike Gilbert gentoo-dev 2019-04-10 18:25:05 UTC
(In reply to Michał Górny from comment #5)
> So I'd like to propose we force tinfo via package.use.force.  If someone
> really needs USE=-tinfo at this point, it can be restored via
> /etc/portage/profile.

Sounds good to me.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-06-20 08:08:18 UTC
Ping.  Can we proceed with this already?
Comment 9 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2019-07-15 10:01:58 UTC
(In reply to Michał Górny from comment #8)
> Ping.  Can we proceed with this already?

Yes, it's been long enough for maintainers to fix this. I am about to go through the remaining blockers, fix those that have working patches/solutions available and then merge your GitHub PR...
Comment 10 Larry the Git Cow gentoo-dev 2019-07-15 11:19:08 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95dbfdecc623498fe8ebbe77ee9c9bcebb217c08

commit 95dbfdecc623498fe8ebbe77ee9c9bcebb217c08
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2019-03-22 08:24:14 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2019-07-15 11:18:11 +0000

    profiles: Force sys-libs/ncurses[tinfo]
    
    Closes: https://bugs.gentoo.org/487844
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    Closes: https://github.com/gentoo/gentoo/pull/11458
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 profiles/base/package.use.force | 8 ++++++++
 1 file changed, 8 insertions(+)
Comment 11 Sergei Trofimovich (RETIRED) gentoo-dev 2019-07-20 17:13:50 UTC
(In reply to Larry the Git Cow from comment #10)
> The bug has been closed via the following commit(s):
> 
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=95dbfdecc623498fe8ebbe77ee9c9bcebb217c08
> 
> commit 95dbfdecc623498fe8ebbe77ee9c9bcebb217c08
> Author:     Michał Górny <mgorny@gentoo.org>
> AuthorDate: 2019-03-22 08:24:14 +0000
> Commit:     Lars Wendler <polynomial-c@gentoo.org>
> CommitDate: 2019-07-15 11:18:11 +0000
> 
>     profiles: Force sys-libs/ncurses[tinfo]
>     
>     Closes: https://bugs.gentoo.org/487844
>     Signed-off-by: Michał Górny <mgorny@gentoo.org>
>     Closes: https://github.com/gentoo/gentoo/pull/11458
>     Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
> 
>  profiles/base/package.use.force | 8 ++++++++
>  1 file changed, 8 insertions(+)

This caused quite a bit of extra breakage exposed to packages. Many of them were never reported by users. Change is worth being announced in gentoo-dev@.

Also date and date format in this commit is incorrect.
Comment 12 Larry the Git Cow gentoo-dev 2019-07-31 11:34:43 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8a9083ee799487181327c3d51f44bbdea1e2bfd

commit f8a9083ee799487181327c3d51f44bbdea1e2bfd
Author:     Michael Haubenwallner <haubi@gentoo.org>
AuthorDate: 2019-07-31 11:19:47 +0000
Commit:     Michael Haubenwallner <haubi@gentoo.org>
CommitDate: 2019-07-31 11:34:05 +0000

    profiles/prefix/windows: p.use.mask tinfo for ncurses
    
    On KERNEL=Winnt, ncurses requires the term-driver option (#639670),
    which conflicts with the termlib option (use.forced by #487844).
    Bug: https://bugs.gentoo.org/639670
    Bug: https://bugs.gentoo.org/487844
    
    Signed-off-by: Michael Haubenwallner <haubi@gentoo.org>

 profiles/prefix/windows/package.use.mask | 6 ++++++
 1 file changed, 6 insertions(+)