Skip to content

Add org.tunaos.tavern: Tavern, a graphical app store for Homebrew - #677

Merged
jing2uo merged 3 commits into
flatpark:mainfrom
hanthor:add-org.tunaos.tavern
Oct 16, 2026
Merged

jing2uo merged 3 commits into
flatpark:mainfrom
hanthor:add-org.tunaos.tavern

Conversation

@hanthor

@hanthor hanthor commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Tavern is a GTK 4 / libadwaita front end for Homebrew on Linux. You can browse and search formulae and casks, and install, remove, upgrade, pin and tap them.

Packaging

  • Payload: the official Tavern-Linux.AppImage from the GitHub release (v0.1.64), as extra-data, pinned by sha256 and size.
  • apply_extra unpacks it offline with appimage-tools-v2 (fd-26.08). The AppImage is never executed.
  • Runtime: org.gnome.Platform//51.
  • The AppImage bundles GTK 4 and libadwaita, but not Python or PyGObject; usr/bin/tavern expects them from the system, and the GNOME runtime has both.
  • /app/bin/tavern runs the vendor's own program from the unpacked tree, with TAVERN_DATADIR and GSETTINGS_SCHEMA_DIR pointing into it. The vendor's bytes are unmodified.
  • The AppImage's own AppRun isn't used, because its GTK hook forces GDK_BACKEND=x11 and the bundled GTK.
  • Build-time files: all generated from upstream's own data/*.in templates, with Exec pointing at /app/bin:
    • the desktop entry (DBusActivatable) and its two D-Bus service files
    • the metainfo, the icon and the MIME type
    • the GNOME Shell search provider
  • Updates: resolve-update.sh follows releases/latest and selects the Tavern-Linux.AppImage asset.
  • packaging: declares host-command.

Permissions

finish-arg Why
--socket=wayland, --socket=fallback-x11, --share=ipc, --device=dri A GTK 4 app
--share=network The Homebrew API, READMEs, screenshots and install analytics
--talk-name=org.freedesktop.Flatpak Declared in policy.dangerous_permissions. Tavern exists to drive the host's Homebrew, and brew installs into the host's Linuxbrew prefix. Every operation runs as flatpak-spawn --host bash -c '… brew <args>', with each argument shell-quoted (tavern/backend.py, _brew_cmd). Without it, Tavern can browse but can't install, remove, upgrade, tap or run brew doctor.
--filesystem=~/.cache/Homebrew:ro Reads the host brew's signed API cache (formula.jws.json, cask.jws.json) so it doesn't download the catalogue again (tavern/backend_cache.py)
--filesystem=/home/linuxbrew/.linuxbrew/Homebrew:ro Lists the installed taps (tavern/taps.py)
--own-name=org.tunaos.tavern.SearchProvider GNOME Shell search provider

These grants are narrower than Tavern's own Flatpak, which has read-write --filesystem=home and all of /home/linuxbrew. Tavern reads nothing else in home; its writes go through brew on the host or the file chooser portal.

Tested

  • Descriptor checks: node scripts/read-descriptor.mjs, node scripts/audit-descriptor.mjs and ./scripts/check-approvals.sh all pass. The only warning is for the declared --talk-name=org.freedesktop.Flatpak.
  • Build and install: ./scripts/publish.sh --verify org.tunaos.tavern builds, signs, installs from the local signed repo and runs apply_extra.
  • Unprivileged unpack: ./scripts/check-apply-extra.sh org.tunaos.tavern reports apply_extra OK as root with no capabilities.
  • Run: I launched it with flatpak run org.tunaos.tavern on a headless Sway session (Wayland). The window maps as org.tunaos.tavern, Browse loads the Homebrew catalogue with icons, and the Taps, Search, Installed and Doctor views are present.
  • Not tested: actual brew installs and removals, because the test machine has no Homebrew. That path is upstream's existing Flatpak code (IN_FLATPAK → flatpak-spawn --host), unchanged.

Re-run on a3da758 (rebased onto main at 8f963ac): node scripts/read-descriptor.mjs passes; node scripts/audit-descriptor.mjs passes with the one expected WARN (--talk-name=org.freedesktop.Flatpak, declared in policy.dangerous_permissions); ./scripts/check-approvals.sh passes; ./scripts/check-links.sh org.tunaos.tavern passes (7 links OK); ./scripts/publish.sh --verify org.tunaos.tavern builds, signs, installs from the local signed repo and runs apply_extra; ./scripts/check-apply-extra.sh org.tunaos.tavern reports apply_extra OK as root with no capabilities; bash tests/run-tests.sh passes.

@jing2uo

jing2uo commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Review — org.tunaos.tavern (Tavern)

Verdict: NEEDS-HUMAN → recommend merge. No hard-fail rows. The only reason this isn't a plain PASS is the declared --talk-name=org.freedesktop.Flatpak, which the runbook always routes to a human. The justification holds up in the source (below). Static review only: nothing was built, installed or run.

