Commit Graph

10 Commits

Author SHA1 Message Date
Richard Purdie c5a9efca96 useradd: Ensure -native recipes don't depend on target recipes
Without this change, dbus-native can end up depending upon base-passwd
for example. This change mirrors the existing nativesdk code.

Based on a patch from Henning Heinold <heinold@inf.fu-berlin.de>
but with some additions from me.

(From OE-Core rev: eba81d1c606ec29ffb793c1cb3cfed9562d552bc)

(From OE-Core rev: b325378930655beeec03bbc5ce6ccf2b29f408fd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-31 21:11:43 +01:00
Richard Purdie 110d499544 useradd: Add missing DEPEND on shadow
Without this rootfs generation fails as an RDEPENDS is added
but the package might not have bneen built.

(From OE-Core rev: bfe70c6446e6686f826f01040ba74c7d7d28bf42)

(From OE-Core rev: 30a1f1d3ec763b4929b052ab3388499dfb40b1fa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-30 16:38:16 +00:00
Scott Garman 9dc2193d31 useradd.bbclass: do not modify -nativesdk packages
Exclude the addition of user/group code and RDEPENDS changes for
-nativesdk packages.

(From OE-Core rev: 2f057dd905ccb497890ce73ac4e4c256edcf0351)

(From OE-Core rev: 9acbe80fea3dbd5405030c95d8b6d411689c4911)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-30 16:38:15 +00:00
Scott Garman 403d5e0b7d useradd.bbclass: only modify packages in USERADD_PACKAGES
Previously we injected the user/group preinstall script into all
output packages. This fixes that so that only packages listed in
USERADD_PACKAGES get modified.

It also removes the USERADDPN variable, which is no longer needed.

(From OE-Core rev: 2f73466eb5018040a123ccb0e2af8c519525f958)

(From OE-Core rev: 424b6447ebce761c9027ffdaf68ecbcd6f28e4ec)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-30 16:38:15 +00:00
Eric Bénard 155aad308c useradd.bbclass: handle nativesdk case
* 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

(From OE-Core rev: 140a3507fb5c14cd9bcebe4304f491aa1c5c47a2)

(From OE-Core rev: 79d5ce46b4d73e5ed39c509ce872e99e6bcb94ee)

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-30 16:38:13 +00:00
Scott Garman ae88920dec useradd.bbclass: fix how RDEPENDS is setup
Fix bug where only packages named PN included base-passwd in
RDEPENDS.

This fixes [YOCTO #1727]

(From OE-Core rev: 2c55d51afd71d708a54afc8377e10c4f80f810e3)

(From OE-Core rev: 213d31f24d911a10132ddcd75f50363a80c4dc2e)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-30 16:38:11 +00:00
Otavio Salvador afc60481c7 useradd.bbclass: check if a group already exists manually
The use of groupadd -f makes much more difficult to figure when a
group is not add. This was the case of the class not working for our
usage and this being caused by the lack of '/etc/group' file but
unnoticed as groupadd wasn't failing according.

(From OE-Core rev: 82933a1ff921fd0836f03e6f379fd8536cdc0a30)

(From OE-Core rev: e3e8f15176107fa26248e878af548835692d3068)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-30 16:38:04 +00:00
Phil Blundell 00b47701f4 useradd.bbclass: use correct value for $D in postinst functions
This corrects the location of the password file used during package installation.

See http://lists.linuxtogo.org/pipermail/openembedded-core/2011-September/009183.html and subsequent discussion.

(From OE-Core rev: 848bb277769af5b094031aeb54d287c158256724)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-07 23:44:29 +01:00
Phil Blundell 050e43a57f useradd.bbclass: remove hardcoded reference to /usr/bin
Otherwise the class doesn't work if ${bindir} is set to a different value;
likewise for /var vs ${localstatedir}.

(From OE-Core rev: 21371df16917cd82642b39763793783d61ee5516)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-02 18:36:20 +01:00
Scott Garman 14be7dbb15 useradd.bbclass: new class for managing user/group permissions
This class is to be used by recipes that need to set up specific
user/group accounts and set custom file/directory permissions.

(From OE-Core rev: a82885db00956734922291d8a17eb135461204fa)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-01 17:17:34 +01:00