Build the Flatpak with crafter-build's Flatpak output instead of the CrafterBuild base app #7
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Catcrafts/Crafter.Review#7
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
crafter-build 6.1.0 (on its way to
stable) can package an executable as a Flatpak itself. Crafter.Review's manifest could then drop the CrafterBuild base app andprune-base.sh: the program, the three LLVM libraries it links and its data come out of crafter-build ready to install, and flatpak-builder only adds node and ripgrep.Blocked on crafter-build 6.1.0 being on
stable. That release brings the Flatpak output, thebundleandinstallverbs, and the--talk-name=org.freedesktop.Flatpakpermission those verbs need.Today
The manifest uses
net.catcrafts.CrafterBuild//stableas its base, so flatpak-builder's build sandbox has crafter-build. Thenprune-base.shdeletes everything of the base except the libc++, libc++abi and libunwind the binary links through its/app/librun path. The finish-args, app-id and metainfo live in the YAML.With crafter-build's Flatpak output
project.cppdescribes the app, on thecrafter.review-execonfiguration:bin/crafter.review-exe-<variant>/becomes a finished Flatpak build directory:metadata,export/, andfiles/holdingbin/crafter-review,lib/with the three LLVM libraries, andshare/.process/under-r.<exe>/../share/crafter-review(Crafter.Review-Core.cppm:33) findsfiles/share/crafter-reviewunder-ras well, since-rruns the program fromfiles/bin.build/flatpak-apps/net.catcrafts.CrafterReview/net.catcrafts.CrafterReview.json, ending with a module that copiesfiles/into/app. So the program is not compiled again in flatpak-builder..Debug. With modules set, flatpak-builder still strips the binary and splits out the.Debugextension.-march. As today, setCRAFTER_BUILD_MARCH=x86-64-v2andCRAFTER_BUILD_MTUNE=genericwhen building for release, along withCRAFTER_REVIEW_VERSION.CI
Run crafter-build's Flatpak in the job and let it drive the job container's own flatpak-builder:
Signing, the summary and the
.flatpakattached to the release stay as they are today.bundlealso writesbin/<variant>.flatpak, which uses Flathub as its runtime repository; use it or keep the currentbuild-bundlestep.dbus-run-session. crafter-build reaches the job container's flatpak throughflatpak-spawn --host, which needs a session bus. With a private one, D-Bus startsflatpak-session-helperfrom the service file that Arch'sflatpakpackage installs./tmp: that directory is the sandbox's own, and crafter-build refuses a project there.Verified, and not
Verified on a workstation, 2026-11-02:
dbus-run-session -- flatpak run --talk-name=org.freedesktop.Flatpak net.catcrafts.CrafterBuildreached the host's flatpak 1.18.4 throughflatpak-spawn --host.FLATPAK_USER_DIR, and check that a program finds itssharedata fromfiles/bin.Not verified: