feat: add Linux desktop packaging (deb) support - #79
Conversation
- Add tauri.linux.conf.json: deb target, Ark runtime resources, license files, icons, and an r-base-core recommend - Resolve the bundled Ark executable on Linux in ark_candidate_paths and record linux-x64/linux-arm64 entries in runtime/ark.json - Default WEBKIT_DISABLE_DMABUF_RENDERER=1 on Linux: NVIDIA proprietary graphics stacks fail GBM buffer allocation and leave the webview blank - Store agent provider credentials through the Secret Service keyring on Linux so model settings can save API keys - Skip unreadable or unstat-able entries while scanning project files instead of failing the whole project switch, and log the project restore failure detail in the startup log Verified on Ubuntu 24.04 arm64 (DGX Spark) with R 4.6.1 and ark 0.1.252: the produced deb installs, the Ark session starts, editor Run executes, and API keys persist via gnome-keyring. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…orkmain Merge Linux desktop packaging (deb) support into main. Conflict resolution decisions: - Cargo.lock / Cargo.toml / agent_llm.rs: keep main. LIN6 (keyring 4.1.6 'v1' -> zbus-secret-service) is the authoritative Linux Secret Service implementation; the PR's dbus-secret-service backend would add an openssl build dependency and its lockfile was based on an older main (dev.33). - runtime/ark.json: keep linux-x64 (main) and add linux-arm64 (PR). - tauri.linux.conf.json: merge both sides - targets [appimage, deb], keep externalBin, combine resources (AppImage license files plus the whole runtime dir for deb ark lookup), add deb recommends r-base-core. - main.rs ark_candidate_paths: combine main's AppImage layout with the PR's deb resource layout for linux x86_64; add a linux aarch64 arm; update the linux unit test and add an aarch64 case. - scripts/build-linux.sh: pin '--bundles appimage' so the AppImage lane still produces exactly the AppImage now that deb is also a default target. Kept from the PR: WEBKIT_DISABLE_DMABUF_RENDERER=1 default on Linux, project scan robustness (skip unreadable/unstat-able entries), startup log detail for project restore failures, linux-arm64 manifest entry. Residual: an arm64 deb build via plain 'tauri build' needs a matching binaries/ark-aarch64-unknown-linux-gnu sidecar (externalBin contract); x86_64 appimage+deb both build with the existing sidecar.
xiayh17
left a comment
There was a problem hiding this comment.
I reviewed PR #79 and am requesting changes.
The main blocker is scope/contract: the active Linux plan and cross-review still explicitly defer .deb/.rpm packaging and Linux arm64. This PR turns both on without amending/authorizing the active contract first, and the PR body leaves proposal/NEWS work as follow-up even though this repo treats those as gates for non-trivial product behavior.
I also found concrete packaging/runtime gaps around the ignored resources/runtime/ark path and the arm64 sidecar lane, plus one project-scan robustness hole. Verification I ran locally: git diff --check, node scripts/test-desktop-platform-config.mjs, node scripts/test-installed-license-surface.mjs, focused cargo test -p rho-desktop ark_lookup_, and focused project scan tests. Full cargo test -p rho-desktop reached 176 passed / 4 failed / 1 ignored; the 4 failures were sandbox TcpListener::bind("127.0.0.1:0") permission errors in existing agent discovery tests, not in the changed paths.
…rk staging, arm64 lane, project scan) Addresses the four review comments on PR YuLab-SMU#79: 1. Contract authority: the project owner authorized the deb Linux target and the Linux arm64 staging/build path on 2026-08-20. active-2026-08-11-linux- appimage-support.md records the amendment; cross-review no longer defers .deb or Linux arm64 staging. .rpm, arm64 AppImage/deb packaging, and automatic Linux updates remain deferred. 2. Bundled resources/runtime/ark is now staged and checksum-verified by prepare-runtime-resources.sh from the checked sidecar, instead of packaging whatever ignored file happens to exist in the runtime dir. 3. bootstrap-ark-linux.sh and prepare-runtime-resources.sh consume the runtime/ark.json linux-arm64 entry (sidecar ark-aarch64-unknown-linux-gnu, arch-aware ELF verification, runtime dir); main.rs linux/aarch64 candidate list now includes the development sidecar like x86_64. 4. project.rs skips and logs per-entry read_dir errors instead of failing the whole project scan; regression test added.
# Conflicts: # desktop/src-tauri/tauri.linux.conf.json
|
All four review comments are addressed on branch
Verified locally: |
xiayh17
left a comment
There was a problem hiding this comment.
Reviewed the fix commit 5a07cd4. All four original CHANGES_REQUESTED items are resolved:
- deb contract authority —
active-2026-08-11-linux-appimage-support.mdamended on 2026-08-20 to authorize the deb target; cross-review updated to remove the.deb/.rpmdeferral..rpm, arm64 AppImage/deb packaging, and automatic Linux updates remain deferred. - Bundled resources/runtime/ark checksum-verified —
prepare-runtime-resources.shnow stages the checked sidecar intodesktop/resources/runtime/arkwith atomic partial-file replacement and post-copy SHA256 verification, instead of packaging whatever ignored file happens to exist. - linux-arm64 staging lane —
bootstrap-ark-linux.shandprepare-runtime-resources.share now arch-aware (x86_64 + aarch64), consuming theruntime/ark.jsonlinux-arm64entry with arch-specific ELF verification and runtime dir.main.rslinux/aarch64 candidate list now includes the development sidecar. Fixture tests cover arm64 ELF rejection and unsupported-arch rejection. - project.rs per-entry error handling —
collect_dir_entrieshelper now skips and logs individualread_direrrors instead of propagating them viacollect::<Result<Vec>>()?. Per-entryfile_type(),canonicalize(),metadata(), andrelative_project_path()failures allcontinueinstead of failing the scan. Regression test added.
The DMABUF renderer workaround (WEBKIT_DISABLE_DMABUF_RENDERER=1 default on Linux) and project scan robustness improvements are clean and well-tested. The build lane pinning (--bundles appimage) correctly prevents the AppImage lane from accidentally producing an unverified deb.
Remaining follow-up: NEWS.md entry for the .deb Linux packaging support should be added before release (not a merge blocker for the code changes themselves).
Summary
Adds the missing pieces to build and run the Rho desktop app on Linux, producing a
.debbundle via Tauri.desktop/src-tauri/tauri.linux.conf.json(new): deb target, Ark runtime resources, license files, icons,r-base-corerecommendark_candidate_paths; addlinux-x64/linux-arm64entries (official posit-dev release checksums) toruntime/ark.jsonWEBKIT_DISABLE_DMABUF_RENDERER=1on Linux — on NVIDIA proprietary graphics stacks WebKitGTK fails GBM buffer allocation (Failed to create GBM buffer ... Permission denied) and the webview paints nothing; the env var is respected if already setdbus-secret-service-keyring-store), previously hard-unavailable on this platform$HOME); log the project restore failure detail to the startup logTest plan
cargo tauri build --config tauri.linux.conf.jsonon Ubuntu 24.04 arm64 (DGX Spark, R 4.6.1, ark 0.1.252 linux-arm64, Rust 1.97.0)apt installof the produced deb (auto-resolved webkit2gtk/libgtk deps); app launches with full IDE UICtrl+Enterrun executes and Console shows output (21*2→[1] 42)🤖 Generated with Claude Code