how to add multiple groups in yocto .bb files

i an use yocto 4.0.18

my bb files is poky/meta/recipes-graphics/wayland/weston-init.bb

SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"

PACKAGE_ARCH = "${MACHINE_ARCH}"

SRC_URI = "file://init 
           file://weston.env 
           file://weston.ini 
           file://weston.service 
           file://weston.socket 
           file://weston-autologin 
           file://weston-start"

S = "${WORKDIR}"

PACKAGECONFIG ??= ""
PACKAGECONFIG:append:qemuriscv64 = " use-pixman"
PACKAGECONFIG:append:qemuppc64 = " use-pixman"

PACKAGECONFIG[no-idle-timeout] = ",,"
PACKAGECONFIG[use-pixman] = ",,"

DEFAULTBACKEND ??= ""
DEFAULTBACKEND:qemuall ?= "drm"

do_install() {
        if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
        install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
        sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}/${sysconfdir}/init.d/weston
        fi
    install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini
    install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston

    # Install Weston systemd service and accompanying udev rule
    install -D -p -m0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service
    install -D -p -m0644 ${WORKDIR}/weston.socket ${D}${systemd_system_unitdir}/weston.socket
        if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
        install -D -p -m0644 ${WORKDIR}/weston-autologin ${D}${sysconfdir}/pam.d/weston-autologin
        fi
    sed -i -e s:/etc:${sysconfdir}:g 
        -e s:/usr/bin:${bindir}:g 
        -e s:/var:${localstatedir}:g 
        ${D}${systemd_system_unitdir}/weston.service
    # Install weston-start script
    install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
    sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
    sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start
        if [ -n "${DEFAULTBACKEND}" ]; then
        sed -i -e "/^[core]/a backend=${DEFAULTBACKEND}-backend.so" ${D}${sysconfdir}/xdg/weston/weston.ini
    fi

    if [ "${@bb.utils.contains('PACKAGECONFIG', 'no-idle-timeout', 'yes', 'no', d)}" = "yes" ]; then
        sed -i -e "/^[core]/a idle-time=0" ${D}${sysconfdir}/xdg/weston/weston.ini
    fi

    if [ "${@bb.utils.contains('PACKAGECONFIG', 'use-pixman', 'yes', 'no', d)}" = "yes" ]; then
        sed -i -e "/^[core]/a use-pixman=true" ${D}${sysconfdir}/xdg/weston/weston.ini
    fi

    install -dm 755 -o weston -g weston ${D}/home/weston
}

INHIBIT_UPDATERCD_BBCLASS = "${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', '1', '', d)}"

inherit update-rc.d systemd useradd

USERADD_PACKAGES = "${PN}"

# rdepends on weston which depends on virtual/egl
#
require ${THISDIR}/required-distro-features.inc

RDEPENDS:${PN} = "weston kbd"

INITSCRIPT_NAME = "weston"
INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."

FILES:${PN} += "
    ${sysconfdir}/xdg/weston/weston.ini 
    ${systemd_system_unitdir}/weston.service 
    ${systemd_system_unitdir}/weston.socket 
    ${sysconfdir}/default/weston 
    ${sysconfdir}/pam.d/ 
    /home/weston 
    "

CONFFILES:${PN} += "${sysconfdir}/xdg/weston/weston.ini ${sysconfdir}/default/weston"

SYSTEMD_SERVICE:${PN} = "weston.service weston.socket"
USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G video,input weston"
GROUPADD_PARAM:${PN} = "-r wayland;"

but there is no input group,so the error log is :

  Running scriptlet: weston-init-1.0-r0.sl1640                          441/558 
