Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 709318 - =www-client/firefox-73.0 - portage inherits XDG_CACHE_HOME from root, build fails due to permissions
Summary: =www-client/firefox-73.0 - portage inherits XDG_CACHE_HOME from root, build f...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-11 19:33 UTC by Red
Modified: 2020-02-25 15:04 UTC (History)
5 users (show)

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


Attachments
Build log (www-client-firefox-73.0-build.log,23.71 KB, text/plain)
2020-02-11 19:33 UTC, Red
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Red 2020-02-11 19:33:28 UTC
Emerging =www-client/firefox-73.0 inherits the variable XDG_CACHE_HOME from root. Since portage doesn't have permissions here, the build fails unless XDG_CACHE_HOME is unset.

Build log attached with XDG_CACHE_HOME="/tmp/root/.cache" (permissions for this folder are 750)

Reproducible: Always

Steps to Reproduce:
1. export XDG_CACHE_HOME="/root/.cache" (if not already set)
2. emerge firefox
Actual Results:  
Firefox 73.0 fails to build due to user portage's lack of permissions in /root/.cache

Expected Results:  
Portage should not inherit XDG_CACHE_HOME from root.
Comment 1 Red 2020-02-11 19:33:57 UTC
Created attachment 613410 [details]
Build log
Comment 2 Red 2020-02-11 19:42:58 UTC
Per the most recent edit (September 2019) to https://wiki.gentoo.org/wiki/SSD#XDG_cache_on_tmpfs, creating /tmp/root/.cache is not a good idea. So while this shouldn't be happening at all, it won't happen to me anymore.
Comment 3 Arfrever Frehtes Taifersar Arahesis 2020-02-12 04:46:23 UTC
When ebuilds are updated to EAPI="7", this problem will be solved automatically, since ENV_UNSET contains XDG_CACHE_HOME:

https://gitweb.gentoo.org/repo/gentoo.git/tree/profiles/base/make.defaults?id=6568a730a830fd8a93b28162a01787600d19d307#n25
Comment 4 Arfrever Frehtes Taifersar Arahesis 2020-02-12 04:50:06 UTC
Also then you can drop part (DBUS_SESSION_BUS_ADDRESS, DISPLAY, XAUTHORITY) of:

https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/firefox/firefox-73.0.ebuild?id=a9afb66191d692fe4122f07e582384960db60564#n221
Comment 5 Sander Sweers 2020-02-22 16:49:01 UTC
Yeah, unsetting XDG_CACHE_HOME in the ebuild solved things for me.
Comment 6 Larry the Git Cow gentoo-dev 2020-02-24 22:35:59 UTC
The bug has been referenced in the following commit(s):

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

commit e69c7368abece7ff6ecc9118f972601869d40706
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-02-24 21:01:04 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-02-24 22:35:14 +0000

    www-client/firefox: avoid build failure caused by set XDG_CACHE_HOME
    
    Bug: https://bugs.gentoo.org/709318
    Package-Manager: Portage-2.3.89, Repoman-2.3.20
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 www-client/firefox/firefox-68.5.0.ebuild | 1 +
 www-client/firefox/firefox-73.0.1.ebuild | 1 +
 2 files changed, 2 insertions(+)
Comment 7 Red 2020-02-25 00:52:47 UTC
Can someone please verify that this is fixed in 73.0.1? I still had to unset XDG_CACHE_HOME when upgrading from 73.0 to 73.0.1 today.
Comment 8 Thomas Deutschmann (RETIRED) gentoo-dev 2020-02-25 00:56:49 UTC
(In reply to Red from comment #7)
> Can someone please verify that this is fixed in 73.0.1? I still had to unset
> XDG_CACHE_HOME when upgrading from 73.0 to 73.0.1 today.

Note that the fix landed after 73.0.1 was available in repository. So check timestamp or better, ebuild.
Comment 9 Red 2020-02-25 15:04:29 UTC
(In reply to Thomas Deutschmann from comment #8)
> (In reply to Red from comment #7)
> > Can someone please verify that this is fixed in 73.0.1? I still had to unset
> > XDG_CACHE_HOME when upgrading from 73.0 to 73.0.1 today.
> 
> Note that the fix landed after 73.0.1 was available in repository. So check
> timestamp or better, ebuild.

The latest 73.0.1 ebuild which also unmasks pgo builds properly even when XDG_CACHE_HOME is set.

Thank you!