All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Use dynamic root home directory
@ 2012-12-19  9:39 Kang Kai
  2012-12-19  9:39 ` [PATCH 1/4] bitbake.conf: import var ROOT_HOME Kang Kai
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Kang Kai @ 2012-12-19  9:39 UTC (permalink / raw)
  To: openembedded-core; +Cc: Zhenfeng.Zhao

Import variable ROOT_HOME which can be configured. Update base-files, base-passwd,
oprofile to use the dynamic root home directory.

The following changes since commit 2a9c574fd8b0800199b6569b6abf02634801013d:

  gst-openmax: fix build with newer GLib (2012-12-17 17:53:52 +0000)

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

Kang Kai (4):
  bitbake.conf: import var ROOT_HOME
  base-files: use dynamic root home directory
  base-passwd: use configurable root home directory
  oprofile: use dynamic root home directory

 meta/conf/bitbake.conf                             |    3 ++
 meta/recipes-core/base-files/base-files/profile    |    2 +-
 meta/recipes-core/base-files/base-files_3.0.14.bb  |    3 +-
 .../base-passwd/base-passwd-3.5.26/root-home.patch |   16 -------------
 .../recipes-core/base-passwd/base-passwd_3.5.26.bb |    4 +-
 meta/recipes-kernel/oprofile/oprofile.inc          |    1 +
 .../oprofile/oprofile/oprofile-root.patch          |   23 ++++++++++++-------
 7 files changed, 23 insertions(+), 29 deletions(-)
 delete mode 100644 meta/recipes-core/base-passwd/base-passwd-3.5.26/root-home.patch

-- 
1.7.5.4




^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/4] bitbake.conf: import var ROOT_HOME
  2012-12-19  9:39 [PATCH 0/4] Use dynamic root home directory Kang Kai
@ 2012-12-19  9:39 ` Kang Kai
  2012-12-19  9:39 ` [PATCH 2/4] base-files: use dynamic root home directory Kang Kai
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Kang Kai @ 2012-12-19  9:39 UTC (permalink / raw)
  To: openembedded-core; +Cc: Zhenfeng.Zhao

Import var ROOT_HOME to configure root home directory dynamically.

[Yocto 2683]

Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
 meta/conf/bitbake.conf |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index be3bfc2..983b3c0 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -73,6 +73,9 @@ USRBINPATH = "${bindir}"
 USRBINPATH_class-native = "/usr/bin"
 USRBINPATH_class-nativesdk = "/usr/bin"
 
+# Root home directory
+ROOT_HOME ?= "/home/root"
+
 ##################################################################
 # Architecture-dependent build variables.
 ##################################################################
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/4] base-files: use dynamic root home directory
  2012-12-19  9:39 [PATCH 0/4] Use dynamic root home directory Kang Kai
  2012-12-19  9:39 ` [PATCH 1/4] bitbake.conf: import var ROOT_HOME Kang Kai
