From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6662624591324643328 X-Received: by 2002:a19:da19:: with SMTP id r25mr3089475lfg.4.1552591178866; Thu, 14 Mar 2019 12:19:38 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:92cf:: with SMTP id k15ls874740ljh.6.gmail; Thu, 14 Mar 2019 12:19:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqxnuoYF959UbM6mJnWthH4kRYgpSTe6BpkVjJFjn3FG44FCXejpw0WCeykqg4XjmMuX10jh X-Received: by 2002:a2e:85cd:: with SMTP id h13mr2864186ljj.8.1552591178280; Thu, 14 Mar 2019 12:19:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552591178; cv=none; d=google.com; s=arc-20160816; b=gJCsevqEChfuw7E7i+Fkp6FQ4gOqN01esCrt0hAXOOLcHk/DTNKIH9APDgx32gFHuO 614Ey5nQOVMzBkd+Nk2Y/JrWYbLnR4HaG8cnUkfNaiAa4Ve252EdqH3yLO8bBQ/5Pfzq okFewsYJ6iTnRTh54GDjY6ah627sazAz3xPhGHfl9QdJfn1Hnw6UDPGGs3aCsPXrx0ow iWyRshdpnJLZ1Tj0Hjl1I6JfRpsyQigT6Xo8nYrWs8dDZe4vpIsXzncbPlXS8aNGVkVi 10Q7dECojegnd6meiahv3Dk9PjEs61HcJmgDU+JsNwzvouxWdu7gMg/ZYfxLEG1lFWt/ EwGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:organization:from:references:cc:to :subject; bh=GsI4c8ErmJZHEG+Rtu9eYIdJ3uu905+QdI+eHNbqSgY=; b=YXpdK5Ujptrn6aMUd3yFC7BnsKaOjjYmVxIaDEgiqKUG1ahAA3Cq16KbSyXLRCGUtY B7OZK4IzHH8aeDjPJnrgUk4LKeQQpDefEbxz+2oRLsxxyXSaOQkFoLOvUgA0uK1an3/P liZnIM0GvpfyoWtw3rYg9SCHChgND+wKHXw3SthjfdXwfMU6tunJQi2n9PK9X+O9tbRM BqFvXSN+4xmIIcqc0wAIpesUbepKJYvcxzMDCmEK+MCogbkveDdjfpiJ8D7jdlvrV1Oh wxNAqQ2LD8EL527IGja5V38QEzCmF3C9aHVzzZ/i9spBlJZDqIE0+0PnetOScqDHUPNf n9xg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of mosipov@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id h14si264867lja.2.2019.03.14.12.19.38 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Mar 2019 12:19:38 -0700 (PDT) Received-SPF: pass (google.com: domain of mosipov@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 mosipov@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Received: from [192.168.50.163] (d51A48A80.access.telenet.be [81.164.138.128]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPSA id x2EJJaYX027621 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Mar 2019 20:19:36 +0100 Subject: Re: [PATCH] buildchroot: do not assume group of "builder" to be "builder" To: Henning Schild , isar-users@googlegroups.com Cc: Michael Adler , Jan Kiszka References: <20190227102606.18017-1-henning.schild@siemens.com> From: "Maxim Yu. Osipov" Organization: ilbers GmbH Message-ID: <56852a2f-d7f6-739a-0d85-7ea8eef2b49a@ilbers.de> Date: Thu, 14 Mar 2019 20:19:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190227102606.18017-1-henning.schild@siemens.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,URIBL_BLOCKED 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: xWUS3RRZGxWz On 2/27/19 11:26 AM, Henning Schild wrote: > From: Henning Schild > > We try to align the user and group ids of the user running bitbake with > the users inside the chroots. If that outside user happens to be in a > group that already exists in a fresh installation (i.e. users:100) we > will not create a group called "builder" so checking the group name > later will fail. Just check that the gid is the gid of "builder" instead > of checking that the group name is "builder". Applied to the 'next'. Thanks, Maxim. > Reported-by: Michael Adler > Signed-off-by: Henning Schild > --- > meta/recipes-devtools/buildchroot/files/common.sh | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/meta/recipes-devtools/buildchroot/files/common.sh b/meta/recipes-devtools/buildchroot/files/common.sh > index 9e6adbc..01d3c57 100644 > --- a/meta/recipes-devtools/buildchroot/files/common.sh > +++ b/meta/recipes-devtools/buildchroot/files/common.sh > @@ -7,10 +7,10 @@ > set -e > printenv | grep -q BB_VERBOSE_LOGS && set -x > > -# assert we are either "root:root" or "builder:builder" > -if ([ "$(id -un)" != "builder" ] || [ "$(id -gn)" != "builder" ]) && > +# assert we are either "root:root" or "builder:" > +if ([ "$(id -un)" != "builder" ] || [ "$(id -g)" != "$(id -g builder)" ]) && > ([ "$(id -un)" != "root" ] || [ "$(id -gn)" != "root" ]); then > - echo "This script can only be run as root:root or builder:builder!" >&2 > + echo "This script can only be run as root:root or builder:!" >&2 > echo "(Currently running as $(id -un)($(id -u)):$(id -gn)($(id -g)))" >&2 > exit 1 > fi > -- Maxim Osipov ilbers GmbH Maria-Merian-Str. 8 85521 Ottobrunn Germany +49 (151) 6517 6917 mosipov@ilbers.de http://ilbers.de/ Commercial register Munich, HRB 214197 General Manager: Baurzhan Ismagulov