Openembedded Core Discussions
 help / color / mirror / Atom feed
* useradd changes to dbus, base-passwd
@ 2011-10-26  1:34 James Limbouris
  2011-10-26  3:37 ` James Limbouris
  0 siblings, 1 reply; 20+ messages in thread
From: James Limbouris @ 2011-10-26  1:34 UTC (permalink / raw)
  To: openembedded-core@lists.openembedded.org

Hi,

Recent changes to dbus have broken some sdk building:

Missing or unbuildable dependency chain was: ['meta-toolchain-qte', 'task-qte-toolchain-host-nativesdk', 'qt4-tools-nativesdk', 'dbus-nativesdk', 'base-passwd-nativesdk']

I think the commit introducing the base-passed dependency is 46e6c3fa8034b12d178d605f3f5d7efe69671a13 (dbus: use useradd class to allow use in read-only filesystems).
I'm not too clear on how useradd works, so I can't tell if simply adding BBCLASSEXTEND = "native nativesdk" to base-passwd is sufficient. I'd expect that this would cause dbus to add itself to the sdk sysroot's passwd (which previously didn't exist?). Seems harmless enough... I'm giving it a try now, but any advice or opinions would be appreciated.
  
Regards,
James Limbouris




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

* Re: useradd changes to dbus, base-passwd
  2011-10-26  1:34 useradd changes to dbus, base-passwd James Limbouris
@ 2011-10-26  3:37 ` James Limbouris
  2011-10-26 15:23   ` Mark Hatle
  0 siblings, 1 reply; 20+ messages in thread
From: James Limbouris @ 2011-10-26  3:37 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> James Limbouris
> Sent: Wednesday, 26 October 2011 9:35 AM
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] useradd changes to dbus, base-passwd
> 
> Hi,
> 
> Recent changes to dbus have broken some sdk building:
> 
> Missing or unbuildable dependency chain was: ['meta-toolchain-qte', 'task-qte-
> toolchain-host-nativesdk', 'qt4-tools-nativesdk', 'dbus-nativesdk', 'base-passwd-
> nativesdk']
> 
> I think the commit introducing the base-passed dependency is
> 46e6c3fa8034b12d178d605f3f5d7efe69671a13 (dbus: use useradd class to
> allow use in read-only filesystems).
> I'm not too clear on how useradd works, so I can't tell if simply adding
> BBCLASSEXTEND = "native nativesdk" to base-passwd is sufficient. I'd expect
> that this would cause dbus to add itself to the sdk sysroot's passwd (which
> previously didn't exist?). Seems harmless enough... I'm giving it a try now, but
> any advice or opinions would be appreciated.

It seems that adding BBCLASSEXTEND = "native nativesdk" to base-passwd and shadow-sysroot is not sufficient.
dbus itself will not build for nativesdk:

NOTE: package dbus-nativesdk-1.4.12-r1: task do_install: Started
ERROR: Function 'useradd_sysroot' failed (see /home/james/oe/build/tmp-eglibc/work/i686-nativesdk-ricasdk-linux/dbus-nativesdk-1.4.12-r1/temp/log.do_install.1735 for further information)
ERROR: Logfile of failure stored in: /home/james/oe/build/tmp-eglibc/work/i686-nativesdk-ricasdk-linux/dbus-nativesdk-1.4.12-r1/temp/log.do_install.1735
Log data follows:
| DEBUG: SITE files ['endian-little', 'bit-32', 'ix86-common', 'common-linux', 'common-glibc', 'i686-linux', 'common']
| + cd /home/james/oe/build/tmp-eglibc/work/i686-nativesdk-ricasdk-linux/dbus-nativesdk-1.4.12-r1/dbus-1.4.12
| + useradd_sysroot
| + export PSEUDO=/home/james/oe/build/tmp-eglibc/sysroots/i686-linux/usr/local/rica-eglibc-i686-armv5te/sysroots/i686-ricasdk-linux/usr/bin/pseudo
| + PSEUDO=/home/james/oe/build/tmp-eglibc/sysroots/i686-linux/usr/local/rica-eglibc-i686-armv5te/sysroots/i686-ricasdk-linux/usr/bin/pseudo
| + export PSEUDO_LOCALSTATEDIR=/home/james/oe/build/tmp-eglibc/sysroots/i686-nativesdk-ricasdk-linux/usr/local/rica-eglibc-i686-armv5te/sysroots/i686-ricasdk-linux/var/pseudo
| + PSEUDO_LOCALSTATEDIR=/home/james/oe/build/tmp-eglibc/sysroots/i686-nativesdk-ricasdk-linux/usr/local/rica-eglibc-i686-armv5te/sysroots/i686-ricasdk-linux/var/pseudo
| + D=/home/james/oe/build/tmp-eglibc/sysroots/i686-nativesdk-ricasdk-linux
| + useradd_preinst
| + OPT=
| + SYSROOT=
| + test x/home/james/oe/build/tmp-eglibc/sysroots/i686-nativesdk-ricasdk-linux '!=' x
| + SYSROOT=/home/james/oe/build/tmp-eglibc/sysroots/i686-nativesdk-ricasdk-linux
| + OPT='--root /home/james/oe/build/tmp-eglibc/sysroots/i686-nativesdk-ricasdk-linux'
| + GROUPADD_PARAM='-r netdev'
| + USERADD_PARAM='--system --home /usr/local/rica-eglibc-i686-armv5te/sysroots/i686-ricasdk-linux/var/lib/dbus                        --no-create-home --user-group messagebus'
| + test 'x-r netdev' '!=' x
| + echo 'Running groupadd commands...'
| Running groupadd commands...
| ++ echo '-r netdev'
| ++ cut -d ';' -f 1
| + opts='-r netdev'
| ++ echo '-r netdev'
| ++ cut -d ';' -f 2-
| + remaining='-r netdev'
| + test 'x-r netdev' '!=' x
| ++ echo '-r netdev'
| ++ awk '{ print $NF }'
| + groupname=netdev
| ++ grep '^netdev:' /home/james/oe/build/tmp-eglibc/sysroots/i686-nativesdk-ricasdk-linux/etc/group
| grep: /home/james/oe/build/tmp-eglibc/sysroots/i686-nativesdk-ricasdk-linux/etc/group: No such file or directory
| ++ true
| + group_exists=
| + test x = x
| + eval /home/james/oe/build/tmp-eglibc/sysroots/i686-linux/usr/local/rica-eglibc-i686-armv5te/sysroots/i686-ricasdk-linux/usr/bin/pseudo groupadd --root /home/james/oe/build/tmp-eglibc/sysroots/i686-nativesdk-ricasdk-linux -r netdev
| ++ /home/james/oe/build/tmp-eglibc/sysroots/i686-linux/usr/local/rica-eglibc-i686-armv5te/sysroots/i686-ricasdk-linux/usr/bin/pseudo groupadd --root /home/james/oe/build/tmp-eglibc/sysroots/i686-nativesdk-ricasdk-linux -r netdev
| /home/james/oe/build/tmp-eglibc/work/i686-nativesdk-ricasdk-linux/dbus-nativesdk-1.4.12-r1/temp/run.useradd_sysroot.1735: line 129: /home/james/oe/build/tmp-eglibc/sysroots/i686-linux/usr/local/rica-eglibc-i686-armv5te/sysroots/i686-ricasdk-linux/usr/bin/pseudo: No such file or directory
| ERROR: Function 'useradd_sysroot' failed (see /home/james/oe/build/tmp-eglibc/work/i686-nativesdk-ricasdk-linux/dbus-nativesdk-1.4.12-r1/temp/log.do_install.1735 for further information)
NOTE: package dbus-nativesdk-1.4.12-r1: task do_install: Failed
ERROR: Task 1370 (virtual:nativesdk:/home/james/oe/sources/oe-core/meta/recipes-core/dbus/dbus_1.4.12.bb, do_install) failed with exit code '1'

Perhaps we should not inherit useradd when building for nativesdk? After all, the sdk sysroots have not had /etc/passwd in the past.

James




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

* Re: useradd changes to dbus, base-passwd
  2011-10-26  3:37 ` James Limbouris
@ 2011-10-26 15:23   ` Mark Hatle
  2011-10-26 16:52     ` Scott Garman
  0 siblings, 1 reply; 20+ messages in thread
From: Mark Hatle @ 2011-10-26 15:23 UTC (permalink / raw)
  To: openembedded-core

On 10/25/11 10:37 PM, James Limbouris wrote:
>> -----Original Message-----
>> From: openembedded-core-bounces@lists.openembedded.org
>> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
>> James Limbouris
>> Sent: Wednesday, 26 October 2011 9:35 AM
>> To: openembedded-core@lists.openembedded.org
>> Subject: [OE-core] useradd changes to dbus, base-passwd
>>
>> Hi,
>>
>> Recent changes to dbus have broken some sdk building:
>>
>> Missing or unbuildable dependency chain was: ['meta-toolchain-qte', 'task-qte-
>> toolchain-host-nativesdk', 'qt4-tools-nativesdk', 'dbus-nativesdk', 'base-passwd-
>> nativesdk']
>>
>> I think the commit introducing the base-passed dependency is
>> 46e6c3fa8034b12d178d605f3f5d7efe69671a13 (dbus: use useradd class to
>> allow use in read-only filesystems).
>> I'm not too clear on how useradd works, so I can't tell if simply adding
>> BBCLASSEXTEND = "native nativesdk" to base-passwd is sufficient. I'd expect
>> that this would cause dbus to add itself to the sdk sysroot's passwd (which
>> previously didn't exist?). Seems harmless enough... I'm giving it a try now, but
>> any advice or opinions would be appreciated.
> 
> It seems that adding BBCLASSEXTEND = "native nativesdk" to base-passwd and shadow-sysroot is not sufficient.
> dbus itself will not build for nativesdk:
> 

...

> NOTE: package dbus-nativesdk-1.4.12-r1: task do_install: Failed
> ERROR: Task 1370 (virtual:nativesdk:/home/james/oe/sources/oe-core/meta/recipes-core/dbus/dbus_1.4.12.bb, do_install) failed with exit code '1'
> 
> Perhaps we should not inherit useradd when building for nativesdk? After all, the sdk sysroots have not had /etc/passwd in the past.

The useradd class should only be used in a target build.  Neither nativesdk or
native have a reasonable set of actions with useradd.

I am a bit confused as to why we are building dbus in a nativesdk situation.  I
would have thought that we'd be forced to use the host system's version of dbus
for compatibility sake.  Perhaps this is the root of the problem -- or I'm
mistaken and we do need to build it -- in that case we need to avoid including
useradd with non-target builds.

--Mark

> James
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core




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

* Re: useradd changes to dbus, base-passwd
  2011-10-26 15:23   ` Mark Hatle
@ 2011-10-26 16:52     ` Scott Garman
  2011-11-06 20:31       ` Eric Bénard
  0 siblings, 1 reply; 20+ messages in thread
From: Scott Garman @ 2011-10-26 16:52 UTC (permalink / raw)
  To: openembedded-core

On 10/26/2011 08:23 AM, Mark Hatle wrote:
> On 10/25/11 10:37 PM, James Limbouris wrote:
>>> -----Original Message-----
>>> From: openembedded-core-bounces@lists.openembedded.org
>>> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
>>> James Limbouris
>>> Sent: Wednesday, 26 October 2011 9:35 AM
>>> To: openembedded-core@lists.openembedded.org
>>> Subject: [OE-core] useradd changes to dbus, base-passwd
>>>
>>> Hi,
>>>
>>> Recent changes to dbus have broken some sdk building:
>>>
>>> Missing or unbuildable dependency chain was: ['meta-toolchain-qte', 'task-qte-
>>> toolchain-host-nativesdk', 'qt4-tools-nativesdk', 'dbus-nativesdk', 'base-passwd-
>>> nativesdk']
>>>
>>> I think the commit introducing the base-passed dependency is
>>> 46e6c3fa8034b12d178d605f3f5d7efe69671a13 (dbus: use useradd class to
>>> allow use in read-only filesystems).
>>> I'm not too clear on how useradd works, so I can't tell if simply adding
>>> BBCLASSEXTEND = "native nativesdk" to base-passwd is sufficient. I'd expect
>>> that this would cause dbus to add itself to the sdk sysroot's passwd (which
>>> previously didn't exist?). Seems harmless enough... I'm giving it a try now, but
>>> any advice or opinions would be appreciated.
>>
>> It seems that adding BBCLASSEXTEND = "native nativesdk" to base-passwd and shadow-sysroot is not sufficient.
>> dbus itself will not build for nativesdk:
>>
>
> ...
>
>> NOTE: package dbus-nativesdk-1.4.12-r1: task do_install: Failed
>> ERROR: Task 1370 (virtual:nativesdk:/home/james/oe/sources/oe-core/meta/recipes-core/dbus/dbus_1.4.12.bb, do_install) failed with exit code '1'
>>
>> Perhaps we should not inherit useradd when building for nativesdk? After all, the sdk sysroots have not had /etc/passwd in the past.
>
> The useradd class should only be used in a target build.  Neither nativesdk or
> native have a reasonable set of actions with useradd.
>
> I am a bit confused as to why we are building dbus in a nativesdk situation.  I
> would have thought that we'd be forced to use the host system's version of dbus
> for compatibility sake.  Perhaps this is the root of the problem -- or I'm
> mistaken and we do need to build it -- in that case we need to avoid including
> useradd with non-target builds.

Grepping through our classes, it looks like I can detect the nativesdk 
within useradd.bbclass by checking for 
bb.data.inherits_class('nativesdk', d).

I've filed a bug for this and will develop a patch to ensure useradd is 
becomes a no-op for nativesdk builds:

http://bugzilla.pokylinux.org/show_bug.cgi?id=1702

Thanks for reporting this!

Scott

-- 
Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center



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

* Re: useradd changes to dbus, base-passwd
  2011-10-26 16:52     ` Scott Garman
@ 2011-11-06 20:31       ` Eric Bénard
  2011-11-06 23:16         ` Scott Garman
  0 siblings, 1 reply; 20+ messages in thread
From: Eric Bénard @ 2011-11-06 20:31 UTC (permalink / raw)
  To: scott.a.garman; +Cc: Patches and discussions about the oe-core layer

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

Hi Scott,

Le 26/10/2011 18:52, Scott Garman a écrit :
> Grepping through our classes, it looks like I can detect the nativesdk within
> useradd.bbclass by checking for bb.data.inherits_class('nativesdk', d).
>
> I've filed a bug for this and will develop a patch to ensure useradd is
> becomes a no-op for nativesdk builds:
>
> http://bugzilla.pokylinux.org/show_bug.cgi?id=1702
>
here is a patch tentative which allowed me to compile meta-toolchain-qte.
Is that the right way to solve the problem (in which case I'll submit the 
patch with comment & sob)?

Thanks
Eric

[-- Attachment #2: fix_dbusnativesdk.patch --]
[-- Type: text/plain, Size: 2047 bytes --]

diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index fb70b3e..cbcc9e9 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -3,9 +3,16 @@ USERADDPN ?= "${PN}"
 # base-passwd-cross provides the default passwd and group files in the
 # target sysroot, and shadow -native and -sysroot provide the utilities
 # and support files needed to add and modify user and group accounts
-DEPENDS_append = " base-passwd shadow-native shadow-sysroot"
 RDEPENDS_${USERADDPN}_append = " base-passwd shadow"
 
+def useradd_dep_append(d):
+	deps = ' '
+	if not bb.data.inherits_class('nativesdk', d):
+		deps = ' shadow-native shadow-sysroot base-passwd'
+	return deps
+
+DEPENDS_append = "${@useradd_dep_append(d)}"
+
 # This preinstall function will be run in two contexts: once for the
 # native sysroot (as invoked by the useradd_sysroot() wrapper), and
 # also as the preinst script in the target package.
@@ -96,8 +103,17 @@ useradd_sysroot_sstate () {
 	fi
 }
 
-do_install[prefuncs] += "useradd_sysroot"
-SSTATEPOSTINSTFUNCS += "useradd_sysroot_sstate"
+
+python () {
+	if not bb.data.inherits_class('nativesdk', d):
+		funcs = bb.data.getVarFlag('do_install', 'prefuncs', d) or ""
+		funcs += 'useradd_sysroot'
+		bb.data.setVarFlag('do_install', 'prefuncs', funcs, d)
+		d.setVar('SSTATEPOSTINSTFUNCS', (bb.data.getVar('SSTATEPOSTINSTFUNCS', d, True) or "").join("useradd_sysroot_sstate"))
+}
+

 # Recipe parse-time sanity checks
 def update_useradd_after_parse(d):
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index caa781c..99b2fc7 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -105,4 +105,8 @@ do_install_virtclass-native() {
 	# dbus-glib-native and dbus-glib need this xml file
 	./bus/dbus-daemon --introspect > ${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
 }
+
+do_install_virtclass-nativesdk() {
+	autotools_do_install
+}
 BBCLASSEXTEND = "native nativesdk"

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

* Re: useradd changes to dbus, base-passwd
  2011-11-06 20:31       ` Eric Bénard
@ 2011-11-06 23:16         ` Scott Garman
  2011-11-07  8:36           ` Eric Bénard
  0 siblings, 1 reply; 20+ messages in thread
From: Scott Garman @ 2011-11-06 23:16 UTC (permalink / raw)
  To: Eric Bénard; +Cc: Patches and discussions about the oe-core layer

On 11/06/2011 12:31 PM, Eric Bénard wrote:
> Hi Scott,
>
> Le 26/10/2011 18:52, Scott Garman a écrit :
>> Grepping through our classes, it looks like I can detect the nativesdk
>> within
>> useradd.bbclass by checking for bb.data.inherits_class('nativesdk', d).
>>
>> I've filed a bug for this and will develop a patch to ensure useradd is
>> becomes a no-op for nativesdk builds:
>>
>> http://bugzilla.pokylinux.org/show_bug.cgi?id=1702
>>
> here is a patch tentative which allowed me to compile meta-toolchain-qte.
> Is that the right way to solve the problem (in which case I'll submit
> the patch with comment & sob)?

Hi Eric,

This looks good, thank you! Two questions though:

When I was testing my own variation of this fix out, I found that 
testing bb.data.inherits_class('nativesdk', d) did not work as I 
expected. It returned false for a recipe I was testing with that used 
BBCLASSEXTEND = "native nativesdk". So instead I was checking if PN 
ended with -nativesdk. Are you certain the inherits_class test works?

My second question is why the autotools_do_install is needed for the 
nativesdk case?

Thanks,

Scott

-- 
Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center



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

* Re: useradd changes to dbus, base-passwd
  2011-11-06 23:16         ` Scott Garman
@ 2011-11-07  8:36           ` Eric Bénard
  2011-11-07 18:24             ` Scott Garman
  0 siblings, 1 reply; 20+ messages in thread
From: Eric Bénard @ 2011-11-07  8:36 UTC (permalink / raw)
  To: Scott Garman; +Cc: Patches and discussions about the oe-core layer

Hi Scott,

Le 07/11/2011 00:16, Scott Garman a écrit :
> This looks good, thank you! Two questions though:
>
> When I was testing my own variation of this fix out, I found that testing
> bb.data.inherits_class('nativesdk', d) did not work as I expected. It returned
> false for a recipe I was testing with that used BBCLASSEXTEND = "native
> nativesdk". So instead I was checking if PN ended with -nativesdk. Are you
> certain the inherits_class test works?
>
this seems to work as expected in the present case :

$ grep BBCLASSEXTEND sources/openembedded-core/meta/recipes-core/dbus/dbus.inc
BBCLASSEXTEND = "native nativesdk"

$ bitbake dbus -e |grep ^DEPENDS=
DEPENDS="pkgconfig-native autoconf-native automake-native libtool-native 
libtool-cross gnu-config-native virtual/gettext gettext-native 
virtual/arm-angstrom-linux-gnueabi-gcc 
virtual/arm-angstrom-linux-gnueabi-compilerlibs virtual/libc  expat 
virtual/libintl virtual/libx11 libsm shadow-native shadow-sysroot base-passwd 
update-rc.d-native"

$ bitbake dbus-native -e |grep ^DEPENDS=
DEPENDS="pkgconfig-native autoconf-native automake-native libtool-native 
gnu-config-native gettext-minimal-native  expat-native virtual/libintl-native 
shadow-native shadow-sysroot base-passwd update-rc.d-native"

$ bitbake dbus-nativesdk -e |grep ^DEPENDS=
DEPENDS="pkgconfig-native autoconf-native automake-native libtool-native 
libtool-cross gnu-config-native virtual/gettext-nativesdk gettext-native 
virtual/i686-angstromsdk-linux-gcc-crosssdk 
virtual/i686-angstromsdk-linux-compilerlibs-nativesdk virtual/libc-nativesdk 
expat-nativesdk virtual/libintl-nativesdk virtual/libx11-nativesdk 
update-rc.d-native"

$ bitbake dbus-nativesdk -e |grep ^SSTATEPOSTIN
$ bitbake dbus-native -e |grep ^SSTATEPOSTIN
SSTATEPOSTINSTFUNCS="useradd_sysroot_sstate"
$ bitbake dbus -e |grep ^SSTATEPOSTIN
SSTATEPOSTINSTFUNCS="useradd_sysroot_sstate"


> My second question is why the autotools_do_install is needed for the nativesdk
> case?
>
because without the do_install_virtclass-nativesdk() , that's the standard 
do_install which is used which tries to setup some rigths using chown on the 
files and that fails (and is not very useful for a nativesdk).
Maybe we could use a similar do_install as the one used for native.

Eric



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

* Re: useradd changes to dbus, base-passwd
  2011-11-07  8:36           ` Eric Bénard
@ 2011-11-07 18:24             ` Scott Garman
  2011-11-07 21:11               ` [PATCH 1/2] useradd.bbclass: handle nativesdk case Eric Bénard
  0 siblings, 1 reply; 20+ messages in thread
From: Scott Garman @ 2011-11-07 18:24 UTC (permalink / raw)
  To: Eric Bénard; +Cc: Patches and discussions about the oe-core layer

On 11/07/2011 12:36 AM, Eric Bénard wrote:
> Hi Scott,
>
> Le 07/11/2011 00:16, Scott Garman a écrit :
>> This looks good, thank you! Two questions though:
>>
>> When I was testing my own variation of this fix out, I found that testing
>> bb.data.inherits_class('nativesdk', d) did not work as I expected. It
>> returned
>> false for a recipe I was testing with that used BBCLASSEXTEND = "native
>> nativesdk". So instead I was checking if PN ended with -nativesdk. Are
>> you
>> certain the inherits_class test works?
>>
> this seems to work as expected in the present case :
>
> $ grep BBCLASSEXTEND
> sources/openembedded-core/meta/recipes-core/dbus/dbus.inc
> BBCLASSEXTEND = "native nativesdk"
>
> $ bitbake dbus -e |grep ^DEPENDS=
> DEPENDS="pkgconfig-native autoconf-native automake-native libtool-native
> libtool-cross gnu-config-native virtual/gettext gettext-native
> virtual/arm-angstrom-linux-gnueabi-gcc
> virtual/arm-angstrom-linux-gnueabi-compilerlibs virtual/libc expat
> virtual/libintl virtual/libx11 libsm shadow-native shadow-sysroot
> base-passwd update-rc.d-native"
>
> $ bitbake dbus-native -e |grep ^DEPENDS=
> DEPENDS="pkgconfig-native autoconf-native automake-native libtool-native
> gnu-config-native gettext-minimal-native expat-native
> virtual/libintl-native shadow-native shadow-sysroot base-passwd
> update-rc.d-native"
>
> $ bitbake dbus-nativesdk -e |grep ^DEPENDS=
> DEPENDS="pkgconfig-native autoconf-native automake-native libtool-native
> libtool-cross gnu-config-native virtual/gettext-nativesdk gettext-native
> virtual/i686-angstromsdk-linux-gcc-crosssdk
> virtual/i686-angstromsdk-linux-compilerlibs-nativesdk
> virtual/libc-nativesdk expat-nativesdk virtual/libintl-nativesdk
> virtual/libx11-nativesdk update-rc.d-native"
>
> $ bitbake dbus-nativesdk -e |grep ^SSTATEPOSTIN
> $ bitbake dbus-native -e |grep ^SSTATEPOSTIN
> SSTATEPOSTINSTFUNCS="useradd_sysroot_sstate"
> $ bitbake dbus -e |grep ^SSTATEPOSTIN
> SSTATEPOSTINSTFUNCS="useradd_sysroot_sstate"
>
>
>> My second question is why the autotools_do_install is needed for the
>> nativesdk
>> case?
>>
> because without the do_install_virtclass-nativesdk() , that's the
> standard do_install which is used which tries to setup some rigths using
> chown on the files and that fails (and is not very useful for a nativesdk).
> Maybe we could use a similar do_install as the one used for native.

Thanks for the explanation and verifying the inherit_class call.

I'm happy to ack a patch for this, please submit it.

Thanks!

Scott

-- 
Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center



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

* [PATCH 1/2] useradd.bbclass: handle nativesdk case
  2011-11-07 18:24             ` Scott Garman
@ 2011-11-07 21:11               ` Eric Bénard
  2011-11-07 21:11                 ` [PATCH 2/2] dbus: fix install for virtclass-nativesdk Eric Bénard
                                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Eric Bénard @ 2011-11-07 21:11 UTC (permalink / raw)
  To: openembedded-core

* without this patch, building dbus-nativesdk leads to a missing
dependency on 'base-passwd-nativesdk'
This was added by commit 46e6c3fa8034b12d178d605f3f5d7efe69671a13
* this patch handle the nativesdk case in the class useradd
* close bug 1702 http://bugzilla.pokylinux.org/show_bug.cgi?id=1702

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 meta/classes/useradd.bbclass |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index fb70b3e..b935d01 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -3,9 +3,16 @@ USERADDPN ?= "${PN}"
 # base-passwd-cross provides the default passwd and group files in the
 # target sysroot, and shadow -native and -sysroot provide the utilities
 # and support files needed to add and modify user and group accounts
-DEPENDS_append = " base-passwd shadow-native shadow-sysroot"
 RDEPENDS_${USERADDPN}_append = " base-passwd shadow"
 
+def useradd_dep_append(d):
+	deps = ' '
+	if not bb.data.inherits_class('nativesdk', d):
+		deps = ' shadow-native shadow-sysroot base-passwd'
+	return deps
+
+DEPENDS_append = "${@useradd_dep_append(d)}"
+
 # This preinstall function will be run in two contexts: once for the
 # native sysroot (as invoked by the useradd_sysroot() wrapper), and
 # also as the preinst script in the target package.
@@ -96,8 +103,13 @@ useradd_sysroot_sstate () {
 	fi
 }
 
-do_install[prefuncs] += "useradd_sysroot"
-SSTATEPOSTINSTFUNCS += "useradd_sysroot_sstate"
+python () {
+	if not bb.data.inherits_class('nativesdk', d):
+		funcs = bb.data.getVarFlag('do_install', 'prefuncs', d) or ""
+		funcs += 'useradd_sysroot'
+		bb.data.setVarFlag('do_install', 'prefuncs', funcs, d)
+		d.setVar('SSTATEPOSTINSTFUNCS', (bb.data.getVar('SSTATEPOSTINSTFUNCS', d, True) or "").join("useradd_sysroot_sstate"))
+}
 
 # Recipe parse-time sanity checks
 def update_useradd_after_parse(d):
-- 
1.7.6.4




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

* [PATCH 2/2] dbus: fix install for virtclass-nativesdk
  2011-11-07 21:11               ` [PATCH 1/2] useradd.bbclass: handle nativesdk case Eric Bénard
@ 2011-11-07 21:11                 ` Eric Bénard
  2011-11-07 21:32                   ` Scott Garman
  2011-11-07 21:32                 ` [PATCH 1/2] useradd.bbclass: handle nativesdk case Scott Garman
  2011-11-07 23:47                 ` Scott Garman
  2 siblings, 1 reply; 20+ messages in thread
From: Eric Bénard @ 2011-11-07 21:11 UTC (permalink / raw)
  To: openembedded-core

* 46e6c3fa8034b12d178d605f3f5d7efe69671a13 changed do_install
which now fails for nativesdk (chown messagebus leads to no
such user)
* tested by building meta-toolchain-qte and running the generated
sdk

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 meta/recipes-core/dbus/dbus.inc |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index caa781c..99b2fc7 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -105,4 +105,8 @@ do_install_virtclass-native() {
 	# dbus-glib-native and dbus-glib need this xml file
 	./bus/dbus-daemon --introspect > ${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
 }
+
+do_install_virtclass-nativesdk() {
+	autotools_do_install
+}
 BBCLASSEXTEND = "native nativesdk"
-- 
1.7.6.4




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

* Re: [PATCH 1/2] useradd.bbclass: handle nativesdk case
  2011-11-07 21:11               ` [PATCH 1/2] useradd.bbclass: handle nativesdk case Eric Bénard
  2011-11-07 21:11                 ` [PATCH 2/2] dbus: fix install for virtclass-nativesdk Eric Bénard
@ 2011-11-07 21:32                 ` Scott Garman
  2011-11-07 23:47                 ` Scott Garman
  2 siblings, 0 replies; 20+ messages in thread
From: Scott Garman @ 2011-11-07 21:32 UTC (permalink / raw)
  To: openembedded-core

On 11/07/2011 01:11 PM, Eric Bénard wrote:
> * without this patch, building dbus-nativesdk leads to a missing
> dependency on 'base-passwd-nativesdk'
> This was added by commit 46e6c3fa8034b12d178d605f3f5d7efe69671a13
> * this patch handle the nativesdk case in the class useradd
> * close bug 1702 http://bugzilla.pokylinux.org/show_bug.cgi?id=1702
>
> Signed-off-by: Eric Bénard<eric@eukrea.com>

Acked-by: Scott Garman <scott.a.garman@intel.com>

> ---
>   meta/classes/useradd.bbclass |   18 +++++++++++++++---
>   1 files changed, 15 insertions(+), 3 deletions(-)
>
> diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
> index fb70b3e..b935d01 100644
> --- a/meta/classes/useradd.bbclass
> +++ b/meta/classes/useradd.bbclass
> @@ -3,9 +3,16 @@ USERADDPN ?= "${PN}"
>   # base-passwd-cross provides the default passwd and group files in the
>   # target sysroot, and shadow -native and -sysroot provide the utilities
>   # and support files needed to add and modify user and group accounts
> -DEPENDS_append = " base-passwd shadow-native shadow-sysroot"
>   RDEPENDS_${USERADDPN}_append = " base-passwd shadow"
>
> +def useradd_dep_append(d):
> +	deps = ' '
> +	if not bb.data.inherits_class('nativesdk', d):
> +		deps = ' shadow-native shadow-sysroot base-passwd'
> +	return deps
> +
> +DEPENDS_append = "${@useradd_dep_append(d)}"
> +
>   # This preinstall function will be run in two contexts: once for the
>   # native sysroot (as invoked by the useradd_sysroot() wrapper), and
>   # also as the preinst script in the target package.
> @@ -96,8 +103,13 @@ useradd_sysroot_sstate () {
>   	fi
>   }
>
> -do_install[prefuncs] += "useradd_sysroot"
> -SSTATEPOSTINSTFUNCS += "useradd_sysroot_sstate"
> +python () {
> +	if not bb.data.inherits_class('nativesdk', d):
> +		funcs = bb.data.getVarFlag('do_install', 'prefuncs', d) or ""
> +		funcs += 'useradd_sysroot'
> +		bb.data.setVarFlag('do_install', 'prefuncs', funcs, d)
> +		d.setVar('SSTATEPOSTINSTFUNCS', (bb.data.getVar('SSTATEPOSTINSTFUNCS', d, True) or "").join("useradd_sysroot_sstate"))
> +}
>
>   # Recipe parse-time sanity checks
>   def update_useradd_after_parse(d):


-- 
Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center



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

* Re: [PATCH 2/2] dbus: fix install for virtclass-nativesdk
  2011-11-07 21:11                 ` [PATCH 2/2] dbus: fix install for virtclass-nativesdk Eric Bénard
@ 2011-11-07 21:32                   ` Scott Garman
  0 siblings, 0 replies; 20+ messages in thread
From: Scott Garman @ 2011-11-07 21:32 UTC (permalink / raw)
  To: openembedded-core

On 11/07/2011 01:11 PM, Eric Bénard wrote:
> * 46e6c3fa8034b12d178d605f3f5d7efe69671a13 changed do_install
> which now fails for nativesdk (chown messagebus leads to no
> such user)
> * tested by building meta-toolchain-qte and running the generated
> sdk
>
> Signed-off-by: Eric Bénard<eric@eukrea.com>

Acked-by: Scott Garman <scott.a.garman@intel.com>

> ---
>   meta/recipes-core/dbus/dbus.inc |    4 ++++
>   1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
> index caa781c..99b2fc7 100644
> --- a/meta/recipes-core/dbus/dbus.inc
> +++ b/meta/recipes-core/dbus/dbus.inc
> @@ -105,4 +105,8 @@ do_install_virtclass-native() {
>   	# dbus-glib-native and dbus-glib need this xml file
>   	./bus/dbus-daemon --introspect>  ${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
>   }
> +
> +do_install_virtclass-nativesdk() {
> +	autotools_do_install
> +}
>   BBCLASSEXTEND = "native nativesdk"


-- 
Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center



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

* Re: [PATCH 1/2] useradd.bbclass: handle nativesdk case
  2011-11-07 21:11               ` [PATCH 1/2] useradd.bbclass: handle nativesdk case Eric Bénard
  2011-11-07 21:11                 ` [PATCH 2/2] dbus: fix install for virtclass-nativesdk Eric Bénard
  2011-11-07 21:32                 ` [PATCH 1/2] useradd.bbclass: handle nativesdk case Scott Garman
@ 2011-11-07 23:47                 ` Scott Garman
  2011-11-08  8:41                   ` Eric Bénard
  2011-11-08  8:45                   ` [PATCH 1/2] " Eric Bénard
  2 siblings, 2 replies; 20+ messages in thread
From: Scott Garman @ 2011-11-07 23:47 UTC (permalink / raw)
  To: openembedded-core

Hi Eric,

Sorry to throw more churn into this, but can I ask you to submit a new 
pull request for this?

In discussions with Richard today, he pointed out a few tricks that 
would improve the patchset:

DEPENDS_append = "${USERADDDEPENDS}"
USERADDDEPENDS = " base-passwd shadow-native shadow-sysroot"
USERADDDEPENDS_virtclass-nativesdk = ""

do_install[prefuncs] += "${SYSROOTFUNC}"
SYSROOTFUNC = "useradd_sysroot"
SYSROOTFUNC_virtclass-nativesdk = ""

I didn't want to take away credit for your patch, so if you'd be willing 
to make these changes and respin your patch set, we'll take that.

The second thing is to avoid merge conflicts, can you rebase you 
patchset on top of this branch:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=sgarman/useradd-rdepends-final

...and Saul has been warned to apply these patches in the correct order.

Thanks,

Scott

PS - if this is a hassle, just let me know and I'm happy to take care of it.

-- 
Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center



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

* [PATCH 1/2] useradd.bbclass: handle nativesdk case
  2011-11-07 23:47                 ` Scott Garman
@ 2011-11-08  8:41                   ` Eric Bénard
  2011-11-08  8:41                     ` [PATCH 2/2] dbus: fix install for virtclass-nativesdk Eric Bénard
  2011-11-08 14:11                     ` [PATCH 1/2] useradd.bbclass: handle nativesdk case Richard Purdie
  2011-11-08  8:45                   ` [PATCH 1/2] " Eric Bénard
  1 sibling, 2 replies; 20+ messages in thread
From: Eric Bénard @ 2011-11-08  8:41 UTC (permalink / raw)
  To: openembedded-core; +Cc: Scott Garman

* without this patch, building dbus-nativesdk leads to a missing
dependency on 'base-passwd-nativesdk'
This was added by commit 46e6c3fa8034b12d178d605f3f5d7efe69671a13
* this patch handle the nativesdk case in the class useradd
* close bug 1702 http://bugzilla.pokylinux.org/show_bug.cgi?id=1702
* v2 from Scott Garman with Richard Purdie's tricks

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
---
 meta/classes/useradd.bbclass |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index 0f9b84c..6c933e1 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -3,7 +3,9 @@ USERADDPN ?= "${PN}"
 # base-passwd-cross provides the default passwd and group files in the
 # target sysroot, and shadow -native and -sysroot provide the utilities
 # and support files needed to add and modify user and group accounts
-DEPENDS_append = " base-passwd shadow-native shadow-sysroot"
+DEPENDS_append = "${USERADDDEPENDS}"
+USERADDDEPENDS = " base-passwd shadow-native shadow-sysroot"
+USERADDDEPENDS_virtclass-nativesdk = ""
 
 # This preinstall function will be run in two contexts: once for the
 # native sysroot (as invoked by the useradd_sysroot() wrapper), and
@@ -95,8 +97,9 @@ useradd_sysroot_sstate () {
 	fi
 }
 
-do_install[prefuncs] += "useradd_sysroot"
-SSTATEPOSTINSTFUNCS += "useradd_sysroot_sstate"
+do_install[prefuncs] += "${SYSROOTFUNC}"
+SYSROOTFUNC = "useradd_sysroot"
+SYSROOTFUNC_virtclass-nativesdk = ""
 
 # Recipe parse-time sanity checks
 def update_useradd_after_parse(d):
-- 
1.7.6.4




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

* [PATCH 2/2] dbus: fix install for virtclass-nativesdk
  2011-11-08  8:41                   ` Eric Bénard
@ 2011-11-08  8:41                     ` Eric Bénard
  2011-11-08 14:19                       ` Richard Purdie
  2011-11-08 14:11                     ` [PATCH 1/2] useradd.bbclass: handle nativesdk case Richard Purdie
  1 sibling, 1 reply; 20+ messages in thread
From: Eric Bénard @ 2011-11-08  8:41 UTC (permalink / raw)
  To: openembedded-core

* 46e6c3fa8034b12d178d605f3f5d7efe69671a13 changed do_install
which now fails for nativesdk (chown messagebus leads to no
such user)
* tested by building meta-toolchain-qte and running the generated
sdk

Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Scott Garman <scott.a.garman@intel.com>
---
 meta/recipes-core/dbus/dbus.inc |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index caa781c..99b2fc7 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -105,4 +105,8 @@ do_install_virtclass-native() {
 	# dbus-glib-native and dbus-glib need this xml file
 	./bus/dbus-daemon --introspect > ${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
 }
+
+do_install_virtclass-nativesdk() {
+	autotools_do_install
+}
 BBCLASSEXTEND = "native nativesdk"
-- 
1.7.6.4




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

* Re: [PATCH 1/2] useradd.bbclass: handle nativesdk case
  2011-11-07 23:47                 ` Scott Garman
  2011-11-08  8:41                   ` Eric Bénard
@ 2011-11-08  8:45                   ` Eric Bénard
  1 sibling, 0 replies; 20+ messages in thread
From: Eric Bénard @ 2011-11-08  8:45 UTC (permalink / raw)
  To: Scott Garman; +Cc: openembedded-core

Hi Scott,

Le 08/11/2011 00:47, Scott Garman a écrit :
> Sorry to throw more churn into this, but can I ask you to submit a new pull
> request for this?
>
> In discussions with Richard today, he pointed out a few tricks that would
> improve the patchset:
>
> DEPENDS_append = "${USERADDDEPENDS}"
> USERADDDEPENDS = " base-passwd shadow-native shadow-sysroot"
> USERADDDEPENDS_virtclass-nativesdk = ""
>
> do_install[prefuncs] += "${SYSROOTFUNC}"
> SYSROOTFUNC = "useradd_sysroot"
> SYSROOTFUNC_virtclass-nativesdk = ""
>
that's clean it removes all the python code and ... that works !

> I didn't want to take away credit for your patch, so if you'd be willing to
> make these changes and respin your patch set, we'll take that.
>
well now you have written v2 of the patch so you also get the credits but the 
most important thing beyond the credits is to have this bug fixed ;-)

> The second thing is to avoid merge conflicts, can you rebase you patchset on
> top of this branch:
>
> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=sgarman/useradd-rdepends-final
>
>
I just applied this patch and resent the 2 others on top of this one.

Thanks,
Eric



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

* Re: [PATCH 1/2] useradd.bbclass: handle nativesdk case
  2011-11-08  8:41                   ` Eric Bénard
  2011-11-08  8:41                     ` [PATCH 2/2] dbus: fix install for virtclass-nativesdk Eric Bénard
@ 2011-11-08 14:11                     ` Richard Purdie
  2011-11-08 15:46                       ` [PATCH] " Eric Bénard
  1 sibling, 1 reply; 20+ messages in thread
From: Richard Purdie @ 2011-11-08 14:11 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Scott Garman

On Tue, 2011-11-08 at 09:41 +0100, Eric Bénard wrote:
> * without this patch, building dbus-nativesdk leads to a missing
> dependency on 'base-passwd-nativesdk'
> This was added by commit 46e6c3fa8034b12d178d605f3f5d7efe69671a13
> * this patch handle the nativesdk case in the class useradd
> * close bug 1702 http://bugzilla.pokylinux.org/show_bug.cgi?id=1702
> * v2 from Scott Garman with Richard Purdie's tricks
> 
> Signed-off-by: Eric Bénard <eric@eukrea.com>
> Signed-off-by: Scott Garman <scott.a.garman@intel.com>
> ---
>  meta/classes/useradd.bbclass |    9 ++++++---
>  1 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
> index 0f9b84c..6c933e1 100644
> --- a/meta/classes/useradd.bbclass
> +++ b/meta/classes/useradd.bbclass
> @@ -3,7 +3,9 @@ USERADDPN ?= "${PN}"
>  # base-passwd-cross provides the default passwd and group files in the
>  # target sysroot, and shadow -native and -sysroot provide the utilities
>  # and support files needed to add and modify user and group accounts
> -DEPENDS_append = " base-passwd shadow-native shadow-sysroot"
> +DEPENDS_append = "${USERADDDEPENDS}"
> +USERADDDEPENDS = " base-passwd shadow-native shadow-sysroot"
> +USERADDDEPENDS_virtclass-nativesdk = ""
>  
>  # This preinstall function will be run in two contexts: once for the
>  # native sysroot (as invoked by the useradd_sysroot() wrapper), and
> @@ -95,8 +97,9 @@ useradd_sysroot_sstate () {
>  	fi
>  }
>  
> -do_install[prefuncs] += "useradd_sysroot"
> -SSTATEPOSTINSTFUNCS += "useradd_sysroot_sstate"
> +do_install[prefuncs] += "${SYSROOTFUNC}"
> +SYSROOTFUNC = "useradd_sysroot"
> +SYSROOTFUNC_virtclass-nativesdk = ""

Nearly but you're missing a:

SSTATEPOSTINSTFUNCS += "${SYSROOTPOSTFUNC}"
SYSROOTPOSTFUNC = "useradd_sysroot_sstate"
SYSROOTPOSTFUNC_virtclass-nativesdk = ""

Cheers,

Richard




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

* Re: [PATCH 2/2] dbus: fix install for virtclass-nativesdk
  2011-11-08  8:41                     ` [PATCH 2/2] dbus: fix install for virtclass-nativesdk Eric Bénard
@ 2011-11-08 14:19                       ` Richard Purdie
  0 siblings, 0 replies; 20+ messages in thread
From: Richard Purdie @ 2011-11-08 14:19 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Tue, 2011-11-08 at 09:41 +0100, Eric Bénard wrote:
> * 46e6c3fa8034b12d178d605f3f5d7efe69671a13 changed do_install
> which now fails for nativesdk (chown messagebus leads to no
> such user)
> * tested by building meta-toolchain-qte and running the generated
> sdk
> 
> Signed-off-by: Eric Bénard <eric@eukrea.com>
> Acked-by: Scott Garman <scott.a.garman@intel.com>
> ---
>  meta/recipes-core/dbus/dbus.inc |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
> index caa781c..99b2fc7 100644
> --- a/meta/recipes-core/dbus/dbus.inc
> +++ b/meta/recipes-core/dbus/dbus.inc
> @@ -105,4 +105,8 @@ do_install_virtclass-native() {
>  	# dbus-glib-native and dbus-glib need this xml file
>  	./bus/dbus-daemon --introspect > ${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
>  }
> +
> +do_install_virtclass-nativesdk() {
> +	autotools_do_install
> +}
>  BBCLASSEXTEND = "native nativesdk"

I've merged this piece to master, thanks.

Richard




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

* [PATCH] useradd.bbclass: handle nativesdk case
  2011-11-08 14:11                     ` [PATCH 1/2] useradd.bbclass: handle nativesdk case Richard Purdie
@ 2011-11-08 15:46                       ` Eric Bénard
  2011-11-08 16:30                         ` Richard Purdie
  0 siblings, 1 reply; 20+ messages in thread
From: Eric Bénard @ 2011-11-08 15:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: Scott Garman

* without this patch, building dbus-nativesdk leads to a missing
dependency on 'base-passwd-nativesdk'
This was added by commit 46e6c3fa8034b12d178d605f3f5d7efe69671a13
* this patch handle the nativesdk case in the class useradd
* close bug 1702 http://bugzilla.pokylinux.org/show_bug.cgi?id=1702
* v2 from Scott Garman with Richard Purdie's tricks

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
---
 meta/classes/useradd.bbclass |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index 0f9b84c..a8a1c14 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -3,7 +3,9 @@ USERADDPN ?= "${PN}"
 # base-passwd-cross provides the default passwd and group files in the
 # target sysroot, and shadow -native and -sysroot provide the utilities
 # and support files needed to add and modify user and group accounts
-DEPENDS_append = " base-passwd shadow-native shadow-sysroot"
+DEPENDS_append = "${USERADDDEPENDS}"
+USERADDDEPENDS = " base-passwd shadow-native shadow-sysroot"
+USERADDDEPENDS_virtclass-nativesdk = ""
 
 # This preinstall function will be run in two contexts: once for the
 # native sysroot (as invoked by the useradd_sysroot() wrapper), and
@@ -95,8 +97,12 @@ useradd_sysroot_sstate () {
 	fi
 }
 
-do_install[prefuncs] += "useradd_sysroot"
-SSTATEPOSTINSTFUNCS += "useradd_sysroot_sstate"
+do_install[prefuncs] += "${SYSROOTFUNC}"
+SYSROOTFUNC = "useradd_sysroot"
+SYSROOTFUNC_virtclass-nativesdk = ""
+SSTATEPOSTINSTFUNCS += "${SYSROOTPOSTFUNC}"
+SYSROOTPOSTFUNC = "useradd_sysroot_sstate"
+SYSROOTPOSTFUNC_virtclass-nativesdk = ""
 
 # Recipe parse-time sanity checks
 def update_useradd_after_parse(d):
-- 
1.7.6.4




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

* Re: [PATCH] useradd.bbclass: handle nativesdk case
  2011-11-08 15:46                       ` [PATCH] " Eric Bénard
@ 2011-11-08 16:30                         ` Richard Purdie
  0 siblings, 0 replies; 20+ messages in thread
From: Richard Purdie @ 2011-11-08 16:30 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Scott Garman

On Tue, 2011-11-08 at 16:46 +0100, Eric Bénard wrote:
> * without this patch, building dbus-nativesdk leads to a missing
> dependency on 'base-passwd-nativesdk'
> This was added by commit 46e6c3fa8034b12d178d605f3f5d7efe69671a13
> * this patch handle the nativesdk case in the class useradd
> * close bug 1702 http://bugzilla.pokylinux.org/show_bug.cgi?id=1702
> * v2 from Scott Garman with Richard Purdie's tricks
> 
> Signed-off-by: Eric Bénard <eric@eukrea.com>
> Signed-off-by: Scott Garman <scott.a.garman@intel.com>
> ---
>  meta/classes/useradd.bbclass |   12 +++++++++---
>  1 files changed, 9 insertions(+), 3 deletions(-)

Merged to master, thanks.

Richard




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

end of thread, other threads:[~2011-11-08 16:36 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-26  1:34 useradd changes to dbus, base-passwd James Limbouris
2011-10-26  3:37 ` James Limbouris
2011-10-26 15:23   ` Mark Hatle
2011-10-26 16:52     ` Scott Garman
2011-11-06 20:31       ` Eric Bénard
2011-11-06 23:16         ` Scott Garman
2011-11-07  8:36           ` Eric Bénard
2011-11-07 18:24             ` Scott Garman
2011-11-07 21:11               ` [PATCH 1/2] useradd.bbclass: handle nativesdk case Eric Bénard
2011-11-07 21:11                 ` [PATCH 2/2] dbus: fix install for virtclass-nativesdk Eric Bénard
2011-11-07 21:32                   ` Scott Garman
2011-11-07 21:32                 ` [PATCH 1/2] useradd.bbclass: handle nativesdk case Scott Garman
2011-11-07 23:47                 ` Scott Garman
2011-11-08  8:41                   ` Eric Bénard
2011-11-08  8:41                     ` [PATCH 2/2] dbus: fix install for virtclass-nativesdk Eric Bénard
2011-11-08 14:19                       ` Richard Purdie
2011-11-08 14:11                     ` [PATCH 1/2] useradd.bbclass: handle nativesdk case Richard Purdie
2011-11-08 15:46                       ` [PATCH] " Eric Bénard
2011-11-08 16:30                         ` Richard Purdie
2011-11-08  8:45                   ` [PATCH 1/2] " Eric Bénard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox