Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] useradd.bbclass: fix how RDEPENDS is setup
@ 2011-11-06 19:31 Scott Garman
  2011-11-06 19:31 ` [PATCH 1/1] " Scott Garman
  0 siblings, 1 reply; 9+ messages in thread
From: Scott Garman @ 2011-11-06 19:31 UTC (permalink / raw)
  To: openembedded-core

Fix bug where only packages named PN included base-passwd in
RDEPENDS. Also remove shadow requirement, since some targets
do not use shadow and file ownership can be changed with only
passwd/group entries.
    
This fixes [YOCTO #1727]

The following changes since commit e3c003282afb93ec52882496400b042620ab00ef:

  rt-tests: update to 0.83 (2011-11-04 15:43:19 +0000)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib sgarman/useradd-rdepends-final
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=sgarman/useradd-rdepends-final

Scott Garman (1):
  useradd.bbclass: fix how RDEPENDS is setup

 meta/classes/useradd.bbclass |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

-- 
1.7.5.4




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

* [PATCH 1/1] useradd.bbclass: fix how RDEPENDS is setup
  2011-11-06 19:31 [PATCH 0/1] useradd.bbclass: fix how RDEPENDS is setup Scott Garman
@ 2011-11-06 19:31 ` Scott Garman
  2011-11-06 20:25   ` Phil Blundell
  0 siblings, 1 reply; 9+ messages in thread
From: Scott Garman @ 2011-11-06 19:31 UTC (permalink / raw)
  To: openembedded-core

Fix bug where only packages named PN included base-passwd in
RDEPENDS. Also remove shadow requirement, since some targets
do not use shadow and file ownership can be changed with only
passwd/group entries.

This fixes [YOCTO #1727]

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
---
 meta/classes/useradd.bbclass |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index fb70b3e..12d7586 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -4,7 +4,6 @@ USERADDPN ?= "${PN}"
 # 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"
 
 # This preinstall function will be run in two contexts: once for the
 # native sysroot (as invoked by the useradd_sysroot() wrapper), and
@@ -147,6 +146,13 @@ fakeroot python populate_packages_prepend () {
 		preinst += d.getVar('useradd_preinst', True)
 		bb.data.setVar('pkg_preinst_%s' % pkg, preinst, d)
 
+		# RDEPENDS setup
+		rdepends = d.getVar("RDEPENDS_%s" % pkg, True)
+		if not rdepends:
+			rdepends = ""
+		rdepends += " base-passwd"
+		bb.data.setVar("RDEPENDS_%s" % pkg, rdepends, d)
+		
 	# We add the user/group calls to all packages to allow any package
 	# to contain files owned by the users/groups defined in the recipe.
 	# The user/group addition code is careful not to create duplicate
-- 
1.7.5.4




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

* Re: [PATCH 1/1] useradd.bbclass: fix how RDEPENDS is setup
  2011-11-06 19:31 ` [PATCH 1/1] " Scott Garman
@ 2011-11-06 20:25   ` Phil Blundell
  2011-11-06 23:07     ` Scott Garman
  0 siblings, 1 reply; 9+ messages in thread
From: Phil Blundell @ 2011-11-06 20:25 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Sun, 2011-11-06 at 11:31 -0800, Scott Garman wrote:
> Fix bug where only packages named PN included base-passwd in
> RDEPENDS. Also remove shadow requirement, since some targets
> do not use shadow and file ownership can be changed with only
> passwd/group entries.
> 
> This fixes [YOCTO #1727]

Don't you need shadow or some equivalent to provide /sbin/useradd so
that the postinsts work for on-target installs?  Removing shadow from
RDEPENDS does sound like a good plan for the no-package-management case,
but I'm not sure it's safe otherwise.

p.





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

* Re: [PATCH 1/1] useradd.bbclass: fix how RDEPENDS is setup
  2011-11-06 20:25   ` Phil Blundell
@ 2011-11-06 23:07     ` Scott Garman
  0 siblings, 0 replies; 9+ messages in thread
From: Scott Garman @ 2011-11-06 23:07 UTC (permalink / raw)
  To: openembedded-core

On 11/06/2011 12:25 PM, Phil Blundell wrote:
> On Sun, 2011-11-06 at 11:31 -0800, Scott Garman wrote:
>> Fix bug where only packages named PN included base-passwd in
>> RDEPENDS. Also remove shadow requirement, since some targets
>> do not use shadow and file ownership can be changed with only
>> passwd/group entries.
>>
>> This fixes [YOCTO #1727]
>
> Don't you need shadow or some equivalent to provide /sbin/useradd so
> that the postinsts work for on-target installs?  Removing shadow from
> RDEPENDS does sound like a good plan for the no-package-management case,
> but I'm not sure it's safe otherwise.

Of course you're right. Thank you for pointing this out. I will spin a 
v2 of the patchset.

Scott

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



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

* [PATCH 1/1] useradd.bbclass: fix how RDEPENDS is setup
  2011-11-06 23:27 [PATCH 0/1] useradd.bbclass: fix how RDEPENDS is setup [v2] Scott Garman
@ 2011-11-06 23:27 ` Scott Garman
  0 siblings, 0 replies; 9+ messages in thread
From: Scott Garman @ 2011-11-06 23:27 UTC (permalink / raw)
  To: openembedded-core

Fix bug where only packages named PN included base-passwd in
RDEPENDS.

This fixes [YOCTO #1727]

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
---
 meta/classes/useradd.bbclass |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index fb70b3e..18e062f 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -4,7 +4,6 @@ USERADDPN ?= "${PN}"
 # 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"
 
 # This preinstall function will be run in two contexts: once for the
 # native sysroot (as invoked by the useradd_sysroot() wrapper), and
@@ -147,6 +146,13 @@ fakeroot python populate_packages_prepend () {
 		preinst += d.getVar('useradd_preinst', True)
 		bb.data.setVar('pkg_preinst_%s' % pkg, preinst, d)
 
+		# RDEPENDS setup
+		rdepends = d.getVar("RDEPENDS_%s" % pkg, True)
+		if not rdepends:
+			rdepends = ""
+		rdepends += " base-passwd shadow"
+		bb.data.setVar("RDEPENDS_%s" % pkg, rdepends, d)
+		
 	# We add the user/group calls to all packages to allow any package
 	# to contain files owned by the users/groups defined in the recipe.
 	# The user/group addition code is careful not to create duplicate
-- 
1.7.5.4




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

* [PATCH 1/1] useradd.bbclass: fix how RDEPENDS is setup
  2011-11-07 23:36 [PATCH 0/1] useradd.bbclass: fix how RDEPENDS is setup [v3] Scott Garman
@ 2011-11-07 23:36 ` Scott Garman
  2011-11-08 14:09   ` Richard Purdie
  0 siblings, 1 reply; 9+ messages in thread
From: Scott Garman @ 2011-11-07 23:36 UTC (permalink / raw)
  To: openembedded-core

Fix bug where only packages named PN included base-passwd in
RDEPENDS.

This fixes [YOCTO #1727]

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
---
 meta/classes/useradd.bbclass |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index fb70b3e..0f9b84c 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -4,7 +4,6 @@ USERADDPN ?= "${PN}"
 # 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"
 
 # This preinstall function will be run in two contexts: once for the
 # native sysroot (as invoked by the useradd_sysroot() wrapper), and
@@ -147,6 +146,11 @@ fakeroot python populate_packages_prepend () {
 		preinst += d.getVar('useradd_preinst', True)
 		bb.data.setVar('pkg_preinst_%s' % pkg, preinst, d)
 
+		# RDEPENDS setup
+		rdepends = d.getVar("RDEPENDS_%s" % pkg, True) or ""
+		rdepends += " base-passwd shadow"
+		bb.data.setVar("RDEPENDS_%s" % pkg, rdepends, d)
+		
 	# We add the user/group calls to all packages to allow any package
 	# to contain files owned by the users/groups defined in the recipe.
 	# The user/group addition code is careful not to create duplicate
-- 
1.7.5.4




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

* Re: [PATCH 1/1] useradd.bbclass: fix how RDEPENDS is setup
  2011-11-07 23:36 ` [PATCH 1/1] useradd.bbclass: fix how RDEPENDS is setup Scott Garman
@ 2011-11-08 14:09   ` Richard Purdie
  2011-11-08 16:24     ` Scott Garman
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Purdie @ 2011-11-08 14:09 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Mon, 2011-11-07 at 15:36 -0800, Scott Garman wrote:
> Fix bug where only packages named PN included base-passwd in
> RDEPENDS.
> 
> This fixes [YOCTO #1727]
> 
> Signed-off-by: Scott Garman <scott.a.garman@intel.com>
> ---
>  meta/classes/useradd.bbclass |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)

Merged to master, thanks.

As an aside, does the USERADDPN variable serve any purpose now or can we
remove it?

Cheers,

Richard




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

* Re: [PATCH 1/1] useradd.bbclass: fix how RDEPENDS is setup
  2011-11-08 14:09   ` Richard Purdie
@ 2011-11-08 16:24     ` Scott Garman
  2011-11-08 16:58       ` Richard Purdie
  0 siblings, 1 reply; 9+ messages in thread
From: Scott Garman @ 2011-11-08 16:24 UTC (permalink / raw)
  To: openembedded-core

On 11/08/2011 06:09 AM, Richard Purdie wrote:
> On Mon, 2011-11-07 at 15:36 -0800, Scott Garman wrote:
>> Fix bug where only packages named PN included base-passwd in
>> RDEPENDS.
>>
>> This fixes [YOCTO #1727]
>>
>> Signed-off-by: Scott Garman<scott.a.garman@intel.com>
>> ---
>>   meta/classes/useradd.bbclass |    6 +++++-
>>   1 files changed, 5 insertions(+), 1 deletions(-)
>
> Merged to master, thanks.
>
> As an aside, does the USERADDPN variable serve any purpose now or can we
> remove it?

Indeed it does. I'll prepare a patch for that and also to remove the 
temporary workaround USERADDPN entry Koen added to the avahi recipe once 
you've accepted Eric's other patch.

Scott

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



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

* Re: [PATCH 1/1] useradd.bbclass: fix how RDEPENDS is setup
  2011-11-08 16:24     ` Scott Garman
@ 2011-11-08 16:58       ` Richard Purdie
  0 siblings, 0 replies; 9+ messages in thread
From: Richard Purdie @ 2011-11-08 16:58 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Tue, 2011-11-08 at 08:24 -0800, Scott Garman wrote:
> On 11/08/2011 06:09 AM, Richard Purdie wrote:
> > On Mon, 2011-11-07 at 15:36 -0800, Scott Garman wrote:
> >> Fix bug where only packages named PN included base-passwd in
> >> RDEPENDS.
> >>
> >> This fixes [YOCTO #1727]
> >>
> >> Signed-off-by: Scott Garman<scott.a.garman@intel.com>
> >> ---
> >>   meta/classes/useradd.bbclass |    6 +++++-
> >>   1 files changed, 5 insertions(+), 1 deletions(-)
> >
> > Merged to master, thanks.
> >
> > As an aside, does the USERADDPN variable serve any purpose now or can we
> > remove it?
> 
> Indeed it does. I'll prepare a patch for that and also to remove the 
> temporary workaround USERADDPN entry Koen added to the avahi recipe once 
> you've accepted Eric's other patch.

Its in and thanks :)

Cheers,

Richard




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

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

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-06 19:31 [PATCH 0/1] useradd.bbclass: fix how RDEPENDS is setup Scott Garman
2011-11-06 19:31 ` [PATCH 1/1] " Scott Garman
2011-11-06 20:25   ` Phil Blundell
2011-11-06 23:07     ` Scott Garman
  -- strict thread matches above, loose matches on Subject: below --
2011-11-06 23:27 [PATCH 0/1] useradd.bbclass: fix how RDEPENDS is setup [v2] Scott Garman
2011-11-06 23:27 ` [PATCH 1/1] useradd.bbclass: fix how RDEPENDS is setup Scott Garman
2011-11-07 23:36 [PATCH 0/1] useradd.bbclass: fix how RDEPENDS is setup [v3] Scott Garman
2011-11-07 23:36 ` [PATCH 1/1] useradd.bbclass: fix how RDEPENDS is setup Scott Garman
2011-11-08 14:09   ` Richard Purdie
2011-11-08 16:24     ` Scott Garman
2011-11-08 16:58       ` Richard Purdie

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