Skip to content

feat(opentubex): add privacy-focused YouTube client - #275

Merged
jing2uo merged 3 commits into
flatpark:mainfrom
D3SOX:add-opentubex
Aug 28, 2026
Merged

jing2uo merged 3 commits into
flatpark:mainfrom
D3SOX:add-opentubex

Conversation

@D3SOX

@D3SOX D3SOX commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

OpenTubeX publishes an official Flatpak repository, but it is not available through FlatPark. This adds the official portable Linux release as a pinned, unmodified extra-data package for x86_64 and ARM64.

What changed

  • Add the OpenTubeX 0.32.1-beta portable ZIPs with SHA-256 and size pins.
  • Use Electron2 BaseApp 25.08 with zypak-wrapper.
  • Add pinned Deno 2.9.5 binaries for yt-dlp's YouTube JavaScript challenges.
  • Add AppStream metadata, desktop integration, the OpenTubeX icon, and an automatic GitHub release resolver.
  • Support Wayland with fallback X11 and keep user data inside the app's private Flatpak directories.

Sandbox and runtime behavior

The package grants network access for YouTube, Wayland with fallback X11, GPU rendering, audio, MPRIS ownership, and the session services Electron uses to inhibit sleep during playback. It does not grant access to the host filesystem or the user's home directory. File and directory selection uses portals.

On first launch, upstream OpenTubeX automatically downloads a managed copy of yt-dlp from the official yt-dlp releases and stores it inside the application's private data directory. The freedesktop Flatpak runtime already provides FFmpeg and FFprobe at /usr/bin, and OpenTubeX prefers these system path tools, so it does not download managed FFmpeg copies during normal first-run setup. The AppStream description discloses this behavior. FlatPark confirmed in #274 that the package may ship OpenTubeX's upstream tool management.

Existing upstream Flatpak repository

OpenTubeX also maintains its own Flatpak repository at https://flatpak.opentubex.org/opentubex.flatpakrepo, with packaging source in OpenTubeX/flatpak. This FlatPark entry adds another distribution channel and does not replace that repository.

Validation

  • FlatPark descriptor and policy audit passed.
  • FlatPark shell test suite passed.
  • AppStream, desktop entry, XML, ShellCheck, whitespace, and all six changed-app link checks passed.
  • Both release archive hashes matched, and both archives were inspected for layout and unsafe entries.
  • apply_extra.sh passed the root process with no capabilities check.
  • The x86_64 Flatpak built, signed, installed, and launched with no missing linked libraries.
  • Sandbox checks resolved FFmpeg and FFprobe from /usr/bin, Deno from /app/bin, and found only yt-dlp in OpenTubeX's managed-tool directory.
  • Video playback and the core application flow were exercised in a KDE Plasma Wayland session over waypipe. Chromium's GPU and renderer processes selected native Wayland with --ozone-platform=wayland.
  • The ARM64 asset and manifest path were verified but not executed on ARM64 hardware.

@jing2uo

jing2uo commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Static review — recommend: approve & merge (a maintainer merges; this is a recommendation only).

Classification: new app, all 8 files under a new registry/org.opentubex.OpenTubeX/. No high-scrutiny surface touched; the resolver sits in the new app dir, which is the normal flow.

Provenance — Tier 2 (official upstream prebuilt), verified:

  • Submitter @D3SOX is the OpenTubeX maintainer (sole public member of the OpenTubeX org, opentubex.org, weblate.d3sox.me). Account since 2017. OpenTubeX/OpenTubeX is a public AGPL-3.0 fork of FreeTubeApp/FreeTube.
  • Both portable ZIPs re-fetched from the official release URL; sha256 and size match the manifest pins and GitHub's attested asset digests:
    • opentubex-x86_64.zip 7d3cdbc2…f318b / 123601216
    • opentubex-aarch64.zip 7f6a07d1…a3b94 / 121876092
  • Deno 2.9.5 archives (x86_64 8b010a3b…d530, aarch64 6b7cae3a…4be0) match denoland's official release digests.
  • Both ZIPs inspected without extraction: 76 entries, standard electron-builder layout, no path traversal, no symlinks, no setuid/setgid/world-writable. build-commands are install-only; apply_extra.sh stages the official tree unmodified to /app/extra/opentubex. Repackage is unmodified — Tier 2 intact.

