Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 96177 - kdebase-3.3.2-r2 fails to emerge when KDEROOTHOME is set to /root/.kde
Summary: kdebase-3.3.2-r2 fails to emerge when KDEROOTHOME is set to /root/.kde
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-15 06:32 UTC by Harald Fricke
Modified: 2005-07-29 06:59 UTC (History)
0 users

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


Attachments
Compressed output from emerge kdebase. >3MB uncompressed! (kdebuildproblem.txt.bz2,147.15 KB, application/octet-stream)
2005-07-07 23:57 UTC, Harald Fricke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Fricke 2005-06-15 06:32:06 UTC
kdebase-3.3.2-r2 fails to emerge with sandbox access violations:

ACCESS DENIED mkdir /root/.kde
trying to create local folders: Permission denied
failed to create /root/.kde/share/config

under the following circumstances:
- the KDEROOTHOME environment variable is set to /root/.kde
- the /root/.kde directory does not exist.
This happens if you log into an existing Linux distribution as root and try to
install Gentoo chrooted from a KDE terminal window.

Work-around:
mkdir -p /root/.kde/share/config
--or--
unset KDEROOTHOME
before emerging.
This may or may not a variation of the following bugs: 7853 11664 22337 23150
24691 300030 34933 38442.

One might argue this is actually documentation bug. "The Gentoo Linux
alternative installation method HOWTO" and/or "The KDE Configuration HOWTO"
should mention that you must chroot from a clean environment as obtained by
su -
.


 

Reproducible: Always
Steps to Reproduce:
Comment 1 Dan Armak (RETIRED) gentoo-dev 2005-06-30 09:15:47 UTC
Quoting http://www.kde.org/areas/sysadmin/fsh.php: 
KDEROOTHOME [...] If this variable is not defined the home directoy of the root 
user is looked up in the password file and .kde is appended. Usually that 
results in /root/.kde . 
 
So why do we have a difference between KDEROOTHOME being defined and not? 
 
Please post the build output before/around the error, I want to know where it 
happens. 
 
Comment 2 Dan Armak (RETIRED) gentoo-dev 2005-06-30 09:16:39 UTC
Sorry docs team, shouldn't have added you yet... I'll let you know only if the  
docs really need changing and this isn't fixable in the ebuilds.  
Comment 3 Harald Fricke 2005-07-01 04:59:29 UTC
It will take a couple of days to get the machine back to the state where the
build is failing. I'm afraid I'll have to reinstall from scratch.
Comment 4 Harald Fricke 2005-07-07 23:57:30 UTC
Created attachment 62881 [details]
Compressed output from emerge kdebase. >3MB uncompressed!

I have attached a compressed log file with some annotations. It contains output
from an unsuccessful run, a successful run and emerge --info.
Comment 5 Dan Armak (RETIRED) gentoo-dev 2005-07-19 11:44:47 UTC
Confirmed with the latest kdebase 3.4.1. Access is attempted by (at least) 
kde-config (through KStandardDirs somehow, I assume), no matter what parameters 
it is given, and is triggered by KDEROOTHOME being set explicitly. 
Comment 6 Dan Armak (RETIRED) gentoo-dev 2005-07-22 03:59:52 UTC
Finally got around to looking at this...  
BTW, I thought this could be induced to happen with KDEHOME and FEATURES= 
userpriv usersandbox, but that doesn't seem to be so... 
Anyway, it's due to the following code in kstandarddirs.cpp: 
    QString localKdeDir = readEnvPath(getuid() ? "KDEHOME" : "KDEROOTHOME"); 
    if (!localKdeDir.isEmpty()) 
    { 
       if (localKdeDir[localKdeDir.length()-1] != '/') 
          localKdeDir += '/'; 
    } 
    else 
    { 
       localKdeDir =  QDir::homeDirPath() + "/.kde/"; 
    } 
So when KDEROOTHOME is unset things work because portage sets the home dir 
to a writeable temp dir. 
 
I think we can just unset KDEHOME and KDEROOTHOME in kde.eclass. Objections? 
Comment 7 Dan Armak (RETIRED) gentoo-dev 2005-07-22 06:06:06 UTC
Oh, and the $T/fakehome stuff in kde.eclass seems unnecessary since portage now 
manages $BUILD_PREFIX/homedir... But it's probably best to let sleeping bugs 
lie until the Next Complete Eclass Rewrite (tm).  
Comment 8 Gregorio Guidi (RETIRED) gentoo-dev 2005-07-26 07:22:05 UTC
> I think we can just unset KDEHOME and KDEROOTHOME in kde.eclass. 
 
Fine for me. 
Comment 9 Dan Armak (RETIRED) gentoo-dev 2005-07-29 06:59:52 UTC
Committed in kde.eclass.