Skip to contentSkip to conversation

Update oprofile to know about OE root home directory

PATCH Applied Mark Hatle 5 participants 10 messages Jul 2, 2012 – Jul 5, 2012

lore
Share & tools
lore

Mark Hatle

author
#0 lore raw

cover Update oprofile to know about OE root home directory

The root home directory is /home/root and not /root, adjust oprofile to match.

The following changes since commit 64422f7c5da160050a5454817c8fa9d070104b34:

package.bbclass: Add missing PKGR, PKGV, PKGE and ALTERNATIVE variables from PACKAGEVARS (2012-07-02 16:44:57 +0100)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib mhatle/oprofile
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/oprofile

Mark Hatle (1):
oprofile: Change /root to /home/root

 meta/recipes-kernel/oprofile/oprofile.inc          |    3 +-
 .../oprofile/oprofile/oprofile-root.patch          |  108 ++++++++++++++++++++
 2 files changed, 110 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch
Signature · 1 line
1.7.3.4
author
#1 lore raw

PATCH 1/1 oprofile: Change /root to /home/root

OE uses /home/root instead of /root for the root user's directory. Update oprofile to match.

Upstream-status: Inappropriate [OE Specific]

---
 meta/recipes-kernel/oprofile/oprofile.inc          |    3 +-
 .../oprofile/oprofile/oprofile-root.patch          |  108 ++++++++++++++++++++
 2 files changed, 110 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch
meta/recipes-kernel/oprofile/oprofile.inc +2 -1
index 73a5a07..ac8ce10 100644
@@ -19,10 +19,11 @@ FILES_${PN} = "${bindir} ${libdir}/${BPN}/lib*${SOLIBS} ${datadir}/${BPN}"
 FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/lib*.la"
 FILES_${PN}-staticdev += "${libdir}/${BPN}/lib*.a"
 
-INC_PR = "r0"
+INC_PR = "r1"
 
 SRC_URI = "file://opstart.patch \
            file://oprofile-no-query-modules.patch \
+           file://oprofile-root.patch \
            file://acinclude.m4"
 
 inherit autotools
meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch new file +108 -0

108 lines not on this page · raw message

Signature · 1 line
1.7.3.4
#2 lore raw

Re: [PATCH 1/1] oprofile: Change /root to /home/root

meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch line 108

Quoted 12 lines · Mark Hatle
meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch new file +12 -0
+diff -ur oprofile-0.9.7.orig/utils/opcontrol oprofile-0.9.7/utils/opcontrol
+--- oprofile-0.9.7.orig/utils/opcontrol	2011-07-20 14:36:48.000000000 -0500
++++ oprofile-0.9.7/utils/opcontrol	2012-07-02 13:55:06.232872688 -0500
+@@ -384,7 +384,7 @@
+ 	OPROFILED="$OPDIR/oprofiled"
+ 
+ 	# location for daemon setup information
+-	SETUP_DIR="/root/.oprofile"
++	SETUP_DIR="/home/root/.oprofile"
+ 	SETUP_FILE="$SETUP_DIR/daemonrc"
+ 	SEC_SETUP_FILE="$SETUP_DIR/daemonrc_new"
+ 

Why is it putting "daemon setup information" in /root in the first place? Surely that should go in /etc or some such place.

Also, the choice of where root's home directory goes is a distro decision and, in the general case, it is not correct to say that "OE uses /home/root". Changing the hardcoded value from one thing to another is probably not that much of an improvement overall.

p.

author
#3 lore raw

Re: [PATCH 1/1] oprofile: Change /root to /home/root

Quoted 17 lines · Phil Blundell

meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch line 108

Quoted 12 lines · Mark Hatle
meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch new file +12 -0
+diff -ur oprofile-0.9.7.orig/utils/opcontrol oprofile-0.9.7/utils/opcontrol
+--- oprofile-0.9.7.orig/utils/opcontrol	2011-07-20 14:36:48.000000000 -0500
++++ oprofile-0.9.7/utils/opcontrol	2012-07-02 13:55:06.232872688 -0500
+@@ -384,7 +384,7 @@
+ 	OPROFILED="$OPDIR/oprofiled"
+
+ 	# location for daemon setup information
+-	SETUP_DIR="/root/.oprofile"
++	SETUP_DIR="/home/root/.oprofile"
+ 	SETUP_FILE="$SETUP_DIR/daemonrc"
+ 	SEC_SETUP_FILE="$SETUP_DIR/daemonrc_new"
+

Why is it putting "daemon setup information" in /root in the first place? Surely that should go in /etc or some such place.

Quoted 4 lines

Also, the choice of where root's home directory goes is a distro decision and, in the general case, it is not correct to say that "OE uses /home/root". Changing the hardcoded value from one thing to another is probably not that much of an improvement overall.

systemd (meta-oe), base-passwd, base-files (profile settings), xserver- nodm-init-2.0/xserver-nodm -- they all have patches that change hard coded /root to /home/root.

I don't honestly care which we used, but /home/root has been used as -the- root directory on OE since as far back as 2004 from what I can tell.

As for the files, these are files used by the system to setup and store the data. oprofile does this to the root home directory. I don't know or understand why, other then I have a bug in my pile that says oprofile is currently broken, as there is no /root directory.

--Mark

Quoted 9 lines

p.

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#4 lore raw

Re: [PATCH 1/1] oprofile: Change /root to /home/root

In reply to Phil Blundell
Quoted 8 lines · Phil Blundell

Why is it putting "daemon setup information" in /root in the first place? Surely that should go in /etc or some such place.

Also, the choice of where root's home directory goes is a distro decision and, in the general case, it is not correct to say that "OE uses /home/root". Changing the hardcoded value from one thing to another is probably not that much of an improvement overall.

yes having ROOTHOME configurable is desirable but probably nothing as such exists AFAICT

#5 lore raw

Re: [PATCH 1/1] oprofile: Change /root to /home/root

Quoted 5 lines · Khem Raj
Quoted 4 lines · Phil Blundell

Why is it putting "daemon setup information" in /root in the first place? Surely that should go in /etc or some such place.

Quoted 7 lines
Quoted 4 lines

Also, the choice of where root's home directory goes is a distro decision and, in the general case, it is not correct to say that "OE uses /home/root". Changing the hardcoded value from one thing to another is probably not that much of an improvement overall.

yes having ROOTHOME configurable is desirable but probably nothing as such exists AFAICT

Why do we use /home/root instead of /root? If we are having to patch multiple recipes to account for this, maybe we should default to /root?

Philip

author
#6 lore raw

Re: [PATCH 1/1] oprofile: Change /root to /home/root

Quoted 11 lines · Philip Balister
Quoted 10 lines · Khem Raj
Quoted 8 lines · Phil Blundell

Why is it putting "daemon setup information" in /root in the first place? Surely that should go in /etc or some such place.

Also, the choice of where root's home directory goes is a distro decision and, in the general case, it is not correct to say that "OE uses /home/root". Changing the hardcoded value from one thing to another is probably not that much of an improvement overall.

Quoted 5 lines
Quoted 2 lines

yes having ROOTHOME configurable is desirable but probably nothing as such exists AFAICT

Why do we use /home/root instead of /root? If we are having to patch multiple recipes to account for this, maybe we should default to /root?

I attempted to figure this out yesterday... I probably have some details wrong, so anyone who knows should correct this...

The original Zaurus (commercial release) used /home/root, because the main / filesystem was read-only, and there was a need for all user data to reside on rw space (SD card?)

When OpenZaurus came about, it copied this behavior and it was eventually adopted by handhelds.org, nslu2, OpenEmbedded etc.. this is around 2004 time frame and later.

The first reference to this I find in the logs is around January of 2004, and it's been that way ever since.

From what I can tell, there used to be a symlink from /root -> /home/root... but I don't see that symlink in OE anymore.

This who /home/root vs /root certainly caught me by surprise.. but frankly I don't care either way. oprofile is not matching the system, so it needs to match -- or the system needs to change.

Most of the developers I work with are partial to /root vs /home/root. I'm open to either changing it back to /root, allowing for a more dynamic option, or keeping it the way it is..

--Mark

Quoted 8 lines

Philip

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#7 lore raw

Re: [PATCH 1/1] oprofile: Change /root to /home/root

Quoted 37 lines · Mark Hatle
Quoted 11 lines · Philip Balister
Quoted 10 lines · Khem Raj
Quoted 8 lines · Phil Blundell

Why is it putting "daemon setup information" in /root in the first place? Surely that should go in /etc or some such place.

Also, the choice of where root's home directory goes is a distro decision and, in the general case, it is not correct to say that "OE uses /home/root". Changing the hardcoded value from one thing to another is probably not that much of an improvement overall.

Quoted 6 lines
Quoted 3 lines

yes having ROOTHOME configurable is desirable but probably nothing as such
exists AFAICT

Why do we use /home/root instead of /root? If we are having to patch multiple recipes to account for this, maybe we should default to /root?

I attempted to figure this out yesterday... I probably have some details wrong, so anyone who knows should correct this...

The original Zaurus (commercial release) used /home/root, because the main / filesystem was read-only, and there was a need for all user data to reside on rw space (SD card?)

When OpenZaurus came about, it copied this behavior and it was eventually adopted by handhelds.org, nslu2, OpenEmbedded etc.. this is around 2004 time frame and later.

The first reference to this I find in the logs is around January of 2004, and it's been that way ever since.

From what I can tell, there used to be a symlink from /root ->
/home/root... but I don't see that symlink in OE anymore.

Quoted 8 lines

This who /home/root vs /root certainly caught me by surprise.. but frankly I don't care either way. oprofile is not matching the system, so it needs to match -- or the system needs to change.

Most of the developers I work with are partial to /root vs /home/root. I'm open to either changing it back to /root, allowing for a more dynamic option, or keeping it the way it is..

Mark,

For the sack of expediency, maybe we take your change now, can you file a bug to make it dynamic and we can get that fixed overall?

Making it dynamic will require a bit more work, would you take that RFE on for 1.3 or future?

Sau!

Quoted 19 lines

--Mark

Quoted 8 lines

Philip

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

author
#8 lore raw

Re: [PATCH 1/1] oprofile: Change /root to /home/root

Quoted 46 lines · Saul Wold
Quoted 37 lines · Mark Hatle
Quoted 11 lines · Philip Balister
Quoted 10 lines · Khem Raj
Quoted 8 lines · Phil Blundell

Why is it putting "daemon setup information" in /root in the first place? Surely that should go in /etc or some such place.

Also, the choice of where root's home directory goes is a distro decision and, in the general case, it is not correct to say that "OE uses /home/root". Changing the hardcoded value from one thing to another is probably not that much of an improvement overall.

Quoted 6 lines
Quoted 3 lines

yes having ROOTHOME configurable is desirable but probably nothing as such
exists AFAICT

Why do we use /home/root instead of /root? If we are having to patch multiple recipes to account for this, maybe we should default to /root?

I attempted to figure this out yesterday... I probably have some details wrong, so anyone who knows should correct this...

The original Zaurus (commercial release) used /home/root, because the main / filesystem was read-only, and there was a need for all user data to reside on rw space (SD card?)

When OpenZaurus came about, it copied this behavior and it was eventually adopted by handhelds.org, nslu2, OpenEmbedded etc.. this is around 2004 time frame and later.

The first reference to this I find in the logs is around January of 2004, and it's been that way ever since.

From what I can tell, there used to be a symlink from /root ->
/home/root... but I don't see that symlink in OE anymore.

Quoted 8 lines

This who /home/root vs /root certainly caught me by surprise.. but frankly I don't care either way. oprofile is not matching the system, so it needs to match -- or the system needs to change.

Most of the developers I work with are partial to /root vs /home/root. I'm open to either changing it back to /root, allowing for a more dynamic option, or keeping it the way it is..

Quoted 7 lines

Mark,

For the sack of expediency, maybe we take your change now, can you file a bug to make it dynamic and we can get that fixed overall?

Making it dynamic will require a bit more work, would you take that RFE on for 1.3 or future?

I'll add an enhancement request to the Yocto Project bugzilla.. I'm not sure at this point where it could be implemented, but due to history the "safe" answer right now is to keep /home/root until we can make it dynamic.

--Mark

Quoted 21 lines

Sau!

Quoted 19 lines

--Mark

Quoted 8 lines

Philip

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Applied
#9 lore raw
In reply to Mark Hatle
Quoted 10 lines · Mark Hatle

The root home directory is /home/root and not /root, adjust oprofile to match.

The following changes since commit 64422f7c5da160050a5454817c8fa9d070104b34:

package.bbclass: Add missing PKGR, PKGV, PKGE and ALTERNATIVE variables from PACKAGEVARS (2012-07-02 16:44:57 +0100)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib mhatle/oprofile
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/oprofile

Quoted 8 lines

Mark Hatle (1):
oprofile: Change /root to /home/root

  meta/recipes-kernel/oprofile/oprofile.inc          |    3 +-
  .../oprofile/oprofile/oprofile-root.patch          |  108 ++++++++++++++++++++
  2 files changed, 110 insertions(+), 1 deletions(-)

create mode 100644 meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch

Merged into OE-Core

Thanks
Sau!