Skip to content

Fix the release's Linux package check for the bundled localhost command - #39

Merged
marcellosso merged 3 commits into
mainfrom
fix/release-linux-cli
Oct 30, 2026
Merged

marcellosso merged 3 commits into
mainfrom
fix/release-linux-cli

Conversation

@marcellosso

Copy link
Copy Markdown
Owner

The v0.3.0 Release workflow failed in "Build the .deb, .rpm and AppImage" (run 40994864318, job "Build the Linux packages") right after tauri build finished and signed all three bundles, with no output.

Why

The check was wrong, not the packages. The step ran bash -e without pipefail, so the failing command was the first check's grep:

dpkg-deb --contents …/*.deb | grep -E ' \./usr/bin/localhost$'

Tauri writes a .deb's data.tar.gz with paths relative to its data folder, with no ./ prefix (create_tar_from_dir in tauri-bundler linux/debian.rs uses strip_prefix). So dpkg-deb --contents lists usr/bin/localhost, and a pattern requiring ./usr/bin/localhost can never match. A failing grep -q-style match prints nothing, which explains the empty log.

The command is in the package. The bundler copies externalBin into usr/bin with the target triple stripped (copy_binaries in settings.rs: localhost-x86_64-unknown-linux-gnu → usr/bin/localhost, the same folder as localhost-app). The AppImage is built from that folder too. The .rpm check never ran.

What changed

  • scripts/check-linux-packages.sh <bundle folder> <version> unpacks each package instead of parsing a tool's listing: .deb with dpkg-deb -x, .rpm with rpm2cpio | cpio, the AppImage with --appimage-extract (no FUSE needed). For each it checks that usr/bin/localhost exists and is executable, runs it, and checks it says localhost <version>. When one is wrong it prints the error and what that package's usr/bin holds. All three are checked even if one fails.
  • release.yml: the inline greps are replaced by a step "Check the localhost command in every package" running that script with the tag's version, and the Linux job installs cpio beside rpm.
  • New .github/workflows/packages.yml: builds the unsigned .deb, .rpm and AppImage exactly as the release does, sidecar included, and runs the same script. It runs on pull requests touching release.yml, the script, the Tauri config, src-tauri/Cargo.toml, src-tauri/src/agents.rs or core/localhost-cli/, or by hand. It runs on this PR, so the fix is proven on Ubuntu 22.04 before a new tag.
  • RELEASING.md mentions both.

On PATH

  • .deb and .rpm: the command lands at /usr/bin/localhost once installed, which is on the PATH.
  • AppImage: it's inside the image at usr/bin/localhost. The app copies it to ~/.local/share/localhost/bin/localhost at launch for agents, and Settings → Agents → Add to PATH links ~/.local/bin/localhost to it.

How it was checked

  • shellcheck on the script and actionlint on all workflows: clean.
  • The script's check logic was tried locally on fake package trees (passing and failing cases).
  • The real run is the Linux packages workflow on this PR (see the checks).

Nothing here touches the v0.3.0 tag or its draft. Re-running the release is yours to decide once this is merged: delete the draft and the tag, then tag again (RELEASING.md, "When the workflow fails").

…ild them on pull requests that change packaging
@vercel

vercel Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
localhost-web Ready Ready Preview Oct 30, 2026 3:53am UTC

@marcellosso
marcellosso merged commit 89a10d3 into main Oct 30, 2026
6 checks passed
@marcellosso
marcellosso deleted the fix/release-linux-cli branch October 30, 2026 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant