feat(linux): bundle an AppImage alongside the .deb - #209
Merged
Conversation
The .deb installs only on Debian and Ubuntu, which left every other distribution — Fedora, openSUSE, Arch — with no runnable artifact other than the Nix package. An AppImage covers them from the same build. An .rpm would be the obvious alternative, but dx 0.7 has no RPM-specific dependency settings: it feeds `[bundle.deb] depends` straight into the RPM `Requires`, so the package would demand Debian package names that no RPM distro can resolve, and would fail at install time. The bundle directory is swept before bundling because CI caches it and non-release runs leave artifacts stamped 0.0.0 behind, which the release upload glob would attach alongside the real ones. The verifier gains an AppImage path: the artifact is self-extracted and its binary checked exactly like the packaged one, and the bundled libraries are checked too. linuxdeploy rewrites RUNPATH to $ORIGIN and copies the host's libraries in, so a devShell build would otherwise pass the header check while shipping a directory full of /nix/store libraries.
The Linux legs would build the AppImage but upload only the .deb, so the artifact non-Debian distributions depend on would never reach a release.
The Linux section told every reader to install a .deb, which the package manager on Fedora and other RPM distributions cannot use — leaving a source build or Nix as the only documented way in.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands Linux release distribution by producing and publishing an AppImage alongside the existing .deb, addressing non-Debian/Ubuntu distributions where the .deb is not usable.
Changes:
- Updated the Linux bundle verification script to support validating both
.deband.AppImageartifacts. - Modified the desktop
justfileLinux recipes to build, sweep stale artifacts, and verify both packaging formats. - Adjusted the GitHub Actions workflow and README to upload/attach and document the AppImage release path.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| scripts/verify-linux-bundle.sh | Adds artifact-type dispatch for .deb vs .AppImage, including extraction and runtime launch checks for AppImages. |
| README.md | Documents .deb for Debian/Ubuntu and .AppImage for other distros, including basic dependency note for Fedora. |
| desktop/justfile | Builds both .deb and .AppImage from one Linux build, deletes stale cached artifacts, and verifies presence of both formats. |
| .github/workflows/build.yml | Uploads AppImages from Linux build jobs and attaches *.AppImage assets to releases. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+77
to
+88
| if [[ "$kind" == "appimage" && -d "$root/usr/lib" ]]; then | ||
| # The header check above is not sufficient for an AppImage: linuxdeploy | ||
| # rewrites RUNPATH to $ORIGIN/../lib and copies every library it resolved on | ||
| # the build host into the AppDir. A devShell build would therefore have its | ||
| # /nix/store RUNPATH laundered out of the headers while the bundled libraries | ||
| # are the store's own. Inspect what was actually shipped alongside it. | ||
| if refs="$(grep -rlF /nix/store "$root/usr/lib")"; then | ||
| echo "Error: bundled libraries come from the build environment:" >&2 | ||
| echo "$refs" >&2 | ||
| status=1 | ||
| fi | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The
.debinstalls only on Debian and Ubuntu. On Fedora — and on openSUSE orArch — there is currently no runnable release artifact at all; the only
documented way in is a source build or the Nix package.
dx0.7.9 can emit an.rpm, but it has no RPM-specific dependency settings:bundle_linux_rpmreadsdeb_settings.dependsand writes those names straightinto the RPM
Requires(packages/cli/src/bundler/linux.rs:257,420-423). Thepackage would demand
libwebkit2gtk-4.1-0,libgtk-3-0t64 | libgtk-3-0, … —Debian names no RPM distro can resolve, and
|is not even valid RPM syntax.So the Linux build now emits an AppImage next to the
.debinstead.What changed
desktop/justfile—[linux] buildbundlesdeb+appimagefrom the samebuild, and sweeps stale artifacts first (CI caches
desktop/target, andnon-release runs leave
0.0.0-stamped packages the release glob would attach).[linux] verify-bundlenow requires and checks both formats.scripts/verify-linux-bundle.sh— dispatches on extension. The AppImage isself-extracted, its binary gets the same
/nix/storechecks, and the bundledusr/libis scanned too: linuxdeploy rewrites RUNPATH to$ORIGINand copiesthe host's libraries in, so a devShell build would otherwise pass the header
check while shipping store libraries. The artifact itself is then launched via
APPIMAGE_EXTRACT_AND_RUN=1..github/workflows/build.yml— both Linux legs upload the AppImage, and therelease attaches
*.AppImage.README.md— Linux section split into Debian/Ubuntu (.deb) and everythingelse (
.AppImage).Verification status
Not verifiable locally (macOS): this PR run is the first real test of the
linuxdeploy step. Checked statically instead —
just --evaluate,bash -nonthe script and both recipe bodies, YAML parse of the workflow, and a read of
the dx bundler confirming
Icon=artomatches the installedusr/share/icons/hicolor/*/apps/arto.png(linuxdeploy's most common hardfailure), that
.icnsentries are warned about and skipped, and thatdebandappimagecoexist in one invocation.Still unconfirmed and worth testing on a real Fedora box before this is treated
as done: whether the AppImage actually launches. WebKitGTK spawns
WebKitWebProcess/WebKitNetworkProcessfrom a compiled-in libexec path thatlinuxdeploy does not bundle, so a host WebKitGTK at a different version may
break it even when installed.
🤖 Generated with Claude Code