diff --git a/flatpak.bzl b/flatpak.bzl index 48aac85..509c2be 100644 --- a/flatpak.bzl +++ b/flatpak.bzl @@ -3,9 +3,13 @@ # Unlike cargo.bzl's genrules (which shell out to a real `cargo build`), # this one doesn't compile anything itself — it packages the *already # buck2-built* //:sleek-host binary into a distributable .flatpak bundle, -# reusing the org.gnome.Platform//49 runtime (baked into toolchains/ -# rbe-image/Containerfile at image-build time, same pattern as the Android -# NDK/SDK) instead of vendoring every shared library sleek links against. +# reusing the org.freedesktop.Platform//25.08 runtime (baked into +# toolchains/rbe-image/Containerfile at image-build time, same pattern as +# the Android NDK/SDK) instead of vendoring every shared library sleek +# links against. Freedesktop's base runtime, not GNOME's — `ldd` on the +# built binary shows only libstdc++/libpipewire/libasound/libc, no +# GTK/glib/adwaita, so the GNOME layer GNOME's runtime adds on top of +# Freedesktop's own was pure unused weight (eframe/glow, not GTK). # # Ports flake.nix's old `nix2flatpak.lib.${system}.mkFlatpak` derivation # (see git history) to buck2 — nix2flatpak itself has no buck2 equivalent @@ -113,7 +117,7 @@ def flatpak_genrule(name, manifest, app_id, host_target = "//:sleek-host"): # build-init sets up build-dir/{files,var,metadata} — no bwrap # involved, unlike flatpak-builder's own build-command # execution (see module docstring). - " flatpak build-init build-dir {} org.gnome.Sdk org.gnome.Platform 49".format(app_id), + " flatpak build-init build-dir {} org.freedesktop.Sdk org.freedesktop.Platform 25.08".format(app_id), # Hand-replicated from flatpak/uk.nandi.sleek.json's # build-commands — /app/... there maps to build-dir/files/... # here (what build-init's build-dir becomes once exported). diff --git a/flatpak/uk.nandi.sleek.json b/flatpak/uk.nandi.sleek.json index ac1bfbd..54109cf 100644 --- a/flatpak/uk.nandi.sleek.json +++ b/flatpak/uk.nandi.sleek.json @@ -1,8 +1,8 @@ { "app-id": "uk.nandi.sleek", - "runtime": "org.gnome.Platform", - "runtime-version": "49", - "sdk": "org.gnome.Sdk", + "runtime": "org.freedesktop.Platform", + "runtime-version": "25.08", + "sdk": "org.freedesktop.Sdk", "command": "sleek", "appstream-compose": false, "finish-args": [ diff --git a/toolchains/rbe-image/Containerfile b/toolchains/rbe-image/Containerfile index ad8b29c..5efb64d 100644 --- a/toolchains/rbe-image/Containerfile +++ b/toolchains/rbe-image/Containerfile @@ -7,11 +7,11 @@ # devShell env exactly, so sleek-android-lib's `cargo build` has # everything it needs without depending on this machine's local pixi/NDK # install. Also bakes in flatpak + flatpak-builder + a system-wide -# org.gnome.Platform//49 + org.gnome.Sdk//49 install for flatpak.bzl's -# sleek-flatpak genrule (see near the bottom of this file) — same -# "pre-install so RE actions don't need Flathub network access" pattern as -# the Android NDK/SDK. See README.md in this directory for how to build + -# push it. +# org.freedesktop.Platform//25.08 + org.freedesktop.Sdk//25.08 install for +# flatpak.bzl's sleek-flatpak genrule (see near the bottom of this file) — +# same "pre-install so RE actions don't need Flathub network access" +# pattern as the Android NDK/SDK. See README.md in this directory for how +# to build + push it. FROM gcr.io/flame-public/rbe-ubuntu22-04:latest # build-essential: pixi's own clang/libclang (bindgen's dependency, see @@ -112,12 +112,18 @@ RUN cd /tmp/sleek-pixi && pixi install --locked \ && rm -rf /tmp/sleek-pixi # flatpak + flatpak-builder — for flatpak.bzl's sleek-flatpak genrule -# (packages //:sleek-host into a distributable .flatpak using the GNOME -# Platform/49 runtime; ports flake.nix's old nix2flatpak-based -# sleek-flatpak derivation, see that file's git history). Jammy's stock -# apt versions (flatpak 1.12.7, flatpak-builder 1.2.2 — both quite old) -# confirmed able to pull a current GNOME 49 runtime from Flathub fine, no -# PPA needed. +# (packages //:sleek-host into a distributable .flatpak using the +# Freedesktop Platform/25.08 runtime, not GNOME's — `ldd` on the built +# binary shows only libstdc++/libpipewire/libasound/libc, no GTK/glib, so +# GNOME's runtime was pulling in a desktop stack the app never uses; +# org.freedesktop.Platform.GL//25.08 is what org.gnome.Platform//49 +# itself declares as its own GL extension version, confirmed via +# `flatpak remote-info --show-metadata`, so 25.08 is the correctly-paired +# base version). Ports flake.nix's old nix2flatpak-based sleek-flatpak +# derivation, see that file's git history. Jammy's stock apt versions +# (flatpak 1.12.7, flatpak-builder 1.2.2 — both quite old) confirmed able +# to pull a current Freedesktop 25.08 runtime from Flathub fine, no PPA +# needed. RUN apt-get update && apt-get install -y --no-install-recommends \ flatpak flatpak-builder \ && rm -rf /var/lib/apt/lists/* @@ -149,4 +155,4 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ # jammy's own `appstream` package (0.15.2) doesn't ship it anyway (that # subcommand only exists in much newer libappstream releases). RUN flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo \ - && flatpak install -y --noninteractive --system flathub org.gnome.Platform//49 org.gnome.Sdk//49 + && flatpak install -y --noninteractive --system flathub org.freedesktop.Platform//25.08 org.freedesktop.Sdk//25.08