Package as a Flatpak and build it in CI - #2
Open
Josh-Reimer wants to merge 3 commits into
Open
Conversation
Adds a Flatpak manifest, launcher, desktop entry, and AppStream metainfo under flatpak/, plus a GitHub Actions workflow that builds the bundle on x86_64 and aarch64 and validates the metadata. The freedesktop runtime ships Python but not Tkinter, so the manifest builds Tcl, Tk, and CPython. Python 3.12 removed --with-tcltk-includes and locates Tk only through pkg-config, hence PKG_CONFIG_PATH on the python3 module; a post-install "import tkinter" fails the build rather than shipping an app that cannot open a window. Settings move to $XDG_CONFIG_HOME/bibleapp/settings.json. The install directory is read-only under Flatpak, so the previous location next to the script would have made save_settings() silently discard every preference. The old path is still read once so existing settings carry over. Also adds CLAUDE.md documenting the data format, the index-aligned book name lists, the theming split, and the packaging setup. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The flatpak-github-actions image is published for x86_64 only, so the arm64 runner failed at docker pull with "no matching manifest for linux/arm64/v8" before any build work started. Install flatpak from apt on the native arm runner and drive flatpak-builder directly instead. Ubuntu 24.04 confines unprivileged user namespaces with AppArmor, which blocks bubblewrap, so the job relaxes that sysctl before building. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Tcl and Tk install their shared libraries mode 555. flatpak-builder's eu-strip pass then fails with "Permission denied" on libtcl8.6.so wherever rofiles-fuse is not mediating writes, which is how the aarch64 job runs. The x86_64 job happened to survive this because the container build uses rofiles-fuse. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Packages BibleApp as a Flatpak and adds CI so it can be built and tested without a Linux machine.
What's here
flatpak/io.github.josh_reimer.BibleApp.yml— manifest building Tcl 8.6.15, Tk 8.6.15, CPython 3.12.11, then the appflatpak/bibleapp— launcher installed to/app/bin/bibleappflatpak/*.desktop,flatpak/*.metainfo.xml— desktop entry and AppStream metadata.github/workflows/flatpak.yml— builds x86_64 + aarch64 bundles, plus a fast metadata-validation jobCLAUDE.md— repo guideWhy Tcl, Tk, and Python are built from source
The freedesktop runtime ships Python but not Tkinter. Python 3.12 removed
--with-tcltk-includes/--with-tcltk-libsand now locates Tk solely via pkg-config (tcl >= 8.5.12 tk >= 8.5.12), which is whyPKG_CONFIG_PATH=/app/lib/pkgconfigis set on thepython3module and Tcl/Tk must install their.pcfiles first. Apost-installstep runsimport tkinterso a broken chain fails the build instead of producing an app that can't open a window.Settings had to move
/appis read-only in the sandbox. The old_bpath("settings.json")would have hit theexcept OSError: passinsave_settings()and silently discarded every preference. Settings now live at$XDG_CONFIG_HOME/bibleapp/settings.json;load_settings()still reads the old path once so existing settings carry over.Not yet verified
The build itself — flatpak-builder doesn't run on macOS, so this PR's CI run is the first real test. Two things to watch:
appstreamcli validatemay fail on theLicenseRef-proprietaryplaceholder in the metainfo (the repo has no LICENSE file, so that value is currently accurate).freedesktop-24.08container image is published multi-arch. If it fails on image pull, drop that matrix entry.Before submitting to Flathub
project_licenseto its SPDX idtype: dirsource to a pinned tag + commituser-attachmentsURL🤖 Generated with Claude Code