Skip to content

feat: Flatpak bundle — PyInstaller wrapper + release workflow#1

Merged
marthabo merged 1 commit intomainfrom
copilot/add-flatpak-wrapper-for-pyinstaller
Apr 10, 2026
Merged

feat: Flatpak bundle — PyInstaller wrapper + release workflow#1
marthabo merged 1 commit intomainfrom
copilot/add-flatpak-wrapper-for-pyinstaller

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 10, 2026

Packages iOpenPod for Flatpak by wrapping the existing PyInstaller one-folder bundle, avoiding a full Python/Qt SDK build inside the Flatpak sandbox.

New files

flatpak/

  • io.github.marthabo.iOpenPod.yml — manifest using org.freedesktop.Platform 24.08; copies dist/iOpenPod/ into /app/lib/iOpenPod/ via type: dir source, installs icons, desktop entry, and AppStream metadata
  • iOpenPod-wrapper.sh — installed at /app/bin/iOpenPod; prepends the bundled _internal/ and _internal/Qt/lib to LD_LIBRARY_PATH and QT_PLUGIN_PATH before exec-ing the real binary (mirrors what the AppImage AppRun already does)
  • io.github.marthabo.iOpenPod.metainfo.xml — AppStream metadata (description, OARS rating, release list)
  • io.github.marthabo.iOpenPod.desktop — desktop entry for software centres / launchers

.github/workflows/flatpak.yml

New workflow triggered on v* tags. Builds the PyInstaller bundle first (same steps as release.yml), then hands it to flatpak/flatpak-github-actions/flatpak-builder@v6, and uploads iOpenPod-Linux.flatpak + its SHA-256 to the GitHub Release.

Sandbox permissions

Permission Reason
--device=all USB iPod access
--filesystem=home, /media, /run/media Music library + iPod mount points
--share=network Podcast downloads, update checks
--socket=x11 + --socket=wayland + --share=ipc Qt display

…ata, workflow)

Agent-Logs-Url: https://github.com/marthabo/iOpenPod/sessions/355db9ed-7b1c-4fef-a27c-56e599d967c6

Co-authored-by: marthabo <39622526+marthabo@users.noreply.github.com>
@marthabo marthabo marked this pull request as ready for review April 10, 2026 06:42
Copilot AI review requested due to automatic review settings April 10, 2026 06:42
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a Flatpak packaging path for iOpenPod by wrapping the existing Linux PyInstaller one-folder bundle, plus a tag-triggered GitHub Actions workflow to build and attach a .flatpak artifact to Releases.

Changes:

  • Add Flatpak manifest + desktop integration (icons, .desktop, AppStream metadata).
  • Add a launcher wrapper script to set up runtime library/plugin paths for the bundled Qt.
  • Add a v* tag workflow to build the PyInstaller bundle, build a Flatpak bundle, and upload it to the GitHub Release.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
flatpak/iOpenPod-wrapper.sh Wrapper that sets environment variables then execs the bundled binary inside Flatpak.
flatpak/io.github.marthabo.iOpenPod.yml Flatpak manifest that copies dist/iOpenPod/ into /app/lib/iOpenPod/ and installs desktop metadata.
flatpak/io.github.marthabo.iOpenPod.metainfo.xml AppStream metadata for software centers.
flatpak/io.github.marthabo.iOpenPod.desktop Desktop entry for launchers/software centers.
.github/workflows/flatpak.yml CI workflow to build PyInstaller output, build .flatpak, checksum, and upload to release.

Comment on lines +4 to +6
BUNDLE=/app/lib/iOpenPod
export LD_LIBRARY_PATH="$BUNDLE/_internal:$BUNDLE/_internal/Qt/lib:${LD_LIBRARY_PATH:-}"
export QT_PLUGIN_PATH="$BUNDLE/_internal/plugins:${QT_PLUGIN_PATH:-}"
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wrapper sets LD_LIBRARY_PATH/QT_PLUGIN_PATH but doesn’t mirror the environment setup used by the AppImage launcher in release.yml (which also prepends _internal/lib, sets QML2_IMPORT_PATH, and adds the bundle dir to PATH). This can cause missing-library or missing-QML-plugin runtime failures inside Flatpak even when the PyInstaller bundle works in AppImage. Align the wrapper’s exported vars with the AppImage AppRun to keep launch behavior consistent across packaging formats.

Copilot uses AI. Check for mistakes.
Comment on lines +24 to +25
runs-on: ubuntu-latest

Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow builds the PyInstaller bundle on ubuntu-latest, while release.yml uses ubuntu-22.04. Since the Flatpak wraps that bundle verbatim, building on a different runner image can change the set of bundled shared libs and reduce reproducibility (and potentially compatibility). Consider pinning the runner to the same Ubuntu version as the release workflow to keep artifacts consistent.

Copilot uses AI. Check for mistakes.
Comment on lines +46 to +49
# ── Build the PyInstaller one-folder bundle ───────────────────────
- name: Build with PyInstaller
run: uv run pyinstaller iOpenPod.spec --noconfirm

Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flatpak.yml duplicates the PyInstaller build steps from release.yml (“same steps as release.yml”), which creates an ongoing drift risk (one workflow will eventually be updated without the other). Consider factoring the shared build into a reusable workflow (workflow_call) or moving Flatpak bundling into the existing Release workflow so there’s a single source of truth for the Linux build.

Copilot uses AI. Check for mistakes.
Comment on lines +43 to +45
<releases>
<release version="1.0.41" date="2026-04-10"/>
</releases>
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The AppStream <release> entry hard-codes both the version and date. Since the version is already sourced from pyproject.toml for builds, this metadata will become stale on the next release unless it’s manually updated as well. Consider either omitting the <releases> section or generating/updating it automatically as part of the release process to avoid mismatched store metadata.

Copilot uses AI. Check for mistakes.
@marthabo marthabo merged commit b9ce3dd into main Apr 10, 2026
4 checks passed
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.

3 participants