From 7dcb57b04772937f39841a82d2ec0258b637a23c Mon Sep 17 00:00:00 2001 From: Sami Altamimi <139174515+saminaltamimi@users.noreply.github.com> Date: Thu, 15 Jan 2026 16:18:34 -0600 Subject: [PATCH] justfile: make SELinux optional If SELinux is not the base system (which might be the case if you use Ubuntu), we will fail to build. --- Justfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Justfile b/Justfile index 0485469..a62607a 100644 --- a/Justfile +++ b/Justfile @@ -2,7 +2,9 @@ image_name := env("BUILD_IMAGE_NAME", "arch-bootc") image_tag := env("BUILD_IMAGE_TAG", "latest") base_dir := env("BUILD_BASE_DIR", ".") filesystem := env("BUILD_FILESYSTEM", "ext4") +selinux := env("BUILD_SELINUX", "true") +options := if selinux == "true" { "-v /var/lib/containers:/var/lib/containers:Z -v /etc/containers:/etc/containers:Z -v /sys/fs/selinux:/sys/fs/selinux --security-opt label=type:unconfined_t" } else { "-v /var/lib/containers:/var/lib/containers -v /etc/containers:/etc/containers" } container_runtime := env("CONTAINER_RUNTIME", `command -v podman >/dev/null 2>&1 && echo podman || echo docker`) build-containerfile $image_name=image_name: @@ -12,13 +14,10 @@ bootc *ARGS: sudo {{container_runtime}} run \ --rm --privileged --pid=host \ -it \ - -v /sys/fs/selinux:/sys/fs/selinux \ - -v /etc/containers:/etc/containers:Z \ - -v /var/lib/containers:/var/lib/containers:Z \ + {{options}} \ -v /dev:/dev \ -e RUST_LOG=debug \ -v "{{base_dir}}:/data" \ - --security-opt label=type:unconfined_t \ "{{image_name}}:{{image_tag}}" bootc {{ARGS}} generate-bootable-image $base_dir=base_dir $filesystem=filesystem: