Commit Graph

10 Commits

Author SHA1 Message Date
Richard Purdie c8dee9b92d Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:

sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`

(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10 11:51:19 +00:00
Richard Purdie 605d011641 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)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10 11:37:13 +00:00
Scott Garman 3b93447e35 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)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10 11:37:12 +00:00
Scott Garman 67a2c35530 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)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10 11:37:12 +00:00
Eric Bénard d5175bb3ed 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)

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>
2011-11-08 16:22:48 +00:00
Scott Garman 27d70f9655 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)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-08 14:13:24 +00:00
Otavio Salvador 5ea680a7f4 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)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-24 17:27:15 +01: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