Skip to content

devops: telegram on both platforms, and flathub as the channel linux has left - #80

Merged
landsman merged 1 commit into
mainfrom
telegram
Aug 12, 2026
Merged

devops: telegram on both platforms, and flathub as the channel linux has left#80
landsman merged 1 commit into
mainfrom
telegram

Conversation

@landsman

Copy link
Copy Markdown
Owner

macOS

cask "telegram" — Telegram's native macOS app, deliberately not the Qt telegram-desktop cask. Installed and verified locally (12.9,282555).

Linux — the awkward half

Neither of the existing shapes fits, so this is the first flatpak in the repo:

  • telegram-desktop was in the Ubuntu archive up to jammy only — gone from noble onward (checked against packages.ubuntu.com, all suites). So the VLC/LibreOffice row shape is out.
  • Upstream publishes a tarball, a Snap and a Flatpak, and no apt repo and no .deb (checked against desktop.telegram.org). So the Discord hand-download exception is out too.

Flathub is the only channel left that still updates it. install-apps.sh installs flatpak and plasma-discover-backend-flatpak from the archive, adds the remote, and pulls org.telegram.desktop system-wide. The Discover backend is deliberate — without it a flatpak updates only from the command line, which is the trap the Discord .deb is already in.

The key gets pinned like every other one

Flathub ships its key inline, as one base64 line of flathub.flatpakrepo, rather than as a download of its own. So the script decodes it, checks it against a pinned fingerprint, and adds the remote from the verified local fileflatpak remote-add <url> would re-fetch the key and trust whatever came back, leaving the pin decorative. The test asserts both halves.

Fingerprint 6E5C05D979C76DAF93C081354184DD4D907A7CAE (Flathub Repo Signing Key <flathub@flathub.org>), taken two ways: the inline GPGKey= and the standalone dl.flathub.org/repo/flathub.gpg. Same primary key both times.

fetch_key gave up its fingerprint check to a check_fpr helper, since apt and flatpak now reach the same pin by different routes.

Two bugs this surfaced

  • apt-get install is now guarded on a non-empty list. A run whose only missing app is the flatpak would have called it with no arguments, which is an error rather than a no-op.
  • The missing-package loop needs ${a[@]+"${a[@]}"}. MISSING can legitimately be empty now, and bash 3.2 — what the macOS CI leg runs the tests under — cannot expand an empty array under set -u.

Also fixed contains() in the test to pass -- to grep; a pattern starting with -- was being read as an option, so that assertion had been failing on its own syntax.

Two new test cases: the flatpak happy path, and Flathub's key failing the pin. make qa passes.

…has left

The native macOS cask on the Mac, deliberately not `telegram-desktop`.

The Linux half is the awkward one: `telegram-desktop` was in the Ubuntu archive
up to jammy and is gone from noble onward, and upstream publishes a tarball, a
Snap and a Flatpak but no apt repo — so neither the archive rows nor the Discord
hand-download shape applies. Flathub is the only channel left that still
updates, which makes this the first flatpak here.

It gets the same discipline as apt: Flathub's key ships inline as one base64
line of flathub.flatpakrepo, so the script decodes it, pins the fingerprint
6E5C05D979C76DAF93C081354184DD4D907A7CAE (cross-checked against the standalone
flathub.gpg) and adds the remote from the verified local file — `remote-add
<url>` would re-fetch the key and trust whatever came back.

Two things fell out of it. `apt-get install` is now guarded, because a run whose
only missing app is the flatpak would otherwise call it with no arguments; and
the missing-package loop needs the empty-array-safe expansion, since bash 3.2 on
the macOS CI leg cannot expand an empty one under `set -u`.
@landsman
landsman merged commit b607849 into main Aug 12, 2026
3 checks passed
@landsman
landsman deleted the telegram branch August 12, 2026 11:22
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