# Check Verdict Evidence
0 Static-only, isolated ✅ AppImage fetched as bytes into a scratch dir; SquashFS carved at the ELF section-table end (offset 944632, magic hsqs) and listed/extracted with 7-Zip; nothing executed
1.1 Scope ✅ New app: 13 files, all under registry/org.tunaos.tavern/
1.2 High-scrutiny surface ✅ No .github/, scripts/, config/ or existing-app resolver touched; the resolver is in a brand-new app dir
2.1 Submitter ✅ hanthor (James Reilly): account since 2013, 163 repos, Bluefin LTS maintainer; a tuna-os org member
2.2 Source repo ✅ tuna-os/Tavern: created 2026-05-31, GPL-3.0, 65 releases since June, active (pushed 2026-10-15)
2.3 Commit identity ✅ a3da758 by James Reilly <[email protected]>, the same identity as upstream's v0.1.64 commit b995ab4
2.4 Timeline ✅ Release 2026-09-15 → PR 2026-10-15
2.5 Trust tier ✅ Established, and the submitter is the upstream author
2.6 Provenance tier ✅ Tier 2: upstream's own CI release (Release workflow_dispatch run, 2026-09-15, uploaded by github-actions[bot]), with 2 GitHub build attestations on the AppImage digest. Interpreted code is also Tier-1 verifiable (5.3)
3.1 Pinning ✅ org.tunaos.tavern.yml:62-68 extra-data with sha256 and size 32999928; appimage-tools :54-60 sha256 and size 57220 (matches the prebuilt release digest and other apps' pins); every other source is a local type: file
3.1b Nothing remote in /app ✅ No archive/git sources; build-commands only install local files
3.2 Escape perms 👤 --talk-name=org.freedesktop.Flatpak (:25), declared in flatpark.yml:21-28 with a justification. Verified: the only flatpak-spawn call is backend.py:42-58 _brew_cmd, which builds flatpak-spawn --host bash -c '… brew <shlex.quote(args)>'; taps.py, backend_state.py and backend_remote.py all delegate to it. No home/host grant
3.3 policy: honest ✅ proprietary: false (GPL-3.0-or-later); dangerous_permissions covers the one high-risk arg
3.4 build-commands ✅ :40-49 install wrapper/apply_extra/data files only; no payload patching or injected code. Wrappers set TAVERN_DATADIR/TAVERN_LOCALEDIR/GSETTINGS_SCHEMA_DIR and exec the runtime's python3 on the vendor script (external adaptation)
3.4b packaging: ✅ host-command declared; en and zh-Hans detail text is plain and accurate
3.5 Source URLs ✅ github.com/tuna-os/Tavern releases, the genuine upstream
3.6 App id ✅ org.tunaos.tavern = upstream's own id (data/*.in, the org.tunaos.tavern.json manifest)
3.7 update.command ✅ ./resolve-update.sh
3.8 Download host ✅ Upstream GitHub release, not a personal namespace
3.9 Optional caps ✅ Narrower than upstream's own Flatpak (which grants home rw): only ~/.cache/Homebrew:ro and /home/linuxbrew/.linuxbrew/Homebrew:ro, both explained in the PR body
3.10 Local-test attestation ✅ Body: publish --verify, check-apply-extra, launched on Sway; untested gap named (real brew installs, no Homebrew on the test box)
4.1 Runtime fetch-and-exec ✅ None in the package. Brew itself runs on the host, as the app's purpose; HOMEBREW_NO_AUTO_UPDATE=1 is set
4.2 Resolver as code ✅ resolve-update.sh: GitHub API releases/latest → exact asset name Tavern-Linux.AppImage; curl/jq only, no eval
4.3 Endpoints ✅ Source URLs: formulae.brew.sh, api.github.com/raw.githubusercontent.com/github.com, gitlab.com, codeberg.org (tap metadata), icons.duckduckgo.com (favicons). No broad filesystem × network
5.1 sha256 ✅ f9c5b5de…4dfb, 32999928 B: matches the pin and the GitHub asset digest
5.2 Inspection ✅ 455 entries; no absolute or .. paths, no setuid/setgid; all 16 symlinks are relative and stay inside the tree (AppRun.wrapped → usr/bin/tavern, .DirIcon, 12 pixbuf loaders). The recipe uses appimage-tools appimage-offset + unsquashfs, and never runs the stub
5.3 Interpreted code == source ✅ All 41 usr/share/tavern/tavern/*.py are byte-identical to src/*.py at v0.1.64; usr/bin/tavern and tavern-search-provider differ from src/*.in only in the meson @VAR@ substitutions; the D-Bus interface XML is identical
5.4 Artifact == official ✅ Re-fetched from the release URL; hash equals the pin
5.5 Bundled prebuilts ➖ The AppImage's usr/lib/* (linuxdeploy GTK stack) is not loaded: the wrapper uses the GNOME 51 runtime's Python/GTK, with no LD_LIBRARY_PATH
5.6 IOC ✅ No autostart/systemd/cron, /dev/tcp, miner strings or hardcoded IPs in the Python; no embedded payload beyond the linuxdeploy libs
6.1 Purpose ✅ Homebrew front end, GPL-3.0
6.2 Non-FOSS ➖ FOSS
7.1 Overall 👤 NEEDS-HUMAN (declared Flatpak escape) → recommend merge
7.2 Hard-fails ✅ None
7.3 Report ✅ Recommendation only; a maintainer merges

Notes, not blocking:

  • CI hasn't run on this PR yet (no checks on a3da758). A maintainer needs to approve the fork workflow run before merging.
  • Every desktop, service, search-provider and metainfo file matches upstream's data/*.in at v0.1.64 apart from template substitution.

@jing2uo

jing2uo commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Since you're Tavern's developer and submitted this yourself, this PR counts as the developer's approval for the listing. I've pushed a commit to this branch that sets catalog.upstream_approved: true and adds the record to docs/upstream-approvals.md, so Tavern gets the developer-approved badge. I merged main into the branch first, so it's up to date.

The one thing left is the two untested paths, install and remove, which are the core of what Tavern does. We'll wait to hear from you. If you're happy they work and the only gap was the test machine having no Homebrew, say so here and I'll merge right away.

@jing2uo

jing2uo commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

I looked through upstream and Tavern already ships and is tested as a Flatpak in many places, and install/remove go through the same flatpak-spawn path there, so this looks fine. Merging now. If you need any changes later, feel free to open a PR anytime.

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.

2 participants