Skip to contentSkip to conversation

why does cpio recipe RDEPENDS on ptest-runner?

DISCUSSION Robert P. J. Day 2 participants 3 messages Feb 11, 2024 – Feb 12, 2024

lore
Share & tools
lore
#1 lore raw
Quoted 13 lines · Robert P. J. Day

  in the midst of writing a ptest tutorial for some colleagues and wanted to embellish it with live examples, and noticed this in the cpio bitbake recipe:

https://git.openembedded.org/openembedded-core/tree/meta/recipes-extended/cpio/cpio_2.15.bb#n69

this is the first recipe i've seen that actually *needs* ptest-runner as a runtime dependency. why is that? i always thought ptest-runner was entirely optional even when using ptests.

rday

Quoted 11 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#195286):
https://lists.openembedded.org/g/openembedded-core/message/195286
Mute This Topic: https://lists.openembedded.org/mt/104292535/8071792
Group Owner: [email protected] Unsubscribe:
https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]
]
-=-=-=-=-=-=-=-=-=-=-=-

Hi, this is a special case. cpio ptest runs not under the root user but under the ptest-user.

This user gets created in the ptest-runner recipe
grep -i useradd ptest-runner_2.4.2.bb
inherit useradd
USERADD_PACKAGES = "${PN}"
USERADD_PARAM:${PN} = "--system --no-create-home --home / --user-group ptest"

Hope that helps,
Simone

#2 lore raw
Quoted 24 lines · Simone Weiß
Quoted 5 lines · Robert P. J. Day

  in the midst of writing a ptest tutorial for some colleagues and wanted to embellish it with live examples, and noticed this in the cpio bitbake recipe:

Quoted 7 lines

https://git.openembedded.org/openembedded-core/tree/meta/recipes-extended/cpio/cpio_2.15.bb#n69

this is the first recipe i've seen that actually *needs* ptest-runner as a runtime dependency. why is that? i always thought ptest-runner was entirely optional even when using ptests.

rday

Hi, this is a special case. cpio ptest runs not under the root user but under the ptest-user.

This user gets created in the ptest-runner recipe
grep -i useradd ptest-runner_2.4.2.bb
inherit useradd
USERADD_PACKAGES = "${PN}"
USERADD_PARAM:${PN} = "--system --no-create-home --home / --user-group ptest"

Quoted 2 lines

Hope that helps,
Simone

very much, thanks. i *suspected* it had something to do with the
ptest user thing, i just wasn't sure.

rday