Skip to content

fix(aur): use system deno runtime instead of precompiled sidecar binary - #3

Open
Scott-Nx wants to merge 1 commit into
MidnightTale:masterfrom
Scott-Nx:master
Open

Scott-Nx wants to merge 1 commit into
MidnightTale:masterfrom
Scott-Nx:master

Conversation

@Scott-Nx

@Scott-Nx Scott-Nx commented Oct 6, 2026

Copy link
Copy Markdown

What

This PR updates the AUR packaging (line-gtk and line-gtk-git) to depend on Arch's system deno package and run the protocol sidecar directly from source (protocol/src/main.ts) instead of shipping the precompiled line-gtk-protocol binary.

Why

When installing line-gtk via AUR (makepkg), the default Arch build environment runs strip on all binaries. Because deno compile appends a serialized JavaScript/bundle section to the end of the binary, running strip removes that section completely.

This corrupts line-gtk-protocol, causing it to immediately crash on startup with:

error: Could not find standalone binary section.

As a result, the GTK client fails to connect to the sidecar, loops through recovery attempts, and gets stuck showing "ไม่สามารถเริ่มระบบโปรโตคอลใหม่ได้" / "Failed to restart protocol" without displaying the login QR code.

How

Added deno to depends in both PKGBUILDs and removed the precompiled line-gtk-protocol binary during packaging.

Since the Rust client already checks for protocol/src/main.ts and falls back to running deno run ... via find_deno() when the compiled binary is absent.

Notes

Why not add !strip:

Adding options=('!strip' '!lto') to the PKGBUILD prevents makepkg from stripping line-gtk-protocol.

However, relying on system deno is cleaner for native Arch packages, it avoids bundling a ~90MB duplicate Deno runtime and plays nicely with Arch's standard packaging practices.

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