public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "Maxim Yu. Osipov" <mosipov@ilbers.de>
To: Henning Schild <henning.schild@siemens.com>, isar-users@googlegroups.com
Cc: Michael Adler <michael.adler@siemens.com>,
	Jan Kiszka <jan.kiszka@siemens.com>
Subject: Re: [PATCH] buildchroot: do not assume group of "builder" to be "builder"
Date: Thu, 14 Mar 2019 20:19:35 +0100	[thread overview]
Message-ID: <56852a2f-d7f6-739a-0d85-7ea8eef2b49a@ilbers.de> (raw)
In-Reply-To: <20190227102606.18017-1-henning.schild@siemens.com>

On 2/27/19 11:26 AM, Henning Schild wrote:
> From: Henning Schild <henning.schild@siemens.com>
> 
> 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 <michael.adler@siemens.com>
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
>   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:<gid of 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:<gid of 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

      parent reply	other threads:[~2019-03-14 19:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-27 10:26 Henning Schild
2019-02-27 10:28 ` Henning Schild
2019-02-27 11:26   ` Adler, Michael
2019-03-14 19:19 ` Maxim Yu. Osipov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56852a2f-d7f6-739a-0d85-7ea8eef2b49a@ilbers.de \
    --to=mosipov@ilbers.de \
    --cc=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.com \
    --cc=michael.adler@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox