From: Henning Schild <henning.schild@siemens.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH] buildchroot: chown the whole WORKDIR to builder:builder
Date: Mon, 12 Nov 2018 15:18:25 +0100 [thread overview]
Message-ID: <20181112151825.2440e739@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <17de5954-55a5-bdb7-88b6-e7daebb880e5@siemens.com>
Am Mon, 12 Nov 2018 14:55:30 +0100
schrieb Jan Kiszka <jan.kiszka@siemens.com>:
> On 12.11.18 14:46, [ext] Henning Schild wrote:
> > This is truly wrong, because now we chown temp/ and other bitbake
> > owned files.
> > The real fix probably is reverting 624b7c484bf5, will send another
> > patch.
>
> Please finally accept: We need alignment of the ownership rights (and
> that implies user IDs) between the bitbake and the chroot build
> environment. Then and only then we can revert that commit.
I can confirm that just reverting this one will also not be correct.
And yes i would now also conclude that aligning the ids is probably
what we should do.
The reason is that we access several folders inside WORKDIR as non-root
from both inside and outside chroot. The alternative to alignment would
be chowning back and forth as we enter/leave ... not even thinking
about parallel jobs.
I will send a series where i will include your alignment patch, to
propose a merging order of patches.
Henning
> Jan
>
> >
> > Henning
> >
> > Am Mon, 12 Nov 2018 12:53:15 +0100
> > schrieb Henning Schild <henning.schild@siemens.com>:
> >
> >> The initial idea was to chown as little as possible, but there is a
> >> "chown -R" in do_unpack that we need to work against when
> >> rebuilding a package.
> >>
> >> Fixes: be291cd991bd ("buildchroot: build debian packages as
> >> "builder" not "root"") Signed-off-by: Henning Schild
> >> <henning.schild@siemens.com> ---
> >> meta/recipes-devtools/buildchroot/files/build.sh | 3 +--
> >> 1 file changed, 1 insertion(+), 2 deletions(-)
> >>
> >> diff --git a/meta/recipes-devtools/buildchroot/files/build.sh
> >> b/meta/recipes-devtools/buildchroot/files/build.sh index
> >> 66b1a77..112aac3 100644 ---
> >> a/meta/recipes-devtools/buildchroot/files/build.sh +++
> >> b/meta/recipes-devtools/buildchroot/files/build.sh @@ -15,6 +15,5
> >> @@ for i in configure aclocal.m4 Makefile.am Makefile.in; do done
> >>
> >> # Build the package as user "builder"
> >> -chown -R builder:builder $1 # the sources
> >> -chown builder:builder $1/.. # the output
> >> +chown -R builder:builder $1/.. # the whole WORKDIR
> >> su builder -c "cd $1; dpkg-buildpackage -a$target_arch -d
> >> --source-option=-I"
> >
>
prev parent reply other threads:[~2018-11-12 14:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-12 11:53 Henning Schild
2018-11-12 13:46 ` Henning Schild
2018-11-12 13:55 ` Jan Kiszka
2018-11-12 14:18 ` Henning Schild [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=20181112151825.2440e739@md1za8fc.ad001.siemens.net \
--to=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@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