[PR #389] [MERGED] Flatpak: build from source instead of repackaging debs #939

Closed
opened 2026-04-20 19:53:09 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mountain-loop/yaak/pull/389
Author: @gschier
Created: 2/11/2026
Status: Merged
Merged: 2/11/2026
Merged by: @gschier

Base: mainHead: flatpak-source-build


📝 Commits (8)

  • 83eb612 Flatpak: build from source instead of repackaging debs
  • 075af74 Fix Flatpak source build: binary paths, wasm skip, lockfile patching, metainfo
  • 3879145 Replace inline Python with Node for lockfile patching
  • 83fa626 Simplify generate-sources.sh
  • 883a437 Move build-wasm.cjs to crates/yaak-templates
  • bf75527 Rewrite update-manifest.sh for source build approach
  • daf4e3b Update CI workflow for source build approach
  • 4fb94b1 Remove hardcoded release from metainfo (CI populates it in Flathub repo)

📊 Changes

12 files changed (+356 additions, -63 deletions)

View changed files

📝 .github/workflows/flathub.yml (+18 -0)
📝 .gitignore (+3 -0)
crates/yaak-templates/build-wasm.cjs (+8 -0)
📝 crates/yaak-templates/package.json (+1 -1)
📝 flatpak/app.yaak.Yaak.metainfo.xml (+0 -1)
📝 flatpak/app.yaak.Yaak.yml (+127 -13)
flatpak/fix-lockfile.mjs (+73 -0)
flatpak/generate-sources.sh (+43 -0)
📝 flatpak/update-manifest.sh (+43 -36)
📝 package-lock.json (+0 -12)
📝 scripts/vendor-node.cjs (+20 -0)
📝 scripts/vendor-protoc.cjs (+20 -0)

📄 Description

Flathub requires apps to build from source. This rewrites the Flatpak manifest to compile everything in the sandbox using offline dependency caches, instead of repackaging pre-built .deb files.

Changes

  • Flatpak manifest — Build from source using SDK extensions (node22, rust-stable) with offline cargo/npm deps, vendored Node.js/protoc/wasm-pack binaries
  • generate-sources.sh — New script to produce cargo-sources.json and node-sources.json from lock files (strips workspace packages to work around flatpak-node-generator limitations)
  • update-manifest.sh — Now updates git tag/commit instead of deb URLs, and regenerates dependency sources
  • Flathub CI workflow — Installs Python generators and copies source files to Flathub repo
  • Vendor scripts — Added SHA256 verification to vendor-node.cjs and vendor-protoc.cjs
  • package-lock.json — Removed stale plugins/faker extraneous entry

Testing

Needs a full flatpak-builder run on Linux to verify end-to-end. May need tweaks for Cargo offline config or Tauri CLI path resolution.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mountain-loop/yaak/pull/389 **Author:** [@gschier](https://github.com/gschier) **Created:** 2/11/2026 **Status:** ✅ Merged **Merged:** 2/11/2026 **Merged by:** [@gschier](https://github.com/gschier) **Base:** `main` ← **Head:** `flatpak-source-build` --- ### 📝 Commits (8) - [`83eb612`](https://github.com/mountain-loop/yaak/commit/83eb612180c5212c15aebd34eae5abc87e3c06c4) Flatpak: build from source instead of repackaging debs - [`075af74`](https://github.com/mountain-loop/yaak/commit/075af74c23bf8056f08c85eb638c884fc533e466) Fix Flatpak source build: binary paths, wasm skip, lockfile patching, metainfo - [`3879145`](https://github.com/mountain-loop/yaak/commit/3879145f24c025a601ea1c1c3bf9c41afeda51ba) Replace inline Python with Node for lockfile patching - [`83fa626`](https://github.com/mountain-loop/yaak/commit/83fa6268d4abf301b65678e005ec9e3622403263) Simplify generate-sources.sh - [`883a437`](https://github.com/mountain-loop/yaak/commit/883a43704cebf224405a37d1de97efc08f96deac) Move build-wasm.cjs to crates/yaak-templates - [`bf75527`](https://github.com/mountain-loop/yaak/commit/bf755275b56e75f4c07a1a8ea1a634f4ebb02312) Rewrite update-manifest.sh for source build approach - [`daf4e3b`](https://github.com/mountain-loop/yaak/commit/daf4e3b65984e6f7294c6ded584c755228af980a) Update CI workflow for source build approach - [`4fb94b1`](https://github.com/mountain-loop/yaak/commit/4fb94b101ca4928e62bf1e25123afe5a444ae18e) Remove hardcoded release from metainfo (CI populates it in Flathub repo) ### 📊 Changes **12 files changed** (+356 additions, -63 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/flathub.yml` (+18 -0) 📝 `.gitignore` (+3 -0) ➕ `crates/yaak-templates/build-wasm.cjs` (+8 -0) 📝 `crates/yaak-templates/package.json` (+1 -1) 📝 `flatpak/app.yaak.Yaak.metainfo.xml` (+0 -1) 📝 `flatpak/app.yaak.Yaak.yml` (+127 -13) ➕ `flatpak/fix-lockfile.mjs` (+73 -0) ➕ `flatpak/generate-sources.sh` (+43 -0) 📝 `flatpak/update-manifest.sh` (+43 -36) 📝 `package-lock.json` (+0 -12) 📝 `scripts/vendor-node.cjs` (+20 -0) 📝 `scripts/vendor-protoc.cjs` (+20 -0) </details> ### 📄 Description Flathub requires apps to build from source. This rewrites the Flatpak manifest to compile everything in the sandbox using offline dependency caches, instead of repackaging pre-built `.deb` files. ## Changes - **Flatpak manifest** — Build from source using SDK extensions (node22, rust-stable) with offline cargo/npm deps, vendored Node.js/protoc/wasm-pack binaries - **generate-sources.sh** — New script to produce `cargo-sources.json` and `node-sources.json` from lock files (strips workspace packages to work around flatpak-node-generator limitations) - **update-manifest.sh** — Now updates git tag/commit instead of deb URLs, and regenerates dependency sources - **Flathub CI workflow** — Installs Python generators and copies source files to Flathub repo - **Vendor scripts** — Added SHA256 verification to `vendor-node.cjs` and `vendor-protoc.cjs` - **package-lock.json** — Removed stale `plugins/faker` extraneous entry ## Testing Needs a full `flatpak-builder` run on Linux to verify end-to-end. May need tweaks for Cargo offline config or Tauri CLI path resolution. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 19:53:09 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/yaak#939