Skip to content

feat(spawn): shared extensions (build.shared) and org.flatpark.Spawn, with a CI allow-list for apps that use it - #1566

Merged
jing2uo merged 1 commit into
mainfrom
feat/shared-extension-spawn
Nov 25, 2026
Merged

jing2uo merged 1 commit into
mainfrom
feat/shared-extension-spawn

Conversation

@jing2uo

@jing2uo jing2uo commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

flatpark-spawn (flatpark/flatpark-spawn, v0.1.0) is a Flatpak extension shared by every app that declares it, on any runtime: an app holding --talk-name=org.freedesktop.Flatpak runs the commands its tools call on the host. It is FlatPark's first extension with no parent app; this PR teaches the pipeline that kind of extension and lists it.

Shared extensions (build.shared: true, exclusive with build.extends)

  • Built against a stand-in, registry/<id>/<id>.BuildParent.yml, which install-parent-skeleton.sh --manifest installs for the build and removes; it is never exported to the published repo. check-apply-extra.sh unpacks on the stand-in's runtime (the extension's [ExtensionOf] runtime=).
  • The audit checks the stand-in the way it checks a parent (extension point, version, mkdir, sdk version, runtime), plus the usual extension payload rules.
  • Discovery says IsRuntime=true; the site files it under Extensions with no parent, no permissions of its own, and lists the apps that use it; those apps link back to it.

Apps that use flatpark-spawn (SPEC §2.2)

  • config/flatpark-spawn.yml is the allow-list; adding an id grants that app a way out of the sandbox. It is empty: VS Code moves to flatpark-spawn in its own PR.
  • The audit fails an app that declares org.flatpark.Spawn (or references flatpark-spawn) unless it uses version: '1', directory: lib/flatpark-spawn, no autodelete: true or no-autodownload: true, creates the mount point, has the talk-name, declares it in dangerous_permissions, declares host-command, and is on the allow-list. A change to the allow-list audits the whole catalog.

org.flatpark.Spawn: manifest, apply_extra and metainfo as in flatpark-spawn's packaging/ (v0.1.0, x86_64 + aarch64); resolver reads the release's SHA256SUMS and SIZES.

Docs: extensions.md (shared extensions, using one, how it builds), permissions.md (running commands on the host: flatpark-spawn, what it costs, the audit, the allow-list, turning it off), system-services, review runbook, users/override.

Tested: tests/run-tests.sh (new test_shared_extensions.sh, cases in test_check_apply_extra.sh and test_registry.sh); full-catalog audit identical to main apart from the new entry; built with build-app.sh, check-apply-extra.sh passes, installed with publish.sh --verify (flatpark-spawn -version → 0.1.0, no stand-in ref in the repo); mounted into a throwaway fd 26.08 app and forwarded a command to the host; site built with a fixture app using it.

Part of #1565.

Decided: pages of apps that use flatpark-spawn show the talk-name permission as a red warning (it leaves the sandbox on purpose and for good, not for one call). catalog.upstream_approved is not set: the approvals table is for third-party upstreams, and a general marker for FlatPark's own infrastructure (flatpark-spawn, cellar) is a separate change. The extension's page doesn't mention that apply_extra runs on freedesktop 26.08; extensions.md does.

Follow-ups

… with a CI allow-list for apps that use it

flatpark-spawn (flatpark/flatpark-spawn, v0.1.0) is a Flatpak extension
shared by every app that declares it, on any runtime. It is FlatPark's
first extension with no parent app; this teaches the pipeline that kind of
extension, lists it, and gates the apps that may use it (empty allow-list
for now). Refs #1565.
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