diff options
author | Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com> | 2023-12-07 12:45:32 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-08 17:51:10 +0000 |
commit | ecef665062be55fcfa0915216335d08883aa86f7 (patch) | |
tree | 7526dc8da27cf82895da01ed0994cb1071e6bc91 /meta/classes | |
parent | d14eb12deb625e6644c0e727c336ad6bfafd0793 (diff) | |
download | poky-ecef665062be55fcfa0915216335d08883aa86f7.tar.gz |
useradd: Fix issues with useradd dependencies
If recipe A requires the useradd actions of recipe B we need to
ensure that recipe B is part of the recipe A dependancy chain. In
order to do that, we introduce USERADD_DEPENDS. This makes sure
that the do_populate_sysroot_setscene of recipe B exists for
recipe A in case of a missing TMPDIR. This requires changes made in
runqueue.py by RP.
This commit along with the runqueue fixes effects:
Bug 13419 - recipes that add users to groups cannot rely on other recipes creating those groups (when population from sstate happens)
Bug 13904 - do_prepare_recipe_sysroot: postinst-useradd-* does not run in order of dependency and sometimes fails
Bug 13279 - Make sure users/groups exist for package_write_* tasks
Bug 15084 - For some reason using of same user in two recipes does not work properly
I've included the start of self-testing for useradd by adding tests for
13419 (which ends up testing 13904, 13279, 15084 by virtue of them all
having the same root cause)
(From OE-Core rev: b47f2352376bd16b7e7087b4dab143403e67e094)
Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/useradd.bbclass | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass index 4d3bd9a5f5..a4b8a2d6d6 100644 --- a/meta/classes/useradd.bbclass +++ b/meta/classes/useradd.bbclass | |||
@@ -177,9 +177,11 @@ SYSROOT_PREPROCESS_FUNCS += "${SYSROOTFUNC}" | |||
177 | 177 | ||
178 | SSTATEPREINSTFUNCS:append:class-target = " useradd_sysroot_sstate" | 178 | SSTATEPREINSTFUNCS:append:class-target = " useradd_sysroot_sstate" |
179 | 179 | ||
180 | USERADD_DEPENDS ??= "" | ||
181 | DEPENDS += "${USERADD_DEPENDS}" | ||
180 | do_package_setscene[depends] += "${USERADDSETSCENEDEPS}" | 182 | do_package_setscene[depends] += "${USERADDSETSCENEDEPS}" |
181 | do_populate_sysroot_setscene[depends] += "${USERADDSETSCENEDEPS}" | 183 | do_populate_sysroot_setscene[depends] += "${USERADDSETSCENEDEPS}" |
182 | USERADDSETSCENEDEPS:class-target = "${MLPREFIX}base-passwd:do_populate_sysroot_setscene pseudo-native:do_populate_sysroot_setscene shadow-native:do_populate_sysroot_setscene ${MLPREFIX}shadow-sysroot:do_populate_sysroot_setscene" | 184 | USERADDSETSCENEDEPS:class-target = "${MLPREFIX}base-passwd:do_populate_sysroot_setscene pseudo-native:do_populate_sysroot_setscene shadow-native:do_populate_sysroot_setscene ${MLPREFIX}shadow-sysroot:do_populate_sysroot_setscene ${@' '.join(['%s:do_populate_sysroot_setscene' % pkg for pkg in d.getVar("USERADD_DEPENDS").split()])}" |
183 | USERADDSETSCENEDEPS = "" | 185 | USERADDSETSCENEDEPS = "" |
184 | 186 | ||
185 | # Recipe parse-time sanity checks | 187 | # Recipe parse-time sanity checks |