Skip to content

build: add CONTAINER_MOUNT_OPTS to toolchain container runs#779

Merged
frysee merged 1 commit into
LoveRetro:mainfrom
Pobega:container_mount_ops-buildflag
Jul 16, 2026
Merged

build: add CONTAINER_MOUNT_OPTS to toolchain container runs#779
frysee merged 1 commit into
LoveRetro:mainfrom
Pobega:container_mount_ops-buildflag

Conversation

@Pobega

@Pobega Pobega commented Jul 16, 2026

Copy link
Copy Markdown

Introduce an overridable CONTAINER_MOUNT_OPTS variable (default empty) and inject it before the workspace bind mount in every toolchain container invocation (all/build/build-cores/build-core and the runtime-check cleanup).

On SELinux-enforcing hosts (e.g. Fedora Toolbox) the toolchain container can't read the bind-mounted workspace, failing with "Permission denied" on the makefile. Setting CONTAINER_MOUNT_OPTS="--security-opt label=disable" lets the container access the mount without relabeling the tree (":z" relabeling doesn't work through rootless/flatpak-spawn setups).

Default-empty keeps existing behavior unchanged on non-SELinux hosts.

Introduce an overridable CONTAINER_MOUNT_OPTS variable (default empty)
and inject it before the workspace bind mount in every toolchain
container invocation (all/build/build-cores/build-core and the
runtime-check cleanup).

On SELinux-enforcing hosts (e.g. Fedora Toolbox) the toolchain container
can't read the bind-mounted workspace, failing with "Permission denied"
on the makefile. Setting CONTAINER_MOUNT_OPTS="--security-opt
label=disable" lets the container access the mount without relabeling
the tree (":z" relabeling doesn't work through rootless/flatpak-spawn
setups).

Default-empty keeps existing behavior unchanged on non-SELinux hosts.
@Pobega

Pobega commented Jul 16, 2026

Copy link
Copy Markdown
Author

This is just a small workaround to an issue I was running into.

I run Fedora Silverblue and do all my development in a Toolbox container. Toolbox does not like :z mounted devices from the host, passing the extra flag mentioned in the comment/commit message allows me to successfully build NextUI.

Has no effect on builds that don't specify CONTAINER_MOUNT_OPTS manually.

Successfully built via: make all PLATFORMS=tg5040 CONTAINER_RUNTIME="flatpak-spawn --host docker" CONTAINER_MOUNT_OPTS="--security-opt label=disable"

@frysee

frysee commented Jul 16, 2026

Copy link
Copy Markdown
Member

Looks good to me. I've restarted the failed builds, looks like a temporary issue upstream.

@Pobega

Pobega commented Jul 16, 2026

Copy link
Copy Markdown
Author

Looks like the CI failure was a transient issue 👍

@frysee
frysee merged commit f524d3b into LoveRetro:main Jul 16, 2026
122 of 124 checks passed
@Pobega
Pobega deleted the container_mount_ops-buildflag branch July 16, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants