Skip to content

feat: flatpak desktop-integration discovery + Flathub-clean release layout#491

Merged
romgrk merged 2 commits into
masterfrom
flathub-mariner-release
Jul 5, 2026
Merged

feat: flatpak desktop-integration discovery + Flathub-clean release layout#491
romgrk merged 2 commits into
masterfrom
flathub-mariner-release

Conversation

@romgrk

@romgrk romgrk commented Jul 5, 2026

Copy link
Copy Markdown
Owner

What

Everything the first real Flathub submission (mariner, io.github.romgrk.mariner) tripped over, automated or surfaced early:

  • App-provided desktop-integration files are discovered and used instead of generated stubs: data/<id>.desktop (only Exec= rewritten for the sandbox), data/<id>.metainfo.xml (verbatim, id mismatch warned), data/icons/hicolor/ (whole theme tree — sized, scalable, symbolic). Overridable via bundle.desktopFile/metainfo/iconsDir; stubs remain the fallback for apps that have nothing.
  • Generated metainfo stub enriched (content_rating, releases, developer from package.json author) so stub-only apps pass appstreamcli validate.
  • --release writes flathub/<id>.yml — the linter hard-requires the manifest filename to equal the app id (appid-filename-mismatch), and the flathub/ dir is exactly what the submission PR contains.
  • bundle.flatpak.lintExceptions ({check: justification}): forwarded to flatpak-builder-lint as --exceptions --user-exceptions, so permissions an app stands by (a file manager's --filesystem=host) lint green locally while documenting what the submission PR must request.
  • Early Flathub-convention warnings: com.github.*/com.gitlab.* ids (Flathub requires io.github.*/io.gitlab.*), placeholder com.example.* ids under --release, broad filesystem access without a declared exception.
  • create-app scaffolds the icon at data/icons/hicolor/scalable/apps/<id>.svg (the discovered convention) and drops bundle.icon from the template.
  • Default runtime 49 → 50, build-validated with the node26 SDK extension; flatpak-build.yaml cache key follows.

Validation

  • scripts/flatpak-smoke-test.js extended: fixture now ships data/ metainfo + icon theme (discovery path) while the missing .desktop still covers stub generation; asserts the flathub/<id>.yml layout. Green.
  • End-to-end on mariner: build on org.gnome.Platform//50, install, headless run under dbus-run-session+Xvfb (window up, clean SIGTERM), --lint green for manifest and appstream, repo-level lint green modulo the two screenshot-mirroring errors expected outside Flathub's pipeline (documented in doc/bundling.md).

🤖 Generated with Claude Code

romgrk and others added 2 commits July 5, 2026 14:21
…ayout

Driven by the first real Flathub submission (mariner). Everything a
submission tripped over is now automated or surfaced early:

- App-provided desktop-integration files are discovered and used instead
  of generated stubs: data/<id>.desktop (Exec rewritten for the sandbox),
  data/<id>.metainfo.xml (verbatim, id checked), data/icons/hicolor/
  (whole theme tree, sized+scalable+symbolic). Overridable via
  bundle.desktopFile/metainfo/iconsDir; stubs remain the fallback.
- Generated metainfo stub enriched (content_rating, releases, developer
  from package.json author) so even stub-only apps pass appstreamcli.
- --release writes flathub/<id>.yml — the linter requires the manifest be
  named exactly <id>.yml, and the flathub/ dir is what the submission PR
  contains. Tarball members now include the icon theme.
- bundle.flatpak.lintExceptions ({check: justification}): passed to
  flatpak-builder-lint as --exceptions --user-exceptions, so permissions
  an app stands by (a file manager's --filesystem=host) lint green
  locally while documenting exactly what the submission PR must request.
- Early warnings for Flathub conventions: com.github.*/com.gitlab.* ids
  (must be io.github.*/io.gitlab.*), placeholder com.example ids on
  --release, broad filesystem access without a declared exception.
- create-app scaffolds the icon at data/icons/hicolor/scalable/apps/
  <id>.svg (the discovered convention) instead of bundle.icon.
- Default runtime 49 -> 50 (build-validated with the node26 extension);
  CI cache key follows.

Validated end-to-end on mariner: build on org.gnome.Platform//50, install,
headless run (window up, clean SIGTERM), manifest+appstream lint green,
repo lint green modulo the two screenshot-mirroring errors expected
outside Flathub's pipeline (documented).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
appstreamcli compose (run by flatpak-builder at finish) rejects a desktop
file whose Categories contain no main category — GTK alone is
additional-only, so the first real flatpak-build.yaml run failed with
no-valid-category. Default to Utility;GTK.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@romgrk romgrk merged commit c36695c into master Jul 5, 2026
10 checks passed
romgrk added a commit to romgrk/mariner that referenced this pull request Jul 5, 2026
Flathub rejects com.github.* application ids, so the app id changes to
io.github.romgrk.mariner everywhere: GApplication applicationId, desktop
file, metainfo, icons, AUR packaging, docs.

- metainfo: captioned screenshots (docs/*.png), branding colors, dated
  0.0.1 release entry
- bundle config: pin org.gnome.Platform//50, declare the
  finish-args-host-filesystem-access lint exception with its justification
- packaging/flathub.md: the release + submission runbook
- gitignore dist/ (node-gtk bundle/flatpak output)

Verified with `node-gtk flatpak --release --lint` (romgrk/node-gtk#491):
manifest + appstream lint green; built on Platform//50, installed, and ran
in the sandbox (headless, clean SIGTERM exit).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@romgrk romgrk deleted the flathub-mariner-release branch July 5, 2026 20:45
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