mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: rhi@pengutronix.de, str@pengutronix.de,
	Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master] scripts: container.sh: map to UID/GUID 1000 in container
Date: Mon, 17 Jun 2024 16:09:06 +0200	[thread overview]
Message-ID: <20240617140906.2038133-1-a.fatoum@pengutronix.de> (raw)

The script was inadvertently assuming that the ID of the user executing
it is 1000. This is not necessarily the case for the host system, but we
know it's the case inside the container. Thus map the user account
outside the container to 1000/1000 within the container.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 scripts/container.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/container.sh b/scripts/container.sh
index 6bfb070692f5..1a68f0a5fe01 100755
--- a/scripts/container.sh
+++ b/scripts/container.sh
@@ -40,5 +40,5 @@ fi
 exec podman run -it $volumes --rm \
 	-e TERM -e ARCH -e CONFIG -e JOBS -e LOGDIR -e REGEX \
 	-e KBUILD_OUTPUT -e LG_BUILDDIR \
-	-e KCONFIG_ADD -w "$PWD" --userns=keep-id \
+	-e KCONFIG_ADD -w "$PWD" --userns=keep-id:uid=1000,gid=1000 \
 	-- "$CONTAINER" "${@:-/bin/bash}"
-- 
2.39.2




             reply	other threads:[~2024-06-17 14:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-17 14:09 Ahmad Fatoum [this message]
2024-06-18  6:14 ` Sascha Hauer

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=20240617140906.2038133-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=rhi@pengutronix.de \
    --cc=str@pengutronix.de \
    /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