Flatpak packaging for the Ladybird web browser (work in progress)
Modeled on Flathub's org.kde.kget manifest structure, targeting the KDE 6.10 runtime. Non-vcpkg parts are wired up (app-id, finish-args, install flags, source pinning to current master since Ladybird has no tagged releases). Offline vendoring of vcpkg's ~40 C++ ports and Cargo deps is not yet solved and is documented as the next work item in README.md. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> |
||
|---|---|---|
| .gitignore | ||
| flathub.json | ||
| org.ladybird.Ladybird.json | ||
| README.md | ||
Ladybird Flatpak (work in progress)
Flatpak packaging for Ladybird, modeled
structurally on Flathub's org.kde.kget manifest. This does not build yet — see
"What's unresolved" below before attempting a real flatpak-builder run.
Facts this manifest relies on (verified 2026-09-29)
- App ID
org.ladybird.Ladybirdis upstream's own, not invented here: Ladybird already ships a desktop file, AppStream metainfo, D-Bus service file and scalable icon underMeta/CMake/freedesktop/, installed via CMake's-DENABLE_INSTALL_FREEDESKTOP_FILES=ON(seeUI/cmake/InstallRules.cmake). We don't need to author any of those ourselves. - Ladybird has no tagged releases — it's rolling
masteronly. The manifest pins thegitsource to the commit that wasmasterHEAD on 2026-09-29:618693e7173413d0a6e23d6449164170b1c7dae8. Re-pin periodically (Flathub requires a pinned commit, not a tracked branch). - Build system: CMake ≥ 3.30 + Ninja, via the
DistributionCMake preset (LADYBIRD_VCPKG_TYPE=distribution, static libs, Release build type) — seeMeta/CMake/presets/CMakeBasePresets.json. - Dependencies come from vcpkg (
vcpkg.json/vcpkg-configuration.json), pinned tobuiltin-baselinecommit7f3781e19cc7d4e4882a4caec01668c6f7b5c163in the vcpkg repo. That's ~40 C++ libraries (Skia, ICU, FFmpeg, curl, libwebp, libavif, harfbuzz, freetype, sqlite3, simdjson, and notably Qt 6.10.0 itself, built from source via vcpkg rather than taken from the runtime). - Rust toolchain:
rust-toolchain.tomlpins stable channel 1.98.0 (not nightly) withrustfmt/clippy. Rust deps are locked inCargo.lockat the repo root. - Runtime chosen:
org.kde.Platform/org.kde.Sdk6.10, matching KGet's manifest and giving us a compatible C++23 toolchain and X11/Wayland/DRI dev headers. Whether vcpkg's self-built Qt or the runtime's Qt ends up mattering is still open (see below).
What's unresolved (the actual hard part)
Flathub's build sandbox has no network access during flatpak-builder runs (except
in a simple-buildsystem module explicitly wrapping known lockfile-based generators).
Ladybird's build wants network access twice:
- vcpkg fetching each port's source archive. There is no existing
flatpak-node-generator/flatpak-cargo-generator-equivalent for vcpkg (checkedflatpak/flatpak-builder-tools— nothing there as of this writing). The plan:- Run
./Meta/ladybird.py vcpkgonce, with network, using theDistributionpreset, against the pinned commit above. - vcpkg caches every port's downloaded archive under
$VCPKG_ROOT/downloads/(orVCPKG_DOWNLOADSif set) with predictable filenames, and vcpkg only re-downloads a file if it's missing — it doesn't require network if the file is already there. - Write a small generator script that walks that downloads directory, and for each
file emits a flatpak
"type": "file"source withdest: vcpkg/downloads(or whereverVCPKG_DOWNLOADSis pointed for the flatpak build) and its sha512 (vcpkg's own hash, reusable directly). - Feed the generated source list into the
Ladybirdmodule'ssourcesarray (as a separate generated JSON file,flatpak-vcpkg-sources.json, merged in the same wayflatpak-cargo-generatoroutput is normally merged). - Open question: whether to let vcpkg build its own Qt 6.10.0 from source (correctness, but a very large extra build — Qt from source is itself a multi-GB, multi-hour build) or add an overlay port that redirects Qt to the runtime's Qt6 instead. Needs a decision before the first real build attempt, since it changes the vcpkg download set significantly.
- Run
- Rust deps via Cargo. This one does have a known-good tool:
flatpak-cargo-generator.pyfromflatpak/flatpak-builder-tools. Run it against Ladybird'sCargo.lockat the pinned commit to producecargo-sources.json, then add arust-depsmodule (or fold the generated sources into theLadybirdmodule) the standard way that tool documents. This is mechanical, not a research problem.
Neither of these has been attempted yet — the manifest currently just documents them via
x-comment fields (ignored by flatpak-builder, same convention as KGet's
x-checker-data) so the gap is visible in the manifest itself, not just here.
Also not yet done
- No local
flatpak-builderis installed in this environment (only theflatpakclient). Install it (sudo dnf install flatpak-builderon Fedora, orflatpak install org.flatpak.Builderfor the flatpak-native builder) before attempting a real build. - Haven't confirmed whether
-DENABLE_QT=ONis the correct/only CMake variable gating the Qt UI (vs. a headless/Android build) — verify againstUI/CMakeLists.txtandvcpkg.json'sVCPKG_MANIFEST_FEATUREShandling once a build is actually attempted. - Haven't confirmed the exact install location vcpkg expects
VCPKG_ROOTto be — thedest: vcpkggit source assumes it lands at$builddir/vcpkg, matching the-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmakeconfig-opt, but this is unverified against an actualMeta/ladybird.py-orchestrated configure. finish-argsincludes--share=networkbecause Ladybird is a browser and legitimately needs runtime network access (unrelated to the build-time network problem above) — this is normal for other browsers on Flathub, not a placeholder.
Next steps, in order
- Get
flatpak-builderinstalled locally. - Run
flatpak-cargo-generator.pyagainst Ladybird'sCargo.lock→ wire up Rust deps (mechanical, do this first since it's solved tooling). - Do one network-enabled local vcpkg fetch, write the downloads-directory generator
script, produce
flatpak-vcpkg-sources.json. - Decide the vcpkg-Qt-vs-runtime-Qt question.
- First real
flatpak-builder --user --install --force-cleanattempt; expect several failed iterations (missing headers from the KDE runtime, wrongVCPKG_ROOTlayout, etc.) before it produces a workingladybirdbinary. - Once it builds and runs, tighten
finish-args/cleanup, add screenshots to the AppStream metainfo if upstream's is missing them, and go through Flathub's submission checklist.