From cef906d03a13246e5785b8ab7a0b16a89fec150f Mon Sep 17 00:00:00 2001 From: Spencer Bull Date: Wed, 9 Sep 2026 22:11:54 -0500 Subject: [PATCH] Make the Cowork optdepends deliver Cowork, and name the Claude Code sandbox deps The app probes Debian's paths for its VM stack: /usr/libexec/virtiofsd then /usr/bin/virtiofsd, and /usr/share/OVMF/OVMF_CODE_4M.fd with the VARS path derived from it. Arch ships virtiofsd at /usr/lib/virtiofsd and the firmware at /usr/share/edk2/x64/OVMF_CODE.4m.fd, so installing the advertised optdepends still left Cowork reporting QEMU missing. Symlinks at the probed paths map them onto Arch's; the app's probe reads through them, they dangle harmlessly until the optdepends arrive, and /usr/libexec keeps the virtiofsd link out of $PATH while it does. The firmware optdepend moves into optdepends_x86_64, and aarch64 loses its Cowork optdepends entirely: the aarch64 builds run against Arch Linux ARM, which ships no UEFI firmware package at all, so both the edk2 name and the qemu-system-aarch64 entry promised a VM that cannot boot there. The embedded Claude Code diagnoses missing sandbox dependencies when bubblewrap and socat are absent; they join the optdepends under the same wording as the standalone claude-code package. Co-Authored-By: Claude Fable 5 Co-Authored-By: Codex XHigh --- pkgbuilds/claude-desktop/PKGBUILD | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/pkgbuilds/claude-desktop/PKGBUILD b/pkgbuilds/claude-desktop/PKGBUILD index 8eab40b..810d106 100644 --- a/pkgbuilds/claude-desktop/PKGBUILD +++ b/pkgbuilds/claude-desktop/PKGBUILD @@ -34,11 +34,16 @@ depends=( optdepends=( 'gnome-keyring: store credentials in a system keyring' - 'edk2-ovmf: UEFI firmware for the Cowork virtual machine' + 'bubblewrap: Claude Code sandboxing' + 'socat: Claude Code sandboxing' 'virtiofsd: file sharing with the Cowork virtual machine' ) -optdepends_x86_64=('qemu-system-x86: run Cowork tasks in a local virtual machine') -optdepends_aarch64=('qemu-system-aarch64: run Cowork tasks in a local virtual machine') +optdepends_x86_64=( + 'qemu-system-x86: run Cowork tasks in a local virtual machine' + 'edk2-ovmf: UEFI firmware for the Cowork virtual machine' +) +# No Cowork optdepends on aarch64: Arch Linux ARM ships no UEFI firmware +# package, so the app's /usr/share/AAVMF probe has nothing to resolve to. makedepends=('libarchive') options=('!debug' '!strip') @@ -78,6 +83,17 @@ package() { install -Dm644 "${pkgdir}/usr/share/doc/claude-desktop/copyright" \ "${pkgdir}/usr/share/licenses/${pkgname}/copyright" + # Cowork probes Debian's paths for its VM stack; map them onto Arch's. + # The links dangle harmlessly until the matching optdepends are installed. + install -d "${pkgdir}/usr/libexec" + ln -s ../lib/virtiofsd "${pkgdir}/usr/libexec/virtiofsd" + if [[ "${CARCH}" == x86_64 ]]; then + # The app derives the VARS path from the CODE path, so both need a link. + install -d "${pkgdir}/usr/share/edk2" + ln -s x64/OVMF_CODE.4m.fd "${pkgdir}/usr/share/edk2/OVMF_CODE_4M.fd" + ln -s x64/OVMF_VARS.4m.fd "${pkgdir}/usr/share/edk2/OVMF_VARS_4M.fd" + fi + # Debian package-policy files are not used on Arch Linux. rm -rf "${pkgdir}/usr/share/doc" "${pkgdir}/usr/share/lintian" }