Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 174335 - [TRACKER] FEATURES variable is used in the tree
Summary: [TRACKER] FEATURES variable is used in the tree
Status: CONFIRMED
Alias: None
Product: Quality Assurance
Classification: Unclassified
Component: Trackers (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Quality Assurance Team
URL:
Whiteboard:
Keywords: Tracker
Depends on: 278730 278731 278735 278736 278737 278738 278740 278743 278744 278745 278747 278749 278751 278752 278753 278756 278757 278868 278870 278872 278873 278874 278948 278949 278951 278953 278955 278957 278958 278960 278962 278963 278965 279460 279463 279465 279466 279467
Blocks:
  Show dependency tree
 
Reported: 2007-04-12 18:50 UTC by Marien Zwart (RETIRED)
Modified: 2021-08-31 10:21 UTC (History)
3 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 Marien Zwart (RETIRED) gentoo-dev 2007-04-12 18:50:24 UTC
A couple of ebuilds currently use FEATURES to determine if userpriv is
in use. They should either be changed to use a different mechanism to
detect root or non-root privs (with bugs filed) or this use of
FEATURES should be allowed by the PMS. A couple of ebuilds check for noinfo, noman, ccache, distcc and more. The same thing applies here: either this needs to be allowed by PMS or it needs bugs filed for the ebuilds.
Comment 1 Ciaran McCreesh 2007-04-12 19:12:13 UTC
FEATURES is considered a package manager configuration issue, and so beyond the scope of the specification and not usable by ebuilds. Ebuilds that do use it can be fixed in due course.
Comment 2 SpanKY gentoo-dev 2007-04-13 10:09:28 UTC
some are package manager specific, but some are not

userpriv for example is documented in the PMS so checking it via FEATURES is valid
Comment 3 Ciaran McCreesh 2007-04-13 15:11:59 UTC
RESTRICT != FEATURES.

FEATURES is a package manager configuration thing and ebuilds shouldn't be using it. Ebuild behaviour shouldn't depend upon anything in FEATURES.
Comment 4 Petteri Räty (RETIRED) gentoo-dev 2007-04-13 16:47:31 UTC
(In reply to comment #3)
> RESTRICT != FEATURES.
> 
> FEATURES is a package manager configuration thing and ebuilds shouldn't be
> using it. Ebuild behaviour shouldn't depend upon anything in FEATURES.
> 

So we fix it for EAPI=1 then unless you have some idea for tests that fail with root. I have for example seen one case where it tests opening some files which of course always succeeds as root so the test is marked as failing. We could of course decide that all these should switch to RESTRICT=test but that would a lost in functionality.
Comment 5 Ciaran McCreesh 2007-04-13 16:51:46 UTC
The particular dodgy tests, and only those tests, should be disabled.
Comment 6 Christian Faulhammer (RETIRED) gentoo-dev 2007-06-07 17:52:21 UTC
(In reply to comment #5)
> The particular dodgy tests, and only those tests, should be disabled.

 And if it is 99% of the tests?  MySQL for example heavily relies on being run with userpriv.
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2007-08-11 10:38:33 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > The particular dodgy tests, and only those tests, should be disabled.
> 
>  And if it is 99% of the tests?  MySQL for example heavily relies on being run
> with userpriv.

Yup, completely a no-go for mysql. 

Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-05-29 05:47:42 UTC
MySQL uses [[ $UID -eq 0 ]] instead of testing FEATURES for userpriv now.
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-05-29 19:43:53 UTC
Ok, we need a different solution than [[ $UID -eq 0 ]], because pkg_setup is always run as root.

I'm strongly inclined to go BACK to testing FEATURES for userpriv, and to hell with Paludis/PMS.
Comment 10 David Leverton 2008-05-29 20:43:35 UTC
(In reply to comment #9)
> Ok, we need a different solution than [[ $UID -eq 0 ]], because pkg_setup is
> always run as root.

Doing it in pkg_setup breaks binpkgs anyway.

You could always move the check to src_unpack... it's a bit hacky, but it should solve both problems nicely.
Comment 11 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-07-22 19:07:26 UTC
I agree, it would be crazy. But can't you have root's UID != 0? Then what?
Comment 12 Ciaran McCreesh 2009-07-22 19:11:58 UTC
(In reply to comment #11)
> I agree, it would be crazy. But can't you have root's UID != 0? Then what?

It's UID 0 that's special, not the username 'root'.
Comment 13 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-07-22 19:25:19 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > I agree, it would be crazy. But can't you have root's UID != 0? Then what?
> 
> It's UID 0 that's special, not the username 'root'.
> 

ah, thx. I was missing that bit of info.