Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 831045 - profiles: remove USE=cli default and inline into ebuilds
Summary: profiles: remove USE=cli default and inline into ebuilds
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Profiles (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Quality Assurance Team
URL:
Whiteboard:
Keywords:
Depends on: profile-23.0
Blocks: future-profile 656148
  Show dependency tree
 
Reported: 2022-01-12 03:31 UTC by Sam James
Modified: 2024-04-10 03:48 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-12 03:31:34 UTC
Currently we set USE="cli" in default/linux/make.defaults:
>profiles/default/linux/make.defaults:26:USE="${USE} cli pcre"

This is a pretty odd choice. We even disable it in hardened!
>profiles/features/hardened/make.defaults:25:USE="${USE} -cli"

We should really just inline +cli where it makes sense in ebuilds and remove this enabling-by-default.

The current situation caused a problem when adding USE=cli to tree-sitter because it has heavy dependencies and they ended up using USE=ts-cli to avoid it being enabled by default for now.
Comment 1 Larry the Git Cow gentoo-dev 2022-09-20 00:02:15 UTC
The bug has been referenced in the following commit(s):

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

commit 5591d00f60e810160f78fa32a66fdbed591ddb7f
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-09-20 00:01:35 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-09-20 00:02:10 +0000

    profiles/features/hardened: drop odd USE defaults
    
    This leads to poor UX and there's no reason for hardened
    to deviate here -- none of these things make a system
    more hardened, they just lead to confusion.
    
    Closes: https://bugs.gentoo.org/871720
    Bug: https://bugs.gentoo.org/831045
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/features/hardened/make.defaults | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
Comment 2 Larry the Git Cow gentoo-dev 2022-11-12 23:21:54 UTC
The bug has been referenced in the following commit(s):

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

commit 19a28412bab445e6c35db9fd14702efbbef22c74
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2022-11-12 23:20:24 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2022-11-12 23:21:42 +0000

    profiles: drop USE="cli dri" in 23.0
    
    Bug: https://bugs.gentoo.org/831045
    Bug: https://bugs.gentoo.org/849875
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 profiles/releases/23.0/make.defaults | 6 ++++++
 1 file changed, 6 insertions(+)
Comment 3 Matt Whitlock 2023-09-17 05:36:33 UTC
> We should really just inline +cli where it makes sense in ebuilds and remove this enabling-by-default.

The current profile situation makes the above suggestion unworkable. Whereas the 23.0 profile really should have nothing to say about "cli", instead it specifically says "cli -cli" (through inheritance from profiles/default/linux/make.defaults). This precludes IUSE="+cli" in ebuilds from having the intended effect: "cli" remains disabled for the package even though the user never mentioned the flag in their make.conf or package.use. The package's own IUSE="+cli" does not override the global USE="-cli" set by the profile. The only ways a user can get "cli" enabled for a package are by setting USE="cli" in make.conf or by explicitly enabling the flag in /etc/portage/package.use. It doesn't even work to set the flag in the profile's package.use, as the global USE overrides that.

General question:
- Why are profiles initializing a global USE variable at all? Wouldn't it be more polite to insert a "*/*" line at the top of the profile's package.use to specify the default flags for that profile? This still wouldn't allow IUSE="+cli" to work as intended, but at least then individual packages could override the defaults on their own lines further down in the profile's package.use (and in overlays' package.use).
Comment 4 jospezial 2024-02-26 04:29:16 UTC
see also bug 925520
Comment 5 Larry the Git Cow gentoo-dev 2024-03-22 19:37:13 UTC
The bug has been referenced in the following commit(s):

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

commit b29bdf91eff134ec14e92b3824961fc84a04940d
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2024-03-22 19:34:05 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2024-03-22 19:36:57 +0000

    profiles: Move default-on of USE=cli to 17.0 directory, so it can be "unset" in 23.0
    
    This way the default can be overridden by in-ebuild use defaults.
    
    Bug: https://bugs.gentoo.org/831045
    Bug: https://bugs.gentoo.org/925520
    Closes: https://bugs.gentoo.org/927217
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 profiles/default/linux/make.defaults | 5 ++++-
 profiles/releases/17.0/make.defaults | 3 ++-
 profiles/releases/23.0/make.defaults | 3 ---
 3 files changed, 6 insertions(+), 5 deletions(-)
Comment 6 Andreas K. Hüttel archtester gentoo-dev 2024-04-10 03:48:11 UTC
This is fixed in the 23.0 profiles (available and stable now). Closing.