]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
useradd.bbclass: Fix order of postinst-useradd-*
authorPiotr Łobacz <p.lobacz@welotec.com>
Fri, 23 Feb 2024 13:25:20 +0000 (13:25 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 24 Feb 2024 16:10:19 +0000 (16:10 +0000)
commit322ef726132a47d977d2c6ee41de5358f1e85994
tree205172b793e2d2e5a32920709f1786da8001617d
parent7cf85204f0943bf741ffce5c4105340197c714df
useradd.bbclass: Fix order of postinst-useradd-*

postinst-useradd-* haven't been running in order of dependency.

This patch is reworked from Piotr Łobacz's patch and fixes:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=15084
https://bugzilla.yoctoproject.org/show_bug.cgi?id=13904

basepasswd_sysroot_postinst in base-passwd can install postinst-useradd-*
scripts with any order. Sometimes this means, for example a useradd postinst
will attempt to run without the corresponding group postinst causing errors.
This patch ensures that we first run groupadd, then useradd and then
group membership.

[RP: Tweaked to avoid removing previous fixes and for whitespace/style issues
     Also ensure the scripts are changed to execute with -e to highlight errors]

Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com>
Signed-off-by: Piotr Łobacz <p.lobacz@welotec.com>
Signed-off-by: Jan Górski <j.gorski@welotec.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-global/staging.bbclass
meta/classes/useradd.bbclass