mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
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>
34 lines
787 B
BlitzBasic
34 lines
787 B
BlitzBasic
SUMMARY = "creategroup pt 2"
|
|
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
|
|
|
LICENSE = "MIT"
|
|
|
|
DEPENDS = "coreutils-native"
|
|
USERADD_DEPENDS = "creategroup1"
|
|
|
|
S = "${WORKDIR}"
|
|
|
|
inherit useradd allarch
|
|
|
|
USERADD_PACKAGES = "${PN}"
|
|
USERADD_PARAM:${PN} = "-u 5556 --gid grouptest gt2"
|
|
|
|
TESTDIR = "${D}${sysconfdir}/creategroup"
|
|
|
|
do_install() {
|
|
install -d ${TESTDIR}
|
|
install -d ${TESTDIR}/dir
|
|
touch ${TESTDIR}/file
|
|
ln -s ./file ${TESTDIR}/symlink
|
|
install -d ${TESTDIR}/fifotest
|
|
mkfifo ${TESTDIR}/fifotest/fifo
|
|
|
|
chown gt2:grouptest ${TESTDIR}/file
|
|
chown -R gt2:grouptest ${TESTDIR}/dir
|
|
chown -h gt2:grouptest ${TESTDIR}/symlink
|
|
chown -R gt2:grouptest ${TESTDIR}/fifotest
|
|
}
|
|
|
|
FILES:${PN} = "${sysconfdir}/creategroup/*"
|
|
|