All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Christian Stewart <christian@paral.in>,
	Ricardo Martincoski <ricardo.martincoski@datacom.com.br>,
	Buildroot List <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH RFC 2/2] utils/docker-run: mount the download directory if specified
Date: Tue, 8 Aug 2023 23:24:51 +0200	[thread overview]
Message-ID: <20230808232451.31faff5b@windsurf> (raw)
In-Reply-To: <20230808205047.GC421096@scaer>

Hello,

On Tue, 8 Aug 2023 22:50:47 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> So, I guess your issue is that /dl does not exist in the container, so
> it is created by the docker runtime and thus group-belongs to docker,
> and the SELinux labelling means that everything beneath it also belongs
> to docker.
> 
> Also:
> 
> * what about files that already existed before: are the chgrp-ed to
>   docker, or do they retain their group?

Folders in /dl that existed before in the BR2_DL_DIR on my "host" look
like this outside the container:

$ ls -l ~/dl/xz
drwxr-xr-x. 2 thomas thomas 4096  6 août  00:05 /home/thomas/dl/xz

and inside the container:

$ ./utils/docker-run ls -ld /dl/xz
drwxr-xr-x. 2 br-user br-user 4096 Aug  5 22:05 /dl/xz

> * and from within the container, whom do the files belong to?

The files downloaded in /dl from within the container (by running a
Buildroot build in the container, that causes some downloads to take
place). They appear outside the container as such:

$ ls -ld ~/dl/swig
drwxr-xr-x. 2 thomas docker 4096 26 juil. 23:00 /home/thomas/dl/swig/

And within the container they appear as such:

$ ./utils/docker-run ls -ld /dl/swig
drwxr-xr-x. 2 br-user 976 4096 Jul 26 21:00 /dl/swig

Inside the container, the /dl directory itself is owned by
br-user:br-user:

$ ./utils/docker-run ls -ld /dl
drwxr-xr-x. 276 br-user br-user 12288 Aug  8 21:18 /dl

Does that answer your question?

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2023-08-08 21:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-26 21:20 [Buildroot] [PATCH RFC 1/2] utils/docker-run: make it compatible with SELinux Thomas Petazzoni via buildroot
2023-07-26 21:20 ` [Buildroot] [PATCH RFC 2/2] utils/docker-run: mount the download directory if specified Thomas Petazzoni via buildroot
2023-08-08 20:50   ` Yann E. MORIN
2023-08-08 21:24     ` Thomas Petazzoni via buildroot [this message]
2023-07-27  8:13 ` [Buildroot] [PATCH RFC 1/2] utils/docker-run: make it compatible with SELinux Antoine Tenart
2023-07-27  8:48   ` Thomas Petazzoni via buildroot
2023-07-27 10:19     ` Antoine Tenart
2023-07-27 10:24       ` Thomas Petazzoni via buildroot
2023-07-27 10:50         ` Antoine Tenart
2023-07-27 11:47           ` Antoine Tenart
2023-07-27 16:21 ` Yann E. MORIN
     [not found] ` <CA+h8R2qJF87Wi_w9DBjFZO__x=Kku+hfU1_-uhn2tLegFtc37g@mail.gmail.com>
2023-07-28  7:24   ` Thomas Petazzoni via buildroot
2023-08-09 21:32 ` Yann E. MORIN

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=20230808232451.31faff5b@windsurf \
    --to=buildroot@buildroot.org \
    --cc=christian@paral.in \
    --cc=ricardo.martincoski@datacom.com.br \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=yann.morin.1998@free.fr \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.