From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Christian Stewart <christian@paral.in>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>,
Ricardo Martincoski <ricardo.martincoski@datacom.com.br>,
Buildroot List <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH RFC 1/2] utils/docker-run: make it compatible with SELinux
Date: Fri, 28 Jul 2023 09:24:07 +0200 [thread overview]
Message-ID: <20230728092407.7426532a@windsurf> (raw)
In-Reply-To: <CA+h8R2qJF87Wi_w9DBjFZO__x=Kku+hfU1_-uhn2tLegFtc37g@mail.gmail.com>
Hello Christian,
On Thu, 27 Jul 2023 20:13:08 -0700
Christian Stewart <christian@paral.in> wrote:
> On Wed, Jul 26, 2023 at 2:20 PM Thomas Petazzoni
> <thomas.petazzoni@bootlin.com> wrote:
> > - --mount "type=bind,src=${MAIN_DIR},dst=${MAIN_DIR}"
> > - --mount "type=bind,src=${GIT_DIR},dst=${GIT_DIR}"
> > + --volume "${MAIN_DIR}:${MAIN_DIR}:Z"
> > + --volume "${GIT_DIR}:${GIT_DIR}:Z"
> > --workdir "${MAIN_DIR}"
>
> What is the purpose of the GIT_DIR mount here, doesn't MAIN_DIR contain .git?
This is explained in 791c163b2f9f07d4c02b18eabd9b195918e1c603:
commit 791c163b2f9f07d4c02b18eabd9b195918e1c603
Author: Yann E. MORIN <yann.morin.1998@free.fr>
Date: Sat May 6 23:46:18 2023 +0200
utils/docker-run: make it work in workdirs/woktrees
It is quite customary to use a single repository with multiple workdirs,
one for each active branch, with either the aging 'git new-workdir' or
the more recent 'git worktree'.
However, in a workdir/worktree, most entries in .git/ are only symlinks
to the actual files in the main repository.
Currently, utils/docker-run only bind-mounts the current working copy.
If that is a workdir/worktree, then it is going to be missing the actual
git data, resulting in errors like:
$ ./utils/docker-run make check-package
fatal: not a git repository (or any parent up to mount point [....]/buildroot)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
No files to check style
make: *** [Makefile:1257: check-package] Error 1
So, we also bind-mount the actual git directory. If that is a subdir
of the current working copy, then it is already mounted and thus the
bind-mount is superfluous but harmless; for simplicity, we mount it
unconditionally.
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Ricardo Martincoski <ricardo.martincoski@datacom.com.br>
> I think this mount might be causing some unpredictable behavior in the
> host-go package, but it's just a hunch at the moment.
Did you confirm this?
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
next prev parent reply other threads:[~2023-07-28 7:24 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
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 [this message]
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=20230728092407.7426532a@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox