From fda932a3a38631831df718a05eef023b70edfbea Mon Sep 17 00:00:00 2001 From: Dan Kluser Date: Sun, 10 May 2026 07:15:52 +0200 Subject: [PATCH] fix arch under qemu build and cachy kernel --- build_image.sh | 2 +- distros/arch/image.yaml | 3 +++ distros/cachyos/image.yaml | 8 ++------ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/build_image.sh b/build_image.sh index 8364b01..6b05860 100755 --- a/build_image.sh +++ b/build_image.sh @@ -66,7 +66,7 @@ if [ "$DISTRO" = "all" ] && [ "$IMG_SIZE" = "12000" ]; then fi if [ -z "$FORMAT" ]; then - case "$DISTRO" in arch) FORMAT="arch" ;; all) FORMAT="all" ;; *) FORMAT="deb" ;; esac + case "$DISTRO" in arch|cachyos) FORMAT="arch" ;; all) FORMAT="all" ;; *) FORMAT="deb" ;; esac fi KERNEL_BUILDER_PLATFORM="linux/amd64" diff --git a/distros/arch/image.yaml b/distros/arch/image.yaml index 865cf10..1add40b 100644 --- a/distros/arch/image.yaml +++ b/distros/arch/image.yaml @@ -118,6 +118,9 @@ actions: action: |- #!/bin/bash set -eux + # Pacman 7 Landlock sandbox is unsupported under QEMU; disable it. + sed -i '/^\[options\]/a DisableSandbox' /etc/pacman.conf + # Initialise pacman keyring pacman-key --init pacman-key --populate archlinux diff --git a/distros/cachyos/image.yaml b/distros/cachyos/image.yaml index bcf0aab..4d1bec4 100644 --- a/distros/cachyos/image.yaml +++ b/distros/cachyos/image.yaml @@ -156,12 +156,8 @@ actions: action: |- #!/bin/bash set -eux - # Pacman 7 Landlock/seccomp sandbox breaks under distrobuilder/Docker (unsupported kernel). - if grep -q '^#DisableSandbox' /etc/pacman.conf; then - sed -i 's/^#DisableSandbox/DisableSandbox/' /etc/pacman.conf - elif ! grep -q '^DisableSandbox' /etc/pacman.conf; then - sed -i '/^\[options\]/a DisableSandbox' /etc/pacman.conf - fi + # Pacman 7 Landlock sandbox is unsupported under QEMU; disable it. + sed -i '/^\[options\]/a DisableSandbox' /etc/pacman.conf CACHYOS_PKG="https://mirror.cachyos.org/repo/x86_64/cachyos"