@ 2012-12-19  9:39 ` Kang Kai
  2012-12-19  9:39 ` [PATCH 3/4] base-passwd: use configurable " Kang Kai
  2012-12-19  9:39 ` [PATCH 4/4] oprofile: use dynamic " Kang Kai
  3 siblings, 0 replies; 8+ messages in thread
From: Kang Kai @ 2012-12-19  9:39 UTC (permalink / raw)
  To: openembedded-core; +Cc: Zhenfeng.Zhao

Use var ROOT_HOME to configure root home directory dynamically.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
 meta/recipes-core/base-files/base-files/profile   |    2 +-
 meta/recipes-core/base-files/base-files_3.0.14.bb |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/base-files/base-files/profile b/meta/recipes-core/base-files/base-files/profile
index e9408d1..8eeaac3 100644
--- a/meta/recipes-core/base-files/base-files/profile
+++ b/meta/recipes-core/base-files/base-files/profile
@@ -11,7 +11,7 @@ if [ ! -e /etc/localtime ]; then
 	export TZ
 fi
 
-if [ "$HOME" = "/home/root" ]; then
+if [ "$HOME" = "ROOTHOME" ]; then
    PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin
 fi
 if [ "$PS1" ]; then
diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index ba355ee..39faad9 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -34,7 +34,7 @@ docdir_append = "/${P}"
 dirs1777 = "/tmp ${localstatedir}/volatile/lock ${localstatedir}/volatile/tmp"
 dirs2775 = "/home ${prefix}/src ${localstatedir}/local"
 dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \
-           ${sysconfdir}/skel /lib /mnt /proc /home/root /sbin \
+           ${sysconfdir}/skel /lib /mnt /proc ${ROOT_HOME} /sbin \
            ${prefix} ${bindir} ${docdir} /usr/games ${includedir} \
            ${libdir} ${sbindir} ${datadir} \
            ${datadir}/common-licenses ${datadir}/dict ${infodir} \
@@ -94,6 +94,7 @@ do_install () {
 	install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab
 	install -m 0644 ${WORKDIR}/filesystems ${D}${sysconfdir}/filesystems
 	install -m 0644 ${WORKDIR}/usbd ${D}${sysconfdir}/default/usbd
+	sed -i "s#ROOTHOME#${ROOT_HOME}#" ${WORKDIR}/profile
 	install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile
 	install -m 0644 ${WORKDIR}/shells ${D}${sysconfdir}/shells
 	install -m 0755 ${WORKDIR}/share/dot.profile ${D}${sysconfdir}/skel/.profile
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/4] base-passwd: use configurable root home directory
  2012-12-19  9:39 [PATCH 0/4] Use dynamic root home directory Kang Kai
  2012-12-19  9:39 ` [PATCH 1/4] bitbake.conf: import var ROOT_HOME Kang Kai
  2012-12-19  9:39 ` [PATCH 2/4] base-files: use dynamic root home directory Kang Kai
@ 2012-12-19  9:39 ` Kang Kai
  2012-12-19  9:39 ` [PATCH 4/4] oprofile: use dynamic " Kang Kai
  3 siblings, 0 replies; 8+ messages in thread
From: Kang Kai @ 2012-12-19  9:39 UTC (permalink / raw)
  To: openembedded-core; +Cc: Zhenfeng.Zhao

Use configurable variable ROOT_HOME as root home directory.
Drop root-home.patch because it is not needed any more.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
 .../base-passwd/base-passwd-3.5.26/root-home.patch |   16 ----------------
 .../recipes-core/base-passwd/base-passwd_3.5.26.bb |    4 ++--
 2 files changed, 2 insertions(+), 18 deletions(-)
 delete mode 100644 meta/recipes-core/base-passwd/base-passwd-3.5.26/root-home.patch

diff --git a/meta/recipes-core/base-passwd/base-passwd-3.5.26/root-home.patch b/meta/recipes-core/base-passwd/base-passwd-3.5.26/root-home.patch
deleted file mode 100644
index eab77f1..0000000
--- a/meta/recipes-core/base-passwd/base-passwd-3.5.26/root-home.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-we use /home/root instead of /root
-
-Comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-06
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- base-passwd/passwd.master.orig	2005-07-08 06:26:22.000000000 +0200
-+++ base-passwd/passwd.master	2005-07-08 06:31:58.000000000 +0200
-@@ -1,4 +1,4 @@
--root::0:0:root:/root:/bin/sh
-+root::0:0:root:/home/root:/bin/sh
- daemon:*:1:1:daemon:/usr/sbin:/bin/sh
- bin:*:2:2:bin:/bin:/bin/sh
- sys:*:3:3:sys:/dev:/bin/sh
diff --git a/meta/recipes-core/base-passwd/base-passwd_3.5.26.bb b/meta/recipes-core/base-passwd/base-passwd_3.5.26.bb
index 3eae214..2b1dc1c 100644
--- a/meta/recipes-core/base-passwd/base-passwd_3.5.26.bb
+++ b/meta/recipes-core/base-passwd/base-passwd_3.5.26.bb
@@ -6,8 +6,7 @@ LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
 
 SRC_URI = "${DEBIAN_MIRROR}/main/b/base-passwd/base-passwd_${PV}.tar.gz \
-           file://nobash.patch \
-           file://root-home.patch"
+           file://nobash.patch"
 
 SRC_URI[md5sum] = "74245e5c21dc74d9675c77cd8dfa02e6"
 SRC_URI[sha256sum] = "258a78317aa563143d10375c6e1e63a60898e503887f00fffd70b6b297c1b429"
@@ -25,6 +24,7 @@ do_install () {
 		${D}${mandir}/pl/man8/update-passwd.8
 	gzip -9 ${D}${mandir}/man8/* ${D}${mandir}/pl/man8/*
 	install -d -m 755 ${D}${datadir}/base-passwd
+	sed -i 's#:/root:#:${ROOT_HOME}:#' ${S}/passwd.master
 	install -o root -g root -p -m 644 ${S}/passwd.master ${D}${datadir}/base-passwd/
 	install -o root -g root -p -m 644 ${S}/group.master ${D}${datadir}/base-passwd/
 
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/4] oprofile: use dynamic root home directory
  2012-12-19  9:39 [PATCH 0/4] Use dynamic root home directory Kang Kai
                   ` (2 preceding siblings ...)
  2012-12-19  9:39 ` [PATCH 3/4] base-passwd: use configurable " Kang Kai
@ 2012-12-19  9:39 ` Kang Kai
  2012-12-19 11:06   ` Martin Jansa
  3 siblings, 1 reply; 8+ messages in thread
From: Kang Kai @ 2012-12-19  9:39 UTC (permalink / raw)
  To: openembedded-core; +Cc: Zhenfeng.Zhao

Use stub "ROOTHOME" to replace "/home/root" in oprofile-root.patch, then
we can substitute it with configured root home directory.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
 meta/recipes-kernel/oprofile/oprofile.inc          |    1 +
 .../oprofile/oprofile/oprofile-root.patch          |   23 ++++++++++++-------
 2 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/meta/recipes-kernel/oprofile/oprofile.inc b/meta/recipes-kernel/oprofile/oprofile.inc
index b3ce852..0977065 100644
--- a/meta/recipes-kernel/oprofile/oprofile.inc
+++ b/meta/recipes-kernel/oprofile/oprofile.inc
@@ -31,6 +31,7 @@ inherit autotools
 
 EXTRA_OECONF = "--with-kernel-support --without-x"
 do_configure () {
+        find . -type f | xargs sed -i 's#ROOTHOME#${ROOT_HOME}#'
 	cp ${WORKDIR}/acinclude.m4 ${S}/
 	autotools_do_configure
 }
diff --git a/meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch b/meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch
index db63a8e..f3fe4c9 100644
--- a/meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch
+++ b/meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch
@@ -4,6 +4,11 @@ Upstream-Status: inappropriate [OE specific]
 
 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
 
+Replace "/home/root" with stub "ROOTHOME", then substitute it with
+real root home directory which is configured dymanically.
+
+Signed-off-by: Kang Kai <kai.kang@windriver.com>
+
 diff -ur oprofile-0.9.7.orig/doc/opcontrol.1.in oprofile-0.9.7/doc/opcontrol.1.in
 --- oprofile-0.9.7.orig/doc/opcontrol.1.in	2011-07-04 21:25:04.000000000 -0500
 +++ oprofile-0.9.7/doc/opcontrol.1.in	2012-07-02 14:02:16.358865420 -0500
@@ -12,7 +17,7 @@ diff -ur oprofile-0.9.7.orig/doc/opcontrol.1.in oprofile-0.9.7/doc/opcontrol.1.i
  .SH FILES
  .TP
 -.I /root/.oprofile/daemonrc
-+.I /home/root/.oprofile/daemonrc
++.I ROOTHOME/.oprofile/daemonrc
  Configuration file for opcontrol
  .TP
  .I /var/lib/oprofile/samples/
@@ -24,7 +29,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.1 oprofile-0.9.7/doc/oprofile.1
  Configuration files
  .TP
 -.I /root/.oprofile/daemonrc
-+.I /home/root/.oprofile/daemonrc
++.I ROOTHOME/.oprofile/daemonrc
  Configuration file for opcontrol
  .TP
  .I /opt/oprofile-0.9.7-rc3/share/oprofile/
@@ -36,7 +41,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.1.in oprofile-0.9.7/doc/oprofile.1.in
  Configuration files
  .TP
 -.I /root/.oprofile/daemonrc
-+.I /home/root/.oprofile/daemonrc
++.I ROOTHOME/.oprofile/daemonrc
  Configuration file for opcontrol
  .TP
  .I @prefix@/share/oprofile/
@@ -48,7 +53,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.html oprofile-0.9.7/doc/oprofile.html
                  <p>
  		    Followed by list arguments for profiling set up. List of arguments
 -		    saved in <code class="filename">/root/.oprofile/daemonrc</code>.
-+		    saved in <code class="filename">/home/root/.oprofile/daemonrc</code>.
++		    saved in <code class="filename">ROOTHOME/.oprofile/daemonrc</code>.
  		    Giving this option is not necessary; you can just directly pass one
  		    of the setup options, e.g. <span class="command"><strong>opcontrol --no-vmlinux</strong></span>.
  		  </p>
@@ -57,7 +62,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.html oprofile-0.9.7/doc/oprofile.html
                  <p>
  		    Start data collection with either arguments provided by <code class="option">--setup</code>
 -		or information saved in <code class="filename">/root/.oprofile/daemonrc</code>. Specifying
-+		or information saved in <code class="filename">/home/root/.oprofile/daemonrc</code>. Specifying
++		or information saved in <code class="filename">ROOTHOME/.oprofile/daemonrc</code>. Specifying
  		the addition <code class="option">--verbose</code> makes the daemon generate lots of debug data
  		whilst it is running.
  		</p>
@@ -69,7 +74,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.xml oprofile-0.9.7/doc/oprofile.xml
  		<listitem><para>
  		    Followed by list arguments for profiling set up. List of arguments
 -		    saved in <filename>/root/.oprofile/daemonrc</filename>.
-+		    saved in <filename>/home/root/.oprofile/daemonrc</filename>.
++		    saved in <filename>ROOTHOME/.oprofile/daemonrc</filename>.
  		    Giving this option is not necessary; you can just directly pass one
  		    of the setup options, e.g. <command>opcontrol --no-vmlinux</command>.
  		  </para></listitem>
@@ -78,7 +83,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.xml oprofile-0.9.7/doc/oprofile.xml
  		<listitem><para>
  		    Start data collection with either arguments provided by <option>--setup</option>
 -		or information saved in <filename>/root/.oprofile/daemonrc</filename>. Specifying
-+		or information saved in <filename>/home/root/.oprofile/daemonrc</filename>. Specifying
++		or information saved in <filename>ROOTHOME/.oprofile/daemonrc</filename>. Specifying
  		the addition <option>--verbose</option> makes the daemon generate lots of debug data
  		whilst it is running.
  		</para></listitem>
@@ -90,7 +95,7 @@ diff -ur oprofile-0.9.7.orig/gui/oprof_start_util.cpp oprofile-0.9.7/gui/oprof_s
  string const get_config_dir()
  {
 -	return "/root";
-+	return "/home/root";
++	return "ROOTHOME";
  }
  
  string daemon_pid;
@@ -102,7 +107,7 @@ diff -ur oprofile-0.9.7.orig/utils/opcontrol oprofile-0.9.7/utils/opcontrol
  
  	# location for daemon setup information
 -	SETUP_DIR="/root/.oprofile"
-+	SETUP_DIR="/home/root/.oprofile"
++	SETUP_DIR="ROOTHOME/.oprofile"
  	SETUP_FILE="$SETUP_DIR/daemonrc"
  	SEC_SETUP_FILE="$SETUP_DIR/daemonrc_new"
  
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 4/4] oprofile: use dynamic root home directory
  2012-12-19  9:39 ` [PATCH 4/4] oprofile: use dynamic " Kang Kai
@ 2012-12-19 11:06   ` Martin Jansa
  2012-12-20  1:44     ` Kang Kai
  0 siblings, 1 reply; 8+ messages in thread
From: Martin Jansa @ 2012-12-19 11:06 UTC (permalink / raw)
  To: Kang Kai; +Cc: Zhenfeng.Zhao, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 6297 bytes --]

On Wed, Dec 19, 2012 at 05:39:39PM +0800, Kang Kai wrote:
> Use stub "ROOTHOME" to replace "/home/root" in oprofile-root.patch, then
> we can substitute it with configured root home directory.
> 
> Signed-off-by: Kang Kai <kai.kang@windriver.com>
> ---
>  meta/recipes-kernel/oprofile/oprofile.inc          |    1 +
>  .../oprofile/oprofile/oprofile-root.patch          |   23 ++++++++++++-------
>  2 files changed, 15 insertions(+), 9 deletions(-)
> 
> diff --git a/meta/recipes-kernel/oprofile/oprofile.inc b/meta/recipes-kernel/oprofile/oprofile.inc
> index b3ce852..0977065 100644
> --- a/meta/recipes-kernel/oprofile/oprofile.inc
> +++ b/meta/recipes-kernel/oprofile/oprofile.inc
> @@ -31,6 +31,7 @@ inherit autotools
>  
>  EXTRA_OECONF = "--with-kernel-support --without-x"
>  do_configure () {
> +        find . -type f | xargs sed -i 's#ROOTHOME#${ROOT_HOME}#'
>  	cp ${WORKDIR}/acinclude.m4 ${S}/
>  	autotools_do_configure

You should use tab here.

Cheers,

>  }
> diff --git a/meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch b/meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch
> index db63a8e..f3fe4c9 100644
> --- a/meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch
> +++ b/meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch
> @@ -4,6 +4,11 @@ Upstream-Status: inappropriate [OE specific]
>  
>  Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
>  
> +Replace "/home/root" with stub "ROOTHOME", then substitute it with
> +real root home directory which is configured dymanically.
> +
> +Signed-off-by: Kang Kai <kai.kang@windriver.com>
> +
>  diff -ur oprofile-0.9.7.orig/doc/opcontrol.1.in oprofile-0.9.7/doc/opcontrol.1.in
>  --- oprofile-0.9.7.orig/doc/opcontrol.1.in	2011-07-04 21:25:04.000000000 -0500
>  +++ oprofile-0.9.7/doc/opcontrol.1.in	2012-07-02 14:02:16.358865420 -0500
> @@ -12,7 +17,7 @@ diff -ur oprofile-0.9.7.orig/doc/opcontrol.1.in oprofile-0.9.7/doc/opcontrol.1.i
>   .SH FILES
>   .TP
>  -.I /root/.oprofile/daemonrc
> -+.I /home/root/.oprofile/daemonrc
> ++.I ROOTHOME/.oprofile/daemonrc
>   Configuration file for opcontrol
>   .TP
>   .I /var/lib/oprofile/samples/
> @@ -24,7 +29,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.1 oprofile-0.9.7/doc/oprofile.1
>   Configuration files
>   .TP
>  -.I /root/.oprofile/daemonrc
> -+.I /home/root/.oprofile/daemonrc
> ++.I ROOTHOME/.oprofile/daemonrc
>   Configuration file for opcontrol
>   .TP
>   .I /opt/oprofile-0.9.7-rc3/share/oprofile/
> @@ -36,7 +41,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.1.in oprofile-0.9.7/doc/oprofile.1.in
>   Configuration files
>   .TP
>  -.I /root/.oprofile/daemonrc
> -+.I /home/root/.oprofile/daemonrc
> ++.I ROOTHOME/.oprofile/daemonrc
>   Configuration file for opcontrol
>   .TP
>   .I @prefix@/share/oprofile/
> @@ -48,7 +53,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.html oprofile-0.9.7/doc/oprofile.html
>                   <p>
>   		    Followed by list arguments for profiling set up. List of arguments
>  -		    saved in <code class="filename">/root/.oprofile/daemonrc</code>.
> -+		    saved in <code class="filename">/home/root/.oprofile/daemonrc</code>.
> ++		    saved in <code class="filename">ROOTHOME/.oprofile/daemonrc</code>.
>   		    Giving this option is not necessary; you can just directly pass one
>   		    of the setup options, e.g. <span class="command"><strong>opcontrol --no-vmlinux</strong></span>.
>   		  </p>
> @@ -57,7 +62,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.html oprofile-0.9.7/doc/oprofile.html
>                   <p>
>   		    Start data collection with either arguments provided by <code class="option">--setup</code>
>  -		or information saved in <code class="filename">/root/.oprofile/daemonrc</code>. Specifying
> -+		or information saved in <code class="filename">/home/root/.oprofile/daemonrc</code>. Specifying
> ++		or information saved in <code class="filename">ROOTHOME/.oprofile/daemonrc</code>. Specifying
>   		the addition <code class="option">--verbose</code> makes the daemon generate lots of debug data
>   		whilst it is running.
>   		</p>
> @@ -69,7 +74,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.xml oprofile-0.9.7/doc/oprofile.xml
>   		<listitem><para>
>   		    Followed by list arguments for profiling set up. List of arguments
>  -		    saved in <filename>/root/.oprofile/daemonrc</filename>.
> -+		    saved in <filename>/home/root/.oprofile/daemonrc</filename>.
> ++		    saved in <filename>ROOTHOME/.oprofile/daemonrc</filename>.
>   		    Giving this option is not necessary; you can just directly pass one
>   		    of the setup options, e.g. <command>opcontrol --no-vmlinux</command>.
>   		  </para></listitem>
> @@ -78,7 +83,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.xml oprofile-0.9.7/doc/oprofile.xml
>   		<listitem><para>
>   		    Start data collection with either arguments provided by <option>--setup</option>
>  -		or information saved in <filename>/root/.oprofile/daemonrc</filename>. Specifying
> -+		or information saved in <filename>/home/root/.oprofile/daemonrc</filename>. Specifying
> ++		or information saved in <filename>ROOTHOME/.oprofile/daemonrc</filename>. Specifying
>   		the addition <option>--verbose</option> makes the daemon generate lots of debug data
>   		whilst it is running.
>   		</para></listitem>
> @@ -90,7 +95,7 @@ diff -ur oprofile-0.9.7.orig/gui/oprof_start_util.cpp oprofile-0.9.7/gui/oprof_s
>   string const get_config_dir()
>   {
>  -	return "/root";
> -+	return "/home/root";
> ++	return "ROOTHOME";
>   }
>   
>   string daemon_pid;
> @@ -102,7 +107,7 @@ diff -ur oprofile-0.9.7.orig/utils/opcontrol oprofile-0.9.7/utils/opcontrol
>   
>   	# location for daemon setup information
>  -	SETUP_DIR="/root/.oprofile"
> -+	SETUP_DIR="/home/root/.oprofile"
> ++	SETUP_DIR="ROOTHOME/.oprofile"
>   	SETUP_FILE="$SETUP_DIR/daemonrc"
>   	SEC_SETUP_FILE="$SETUP_DIR/daemonrc_new"
>   
> -- 
> 1.7.5.4
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 4/4] oprofile: use dynamic root home directory
  2012-12-19 11:06   ` Martin Jansa
@ 2012-12-20  1:44     ` Kang Kai
  2012-12-20  6:23       ` Kang Kai
  0 siblings, 1 reply; 8+ messages in thread
From: Kang Kai @ 2012-12-20  1:44 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Zhenfeng.Zhao, openembedded-core

On 2012年12月19日 19:06, Martin Jansa wrote:
> On Wed, Dec 19, 2012 at 05:39:39PM +0800, Kang Kai wrote:
>> Use stub "ROOTHOME" to replace "/home/root" in oprofile-root.patch, then
>> we can substitute it with configured root home directory.
>>
>> Signed-off-by: Kang Kai<kai.kang@windriver.com>
>> ---
>>   meta/recipes-kernel/oprofile/oprofile.inc          |    1 +
>>   .../oprofile/oprofile/oprofile-root.patch          |   23 ++++++++++++-------
>>   2 files changed, 15 insertions(+), 9 deletions(-)
>>
>> diff --git a/meta/recipes-kernel/oprofile/oprofile.inc b/meta/recipes-kernel/oprofile/oprofile.inc
>> index b3ce852..0977065 100644
>> --- a/meta/recipes-kernel/oprofile/oprofile.inc
>> +++ b/meta/recipes-kernel/oprofile/oprofile.inc
>> @@ -31,6 +31,7 @@ inherit autotools
>>
>>   EXTRA_OECONF = "--with-kernel-support --without-x"
>>   do_configure () {
>> +        find . -type f | xargs sed -i 's#ROOTHOME#${ROOT_HOME}#'
>>   	cp ${WORKDIR}/acinclude.m4 ${S}/
>>   	autotools_do_configure
> You should use tab here.

OK, thanks. I'll wait for others comments until this afternoon and then 
send V2.

Regards,
Kai

>
> Cheers,
>
>>   }
>> diff --git a/meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch b/meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch
>> index db63a8e..f3fe4c9 100644
>> --- a/meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch
>> +++ b/meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch
>> @@ -4,6 +4,11 @@ Upstream-Status: inappropriate [OE specific]
>>
>>   Signed-off-by: Mark Hatle<mark.hatle@windriver.com>
>>
>> +Replace "/home/root" with stub "ROOTHOME", then substitute it with
>> +real root home directory which is configured dymanically.
>> +
>> +Signed-off-by: Kang Kai<kai.kang@windriver.com>
>> +
>>   diff -ur oprofile-0.9.7.orig/doc/opcontrol.1.in oprofile-0.9.7/doc/opcontrol.1.in
>>   --- oprofile-0.9.7.orig/doc/opcontrol.1.in	2011-07-04 21:25:04.000000000 -0500
>>   +++ oprofile-0.9.7/doc/opcontrol.1.in	2012-07-02 14:02:16.358865420 -0500
>> @@ -12,7 +17,7 @@ diff -ur oprofile-0.9.7.orig/doc/opcontrol.1.in oprofile-0.9.7/doc/opcontrol.1.i
>>    .SH FILES
>>    .TP
>>   -.I /root/.oprofile/daemonrc
>> -+.I /home/root/.oprofile/daemonrc
>> ++.I ROOTHOME/.oprofile/daemonrc
>>    Configuration file for opcontrol
>>    .TP
>>    .I /var/lib/oprofile/samples/
>> @@ -24,7 +29,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.1 oprofile-0.9.7/doc/oprofile.1
>>    Configuration files
>>    .TP
>>   -.I /root/.oprofile/daemonrc
>> -+.I /home/root/.oprofile/daemonrc
>> ++.I ROOTHOME/.oprofile/daemonrc
>>    Configuration file for opcontrol
>>    .TP
>>    .I /opt/oprofile-0.9.7-rc3/share/oprofile/
>> @@ -36,7 +41,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.1.in oprofile-0.9.7/doc/oprofile.1.in
>>    Configuration files
>>    .TP
>>   -.I /root/.oprofile/daemonrc
>> -+.I /home/root/.oprofile/daemonrc
>> ++.I ROOTHOME/.oprofile/daemonrc
>>    Configuration file for opcontrol
>>    .TP
>>    .I @prefix@/share/oprofile/
>> @@ -48,7 +53,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.html oprofile-0.9.7/doc/oprofile.html
>>                    <p>
>>    		Followed by list arguments for profiling set up. List of arguments
>>   -		    saved in<code class="filename">/root/.oprofile/daemonrc</code>.
>> -+		    saved in<code class="filename">/home/root/.oprofile/daemonrc</code>.
>> ++		    saved in<code class="filename">ROOTHOME/.oprofile/daemonrc</code>.
>>    		    Giving this option is not necessary; you can just directly pass one
>>    		    of the setup options, e.g.<span class="command"><strong>opcontrol --no-vmlinux</strong></span>.
>>    		</p>
>> @@ -57,7 +62,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.html oprofile-0.9.7/doc/oprofile.html
>>                    <p>
>>    		Start data collection with either arguments provided by<code class="option">--setup</code>
>>   -		or information saved in<code class="filename">/root/.oprofile/daemonrc</code>. Specifying
>> -+		or information saved in<code class="filename">/home/root/.oprofile/daemonrc</code>. Specifying
>> ++		or information saved in<code class="filename">ROOTHOME/.oprofile/daemonrc</code>. Specifying
>>    		the addition<code class="option">--verbose</code>  makes the daemon generate lots of debug data
>>    		whilst it is running.
>>    		</p>
>> @@ -69,7 +74,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.xml oprofile-0.9.7/doc/oprofile.xml
>>    		<listitem><para>
>>    		Followed by list arguments for profiling set up. List of arguments
>>   -		    saved in<filename>/root/.oprofile/daemonrc</filename>.
>> -+		    saved in<filename>/home/root/.oprofile/daemonrc</filename>.
>> ++		    saved in<filename>ROOTHOME/.oprofile/daemonrc</filename>.
>>    		    Giving this option is not necessary; you can just directly pass one
>>    		    of the setup options, e.g.<command>opcontrol --no-vmlinux</command>.
>>    		</para></listitem>
>> @@ -78,7 +83,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.xml oprofile-0.9.7/doc/oprofile.xml
>>    		<listitem><para>
>>    		Start data collection with either arguments provided by<option>--setup</option>
>>   -		or information saved in<filename>/root/.oprofile/daemonrc</filename>. Specifying
>> -+		or information saved in<filename>/home/root/.oprofile/daemonrc</filename>. Specifying
>> ++		or information saved in<filename>ROOTHOME/.oprofile/daemonrc</filename>. Specifying
>>    		the addition<option>--verbose</option>  makes the daemon generate lots of debug data
>>    		whilst it is running.
>>    		</para></listitem>
>> @@ -90,7 +95,7 @@ diff -ur oprofile-0.9.7.orig/gui/oprof_start_util.cpp oprofile-0.9.7/gui/oprof_s
>>    string const get_config_dir()
>>    {
>>   -	return "/root";
>> -+	return "/home/root";
>> ++	return "ROOTHOME";
>>    }
>>
>>    string daemon_pid;
>> @@ -102,7 +107,7 @@ diff -ur oprofile-0.9.7.orig/utils/opcontrol oprofile-0.9.7/utils/opcontrol
>>
>>    	# location for daemon setup information
>>   -	SETUP_DIR="/root/.oprofile"
>> -+	SETUP_DIR="/home/root/.oprofile"
>> ++	SETUP_DIR="ROOTHOME/.oprofile"
>>    	SETUP_FILE="$SETUP_DIR/daemonrc"
>>    	SEC_SETUP_FILE="$SETUP_DIR/daemonrc_new"
>>
>> -- 
>> 1.7.5.4
>>
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 4/4] oprofile: use dynamic root home directory
  2012-12-20  1:44     ` Kang Kai
