]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
useradd: Fix issues with useradd dependencies
authorEilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com>
Thu, 7 Dec 2023 12:45:32 +0000 (12:45 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 8 Dec 2023 17:40:55 +0000 (17:40 +0000)
commitb47f2352376bd16b7e7087b4dab143403e67e094
treeeb16731b60aa68aee2268f631375f5c3520dd88b
parentc2b473390dec0f5132d5b4bff6d3c35214eb898b
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)

Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta-selftest/recipes-test/selftest-users/creategroup1.bb [new file with mode: 0644]
meta-selftest/recipes-test/selftest-users/creategroup2.bb [new file with mode: 0644]
meta/classes/useradd.bbclass
meta/lib/oeqa/selftest/cases/usergrouptests.py [new file with mode: 0644]