flutpak 0.8.1
flutpak: ^0.8.1 copied to clipboard
CLI tool that generates Flatpak manifests and offline source bundles for Flutter applications. One command prepares everything needed for a Flathub-compatible offline build: generated-sources.json, ma [...]
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased #
0.8.1 — 2026-06-17 #
Added #
-
Flutter SDK module for 3.44.2 — pre-built
flutter-sdk-3.44.2.jsonadded tomodules/flutter-sdk/. -
Automated flutter-sdk registry CI (
.github/workflows/flutter-sdk-module.yml) — daily cron at 06:00 UTC resolves the latest Flutter stable release, runsflutpak sdk-mod, and opens a PR when a new module JSON is not yet in the registry. Can also be triggered manually (workflow_dispatch) with an optional explicit version andforceflag. -
pdfium_dartforeign deps entries — versions 0.1.2, 0.2.0, 0.2.1, 0.2.2, 0.2.3 added to the registry. Each entry provides architecture-specific pdfium binary archives and the0.2.0-build.dart.patchpatch for offline Flatpak builds.
Fixed #
- objectbox-c license note corrected — the previous note incorrectly argued Mere
Aggregation (GPLv3 §5) as justification for GPL-3.0 app compatibility. The GPL FAQ
is explicit that modules linked in a shared address space form a combined work;
containers do not change this analysis. The note now states clearly that GPL-3.0
apps cannot use
objectbox_flutter_libsorobjectbox_sync_flutter_libsfor Flathub submissions. Permissive-licensed apps (MIT, Apache 2.0) are unaffected.
0.8.0 — 2026-06-10 #
Breaking Changes #
-
generated-sources.jsonrenamed topubspec-sources.json— the pub and foreign-deps sources file is now namedpubspec-sources.jsonin all generated output. Update your Flathub submission manifest's!includereference and any scripts that reference this filename by name. -
Flutter SDK moved to a standalone module — when
flutter.refis set,generateno longer embeds Flutter SDK sources insidepubspec-sources.json. Instead it produces a separateflutter-sdk-<version>.jsonmodule (analogous torustup-<version>.json) that installs Flutter to/var/lib/flutter. The cache-stampcpbuild-commands are no longer emitted in the app module; they live inside the flutter-sdk module. Re-runflutpak init --forceto regenerate a clean template.
Added #
-
Rust/Cargo support via cargokit —
flutpak generatenow handles Flutter packages that use cargokit for Rust native code. When a project uses cargokit-based packages (e.g.rhttp,metadata_god) and therust:config section is present,generate:- Parses all resolved
Cargo.lockfiles and fetches crate checksums from crates.io to emit acargo-sources.jsonfor offline builds. - Generates a
rustup-<version>.jsonmodule that installs Rust offline: downloads the channel manifest,rustup-initbinary, and a minimal toolchain (rustc, cargo, rust-std) for bothx86_64andaarch64; creates astablesymlink to the pinned version. - Inserts the
rustupmodule before the app module in the generated manifest. - Injects
CARGO_HOME,RUSTUP_HOME, and<rustup-path>/binin the app module'sbuild-options.env/append-path. - Appends
cargo-sources.jsonto the app module'ssourceslist afterpubspec-sources.json.
- Parses all resolved
-
rust:config section influtpak.yaml:rust: version: 1.85.0 # Rust toolchain version; default: 1.85.0 rustup-path: /var/lib/rustup # CARGO_HOME / RUSTUP_HOME; default: /var/lib/rustup locks: # extra Cargo.lock paths (resolved vs config dir) - rust/Cargo.lock -
CargoSourcesGenerator— parses one or moreCargo.lockfiles, fetches SHA-256 checksums from the crates.io sparse registry index, and emits aflatpak-builder-ready archive source list (cargo-sources.json). -
RustupGenerator— generates a completerustup-<version>.jsonFlatpak module (offline Rust toolchain installer). Downloads channel manifests, architecture-specificrustup-initbinaries, and the minimal toolchain components; addsRUSTUP_DIST_SERVERpointing at the pre-downloaded static directory sorustup-initnever touches the network at build time. -
Foreign deps registry — 5 cargokit packages added (alphabetical order):
Package Version flutter_discord_rpc1.0.0 flutter_vodozemac0.5.0 metadata_god1.1.0 rhttp0.12.0 super_native_extensions0.8.24 Each entry specifies
cargo_locks(forCargo.lockextraction from the pub.dev archive) andextra_pubspecs(forcargokit/build_tool/pubspec.lock), plus acargokit/run_build_tool.sh.patchsource that adds--offlinetopub getinside the cargokit build tool. -
foreign_deps/cargokit/run_build_tool.sh.patch— adds--offlinetopub getin cargokit'srun_build_tool.sh; required for Flatpak offline builds. -
Flutter SDK as standalone module — when
flutter.refis set,generateproduces a separateflutter-sdk-<version>.jsonmodule. The module usesbuildsystem: simpleand installs the Flutter SDK to/var/lib/flutter. It is inserted before all other extra modules in the generated manifest. The app module'sappend-pathreferences/var/lib/flutter/bin. -
FlutterSdkRegistry— before generating a flutter-sdk module from scratch,generatechecks for a pre-builtflutter-sdk-<version>.jsonin the flutpak repository. Lookup order:~/.cache/flutpak/flutter_sdk/flutter-sdk-<version>.json(local cache)flutter_sdk/flutter-sdk-<version>.jsonon themainbranch of the flutpak GitHub repo (raw URL)- Fallback to generation when not available
Pre-built modules are cached locally after the first fetch for subsequent runs.
-
flutter-sdk-refconfig field — optional git ref (branch or tag) of the flutpak repo from which pre-built flutter-sdk modules are fetched. Defaults to'main'when unset.flutter-sdk-ref: main # optional; default: main -
flutpak cache clear— new subcommand that deletes the entire~/.cache/flutpak/directory (SHA-256 download cache and cached flutter-sdk modules).
Fixed #
extraPubspecPathsnot wired into pub sources —cargokit/build_tool/pubspec.lockpaths extracted by the foreign deps registry were collected but never passed togenerateSourcesJson. Cargokit build tool Dart dependencies were missing frompubspec-sources.json. Fixed by extractingbuildLockPathsas a top-level testable function that explicitly mergesextraPubspecPathsintoallPubLockPaths.
Demo #
- Demo app (
examples/demo_app/) extended to exercise sqlite3 + rhttp:- Added
sqlite3 ^2.7.0,sqlite3_flutter_libs ^0.6.0,rhttp ^0.12.0 main.dartnow shows the SQLite version string (fromSELECT sqlite_version()) and rhttp initialisation statusflutpak.yamlgainsrust:section (version: 1.85.0,rustup-path: /var/lib/rustup) andforeign-deps-ref: feat/rust-based-deps- Template manifest gains two post-build smoke checks:
test -f "$BUNDLE_PATH/lib/librhttp.so"(Rust native lib bundled by cargokit) andldconfig -p | grep -q libsqlite3(SQLite available from Flatpak runtime)
- Added
0.7.1 — 2026-06-09 #
Added #
- README: flutpak vs flatpak-flutter — new section explaining similarities, differences, compatibility, and use cases for both tools.
Changed #
- Foreign deps version matching changed to
≤— the registry now uses "highest entry ≤ installed version" instead of exact match. A registry entry for1.0.0also applies to1.2.3,1.5.0, etc. A new major entry (e.g.2.0.0) is only picked when the installed version reaches2.x. When the matched registry version differs from the installed version,generatelogs the matched key for traceability (e.g.rhttp 0.12.1 (matched registry 0.12.0)).
0.7.0 — 2026-06-09 #
Breaking Changes #
-
flutter.sdkremoved — replace withflutter.ref: "<tag-or-branch>"influtpak.yaml. Engine versions are now fetched from GitHub raw API; no local Flutter installation is required forflutpak generate.# before flutter: sdk: $FLUTTER_ROOT # after flutter: ref: "3.44.1" # tag, "stable", "main", or commit SHA -
--sdkflag removed fromgenerateandinit— use--flutter <ref>(-f) instead. -
--no-sources,--pub-only,--flutter-onlyflags removed fromgenerate— use--no-foreign-depsfor offline runs; pub-only vs. full generation is now driven by whetherflutter.refis set in config. -
config.patches/PatchEntryremoved — replaced byforeign-deps:influtpak.yaml. Local overrides use the same format asforeign_deps/foreign_deps.json.# before patches: - package: objectbox_flutter_libs path: flatpak/patches/objectbox.patch crlf: true # after foreign-deps: objectbox_flutter_libs: manifest: sources: - type: patch path: patches/objectbox.patch crlf: true -
pub,flutter,sourcescommands removed — usegeneratedirectly. -
sdk-extcommand replaced bysdk-mod— generates a standalone Flutter SDK module JSON (installs Flutter to/var/lib/flutter) instead of an SDK Extension. Pre-generated JSONs for Flutter 3.35.x, 3.38.x, and 3.41.x are available inmodules/flutter-sdk/. -
generateaction inputsdkrenamed toflutter-ref. -
manifest:section removed — all fields (app-id,runtime-version,command,sdk-extensions,finish-args,subdir,sources,env,build-options) are now top-level keys influtpak.yaml.# before manifest: app-id: io.github.YourOrg.YourApp runtime-version: '25.08' finish-args: - --share=network # after app-id: io.github.YourOrg.YourApp runtime-version: '25.08' finish-args: - --share=network -
patches[].strip-trailing-crremoved — this key was deprecated in 0.5.0 in favour ofcrlf:. The alias is no longer recognised; usecrlf: true.
Added #
-
flutter.refconfig key — git ref (tag, branch, or commit SHA) for the Flutter SDK. Engine version files (engine.version,material_fonts.version,gradle_wrapper.version) are fetched from GitHub raw API. No local Flutter install needed for source generation. -
flutter_tools/pubspec.lockauto-fetched — whenflutter.refis set,generatefetchespackages/flutter_tools/pubspec.lockfrom GitHub and includes its deps ingenerated-sources.json. No longer needs to be listed inpub.locks. -
foreign-deps:config key — local overrides for the remote registry. Deep-merged on top before resolution. Shorthand format (no version key) resolves frompubspec.lock.sources: []suppresses a remote entry. -
crlf:ontype: patchsources inforeign-deps:— normalises the patch file to CRLF after download/copy; key is stripped from output JSON. -
subdir:config key — when the Flutter project lives in a subdirectory of the git repo, setsubdir: apps/myappinflutpak.yaml;flutpak initemits it on the app module automatically. The generated stampcpcommands use$FLATPAK_BUILDER_BUILDDIRand are unaffected bysubdir:. -
Inline modules in
modules:— entries can now be either a string path to a YAML file or an inline module map in standard Flatpak manifest format:modules: - flatpak/modules/bclibc.yml # file path (existing) - name: some-dep # inline map (new) buildsystem: simple sources: - type: archive url: https://example.com/dep.tar.gz sha256: abc123 -
FlutterSdkGenerator.dispose()—_ownsClientpattern; closes the internal HTTP client only when it was created internally. Eliminates the multi-second hang aftergeneratecompletes. -
--flutter/-fflag ongenerateandinit— overridesflutter.reffrom config at the CLI level. -
flutpak sdk-mod— new command replacingsdk-ext. Generates a standalone Flutter SDK module JSON for!includein any manifest. Output:modules/flutter-sdk/flutter-sdk-<version>.json. Pre-generated JSONs shipped in the repository.
Changed #
-
Built-in
shared.sh.patchupdated — replacedpub get --offlinewithpub upgrade --offlinefor more reliable flutter_tools bootstrap. -
Foreign deps registry deep-merge —
ForeignDepsRegistry.resolve()now acceptslocalForeignDeps: Map<String, dynamic>instead ofoverriddenPackages: Set<String>. Supports both shorthand and versioned override formats. -
generateaction — removedsdkinput, addedflutter-refinput. Flutter SDK is still installed via theflutteraction forflutter pub get/flutter build;flutpak generateitself no longer reads from a local SDK.
0.6.1 — 2026-06-08 #
Changed #
setup-flutter.shremoved — the generated manifest now callsflutter pub get --offlinedirectly instead of going through thesetup-flutter.shwrapper script. The script was a one-liner with no added value; removing it eliminates theScriptSourcefrom the Flutter SDK source list and avoids sandbox path issues when the Flutter SDK is included as a separate module.
0.6.0 — 2026-06-08 #
Added #
-
manifest.finish-argsconfig key — list of extrafinish-argsentries appended to the mandatory Flutter desktop defaults (--share=ipc,--socket=fallback-x11,--socket=wayland,--device=dri). Duplicates are silently dropped, so repeating a mandatory arg is safe.manifest: app-id: io.github.YourOrg.YourApp finish-args: - --filesystem=xdg-documents - --filesystem=xdg-download - --share=network -
Foreign deps registry —
flutpak generatenow automatically resolves known pub packages (e.g.objectbox_flutter_libs) from a remote registry atforeign_deps/foreign_deps.json, compatible with theflatpak-flutterforeign_deps.jsonformat. For each package found in the project's lock files the registry provides the full set of flatpak sources (archives and patches) needed for an offline Flatpak build. Sources are appended togenerated-sources.json; patch files are downloaded togenerated/patches/<path>.- Local
patches:entries always override the registry for the same package. --no-foreign-depsflag skips the registry fetch for offline/air-gapped use.foreign-deps-refconfig key pins the registry fetch to a specific git ref (tag, branch, SHA). Defaults tomain.- Uses
~/.cache/flutpak/as offline fallback when the network is unavailable; prints a warning and continues. foreign_deps/directory added to the flutpak repository with the initial registry (objectbox_flutter_libs5.3.1/5.3.2 andobjectbox_sync_flutter_libs5.3.1/5.3.2), matching theflatpak-flutterentries exactly.
# Optional — override the git ref used to fetch the registry: foreign-deps-ref: v0.5.0 - Local
-
patches[].use-gitoption influtpak.yaml. When set totrue, the generated flatpak-builder patch source includesuse-git: true, which causes flatpak-builder to apply the patch viagit applyinstead ofpatch -p1. This is more robust for patches in git extended format (e.g. produced bygit diff). Compatible withcrlf(patch is normalised to CRLF beforegit applyruns). Mutually exclusive withoptionsonly.patches: - package: objectbox_flutter_libs path: flatpak/patches/objectbox_flutter_libs/CMakeLists.txt.patch use-git: true -
Known patches for
sqlite3(versions 3.0.0 and 3.3.0) added toknown-patches/. Patcheslib/src/hook/assets.dartandhook/build.dartto use a predictable download directory (download-static) and skip the network fetch when the prebuilt library is already present. Requiresmanifest.sourcesentries for the architecture-specificlibsqlite3.soprebuilts — seeknown-patches/PATCHES.mdfor the full usage snippet. -
Foreign deps registry expanded — 12 packages added, mirroring the
flatpak-flutterregistry exactly:sqlite3(2.9.4 empty, 3.0.0, 3.3.0) — prebuiltlibsqlite3.soarchives +assets.dart.patch/build.dart.patchto redirect the hook to a predictable offline path.sqlite3_flutter_libs(0.5.30, 0.5.32, 0.5.34, 0.5.39, 0.5.41, 0.5.42, 0.6.0 empty) — SQLite source tarballs pre-placed for CMakeFetchContent, one per upstream SQLite release;CMakeLists.txt.patchdisables the network fetch.simple_secure_storage_linux(0.2.5) — pre-placedjson.tar.xzfor the nlohmann/jsonFetchContentdependency;CMakeLists.txt.patchadds an explicitURL_HASHso CMake accepts the cached archive offline.audiotags(1.4.5),flutter_new_pipe_extractor(0.1.0),flutter_webrtc(1.3.0),fvp(0.35.0),media_kit_libs_linux(1.2.1),pdfium_flutter(0.1.7),powersync(2.1.0),printing(5.14.2),sqlcipher_flutter_libs(0.6.8) — pre-placed native library archives/files;printingadditionally patchesCMakeLists.txtto disable the pdfium network fetch. All entries copied verbatim fromflatpak-flutter.
Fixed #
- Foreign deps patch entries — changed
"use-git": trueto"options": ["--binary"]in all fourobjectbox_flutter_libs/objectbox_sync_flutter_libsentries inforeign_deps/foreign_deps.json. Whenuse-git: trueis set, flatpak-builder applies the patch viagit apply, which resolves file paths relative to the git worktree root rather than thedestdirectory. Because the app build directory is itself a git checkout,git applylooked forlinux/CMakeLists.txtat the repo root (where it does not exist) and failed silently, leaving the patch unapplied and causing objectbox to attempt a network download at CMake time. Using"options": ["--binary"]runspatch -p1 --binaryinstead, which always applies relative todestand handles CRLF patches correctly.
Changed #
-
Flutter
shared.sh.patchmoved togenerated-sources.json— the built-in flutter patch is now emitted intogenerated-sources.jsonalongside pub/SDK archives instead of being injected directly into the generated manifest'ssources:list. Behaviour is identical at build time; the change makes the sources file self-contained and consistent with all other source entries. -
Built-in flutter patch written to gitignored
generated/directory — when no explicitflutter.patchpath is set in config,flutpak generatewrites the built-inshared.sh.patchto<output>/generated/patches/flutter/shared.sh.patch(inside the gitignoredgenerated/tree) rather than<output>/patches/flutter/shared.sh.patch(committed). The committedpatches/directory is now reserved exclusively for user-supplied patch files.flutpak sourcesretains the previous behaviour (writes to<output>/patches/so the path survives outside ageneraterun). -
Known patch files renamed from
VERSION/FILENAME.patchdirectory layout toVERSION-FILENAME.patchflat naming (e.g.objectbox_flutter_libs/5.3.1-CMakeLists.txt.patch), consistent with theflatpak-flutterforeign_deps/naming convention. -
objectbox_flutter_libsandobjectbox_sync_flutter_libsknown patches simplified: dropped the separateobjectbox-c.yml/objectbox-sync-c.ymlmodule files and theOBJECTBOX_PREBUILT_DIRenv var. Patches now useCMAKE_CURRENT_SOURCE_DIR/../objectbox-c(or../objectbox-sync-c) to locate the prebuilt archive placed viamanifest.sources— the same self-contained approach asflatpak-flutter. No extra module or env var needed.
0.5.0 — 2026-06-05 #
Removed #
flathub.jsonis no longer generated byflutpak initand no longer copied intogenerated/byflutpak generate. The file is not required for Flathub submission and should be created manually by the app author when needed.
Breaking Changes #
patches[].strip-trailing-crrenamed topatches[].crlf(boolean). The old key is still accepted as a fallback for backward compatibility but is considered deprecated. Update yourflutpak.yaml:# before patches: - package: objectbox_flutter_libs path: flatpak/patches/objectbox_flutter_libs/CMakeLists.txt.patch strip-trailing-cr: true # after patches: - package: objectbox_flutter_libs path: flatpak/patches/objectbox_flutter_libs/CMakeLists.txt.patch crlf: true
Changed #
- Flutter cache-stamp
cpcommands in generated templates now use$FLATPAK_BUILDER_BUILDDIR/flutter/...instead of relativeflutter/...paths.$FLATPAK_BUILDER_BUILDDIRis always the module build root (regardless of whethersubdir:is set), so the commands work correctly both for projects at the repo root and for Flutter projects that live in a subdirectory of a larger git repository. Existing committed templates are unaffected; re-runflutpak init --forceto regenerate them. --binaryis always added to everytype: patchentry in the generated manifest. This preventspatch(1)from silently stripping\rbytes, which was the root cause of "Hunk FAILED at N (different line endings)" errors for CRLF target files. Harmless for LF patches against LF targets.
Added #
disable-submodulestop-level config option influtpak.yaml. When set totrue, addsdisable-submodules: trueto the git source entry in the generated template manifest, preventing flatpak-builder from cloning git submodules. Defaults tofalse, matching flatpak-builder's own default behaviour.- LLVM SDK extension is now auto-injected for Flutter projects. When no
llvmextension is present inmanifest.sdk-extensions,flutpakautomatically addsorg.freedesktop.Sdk.Extension.llvmXXbased onruntime-version(25.08 → llvm20, 24.08 → llvm19, 23.08 → llvm17; falls back to llvm20 for unknown versions). The corresponding paths are also added toappend-pathandprepend-ld-library-path. No longer need to specify the extension manually influtpak.yamlfor Flutter projects. .gitattributes—*.patch -textprevents git from normalising line endings in patch files on any platform. Without this, git on Windows would re-convert CRLF patches to LF on checkout, defeating--binary.
Fixed #
-
--configwith a subdirectory path (e.g.--config subdir/flutpak.yaml) now resolves all paths correctly. Previously the config file path was doubled; additionally,output, lock files, and asset paths were all resolved against CWD instead of the config file's directory, causing template-not-found and missing-asset errors when the config lived in a subdirectory. -
yaml_edit crash when injecting
tag/commitinto a fresh template. yaml_edit 2.x panics when creating new keys inside a map that is an element of a block sequence. The generate command now replaces the whole git source map in one operation instead of updating individual keys. -
Wrapper script installed to wrong path when
manifest.commanddiffers from the last segment of the app-id (e.g.command: demo_appwithapp-id: io.example.demo). The generated template andflutpak initnow install the wrapper to/app/bin/<command>and the wrapper'sexecline now calls$APP/<command>— matching the Flutter executable name rather than the app-id suffix. -
strip-trailing-cr: trueno longer injects atype: shellsource runningsed -i 's/\r//'on the target file.flutpak generatenow normalises the patch file itself:crlf: true→ CRLF,crlf: false(default) → LF. This keeps the generated manifest clean and avoids thetype: shellpattern that Flathub reviewers flag as a code smell. -
Line-ending normalisation is now deterministic on any host OS — patches are always rewritten to the correct encoding regardless of git
autocrlfsettings or platform defaults.
0.4.0 — 2026-06-02 #
Breaking Changes #
-
preparecommand removed — replaced byinit+generate. -
CI pipelines must be updated:
flutpak generatemust now run beforeflatpak-builder. Patch sources are no longer baked into the template atinittime; they are injected into the manifest dynamically atgeneratetime.# before - run: flutpak prepare - run: flatpak-builder ... flatpak/<app-id>.yaml # after - run: flutpak prepare - run: flutpak generate - run: flatpak-builder ... flatpak/generated/<app-id>.yaml -
Config keys converted to kebab-case (to match the Flatpak manifest format):
app_id→app-id,runtime_version→runtime-version,sdk_extensions→sdk-extensions,build_options→build-options,append_path→append-path,prepend_ld_library_path→prepend-ld-library-pathflutter_version_file→flutter-version-filepatches[].dest_subpath→dest-subpath,patches[].strip_trailing_cr→strip-trailing-cr
-
Fields moved from
manifestsection to root config level:repo_url→repo-url,metainfo_path→metainfo-path,desktop_entry_path→desktop-entry-path,icons→icons:
-
manifest.extra_modulesremoved — use the rootmodules:key instead. -
manifest.extra_sourcesrenamed tomanifest.sources. -
pub_patchesremoved — usepatches:only. -
patch_pathroot key removed — useflutter.patchinstead. -
finish_argsremoved from config.ManifestGeneratornow writes sensible Flutter desktop defaults (--share=ipc,--socket=wayland,--socket=fallback-x11,--device=dri) into the template atinit. Edit the template manifest to adjust sandbox permissions. -
__FLATPAK_TAG__and__FLATPAK_COMMIT__placeholders removed.generatenow setstag:andcommit:directly on the git source block in the template viayaml_edit.
Added #
flutpak init— one-time setup: generates the template manifest (<output>/<app_id>.yml),<name>-wrapper.sh,flathub.json, and.gitignore; immediately runsgenerate.flutpak generate [--tag] [--commit]— replacesprepare; reads the template, validates it against config, substitutes placeholders, copies everything to<output>/generated/.actions/generatecomposite action — installs flutpak, auto-detects Flutter SDK fromFLUTTER_ROOTorPATH, runsflutpak generate, validates metainfo, and uploads generated artifacts.actions/build-flatpakcomposite action — installsorg.flatpak.Builder, lints the manifest, builds the Flatpak, lints the repo, exports a.flatpakbundle. Outputsbundle,arch,artifact-url.scripts/flatpak-build.sh— shared shell library with reusable Flatpak build functions.patches[].options— extra flags forwarded to thepatch(1)command via the flatpak-builder patch sourceoptionsfield.patches[].strip-trailing-cr— whentrue, flutpak converts the patch file to CRLF line endings ingenerated/patches/and adds--binaryto the patch options, sopatch(1)applies it cleanly to CRLF target files. Useful for packages with CRLF line endings (e.g.objectbox_flutter_libs≥ 5.3.2).known-patches/— directory with ready-to-use reference patches:flutter/shared.sh.patchobjectbox_flutter_libs/5.3.1/CMakeLists.txt.patchobjectbox_flutter_libs/5.3.2/CMakeLists.txt.patchobjectbox_flutter_libs/5.3.1/objectbox-c.ymland5.3.2/objectbox-c.yml— ready-to-use Flatpak module files that installlibobjectbox.soto/app/lib/.
manifest.icons:— list of entries withsize:andpath:; default is a single256x256entry (fixes previously hardcoded512x512).manifest.metainfo_path:/manifest.desktop_entry_path:— overrides for the metainfo XML and.desktopsource paths.- Auto-generated
<name>-wrapper.shfor Flutter projects (setsLD_LIBRARY_PATH). - Version is now derived at compile time from the git tag via
--define=version=$(git describe --tags --always);lib/src/version.dartandtool/update_version.dartremoved.
Changed #
- Generated output now lives in
<output>/generated/(gitignored); the template manifest in<output>/is committed and edited by hand. generatevalidates template fields (app-id,command,runtime-version) against config and errors if they diverge.--tagonly: commit SHA is auto-resolved viagit rev-parse v1.2.3^{};--commitonly or no flags: SHA is written to bothtag:andcommit:fields.manifest.commandis now optional — defaults to the last reverse-DNS segment ofapp-id.manifest.repo_urlis auto-detected fromgit remote get-url originon the firstflutpak initrun.flutter_version_filedefaults to<output>/flutter.versionfor Flutter projects.- All
${{ inputs.* }}expansions inside composite action shell steps replaced withenv:variable declarations to prevent shell injection. - Built-in patch registry (
_registry) cleared — known patches are now maintained as reference files inknown-patches/. - Template manifest now includes inline guidance comments explaining which sections are safe to edit.
Fixed #
- Patch version in
pubspec.lockis now checked againstversion:in config —generateexits with an error on mismatch instead of silently producing a broken manifest. - Patch subdirectory structure is now preserved in the generated manifest (e.g.
patches/objectbox_flutter_libs/CMakeLists.txt.patchinstead ofpatches/CMakeLists.txt.patch). - All fields (
options,strip_trailing_cr) are now preserved when resolving patch entries without an explicitversion:. PubSourcesGeneratornow explicitly closeshttp.Clientin afinallyblock — eliminates a multi-second hang aftergeneratecompletes.- Patch sources are injected into the generated manifest at
generatetime, not into the template atinittime —dest:path always matches the currentpubspec.lock. SdkExtensionGeneratornow usesFlutterSdkGenerator.readFlutterVersion()— fixesPathNotFoundExceptioncrash on Flutter ≥ 3.32 where the flatversionfile was removed.
Removed #
preparecommand — replaced byinit+generate.tagPlaceholder/commitPlaceholderconstants andpatchManifestPlaceholders/injectPatchSourcesfunctions from the public API.tool/update_version.dart— no longer needed with compile-time--define=version=.prepareandverifycomposite actions — replaced bysetup-flutpak+flutpak prepare.export,manifest,lint,validatecommands — removed; use the official tools directly.- Metainfo XML generation and
.desktopgeneration — removed; maintain files manually inapp/share/.
Minimum config #
The minimum viable config is now just app-id:
flutpak:
manifest:
app-id: io.github.YourOrg.YourApp
All other fields (command, repo-url, flutter-version-file, pub.locks, flutter.sdk, output) are resolved automatically from the environment and git remote.
0.4.0-rc.2 - 2026-06-01 #
Fixed #
generatecomposite action still calleddart run tool/update_version.dart(deleted in rc.1); now builds with--define=version=$(git describe)like the other actions.
0.4.0-rc.1 - 2026-06-01 #
Changed #
finish_argsremoved from config.ManifestGeneratornow writes a sensible Flutter desktop default (--share=ipc,--socket=wayland,--socket=fallback-x11,--device=dri) directly into the template oninit. Edit the template manifest to add, remove, or adjust sandbox permissions — no config change needed.__FLATPAK_TAG__and__FLATPAK_COMMIT__string placeholders removed.generatenow setstag:andcommit:directly on the git source block in the template viayaml_edit, so the template no longer needs to carry placeholder strings. When--tagis omitted, the HEAD SHA is written to both fields soflatpak-buildercan fetch the revision without a release tag.manifestconfig section keys converted to kebab-case to match the Flatpak manifest format:app_id→app-id,runtime_version→runtime-version,sdk_extensions→sdk-extensions,build_options→build-options,append_path→append-path,prepend_ld_library_path→prepend-ld-library-path.repo_url,metainfo_path,desktop_entry_pathmoved from themanifestsection to the root config level asrepo-url,metainfo-path,desktop-entry-path. These are flutpak-specific settings, not part of the Flatpak manifest schema.manifest.iconsmoved to the root config level asicons:. Icons are a flutpak-specific concept (file path validation, default 256x256 fallback) and do not belong in the Flatpak manifest schema.manifest.extra_modulesremoved; use the rootmodules:key instead.manifest.extra_sourcesrenamed tomanifest.sources.- Root config keys converted to kebab-case:
flutter_version_file→flutter-version-file. patches[].dest_subpath→dest-subpath,patches[].strip_trailing_cr→strip-trailing-cr.pub_patcheskey removed; usepatchesonly.patch_pathroot key removed; useflutter.patchinstead.- Version is now derived at compile time from the git tag via
--define=version=$(git describe --tags --always). The generatedlib/src/version.dartfile andtool/update_version.dartscript are removed;pubspec.yamlremains the single source of truth for the published package version.
Fixed #
- Process hung for a few seconds after
generate completedue toPubSourcesGenerator'shttp.Clientnever being closed; the client is now explicitly closed in afinallyblock after sources are generated.
Removed #
tagPlaceholder/commitPlaceholderconstants andpatchManifestPlaceholders/injectPatchSourcesfunctions removed from the public API.tool/update_version.dartremoved; no longer needed with compile-time--define=version=injection.
Added #
known-patches/objectbox_flutter_libs/5.3.1/objectbox-c.ymlandknown-patches/objectbox_flutter_libs/5.3.2/objectbox-c.yml— ready-to-use Flatpak module files that install the prebuiltlibobjectbox.soto/app/lib/. Copy toflatpak/modules/objectbox-c.ymland reference via themodules:config key. Seeknown-patches/PATCHES.mdfor full instructions.
0.4.0-beta.4 - 2026-05-27 #
Added #
patches[].optionsconfig key — extra flags forwarded to thepatch(1)command via the flatpak-builder patch sourceoptionsfield.patches[].strip_trailing_crconfig key — whentrue, flutpak injects atype: shellsource before the patch that runssed -i 's/\r//'on the target file. Use this when the upstream pub.dev archive ships sources with CRLF line endings (e.g.objectbox_flutter_libs≥ 5.3.2); GNUpatch(1)does not reliably handle CRLF/LF mismatches even with--ignore-whitespace.known-patches/objectbox_flutter_libs/5.3.2/CMakeLists.txt.patch— known patch forobjectbox_flutter_libs5.3.2 (sameOBJECTBOX_PREBUILT_DIRlogic as 5.3.1; use withstrip_trailing_cr: truedue to CRLF sources).
Fixed #
patches[].optionsandpatches[].strip_trailing_crwere silently dropped whenversionwas omitted from the patch entry and back-filled from the lock file;resolvePatchEntriesnow preserves all fields during version resolution.
0.4.0-beta.3 - 2026-05-27 #
Added #
scripts/flatpak-build.sh— shared shell library with reusable Flatpak build functions (_dbus_run,install_flatpak_builder,lint_flatpak_manifest,build_flatpak,lint_flatpak_repo,export_flatpak_bundle); sourced by both composite actions and local scripts.actions/generatecomposite action — installs flutpak, optionally fetches the target tag so--tagSHA resolution works with--depth=1checkouts, auto-detects the Flutter SDK path fromFLUTTER_ROOTorPATH, runsflutpak generate, auto-installsappstreamand validates metainfo whenmetainfo-pathis set, and uploads the generated manifest + sources as a workflow artifact.actions/build-flatpakcomposite action — installsorg.flatpak.Builder, lints the manifest, builds the Flatpak viaflathub-build, lints the resulting repo, exports a.flatpakbundle, and optionally uploads it as a workflow artifact. Outputsbundle,arch, andartifact-url.
Changed #
- All
${{ inputs.* }}expansions inside shell steps in composite actions replaced withenv:variable declarations to prevent shell injection.
0.4.0-beta.2 - 2026-05-26 #
Fixed #
- Patch sources are now injected into the generated manifest at
generatetime instead of being baked into the template atinittime. Previously, thedest:path (e.g..pub-cache/hosted/pub.dev/objectbox_flutter_libs-5.3.1) was written into the template once and became stale whenever the package version changed inpubspec.lock. Now the version is resolved from the current lock file on everygeneraterun. - Patch subdirectory structure is preserved in the generated manifest. A patch
at
flatpak/patches/objectbox_flutter_libs/CMakeLists.txt.patchis now correctly referenced aspatches/objectbox_flutter_libs/CMakeLists.txt.patchinstead of the bare filenamepatches/CMakeLists.txt.patch.
Added #
known-patches/directory with reference.patchfiles for packages that commonly need Flatpak modifications:flutter/shared.sh.patchandobjectbox_flutter_libs/5.3.1/CMakeLists.txt.patch. Usage instructions are inknown-patches/PATCHES.md.- Version mismatch check for project
patches:entries:generatenow exits with an error when aversion:pinned in config differs from the version resolved frompubspec.lock, instead of silently producing a broken manifest.
Changed #
ManifestGeneratorno longer accepts or emitspatchEntries; the template manifest intentionally contains notype: patchsources.- The template manifest now includes inline guidance comments explaining which
sections are safe to edit, which placeholders must not be removed, and that
patch sources are auto-injected by
generate. - The Flutter
shared.sh.patchis now injected directly into the generated manifest'ssources:section alongside package patches, instead of being embedded ingenerated-sources.json. This makes it visible and prevents a broken source list when the JSON is regenerated without the patch being copied. For pure Dart projects (--pub-only) the Flutter patch is skipped entirely. - The built-in Dart patch registry (
_registry) has been emptied. Known patches are now maintained as reference files inknown-patches/rather than as half-working auto-detection logic without shipped patch content. Thepatches:config key and all project-level patch support remain unchanged.
Breaking Changes #
- CI workflows must now run
flutpak generatebeforeflatpak-builder. Previously, patch sources were baked intogenerated-sources.jsonatinittime, so a committed JSON file was sufficient for CI. Now all patch sources (type: patch) are injected into the manifest byflutpak generateat build time. Update your CI pipeline:# before - run: flutpak prepare - run: flatpak-builder ... flatpak/<app-id>.yaml # after - run: flutpak prepare - run: flutpak generate - run: flatpak-builder ... flatpak/generated/<app-id>.yaml
0.4.0-beta.1 - 2026-05-21 #
Notes #
- This is a beta release. The stable 0.4.0 will follow after testing.
- Patches injection: Currently patches are injected into the template manifest during init, but this may cause issues when package versions change. The dest path includes the package version (e.g., .pub-cache/hosted/pub.dev/objectbox_flutter_libs-5.3.1). If the version updates in pubspec.lock, the patch would be applied to the wrong directory. TODO: Move patch injection to generate phase where we have access to current locked versions.
Added #
flutpak initcommand — one-time setup: generates the template manifest (<output>/<app_id>.yml),<name>-wrapper.sh,flathub.json, and.gitignore; immediately runsgenerateto populategenerated/flutpak generate [--tag] [--commit]command — replacesprepare; reads the template, validates it against config, substitutes placeholders, copies everything to<output>/generated/manifest.icons:config list — each entry hassize:andpath:; default is a single256x256entry (fixes previously hardcoded512x512); whenicons:key is present a256x256entry is requiredmanifest.metainfo_path:— override for the metainfo XML source path (default:app/share/metainfo/<app_id>.metainfo.xml)manifest.desktop_entry_path:— override for the.desktopsource path (default:app/share/applications/<app_id>.desktop)- Auto-generated
<name>-wrapper.shin<output>/for Flutter projects (setsLD_LIBRARY_PATHand execs the bundle binary)
Removed #
preparecommand — replaced byinit+generate
Changed #
- Generated output now lives in
<output>/generated/(gitignored via auto-generated.gitignore); the template manifest in<output>/is committed and edited by hand generatevalidates template fields (app-id,command,runtime-version) against config and errors if they divergegenerateerrors if__FLATPAK_TAG__or__FLATPAK_COMMIT__placeholders are missing from the template- Asset files (metainfo, desktop, icons) are validated for existence on both
initandgenerate— missing files are errors, not warnings --tagand--commitflags now work exclusively; passing only--tag v1.2.3auto-resolves the commit SHA viagit rev-parse v1.2.3^{}; passing only--commit <sha>(or nothing) writes the SHA into bothtag:andcommit:in the manifest soflatpak-buildercan fetch and build without a release tag; previously omitting--tagwould remove thetag:line which broke buildsmanifest.commandis now optional; defaults to the last reverse-DNS segment ofmanifest.app_id(e.g.io.github.example.myapp→myapp); explicitcommand:still accepted and takes precedence; an info message is printed on first run when the value is inferred so the user can verify or override itflutter_version_filenow defaults to<output>/flutter.versionwhen a Flutter SDK is configured (viaflutter.sdk:or$FLUTTER_ROOT); pure-Dart projects with no Flutter SDK configured are unaffected (field staysnull, no warning)manifest.repo_urlis now auto-detected fromgit remote get-url originon the firstflutpak initrun when not set in config; the resolved URL is written into the manifest; explicitrepo_url:still accepted and takes precedence; an info message is printed when the URL is inferred; if the project has no git remote the field is simply omitted
Minimum config #
The minimum viable config is now just app_id + finish_args:
flutpak:
manifest:
app_id: io.github.YourOrg.YourApp
finish_args:
- --share=ipc
- --socket=wayland
- --device=dri
All other fields (command, repo_url, flutter_version_file, pub.locks,
flutter.sdk, output) are resolved automatically from the environment and
git remote.
0.3.0 - 2026-05-21 #
Added #
-V/--versionglobal flag — printsflutpak <version>and exits;setup-flutpakaction now runsflutpak --versionto verify the installationtool/update_version.dart— generator script that readsversion:frompubspec.yamland writeslib/src/version.dart; run after every version bump:dart run tool/update_version.dart; thesetup-flutpakaction andrelease.ymlrun it automatically sopubspec.yamlis the single source of truthMakefile—make build(regenerate version + compile binary),make version(regenerate only),make test(run test suite)test/version_test.dart— enforces thatpackageVersioninlib/src/version.dartmatchespubspec.yaml; CI will fail if they diverge
Fixed #
setup-flutpakaction: whenversioninput is empty, build from$GITHUB_ACTION_PATH(the ref used in theuses:directive) instead of cloningmain; explicit tag/SHA/branch still supported viaversioninputprepare: warn whenflutter_version_fileis set but$FLUTTER_ROOTis unresolvable instead of silently skipping; no warning emitted for pure-Dart projects that do not setflutter_version_filerelease.yml: regeneratelib/src/version.dart(viadart run tool/update_version.dart) alongside thepubspec.yamlversion bump, so compiled binaries always report the correct release version
Fixed #
SdkExtensionGeneratornow usesFlutterSdkGenerator.readFlutterVersion()instead of reading theversionfile directly; this prevents aPathNotFoundExceptioncrash on Flutter ≥ 3.32 where the flatversionfile was removed (falls back togit describethenpackages/flutter/pubspec.yaml)RegistryEntry.versionConstraintis now evaluated when resolving registry patch entries; previously the field was declared but silently ignored, so constrained entries were applied to every matched package version- Pub archive URLs switched from deprecated
pub.dartlang.orgtopub.dev - Fixed duplicate step-5 comment in
FlutterSdkGenerator.generate();engine_stamp.jsonis now labelled step 6
Changed #
FlutterSdkGenerator._readFlutterVersionrenamed toFlutterSdkGenerator.readFlutterVersion(public static) so thatSdkExtensionGenerator(and external tooling) can reuse the multi-fallback version-resolution logicresolvePatchEntriesaccepts an optionalregistryEntriesparameter to allow injecting a custom registry in tests
0.2.8 - 2026-05-25 #
Removed #
exportcommand — removed; files can be copied manually if neededmanifestcommand — removed- Metainfo XML generation —
manifest.metainfo:config andMetainfoGeneratorremoved; maintain your<app_id>.metainfo.xmlmanually inapp/share/metainfo/ .desktopfile generation —manifest.desktop:config and desktop generator removed; maintain your<app_id>.desktopmanually inapp/share/applications/DesktopConfig,MetainfoConfig,DeveloperConfig,UrlConfig,ScreenshotConfigconfig classes removedreplaceMetainfoScreenshots()/patchMetainfoReleases()helpers removed
Added #
setup-flutpakcomposite action — installs theflutpakbinary (downloads pre-built release or compiles from source); replaces the inline build steps that were previously embedded inprepareandverifyactions
Removed #
preparecomposite action — removed; usesetup-flutpak+flutpak preparedirectlyverifycomposite action — removed
Changed #
- Generated manifest now installs shared assets directly from the
app/directory tree that must be present in the repository:app/share/metainfo/<app_id>.metainfo.xml→/app/share/metainfo/app/share/applications/<app_id>.desktop→/app/share/applications/app/share/icons/hicolor/512x512/apps/<app_id>.png→/app/share/icons/hicolor/512x512/apps/
- Config simplified:
manifest.metainfo:,manifest.desktop:,manifest.icons:sections no longer recognised prepareno longer pins screenshot URLs or patches release dates in metainfo
0.2.7 - 2026-05-20 #
Added #
DesktopConfig: newcommentfield →Comment=in.desktopfile (falls back tometainfo.summaryor pubspecdescriptionwhen omitted)DesktopConfig: newstartup_wm_classfield →StartupWMClass=in.desktopfile (defaults tomanifest.commandwhen omitted)MetainfoConfig: newmetadata_licensefield (default:MIT) — controls<metadata_license>in generated XMLMetainfoConfig: newproject_licensefield (default:MIT) — controls<project_license>in generated XML (e.g. set toGPL-3.0-onlyfor GPL apps)MetainfoConfig: newsupportslist — emits<supports><control>…</control></supports>block (e.g.[pointing, keyboard, touch])MetainfoConfig: newcontent_rating_attributesmap — emits<content_attribute id="…">value</content_attribute>children inside<content_rating>; when empty a comment placeholder is written instead.desktopand metainfo generation now fall back to pubspec.yamlname/descriptionwhen the corresponding config fields are absent
Fixed #
$VARenv placeholders that remain unresolved at runtime (e.g.$FLUTTER_ROOTnot set) now yieldnullinstead of the literal string, preventing aPathNotFoundExceptioncrash inFlutterSdkGenerator- Lock file paths containing unresolvable
$VARreferences are silently skipped instead of triggering a⚠ lock file not found: $FLUTTER_ROOT/…warning output:directory now controls paths for all generated artifacts — manifest,.desktop, and metainfo — not justgenerated-sources.json
0.2.6 - 2026-05-20 #
Removed #
lintcommand — useflatpak run --command=flatpak-builder-lint org.flatpak.Builderdirectly; wrapping an official tool added complexity without value and made it hard to keep up with upstream CLI changes (--exceptions,--user-exceptions, etc.)validatecommand —appstreamcliis only available on Ubuntu/Debian and not universally present in CI environments; call it directly when needed
0.2.5 - 2026-05-20 #
Fixed #
lintcommand: pass both--exceptionsand--user-exceptionstoflatpak-builder-lint;--exceptionsis required to activate exception filtering — without it--user-exceptionshas no effectlintcommand: use absolute path for--user-exceptionsso it is resolvable inside the Flatpak sandbox regardless of CWD
0.2.4 - 2026-05-20 #
Fixed #
lintcommand: auto-detectflathub.jsonin the manifest/repo directory and pass--user-exceptionstoflatpak-builder-lint, so local exception entries (e.g.appid-url-not-reachable) are respected without a PR to the central Flathub exceptions file
0.2.3 - 2026-05-20 #
Fixed #
lintcommand: pass--filesystem=hosttoflatpak runso the sandboxedflatpak-builder-lintprocess can readflathub.jsonfrom the host filesystem (without this theexceptionslist inflathub.jsonwas silently ignored)
0.2.2 - 2026-05-20 #
Fixed #
validatecommand: switched fromappstream-utiltoappstreamcli(the modern AppStream CLI available asappstreampackage on Debian/Ubuntu 22.04+). Added--explain(always on) and--no-net(on by default) flags.
0.2.1 - 2026-05-19 #
Added #
DeveloperConfig— newdeveloper:field inMetainfoConfig; generates<developer [id="..."]><name>...</name></developer>in metainfo XML (AppStream 1.0 / Flathub requirement)
Changed #
- Screenshot URL pinning is now config-driven:
replaceMetainfoScreenshots()rebuilds the entire<screenshots>block frommetainfo.screenshots:configrepo_slug+ ref, instead of regex-replacing/main/in the existing file. Works correctly regardless of what ref the file currently contains.
MetainfoGenerator.generate({ref})bakes the correct ref into screenshot URLs at generation time;mainis used as a fallback when no ref is provided.
0.2.0 - 2026-05-19 #
Added #
lintcommand —flatpak-builder-lintwrapper (requiresorg.flatpak.Builder)exportcommand — collects manifest,generated-sources.json, metainfo, and patches into a ready-to-submit directoryvalidatecommand —appstream-util validatewrapper for AppStream metainfo- Metainfo XML generation from
manifest.metainfo:config (name, summary, description, categories, keywords, URLs, screenshots, OARS content rating) .desktopfile generation frommanifest.desktop:configprepare --dry-run/-n— prints what would be written without touching any filespin-manifestcomposite action:flutter_version/flutter_version_fileinputs (one required),config,validate,flutpak_binarytest-action.yml— CI workflow that builds the binary from source and smoke-tests the action
Changed #
output:config field is now a directory (default:flatpak);generated-sources.jsonis always written as<output>/generated-sources.json--outputCLI flag is now a directory in all sub-commands (sources,pub,flutter,manifest)- All commands resolve paths relative to the config file directory, not CWD
pin-manifestaction: replacedflatpak_dirinput withconfig+flutter_version/flutter_version_file
Fixed #
- Screenshot URL pinning uses git tag date for deterministic release dates
ScreenshotConfig.fromYamlhandles non-Map input safely
0.1.0 - 2026-05-19 #
Added #
preparecommand — one-shot: generates sources, resolves patches, creates/updates manifest, pins metainfo screenshot URLs to tag/commit- Config in
pubspec.yaml(flutpak:section) or standaloneflutpak.yaml(error if both exist) - Manifest generation with
__FLATPAK_TAG__/__FLATPAK_COMMIT__placeholders that CI replaces on each release extra_modules— include verbatim YAML module files into the manifestextra_sources— arch-specific verbatim flatpak sources (e.g. prebuilt C libraries)envat manifest level merged withbuild_options.envflutter_version_file— writes the Flutter SDK version string to a file for CI.desktopfile generation fromdesktop:config (name,categories)sdk-extensionsauto-wires LLVM bin/lib paths intoappend-path/prepend-ld-library-path- Flutter SDK
bin/always appended toappend-pathautomatically - Patches registry —
objectbox_flutter_libsandsqflite_common_ffiresolved automatically when found inpubspec.lock - Project-level
patches:config with version auto-resolved from lock file - Patch paths made relative to the manifest directory for correct flatpak-builder resolution
- Retry with exponential back-off (2 s → 4 s → 8 s) on HTTP 429 / 5xx for pub.dev API and Flutter SDK artifact downloads
- Warning when
--commitis not available and__FLATPAK_COMMIT__would remain in the manifest - Warning when
extra_modulesfile is not found - Validation of required
manifest.app_idandmanifest.commandfields with clear error messages - SHA-256 download cache at
~/.cache/flutpak/to avoid redundant Flutter artifact downloads across runs # Generated by flutpakheader in manifest,.desktop, andflutter.versionoutput files- MIT License