[poky] [PATCH] bitbake.conf: make ROOT_HOME default match the rest of the world

Paul Gortmaker paul.gortmaker at windriver.com
Thu Jul 31 12:19:26 PDT 2014


All distros that I've ever used have /root as the home dir for
UID=0 (root) and even the Filesystem Hierarchy Standard lists
it as /root [1].  So if you've never come across the /home/root
thing before, it can violate the principle of least surprise.

In addition, using /home/root does suck if /home happens to be
on NFS, and you are trying to login as root to rescue something.

Change the default to be "/root" so we are consistent with the
rest of the world and the standards.  If someone wants /home/root
to be back compatible with earlier oe-core/yocto builds, they
can simply set ROOT_HOME themselves in their local.conf file.

[1] http://www.pathname.com/fhs/pub/fhs-2.3.html#ROOTHOMEDIRECTORYFORTHEROOTUSER

Signed-off-by: Paul Gortmaker <paul.gortmaker at windriver.com>

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 5872d1d12cff..fecb45d173dd 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -74,8 +74,9 @@ USRBINPATH = "${bindir}"
 USRBINPATH_class-native = "/usr/bin"
 USRBINPATH_class-nativesdk = "/usr/bin"
 
-# Root home directory
-ROOT_HOME ??= "/home/root"
+# Root home directory, typically /root but optionally sometimes
+# /home/root if and only if /home is local and != NFS
+ROOT_HOME ??= "/root"
 
 ##################################################################
 # Architecture-dependent build variables.
-- 
1.9.1



More information about the poky mailing list