generic-poky/meta
Richard Purdie b5c383074a base-passwd/useradd: Various improvements to useradd with RSS
Currently there are multiple issues with useradd:

* If base-passwd rebuilds, it wipes out recipe specific user/group additions
  to sysroots and causes errors
* If recipe A adds a user and recipe B depends on A, it can't see any of the
  users/groups A adds.

This patch changes base-passwd so it always works as a postinst script
within the sysroot and copies in the master files, then runs any
postinst-useradd-* scripts afterwards to add additional user/groups.

The postinst-useradd-* scripts are tweaked so that if /etc/passwd doesn't exist
they just exit, knowning they'll be executed later. We also add a dummy entry to
the dummy passwd file from pseudo so we can avoid this too.

There is a problem where if recipe A adds a user and recipe B depends on A but
doesn't care about users, it may not have a dependency on the useradd/groupadd
tools which would therefore not be available in B's sysroot. We therefore also
tweak postinst-useradd-* scripts so that if the tools aren't present we simply
don't add users. If you need the users, you add a dependency on the tools in the
recipe and they'll be added.

We add postinst-* to SSTATE_SCAN_FILES since almost any postinst script of this
kind is going to need relocation help.

We also ensure that the postinst-useradd script is written into the sstate
object as the current script was only being added in a recipe local way.

Thanks to Peter Kjellerstedt <pkj@axis.com> and Patrick Ohly for some pieces
of this patch.

[Yocto #11124]

(From OE-Core rev: 1b5afaf437f7a1107d4edca8eeb668b9618a5488)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-14 09:47:08 +01:00
..
classes base-passwd/useradd: Various improvements to useradd with RSS 2017-04-14 09:47:08 +01:00
conf native/nativesdk: Use fixed DISTRO_FEATURES 2017-04-12 15:09:58 +01:00
files fs-perms.txt: Two cleanup tweaks for consistency. 2017-03-17 16:53:05 +00:00
lib oeqa/core/runner: Append PID in the test result folder name 2017-04-13 10:54:10 +01:00
recipes-bsp gnu-efi: copy header files for x32 build 2017-04-11 18:10:17 +01:00
recipes-connectivity openssl: fix the reference to native perl in ptests 2017-04-11 18:10:18 +01:00
recipes-core base-passwd/useradd: Various improvements to useradd with RSS 2017-04-14 09:47:08 +01:00
recipes-devtools base-passwd/useradd: Various improvements to useradd with RSS 2017-04-14 09:47:08 +01:00
recipes-extended ed: update SRC_URI to yoctoproject mirror 2017-04-12 15:09:58 +01:00
recipes-gnome nativesdk-packagegroup-sdk-host: replace smartpm with dnf 2017-03-14 14:42:17 +00:00
recipes-graphics libjpeg-turbo: don't depend on NASM for non-x86 targets 2017-04-05 23:22:13 +01:00
recipes-kernel linux-yocto-dev: update to v4.11+ 2017-04-13 10:54:10 +01:00
recipes-lsb4 libpng12: Use rm instead of unlink 2017-03-10 14:50:11 +00:00
recipes-multimedia gstreamer1.0-plugins-good: Backport patch for v4l2object videometa 2017-04-11 18:10:18 +01:00
recipes-rt meta: remove True option to getVar calls 2016-12-16 10:23:23 +00:00
recipes-sato webkitgtk: Fix build on aarch64 2017-03-17 16:53:05 +00:00
recipes-support ptest-runner: Upgrade to minor version 2.0.2 2017-04-11 18:10:18 +01:00
site siteinfo.bbclass: Add mipsisa{32, 64}r6{el, } support 2016-10-07 16:43:57 +01:00
COPYING.GPLv2 Fix license notices for OE-Core 2014-01-02 12:58:54 +00:00
COPYING.MIT
recipes.txt qt4: remove recipes and classes 2016-01-07 13:40:14 +00:00