From: Jan Kiszka <jan.kiszka@siemens.com>
To: Henning Schild <henning.schild@siemens.com>
Cc: isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH] buildchroot: Align UID and GID of builder user with caller
Date: Mon, 12 Nov 2018 11:09:27 +0100 [thread overview]
Message-ID: <0cae7837-9c01-d87b-dd65-851c670caced@siemens.com> (raw)
In-Reply-To: <20181112110625.1f55f7a5@md1za8fc.ad001.siemens.net>
On 12.11.18 11:06, Henning Schild wrote:
> Am Mon, 12 Nov 2018 10:52:22 +0100
> schrieb Jan Kiszka <jan.kiszka@siemens.com>:
>
>> On 12.11.18 10:42, Henning Schild wrote:
>>> Am Mon, 12 Nov 2018 10:19:54 +0100
>>> schrieb Jan Kiszka <jan.kiszka@siemens.com>:
>>>
>>>> On 12.11.18 10:16, [ext] Henning Schild wrote:
>>>>> I am afraid that this is not correct. The ids you are taking from
>>>>> the "host" might be taken inside the chroot. As a result creating
>>>>> the user/group would fail. Chances might be low ... This also
>>>>> assumes that
>>>>
>>>> Really? I thought that these commands are run very early during
>>>> bootstrap where there are no other users - if not, that would be a
>>>> bug.
>>>
>>> I think the only uid/gid you can really be sure about is 0. 1 could
>>> already be a regular user on the host, and 1 is "daemon" on a
>>> current debian ... probably there right after debootstrap.
>>
>> Let me check if we can move the ID assignment earlier, to reduce that
>> risk.
>
> I will look into it. Knowing a problem and reducing the risk is not
> good enough.
>
>>>
>>> 1000 being the first "user" is more a convention than something you
>>> can rely on for any host. (/etc/login.defs UID_MIN/MAX etc.)
>>
>> We are talking about transferring the ID's from the host Debian to
>> the buildchroot Debian - is there really a realistic risk of friction?
>
> Now you are assuming that everyone is using your container ;). While
No, this is not about the container. We already solved the problem for the
container long ago (by aligning IDs). This breakage is about the host (in the
container or on your host) and the buildchroot.
> this is helpful i would like to allow anyone to build without docker,
> given they have a few debian utils on their machine.
>
>> If we can't solve that sync problem, we need to revert to running as
>> root, I'm afraid. The current model is broken.
>
> I will send a follow up patch ... maybe today. The reproduction build
> is already running.
TIA!
>
> Did you see it in any other package than u-boot? Maybe the u-boot
> recipes are broken? I still do not see how a file formerly owned
> by root:root can cause problems as 1000:1000 ... but i guess i will
> understand that once i can reproduce.
U-boot is exposing it, but you see the breakage earlier by getting funny UIDs of
the artifacts after running a dpkg build.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2018-11-12 10:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-10 7:52 Jan Kiszka
2018-11-12 9:16 ` Henning Schild
2018-11-12 9:19 ` Jan Kiszka
2018-11-12 9:42 ` Henning Schild
2018-11-12 9:52 ` Jan Kiszka
2018-11-12 10:06 ` Henning Schild
2018-11-12 10:09 ` Jan Kiszka [this message]
2018-11-12 11:58 ` Henning Schild
2018-11-12 12:11 ` Jan Kiszka
2018-11-12 12:27 ` Jan Kiszka
2018-11-12 13:37 ` Henning Schild
2018-11-12 12:34 ` Henning Schild
2018-11-12 12:33 ` Jan Kiszka
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=0cae7837-9c01-d87b-dd65-851c670caced@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=henning.schild@siemens.com \
--cc=isar-users@googlegroups.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