%prein(weston-init-1.0-r0.sl1640): scriptlet start
%prein(weston-init-1.0-r0.sl1640): execv(/bin/sh) pid 3523376
+ set -e
+ OPT=
+ SYSROOT=
+ test x/home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs '!=' x
+ SYSROOT=/home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs
+ OPT='--root /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs'
+ '[' '!' -e /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs/etc/login.defs -a -e /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs/etc/login.defs.dpkg-new ']'
+ export PSEUDO_PASSWD=/home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs
+ PSEUDO_PASSWD=/home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs
+ test x = x
+ GROUPADD_PARAM='-r wayland;'
+ USERADD_PARAM='--home /home/weston --shell /bin/sh --user-group -G video,input weston'
+ GROUPMEMS_PARAM=
++ tr -d '[:space:]'
++ echo -r 'wayland;'
+ test 'x-rwayland;' '!=' x
+ echo 'Running groupadd commands...'
Running groupadd commands...
++ cut -d ';' -f 1
++ sed -e 's#[ t]*$##'
++ echo '-r wayland;'
+ opts='-r wayland'
++ echo '-r wayland;'
++ cut -d ';' -f 2-
++ sed -e 's#[ t]*$##'
+ remaining=
+ test 'x-r wayland' '!=' x
+ perform_groupadd /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs '--root /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs -r wayland'
+ local rootdir=/home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs
+ local 'opts=--root /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs -r wayland'
+ bbnote 'weston-init: Performing groupadd with [--root /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs -r wayland]'
+ echo 'NOTE: weston-init: Performing groupadd with [--root /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs -r wayland]'
NOTE: weston-init: Performing groupadd with [--root /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs -r wayland]
++ echo '--root /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs -r wayland'
++ awk '{ print $NF }'
+ local groupname=wayland
++ grep '^wayland:' /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs/etc/group
++ true
+ local group_exists=
+ test x = x
+ eval flock -x /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs/etc -c '"' groupadd '$opts"'
++ flock -x /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs/etc -c ' groupadd --root /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs -r wayland'
configuration error - unknown item 'SYSLOG_SU_ENAB' (notify administrator)
configuration error - unknown item 'SYSLOG_SG_ENAB' (notify administrator)
++ grep '^wayland:' /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs/etc/group
+ group_exists=wayland:x:992:
+ test xwayland:x:992: = x
+ test 'x-r wayland' = x
++ cut -d ';' -f 1
++ echo ''
++ sed -e 's#[ t]*$##'
+ opts=
++ echo ''
++ cut -d ';' -f 2-
++ sed -e 's#[ t]*$##'
+ remaining=
+ test x '!=' x
++ tr -d '[:space:]'
++ echo --home /home/weston --shell /bin/sh --user-group -G video,input weston
+ test x--home/home/weston--shell/bin/sh--user-group-Gvideo,inputweston '!=' x
+ echo 'Running useradd commands...'
Running useradd commands...
++ echo '--home /home/weston --shell /bin/sh --user-group -G video,input weston'
++ cut -d ';' -f 1
++ sed -e 's#[ t]*$##'
+ opts='--home /home/weston --shell /bin/sh --user-group -G video,input weston'
++ cut -d ';' -f 2-
++ echo '--home /home/weston --shell /bin/sh --user-group -G video,input weston'
++ sed -e 's#[ t]*$##'
+ remaining='--home /home/weston --shell /bin/sh --user-group -G video,input weston'
+ test 'x--home /home/weston --shell /bin/sh --user-group -G video,input weston' '!=' x
+ perform_useradd /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs '--root /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs --home /home/weston --shell /bin/sh --user-group -G video,input weston'
+ local rootdir=/home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs
+ local 'opts=--root /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs --home /home/weston --shell /bin/sh --user-group -G video,input weston'
+ bbnote 'weston-init: Performing useradd with [--root /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs --home /home/weston --shell /bin/sh --user-group -G video,input weston]'
+ echo 'NOTE: weston-init: Performing useradd with [--root /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs --home /home/weston --shell /bin/sh --user-group -G video,input weston]'
NOTE: weston-init: Performing useradd with [--root /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs --home /home/weston --shell /bin/sh --user-group -G video,input weston]
++ echo '--root /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs --home /home/weston --shell /bin/sh --user-group -G video,input weston'
++ awk '{ print $NF }'
+ local username=weston
++ grep '^weston:' /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs/etc/passwd
++ true
+ local user_exists=
+ test x = x
+ eval flock -x /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs/etc -c '"' useradd '$opts"'
++ flock -x /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs/etc -c ' useradd --root /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs --home /home/weston --shell /bin/sh --user-group -G video,input weston'
configuration error - unknown item 'SYSLOG_SU_ENAB' (notify administrator)
configuration error - unknown item 'SYSLOG_SG_ENAB' (notify administrator)
**useradd: group 'input' does not exist**
+ true
++ grep '^weston:' /home/sunqian/sl16x0/sdk/build-sl1640/tmp/work/sl1640-poky-linux/astra-ubuntu/1.0-r0/rootfs/etc/passwd
++ true
+ user_exists=
+ test x = x
+ bbfatal 'weston-init: useradd command did not succeed.'
+ echo 'ERROR: weston-init: useradd command did not succeed.'
ERROR: weston-init: useradd command did not succeed.
+ exit 1
%prein(weston-init-1.0-r0.sl1640): waitpid(3523376) rc 3523376 status 100
error: %prein(weston-init-1.0-r0.sl1640) scriptlet failed, exit status 1

i tried to GROUPADD_PARAM:${PN} = "-r wayland;-r input;" used to add groups,but it’s not worked,the build report error;

how to added multiple groups at one bb files?

i just want to create a input group before useradd

New contributor

jason is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật