Fixes warnings

run.do_install_ptest_base.107960:175 exit 1 from 'chgrp -R ptest 
/mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/cpio/2.14/image/usr/lib/cpio/ptest/'

Signed-off-by: Khem Raj <[email protected]>
---
 meta/recipes-devtools/quilt/quilt.inc   |  8 ++++----
 meta/recipes-extended/cpio/cpio_2.14.bb | 11 +++++------
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/meta/recipes-devtools/quilt/quilt.inc 
b/meta/recipes-devtools/quilt/quilt.inc
index 3374f4dfbf3..89572d70d7c 100644
--- a/meta/recipes-devtools/quilt/quilt.inc
+++ b/meta/recipes-devtools/quilt/quilt.inc
@@ -20,7 +20,7 @@ SRC_URI:append:class-target = " 
file://gnu_patch_test_fix_target.patch"
 
 SRC_URI[sha256sum] = 
"3be3be0987e72a6c364678bb827e3e1fcc10322b56bc5f02b576698f55013cc2"
 
-inherit autotools-brokensep ptest
+inherit autotools-brokensep ptest useradd
 
 INHIBIT_AUTOTOOLS_DEPS:class-native = "1"
 PATCHTOOL:class-native = "patch"
@@ -62,9 +62,9 @@ do_install:append:class-native () {
     touch ${D}${sysconfdir}/quiltrc
 }
 
-# The tests need to run as a non-root user, so pull in the ptest user
-DEPENDS:append:class-target = "${@bb.utils.contains('PTEST_ENABLED', '1', ' 
ptest-runner', '', d)}"
-PACKAGE_WRITE_DEPS += "ptest-runner"
+# The tests need to run as a non-root user
+USERADD_PACKAGES = "${PN}-ptest"
+USERADD_PARAM:${PN}-ptest = "--system --home /nonexistent --no-create-home 
--user-group ptest"
 
 do_install_ptest() {
        install ${WORKDIR}/test.sh ${D}${PTEST_PATH}
diff --git a/meta/recipes-extended/cpio/cpio_2.14.bb 
b/meta/recipes-extended/cpio/cpio_2.14.bb
index 560038d2a67..c6ab0054994 100644
--- a/meta/recipes-extended/cpio/cpio_2.14.bb
+++ b/meta/recipes-extended/cpio/cpio_2.14.bb
@@ -14,7 +14,7 @@ SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
 
 SRC_URI[sha256sum] = 
"145a340fd9d55f0b84779a44a12d5f79d77c99663967f8cfa168d7905ca52454"
 
-inherit autotools gettext texinfo ptest
+inherit autotools gettext texinfo ptest useradd
 
 CVE_STATUS[CVE-2010-4226] = "not-applicable-platform: Issue applies to use of 
cpio in SUSE/OBS"
 
@@ -63,11 +63,10 @@ do_install_ptest_base:append() {
     chmod -R g+w ${D}${PTEST_PATH}/
 }
 
-# The tests need to run as a non-root user, so pull in the ptest user
-DEPENDS:append:class-target = "${@bb.utils.contains('PTEST_ENABLED', '1', ' 
ptest-runner', '', d)}"
-PACKAGE_WRITE_DEPS:append:class-target = " ${MLPREFIX}ptest-runner"
-
-RDEPENDS:${PN}-ptest += "ptest-runner"
+# The tests need to run as a non-root user
+USERADD_PACKAGES = "${PN}-ptest"
+USERADD_PARAM:${PN}-ptest = "--system --home /nonexistent --no-create-home \
+                       --user-group ptest"
 
 PACKAGES =+ "${PN}-rmt"
 
-- 
2.43.0

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

Reply via email to