Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 682668 - >=www-client/firefox-66.0.2 USE="pgo" without FEATURES="userpriv" Running Firefox as root in a regular user's session is not supported. ($HOME is /var/calculate/tmp/portage/www-client/firefox-66.0.2/homedir which is owned by portage.)
Summary: >=www-client/firefox-66.0.2 USE="pgo" without FEATURES="userpriv" Running Fir...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-06 10:30 UTC by Alexander
Modified: 2019-07-26 02:49 UTC (History)
1 user (show)

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


Attachments
emerge --info (file_682668.txt,21.63 KB, text/plain)
2019-04-06 10:30 UTC, Alexander
Details
firefox-with-gcc-ltp-pgo-tmpfs.log.xz (firefox-with-gcc-ltp-pgo-tmpfs.log.xz,341.19 KB, application/x-xz)
2019-04-06 10:31 UTC, Alexander
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander 2019-04-06 10:30:25 UTC
Created attachment 572060 [details]
emerge --info

Firefox 66.0.2 build failed with lto and pgo flags.
Comment 1 Alexander 2019-04-06 10:31:17 UTC
Created attachment 572062 [details]
firefox-with-gcc-ltp-pgo-tmpfs.log.xz
Comment 2 Alexander 2019-04-06 11:18:06 UTC
I'm sorry that you had to dig into the build log, just as Thomas told me in Bug 677052, this is not an error, and I did not find another :)
Comment 3 Alexander 2019-05-22 04:38:41 UTC
The same error with the version of Firefox-67_beta19. On the Gentoo forum, I was advised to use FEATURE = "userpriv". Firefox build successful with this option.
Comment 4 Larry the Git Cow gentoo-dev 2019-07-25 21:00:16 UTC
The bug has been closed via the following commit(s):

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

commit c24e20dbdb0c87824f3c37d9df42dceb2ceb2cf9
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2019-07-25 20:59:32 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2019-07-25 21:00:01 +0000

    www-client/firefox: USE=pgo requires FEATURES=userpriv
    
    Closes: https://bugs.gentoo.org/682668
    Package-Manager: Portage-2.3.69, Repoman-2.3.16
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 www-client/firefox/firefox-68.0.1.ebuild | 6 ++++++
 1 file changed, 6 insertions(+)
Comment 5 Arfrever Frehtes Taifersar Arahesis 2019-07-26 00:18:42 UTC
> + if ! has userpriv $FEATURES ; then

This will fail with other package managers which use something else than FEATURES to configure dropping of root privileges.

Please use:
if [[ ${EUID} == 0 ]] ; then
(Or similar variant)

You can use 'grep -ErA1 "\[ +.*\\\${?EUID}?.*0.* +\]" *' in top-level directory of the tree to see that checking ${EUID} is widely used...
Comment 6 Thomas Deutschmann (RETIRED) gentoo-dev 2019-07-26 02:22:10 UTC
Yes, I know that some people claim FEATURES isn't defined in PMS and therefore can't be used. This clam is wrong from my POV:  FEATURES is a variable like IUSE. There is no _technical reason_ why this code should fail anywhere where "has flag string" works (which is the case for ISUE). In addition, devmanual *lists* that example, see https://devmanual.gentoo.org/function-reference/query-functions/ and we were checking FEATURES before. So I will keep this code.
Comment 7 Arfrever Frehtes Taifersar Arahesis 2019-07-26 02:49:13 UTC
$FEATURES can be empty when using another package manager. Then:
- 'has ccache $FEATURES' will always return false (which maybe will happen to work if that package manager does not support ccache).
- '! has userpriv $FEATURES' will always return true.