From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7259987580358230016 X-Received: by 2002:a7b:c449:0:b0:3fa:9924:1241 with SMTP id l9-20020a7bc449000000b003fa99241241mr5649992wmi.4.1691011902110; Wed, 02 Aug 2023 14:31:42 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:600c:8607:b0:3fe:2177:fdf9 with SMTP id ha7-20020a05600c860700b003fe2177fdf9ls597099wmb.1.-pod-prod-04-eu; Wed, 02 Aug 2023 14:31:40 -0700 (PDT) X-Google-Smtp-Source: APBJJlGaSKgflO5l2OX0uBJlb+aqoCJR3kn0HFjwSvdWX0nf7v84eYXU8cGjrEJRXPBg4fxc80U/ X-Received: by 2002:a05:600c:2209:b0:3fe:3b8e:1cba with SMTP id z9-20020a05600c220900b003fe3b8e1cbamr164924wml.6.1691011900096; Wed, 02 Aug 2023 14:31:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691011900; cv=none; d=google.com; s=arc-20160816; b=VLtWkCk667aL/jxwmhKOUtcqcmvzWPa+eV0HGtHZl0TAs3DCRsPGaoHhECAko42ymD vt6lJp2s2nuj3wqfp2xKoK2LlnKXKAUapVDCyhILMuJdji8ln8bBxn5LCmB7AJ5YnWaB wI7mj0Uyf66em0FoNKwhse2m8SSyCUB2szQL9jrqBNuh9VFJIViCqRFH9PVXY9niX9Yq ZrCFyB9755THaPUR9M5eaa9tR1o43HghOJr8P67u9onjntiFmS5Om3XYAjK3sLyv7pUm sARq4ZdWIyDSZNKtj9DnJEYpG2DszCSaWKMFa4YxjMj2phKn42bXGY1yDrDOvHDHQTS2 5spw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id; bh=S73UvF5YzZDQp8dCOacnPtrQIfdnLw2xf3dNDOjzqag=; fh=IhxrutHeH4WMnmLgCUT9efJ9vZhH5Nx0kc6bPLI6DFw=; b=rkm99k5vuQtl5nPCHP5OB9DscwSa9ThwdjUOZAGY/bEOGyBnKoDM+3ZfMccenl1bOk GxRi4ykBE0RD9dknSA7yXTzq+xuoN1o23GU+8pIjLS49De6hOL8uHgKvqfNDfJwOWr3g q4eiZgPy7eIzFQEy0YmVUOhODTPlVeYqIjoVVPzC7c3VS3xdO7ZGJiEGCpmtmrypDgcQ 19hC5Wg8sTa5KNRlG8shGclQ0cABZGUzCW8kCwhPGDlNcYFI1fpo5zjwvtJE6wB77reM EAi9Pue0expVOao5+o5DLzwgPU+grnZFMwuWcHilLfclxJjjIu+ck7Cpjyfl7OktZKGr ZfAw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id c10-20020a05600c0a4a00b003fe16346f71si507339wmq.1.2023.08.02.14.31.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 Aug 2023 14:31:40 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from [127.0.0.1] (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 372LVcGv028519 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 2 Aug 2023 23:31:39 +0200 Message-ID: Subject: Re: [PATCH v2 1/2] fix group splitting in user creation From: Uladzimir Bely To: Felix Moessbauer , isar-users@googlegroups.com Cc: tobias.schaffner@siemens.com Date: Thu, 03 Aug 2023 00:31:37 +0300 In-Reply-To: <20230727032415.3366650-1-felix.moessbauer@siemens.com> References: <20230727032415.3366650-1-felix.moessbauer@siemens.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (by Flathub.org) MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: C8SZbspHYpBf On Thu, 2023-07-27 at 03:24 +0000, 'Felix Moessbauer' via isar-users wrote: > There is a bug when converting the USER_[groups] configuration > from the bitbake format (space separated) to the format useradd > expects (comma separated). We cannot simply replace spaces with > commas, > as then multiple spaces in a row would create multiple commas. > Instead, > we need to split it first into the tokens and then join these tokens > by > comma. >=20 > Signed-off-by: Felix Moessbauer > --- > =C2=A0meta/classes/image-account-extension.bbclass | 4 ++-- > =C2=A01 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/meta/classes/image-account-extension.bbclass > b/meta/classes/image-account-extension.bbclass > index e783c135..6f67f459 100644 > --- a/meta/classes/image-account-extension.bbclass > +++ b/meta/classes/image-account-extension.bbclass > @@ -98,10 +98,10 @@ def image_create_users(d: "DataSmart") -> None: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 add_user_option("--comme= nt", "comment") > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 add_user_option("--shell= ", "shell") > =C2=A0 > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 groups =3D d.getVarFlag(user_= entry, "groups") or "" > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 groups =3D (d.getVarFlag(user= _entry, "groups") or "").split() > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if groups: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = args.append("--groups") > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 args.= append(groups.replace(' ', ',')) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 args.= append(','.join(groups)) > =C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 flags =3D (d.getVarFlag(= user_entry, "flags") or "").split() > =C2=A0 > --=20 > 2.34.1 >=20 Series applied to next, thanks.