Sandbox: no --filesystem grant of any kind; dangerous_permissions: [] is accurate; no sandbox-escape perms. --share=network is the core need. --own-name=org.mpris.MediaPlayer2.chromium.* matches upstream FreeTube's MPRIS pattern.

Scripts reviewed as code: apply_extra.sh (install-time, writes confined to $EXTRA_ROOT, bsdtar --no-same-owner, asserts launcher + app.asar) and resolve-update.sh (read-only gh api + jq, emits JSON only, no manifest rewrite / hash / download / exec, hardcoded genuine upstream repo) are both clean and follow the me.tyrrrz.YoutubeDownloader precedent.

Runtime managed-tool download — pre-cleared in #274: on first launch OpenTubeX fetches a managed yt-dlp (official yt-dlp releases, mutable latest) and, absent system ffmpeg, ffmpeg from ffmpeg.martin-riedl.de, into ~/.var/app/org.opentubex.OpenTubeX/. Normally the runbook's Phase 4 rule (no runtime fetch-and-exec of unpinned third-party code) would make this a NEEDS-HUMAN item, because the endpoints aren't first-party and the URLs aren't hash-pinned. @D3SOX raised it in advance in #274, and the maintainer ruled it exempt: the fetch-and-exec rule exists to stop a third-party packager substituting the developer's binaries, and here the submitter is the app's developer publishing their own app — how OpenTubeX manages its own tools is their call. The condition attached to that ruling — disclose the first-run download in the AppStream description — is met (<description> ¶3). The behaviour is also not core: the built-in playback engine works without either tool. Accepted on that basis.

Validators: audit-descriptor.mjs (no warnings), read-descriptor.mjs, desktop-file-validate, and appstreamcli validate (1 pedantic) all pass locally. CI pr-checks had not run yet at review time — worth a maintainer approval so build-changed / check-apply-extra exercise the x86_64 payload before merge.

Checks that passed (static review):

# Check Basis
0 Static-only, nothing executed, isolated dir only read-only gh/curl/zipinfo/repo validators
1.1 New-app submission 8 new files, all under new registry/org.opentubex.OpenTubeX/
1.2 No high-scrutiny surface no .github/·scripts/·config/·signing; resolver in new app dir = routine
2.1 Submitter established @D3SOX, account 2017, 143 followers, 116 repos
2.2 Source repo corroborated public AGPL fork of FreeTube; submitter == upstream maintainer
2.3 Commit identity sane both commits [email protected], matches blog domain
2.4 Timeline plausible repo Dec 2025 → release 2026-08-25 → PR 2026-08-28
2.5 Trust tier established
2.6 Artifact tier Tier 2 (official upstream prebuilt)
3.1 Sources pinned per type extra-data sha256 + non-zero size; archive sha256; audit-descriptor.mjs exit 0
3.2 No escape perms in finish-args no host///home fs grant; no --filesystem at all
3.3 policy: honest proprietary: false correct; dangerous_permissions: [] correct
3.4 build-commands install-only 5× install -Dm… + deno; no patch/sed/recompile of payload
3.5 Source URLs genuine upstream github.com/OpenTubeX/OpenTubeX/…, github.com/denoland/deno/…
3.6 app-id reverse-DNS matches org.opentubex.OpenTubeX ↔ opentubex.org (200); no impersonation
3.7 update.command shape ./resolve-update.sh
3.8 Download host official upstream org repo, not submitter namespace
3.10 Local-test attestation PR body: x86_64 build/sign/install/launch + video playback; ARM64 gap named
4.1 No arbitrary/unpinned fetch-and-exec as core managed yt-dlp/ffmpeg non-core, unpatched, disclosed; pre-cleared in #274 (developer publishing own app)
4.2 Resolver reviewed as code read-only gh api + jq, JSON only, no rewrite/hash/download/exec
4.3 Endpoints / fs×network --share=network + zero --filesystem; no broad combo
5.1 extra-data sha256 == pin both arch ZIPs + deno both arches match manifest and upstream digests
5.2 Inspected per type 76 entries, standard electron-builder layout; no traversal/symlink/setuid; not an AppImage
5.4 Shipped artifact == official download re-fetch sha256 identical; build did not alter payload
5.5 Prebuilts hash-verified vs upstream OpenTubeX ZIPs + Deno archives match their upstream releases
5.6 IOC scan clean no persistence/miner/reverse-shell/hardcoded-IP/embedded-ELF/RPATH
6.1 Purpose legal & policy-compliant privacy YouTube client (FreeTube is on Flathub); not piracy/abuse
6.2 Non-FOSS not a rejection reason N/A — AGPL-3.0
7.1 Overall PASS
7.2 Hard-fail triggers none

Developer-approved shield. You're the owner of OpenTubeX submitting your own app, so this qualifies for the blue "developer-approved" shield the same way Zuko / zux / Impasto / LibreDB Studio do — approved by construction. To turn it on, in this same PR:

  1. add upstream_approved: true under catalog: in registry/org.opentubex.OpenTubeX/flatpark.yml (same indent as category: / tags:);

  2. add a row to the Approved table in docs/upstream-approvals.md:

    | OpenTubeX | `org.opentubex.OpenTubeX` | Approved by construction — submitted and maintained by its own developer ([flatpark#275](https://github.com/flatpark/flatpark/pull/275)) | 2026-08 |
    
  3. mention that PR link in the commit message.

scripts/check-approvals.sh in pr-checks fails a true flag with no matching doc row, so both edits must land together.

Nits (non-blocking):

  • --talk-name=org.gnome.SettingsDaemon isn't covered by the "powerSaveBlocker" comment next to it — likely media-key handling; consider naming the real reason.
  • Screenshots hotlink the mutable development branch (raw.githubusercontent.com/OpenTubeX/OpenTubeX/development/…); pinning to the release tag would keep them stable. All three resolve 200 today.

No hard-fail triggers. Recommend merge after a CI run.


🤖 Static review per docs/pr-review.md. Reviewer recommends only; a maintainer merges.

D3SOX added a commit to D3SOX/flatpark that referenced this pull request Aug 28, 2026
Pin screenshots to the packaged release and document the legacy GNOME media-key permission.\n\nApproval: flatpark#275
Pin screenshots to the packaged release and document the legacy GNOME media-key permission.

Approval: flatpark#275
@D3SOX

D3SOX commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the detailed review. I addressed all three suggestions in f23a264:

The approval consistency check, descriptor audit, AppStream validation, XML validation and ShellCheck all pass locally.

@jing2uo
jing2uo merged commit 2390780 into flatpark:main Aug 28, 2026
@D3SOX

D3SOX commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks for the quick review, helpful feedback and fast merge!
Will add it as a source in the README and website soon.

jing2uo added a commit that referenced this pull request Sep 1, 2026
The `deno` module staged the Deno runtime via `type: archive`, so its
~95 MB (stripped) binary was baked into the OSTree commit and synced to
R2 — R2 grew from <50 MB to ~90 MB after OpenTubeX landed (#275).

Fetch the official deno zip as extra-data (x86_64 + aarch64) instead.
apply_extra.sh unpacks it (a single `deno` executable) next to the app
payload with the same bsdtar path already used for the portable zip, and
opentubex-wrapper prepends /app/extra to PATH so yt-dlp still finds it.
Pinned by hand and kept outside the MANAGED EXTRA-DATA block, matching
the appimage-tools pattern in OpenShot/Folo.


Claude-Session: https://claude.ai/code/session_01Bkxv9eZ46GSKuPqDBTBnmK

Co-authored-by: Claude Sonnet 5 <[email protected]>
@D3SOX
D3SOX deleted the add-opentubex branch September 7, 2026 12:23
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