Skip to content

Add ci-flatpak: Flatpak's sandbox and Flathub's VSCodium at pinned commits - #8

Merged
Kinflou merged 6 commits into
mainfrom
ci-flatpak
Nov 15, 2026
Merged

Kinflou merged 6 commits into
mainfrom
ci-flatpak

Conversation

@Kinflou

@Kinflou Kinflou commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Adds ci-flatpak, the image for comline-vscode's Flatpak sandbox e2e (comline-vscode#33), so that job stops installing Flatpak with apt and caching ~1 GB of Flathub downloads on a bare VM.

What is in it

  • Same base as the other images: Debian trixie-slim by digest, apt on the DEBIAN_SNAPSHOT, one more target in images/Dockerfile, same build / smoke / size / reproducibility checks, same publish + attest path.
  • flatpak, bubblewrap, xdg-dbus-proxy, dbus-daemon (dbus-run-session), procps (pgrep, which the e2e runs on the "host"), ostree (only to prune), plus the base's git/ca-certificates/zstd. No compiler, no Node.
  • Flathub's com.vscodium.codium and its runtime org.freedesktop.Sdk//26.08 as a system installation, at exact Flathub commits (VSCODIUM_COMMIT, RUNTIME_COMMIT ARGs). The commit is in the image label org.comlineproject.ci-flatpak.vscodium-commit, and in /etc/ci-flatpak/vscodium-commit (and runtime-commit) so a job can log it. Flathub's remote file is fetched with a pinned SHA-256 like the other downloads.
  • amd64 only (build matrix exclude), since Flathub's VSCodium is x86_64 here.

Pinning by commit

ostree pull REF@COMMIT is refused: Flathub's CDN answers HTTP 403 to the ostree client's user agent (libostree/..., any version), while flatpak's is let through. So images/flatpak-install.sh installs the ref, runs flatpak update --commit=<pinned>, and prunes. The runtime downgrade path was exercised in this PR's first green run (pinned to the previous Sdk commit, which the build moved to, then back to the current one); the app and runtime pins are currently Flathub's latest. If Flathub ever drops a commit from a ref's history the build fails loudly and the pin is bumped.

Root, not a dedicated user

The default user stays root, as for every job container: the runner mounts the workspace and HOME into it, and flatpak needs no helper process as root. XDG_RUNTIME_DIR=/run/user/0 is created in the image. --privileged is required (documented in the README and Dockerfile): bubblewrap needs namespaces and a fresh /proc, which Docker's default seccomp and masked paths refuse.

Checks added

  • smoke (root, uid 1001, no network): tool versions, installed commits equal the recorded ones, VSCodium still has --filesystem=host and --talk-name=org.freedesktop.Flatpak.
  • images/flatpak-sandbox-check.sh, in docker run --privileged: dbus-run-session -- flatpak run --command=/app/share/codium/com.vscodium.codium --env=ELECTRON_RUN_AS_NODE=1 com.vscodium.codium -e "console.log(process.versions.electron)" prints the Electron version (43.7.7), and the sandbox starts a program on the "host" through flatpak-spawn --host. Run on the PR build, on the pushed image, and (after merge) as a real container: job (flatpak-container).
  • Reproducibility: three identical digests, as for the other images (the machine id apt writes is removed; nothing else needed).

Size

941 MB compressed, 2571 MB uncompressed (most of it the 1.8 GB Sdk runtime).

Not done / differences from the brief

  • There is no weekly rebuild in this repository (the apt packages are pinned by date), so none was added. Flathub changes are picked up by bumping the two commit ARGs.
  • The flatpak-container job (published image as a real container: job) can only run after the first publish on main.

@Kinflou Kinflou changed the title Add ci-flatpak: Flatpak's sandbox and Flathub's VSCodium, pinned Add ci-flatpak: Flatpak's sandbox and Flathub's VSCodium at pinned commits Nov 15, 2026
@Kinflou
Kinflou merged commit e5c096d into main Nov 15, 2026
13 checks passed
@Kinflou
Kinflou deleted the ci-flatpak branch November 15, 2026 19:36
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