Skip to contentSkip to conversation

bitbake.conf: make ROOT_HOME default match the rest of the world

PATCH In review Paul Gortmaker 3 participants 3 messages Jul 31, 2014 – Aug 4, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bitbake.conf: make ROOT_HOME default match the rest of the world

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

meta/conf/bitbake.conf +3 -2
index 5872d1d12cff..fecb45d173dd 100644
@@ -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.
Signature · 1 line
1.9.1
#1 lore raw
Quoted 8 lines · Paul Gortmaker

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.

Quoted 8 lines

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

This is a key decision for OE so it needs to go to the OE-Core list.

Cheers,

Richard

#2 lore raw
Quoted 14 lines · Richard Purdie
Quoted 13 lines · Paul Gortmaker

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.

Quoted 5 lines
Quoted 3 lines

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

This is a key decision for OE so it needs to go to the OE-Core list.

I think it is a good improvement if it doesnt hamper upgrade paths, I personally do not have a usecase of upgade.