fix: Linux deb/rpm installs fail in-app updates with "invalid updater binary format"Fix/linux deb updater feed - #3123
Conversation
|
Thanks for the fix. The bundle-specific updater changes look correct. Before merging, please:
After these are addressed, this should be ready for another review. |
…talls tauri-plugin-updater selects its Linux installer from the running bundle type and rejects every other payload with 'invalid updater binary format': deb installs require a .deb payload, rpm installs require an .rpm. The release pipeline already signs deb/rpm packages, but generate-tauri-latest-json.mjs and collect-tauri-updater-assets.mjs filtered them out, so latest-v1.json could only ever point linux-x86_64/linux-aarch64 at the AppImage and every deb/rpm install failed each in-app update. Collect and map signed .deb/.rpm artifacts into dedicated linux-<arch>-deb / linux-<arch>-rpm manifest keys. The renamed copies embed the platform key, so they cannot collide with the raw bundler packages staged separately.
… gate
REQUIRED_UPDATER_PLATFORMS now demands linux-{x86_64,aarch64}-deb and
-rpm entries, so a release whose signed deb/rpm updater artifacts go
missing fails loudly instead of silently shipping a feed that breaks
deb and rpm installs again.
The desktop updater probes latest-v1.json with a bare linux-<arch> key, so a deb (or rpm) install ranked endpoints against the AppImage payload and then tauri-plugin-updater rejected the download with 'invalid updater binary format' at install time. Derive the manifest key suffix from the same tauri::utils::platform::bundle_type() the plugin uses to pick its installer: deb installs request linux-<arch>-deb, rpm installs request linux-<arch>-rpm, every other bundle type keeps the bare key.
2895af8 to
3544d9f
Compare
|
Rebased onto latest Test conflict: resolved in CI: the rebase push re-triggers Real-package verification (all three Linux bundles built from this branch):
Local artifacts for reference: deb 137,297,150 B ( |
Fixes #3118
Summary
On Linux clients installed from the
.debpackage, every in-app update fails withinvalid updater binary format. The update feed (latest-v1.json) mapslinux-*platform keys to the AppImage asset only, while
tauri-plugin-updaterrequires a.debpayload for deb installs (and.rpmfor rpm installs).Environment
/usr/bin/openbitfun-desktop, dpkg-owned)Evidence
~/.cache/<app>/app-updates/is a raw AppImage (\x7fELF+AI\x02magic).pending.jsonsignature comment confirms:file:OpenBitFun_1.0.1_amd64.AppImage.install_deb()→infer::archive::is_deb(bytes)fails →Error::InvalidUpdaterFormat("invalid updater binary format").
scripts/generate-tauri-latest-json.mjs:isUpdaterBundle()whitelist(
.appimage/.app.tar.gz/.tar.gz/.zip/.exe) excludes.deb;inferPlatform()has no deb branch. So
linux-x86_64can only ever point at the AppImage.scripts/collect-tauri-updater-assets.mjscollects AppImage-only naming.OpenBitFun_1.0.1_amd64.deb+.deb.sig(and
*.rpm+.rpm.sig) — the signed artifacts exist; only the manifestpipeline drops them.
Impact
Every deb/rpm-installed Linux user gets this error on each in-app update.
AppImage installs are unaffected. Workaround: manual
apt install ./OpenBitFun_*_amd64.deb.Suggested fix (Option A, recommended)
latest-v1.json:linux-<arch>→ AppImage, pluslinux-<arch>-deb/linux-<arch>-rpm.updater_platform_key()(src/apps/desktop/src/api/system_api.rs) appendsthe
-deb/-rpmsuffix per detected bundle type (APPIMAGE env / dpkg / rpm ownership).collect-tauri-updater-assets.mjsto collect + rename the signed deb/rpm assetsand mirror-sync them.
latest-{{bundle_type}}-v1.json(plugin-native{{bundle_type}}substitution) — needs per-type manifests on both origins.Regression test
Extend
scripts/tauri-release-manifest.test.mjsto require the deb/rpm platform keys,plus a unit test that
generate-tauri-latest-json.mjsmapsOpenBitFun_<ver>_amd64.deb(.sig)→linux-x86_64-debwith signature.