aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/useradd.bbclass
AgeCommit message (Collapse)Author
2013-05-09classes: Use modern exception raising syntaxRichard Purdie
Modern expection rasing syntax is function call format, convert to this to keep python 3 happy and model correct coding style in the core. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-02classes: replace virtclass-native(sdk) with class-native(sdk)Robert Yang
The overrides virtclass-native and virtclass-nativesdk are deprecated, which should be replaced by class-native and class-nativesdk. [YOCTO #3297] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-07-19Convert tab indentation in python functions into four-spaceRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-17useradd.bbclass: Fix for multilib buildsRichard Purdie
The class adds a setscene dependency on base-passwd as well as adds this to DEPENDS. The DEPENDS version will be auso-converted to include MLPREFIX whilst the setscene dependency will not. This result in errors about non-existent tasks. This patch ensures MLPREFIX is added when it is needed and fixes various build failures. Whether we should have two base-passwd recipes in a multilib system is a question which would need to be addressed by future changes. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-16Multilib: Fix RDEPENDS in libc-package.bbclass, useradd.bbclass...Zhai Edwin
MLPREFIX is needed in RDEPENDS for multilib build Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-23useradd.bbclass: retry useradd/groupadd commands to avoid lock race issuesScott Garman
A race condition can occur when adding users and groups to the passwd and group files, causing errors like the following: ERROR: Function 'useradd_sysroot' failed Tried to access "/etc/group" but this was locked. This fix will cause the useradd code to retry the useradd and groupadd commands up to 10 times (with a 1s sleep in between attempts) before failing. This fixes [YOCTO #1794] Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-08shadow-sysroot: Fix for multilibZhai Edwin
Fix following error in multilib build: "ERROR: Task do_package_setscene depends upon nonexistant task poky/meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb:do_populate_sysroot_setscene" >From richard.purdie@linuxfoundation.org Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-24useradd.bbclass: override USERADDSETSCENEDEPS to empty when building cross ↵Otavio Salvador
packages Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-10useradd.bbclass: skip processing on virtclass-cross extended packagesOtavio Salvador
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2012-01-27useradd.bbclass: Fix missing quoteRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-27useradd: Ensure dependencies are only added for target recipes, not native ↵Richard Purdie
or nativesdk Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-27useradd.bbclass: Add explict setscene dependencies to ensure correct ↵Richard Purdie
ordering of setscene tasks Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-27useradd.bbclass: Ensure pseudo can load in the pseudo unloaded caseRichard Purdie
In the do_populate_sysroot_setscene case, pseudo has been unloaded and we need to reload it. This code change ensures all the pseudo options are specified so pseudo loads correctly. It also improves some of the comments so all the different contexts are listed. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-27useradd.bbclass: Execute user addition code before do_package_setscene, not ↵Richard Purdie
after do_populate_sysroot_setscene The user addition needs to happen before the do_package files are extracted by do_package_setscene since those are the ones we need to preserve the file ownership information for. This patch ensures this happens. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-21useradd: Ensure -native recipes don't depend on target recipesRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10Convert to use direct access to the data store (instead of bb.data.*Var*())Richard Purdie
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 *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10useradd: Add missing DEPEND on shadowRichard Purdie
Without this rootfs generation fails as an RDEPENDS is added but the package might not have bneen built. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10useradd.bbclass: do not modify -nativesdk packagesScott Garman
Exclude the addition of user/group code and RDEPENDS changes for -nativesdk packages. Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2011-11-10useradd.bbclass: only modify packages in USERADD_PACKAGESScott Garman
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. Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2011-11-08useradd.bbclass: handle nativesdk caseEric Bénard
* 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-08useradd.bbclass: fix how RDEPENDS is setupScott Garman
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>
2011-10-24useradd.bbclass: check if a group already exists manuallyOtavio Salvador
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. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2011-09-07useradd.bbclass: use correct value for $D in postinst functionsPhil Blundell
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. Signed-off-by: Phil Blundell <philb@gnu.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-02useradd.bbclass: remove hardcoded reference to /usr/binPhil Blundell
Otherwise the class doesn't work if ${bindir} is set to a different value; likewise for /var vs ${localstatedir}. Signed-off-by: Phil Blundell <philb@gnu.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-01useradd.bbclass: new class for managing user/group permissionsScott Garman
This class is to be used by recipes that need to set up specific user/group accounts and set custom file/directory permissions. Signed-off-by: Scott Garman <scott.a.garman@intel.com>