* [PATCH] tools/build-docs-container: use CONTAINERCMD to append args
@ 2025-10-09 10:05 Antonin Godard
2025-10-09 12:32 ` [docs] " Quentin Schulz
0 siblings, 1 reply; 3+ messages in thread
From: Antonin Godard @ 2025-10-09 10:05 UTC (permalink / raw)
To: docs; +Cc: Thomas Petazzoni, Antonin Godard
What we have is OCI = $(which $CONTAINERCMD) = /usr/bin/{docker,podman}.
So we never pass these if conditions. Compare against CONTAINERCMD instead.
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
documentation/tools/build-docs-container | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/documentation/tools/build-docs-container b/documentation/tools/build-docs-container
index 70e05f295..a93e0668b 100755
--- a/documentation/tools/build-docs-container
+++ b/documentation/tools/build-docs-container
@@ -157,11 +157,11 @@ main ()
--security-opt label=disable
)
- if [ "$OCI" = "docker" ]; then
+ if [ "$CONTAINERCMD" = "docker" ]; then
args_run+=(
--user="$(id -u)":"$(id -g)"
)
- elif [ "$OCI" = "podman" ]; then
+ elif [ "$CONTAINERCMD" = "podman" ]; then
# we need net access to fetch bitbake terms
args_run+=(
--cap-add=NET_RAW
---
base-commit: 09c7800333b17b21e50d2a089a3ae1b123697243
change-id: 20251009-fix-build-docs-container-args-d50c9ecbf7bf
Best regards,
--
Antonin Godard <antonin.godard@bootlin.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [docs] [PATCH] tools/build-docs-container: use CONTAINERCMD to append args
2025-10-09 10:05 [PATCH] tools/build-docs-container: use CONTAINERCMD to append args Antonin Godard
@ 2025-10-09 12:32 ` Quentin Schulz
2025-10-13 7:08 ` Antonin Godard
0 siblings, 1 reply; 3+ messages in thread
From: Quentin Schulz @ 2025-10-09 12:32 UTC (permalink / raw)
To: antonin.godard, docs; +Cc: Thomas Petazzoni
Hi Antonin,
On 10/9/25 12:05 PM, Antonin Godard via lists.yoctoproject.org wrote:
> What we have is OCI = $(which $CONTAINERCMD) = /usr/bin/{docker,podman}.
> So we never pass these if conditions. Compare against CONTAINERCMD instead.
>
> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Nope, this won't work if you call the script with docker but run with
podman. This would be the case if you have podman-docker package
installed on fedora for example, c.f.
https://packages.fedoraproject.org/pkgs/podman/podman-docker/.
So we do really want to test OCI I think.
A few options:
- "$(basename "$OCI")"
- if [[ "$OCI" =~ "/docker$" ]];
elif [[ "$OCI" =~ "/podman$" ]]
c.f.
https://www.gnu.org/software/bash/manual/html_node/Conditional-Constructs.html#index-_005b_005b
- if echo "$OCI" | grep -q -w docker; then
elif echo "$OCI" | grep -q -w podman; then
This script has worked fine for me with podman-docker script with only
podman installed on my system, can you tell me what the issue is so
we're sure we're fixing the issues?
Cheers,
Quentin
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [docs] [PATCH] tools/build-docs-container: use CONTAINERCMD to append args
2025-10-09 12:32 ` [docs] " Quentin Schulz
@ 2025-10-13 7:08 ` Antonin Godard
0 siblings, 0 replies; 3+ messages in thread
From: Antonin Godard @ 2025-10-13 7:08 UTC (permalink / raw)
To: quentin.schulz, docs; +Cc: Thomas Petazzoni
On Thu Oct 9, 2025 at 2:32 PM CEST, Quentin Schulz via lists.yoctoproject.org wrote:
> Hi Antonin,
>
> On 10/9/25 12:05 PM, Antonin Godard via lists.yoctoproject.org wrote:
>> What we have is OCI = $(which $CONTAINERCMD) = /usr/bin/{docker,podman}.
>> So we never pass these if conditions. Compare against CONTAINERCMD instead.
>>
>> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
>
> Nope, this won't work if you call the script with docker but run with
> podman. This would be the case if you have podman-docker package
> installed on fedora for example, c.f.
> https://packages.fedoraproject.org/pkgs/podman/podman-docker/.
Oh I see... I did not guess that.
I'll send a v2.
Thanks,
Antonin
--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-10-13 7:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-09 10:05 [PATCH] tools/build-docs-container: use CONTAINERCMD to append args Antonin Godard
2025-10-09 12:32 ` [docs] " Quentin Schulz
2025-10-13 7:08 ` Antonin Godard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox