useradd.bbclass: fix how RDEPENDS is setup
cover useradd.bbclass: fix how RDEPENDS is setup
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(-)
Signature · 1 line
1.7.5.4
PATCH 1/1 useradd.bbclass: fix how RDEPENDS is setup
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]
--- meta/classes/useradd.bbclass | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
meta/classes/useradd.bbclass +7 -1
@@ -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
Signature · 1 line
1.7.5.4
Quoted 6 lines · Scott Garman
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.
Quoted 6 lines · Phil Blundell
Quoted 5 lines · Scott Garman
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.
Quoted 6 lines
Quoted 1 line
This fixes [YOCTO #1727]
Don't you need shadow or some equivalent to provide
/sbin/useraddso 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
Signature · 3 lines
Scott Garman Embedded Linux Engineer - Yocto Project Intel Open Source Technology Center