@ 2012-12-20  6:23       ` Kang Kai
  0 siblings, 0 replies; 8+ messages in thread
From: Kang Kai @ 2012-12-20  6:23 UTC (permalink / raw)
  To: Kang Kai; +Cc: openembedded-core, Martin Jansa, Zhenfeng.Zhao

On 2012年12月20日 09:44, Kang Kai wrote:
> On 2012年12月19日 19:06, Martin Jansa wrote:
>> On Wed, Dec 19, 2012 at 05:39:39PM +0800, Kang Kai wrote:
>>> Use stub "ROOTHOME" to replace "/home/root" in oprofile-root.patch, 
>>> then
>>> we can substitute it with configured root home directory.
>>>
>>> Signed-off-by: Kang Kai<kai.kang@windriver.com>
>>> ---
>>>   meta/recipes-kernel/oprofile/oprofile.inc          |    1 +
>>>   .../oprofile/oprofile/oprofile-root.patch          |   23 
>>> ++++++++++++-------
>>>   2 files changed, 15 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/meta/recipes-kernel/oprofile/oprofile.inc 
>>> b/meta/recipes-kernel/oprofile/oprofile.inc
>>> index b3ce852..0977065 100644
>>> --- a/meta/recipes-kernel/oprofile/oprofile.inc
>>> +++ b/meta/recipes-kernel/oprofile/oprofile.inc
>>> @@ -31,6 +31,7 @@ inherit autotools
>>>
>>>   EXTRA_OECONF = "--with-kernel-support --without-x"
>>>   do_configure () {
>>> +        find . -type f | xargs sed -i 's#ROOTHOME#${ROOT_HOME}#'
>>>       cp ${WORKDIR}/acinclude.m4 ${S}/
>>>       autotools_do_configure
>> You should use tab here.
>
> OK, thanks. I'll wait for others comments until this afternoon and 
> then send V2.

Because no other comments and this is tiny update, I just update it in 
the contribute branch on

http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/roothome

which also show in cover letter.

Regards,
Kai


>
> Regards,
> Kai
>
>>
>> Cheers,
>>
>>>   }
>>> diff --git 
>>> a/meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch 
>>> b/meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch
>>> index db63a8e..f3fe4c9 100644
>>> --- a/meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch
>>> +++ b/meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch
>>> @@ -4,6 +4,11 @@ Upstream-Status: inappropriate [OE specific]
>>>
>>>   Signed-off-by: Mark Hatle<mark.hatle@windriver.com>
>>>
>>> +Replace "/home/root" with stub "ROOTHOME", then substitute it with
>>> +real root home directory which is configured dymanically.
>>> +
>>> +Signed-off-by: Kang Kai<kai.kang@windriver.com>
>>> +
>>>   diff -ur oprofile-0.9.7.orig/doc/opcontrol.1.in 
>>> oprofile-0.9.7/doc/opcontrol.1.in
>>>   --- oprofile-0.9.7.orig/doc/opcontrol.1.in    2011-07-04 
>>> 21:25:04.000000000 -0500
>>>   +++ oprofile-0.9.7/doc/opcontrol.1.in    2012-07-02 
>>> 14:02:16.358865420 -0500
>>> @@ -12,7 +17,7 @@ diff -ur oprofile-0.9.7.orig/doc/opcontrol.1.in 
>>> oprofile-0.9.7/doc/opcontrol.1.i
>>>    .SH FILES
>>>    .TP
>>>   -.I /root/.oprofile/daemonrc
>>> -+.I /home/root/.oprofile/daemonrc
>>> ++.I ROOTHOME/.oprofile/daemonrc
>>>    Configuration file for opcontrol
>>>    .TP
>>>    .I /var/lib/oprofile/samples/
>>> @@ -24,7 +29,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.1 
>>> oprofile-0.9.7/doc/oprofile.1
>>>    Configuration files
>>>    .TP
>>>   -.I /root/.oprofile/daemonrc
>>> -+.I /home/root/.oprofile/daemonrc
>>> ++.I ROOTHOME/.oprofile/daemonrc
>>>    Configuration file for opcontrol
>>>    .TP
>>>    .I /opt/oprofile-0.9.7-rc3/share/oprofile/
>>> @@ -36,7 +41,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.1.in 
>>> oprofile-0.9.7/doc/oprofile.1.in
>>>    Configuration files
>>>    .TP
>>>   -.I /root/.oprofile/daemonrc
>>> -+.I /home/root/.oprofile/daemonrc
>>> ++.I ROOTHOME/.oprofile/daemonrc
>>>    Configuration file for opcontrol
>>>    .TP
>>>    .I @prefix@/share/oprofile/
>>> @@ -48,7 +53,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.html 
>>> oprofile-0.9.7/doc/oprofile.html
>>> <p>
>>>            Followed by list arguments for profiling set up. List of 
>>> arguments
>>>   -            saved in<code 
>>> class="filename">/root/.oprofile/daemonrc</code>.
>>> -+            saved in<code 
>>> class="filename">/home/root/.oprofile/daemonrc</code>.
>>> ++            saved in<code 
>>> class="filename">ROOTHOME/.oprofile/daemonrc</code>.
>>>                Giving this option is not necessary; you can just 
>>> directly pass one
>>>                of the setup options, e.g.<span 
>>> class="command"><strong>opcontrol --no-vmlinux</strong></span>.
>>> </p>
>>> @@ -57,7 +62,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.html 
>>> oprofile-0.9.7/doc/oprofile.html
>>> <p>
>>>            Start data collection with either arguments provided 
>>> by<code class="option">--setup</code>
>>>   -        or information saved in<code 
>>> class="filename">/root/.oprofile/daemonrc</code>. Specifying
>>> -+        or information saved in<code 
>>> class="filename">/home/root/.oprofile/daemonrc</code>. Specifying
>>> ++        or information saved in<code 
>>> class="filename">ROOTHOME/.oprofile/daemonrc</code>. Specifying
>>>            the addition<code class="option">--verbose</code>  makes 
>>> the daemon generate lots of debug data
>>>            whilst it is running.
>>> </p>
>>> @@ -69,7 +74,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.xml 
>>> oprofile-0.9.7/doc/oprofile.xml
>>> <listitem><para>
>>>            Followed by list arguments for profiling set up. List of 
>>> arguments
>>>   -            saved in<filename>/root/.oprofile/daemonrc</filename>.
>>> -+            saved 
>>> in<filename>/home/root/.oprofile/daemonrc</filename>.
>>> ++            saved in<filename>ROOTHOME/.oprofile/daemonrc</filename>.
>>>                Giving this option is not necessary; you can just 
>>> directly pass one
>>>                of the setup options, e.g.<command>opcontrol 
>>> --no-vmlinux</command>.
>>> </para></listitem>
>>> @@ -78,7 +83,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.xml 
>>> oprofile-0.9.7/doc/oprofile.xml
>>> <listitem><para>
>>>            Start data collection with either arguments provided 
>>> by<option>--setup</option>
>>>   -        or information saved 
>>> in<filename>/root/.oprofile/daemonrc</filename>. Specifying
>>> -+        or information saved 
>>> in<filename>/home/root/.oprofile/daemonrc</filename>. Specifying
>>> ++        or information saved 
>>> in<filename>ROOTHOME/.oprofile/daemonrc</filename>. Specifying
>>>            the addition<option>--verbose</option>  makes the daemon 
>>> generate lots of debug data
>>>            whilst it is running.
>>> </para></listitem>
>>> @@ -90,7 +95,7 @@ diff -ur 
>>> oprofile-0.9.7.orig/gui/oprof_start_util.cpp oprofile-0.9.7/gui/oprof_s
>>>    string const get_config_dir()
>>>    {
>>>   -    return "/root";
>>> -+    return "/home/root";
>>> ++    return "ROOTHOME";
>>>    }
>>>
>>>    string daemon_pid;
>>> @@ -102,7 +107,7 @@ diff -ur oprofile-0.9.7.orig/utils/opcontrol 
>>> oprofile-0.9.7/utils/opcontrol
>>>
>>>        # location for daemon setup information
>>>   -    SETUP_DIR="/root/.oprofile"
>>> -+    SETUP_DIR="/home/root/.oprofile"
>>> ++    SETUP_DIR="ROOTHOME/.oprofile"
>>>        SETUP_FILE="$SETUP_DIR/daemonrc"
>>>        SEC_SETUP_FILE="$SETUP_DIR/daemonrc_new"
>>>
>>> -- 
>>> 1.7.5.4
>>>
>>>
>>> _______________________________________________
>>> Openembedded-core mailing list
>>> Openembedded-core@lists.openembedded.org
>>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-12-20  6:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-19  9:39 [PATCH 0/4] Use dynamic root home directory Kang Kai
2012-12-19  9:39 ` [PATCH 1/4] bitbake.conf: import var ROOT_HOME Kang Kai
2012-12-19  9:39 ` [PATCH 2/4] base-files: use dynamic root home directory Kang Kai
2012-12-19  9:39 ` [PATCH 3/4] base-passwd: use configurable " Kang Kai
2012-12-19  9:39 ` [PATCH 4/4] oprofile: use dynamic " Kang Kai
2012-12-19 11:06   ` Martin Jansa
2012-12-20  1:44     ` Kang Kai
2012-12-20  6:23       ` Kang Kai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.