Conversation
…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`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
macOS
cask "telegram"— Telegram's native macOS app, deliberately not the Qttelegram-desktopcask. 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-desktopwas in the Ubuntu archive up to jammy only — gone from noble onward (checked againstpackages.ubuntu.com, all suites). So the VLC/LibreOffice row shape is out..deb(checked againstdesktop.telegram.org). So the Discord hand-download exception is out too.Flathub is the only channel left that still updates it.
install-apps.shinstallsflatpakandplasma-discover-backend-flatpakfrom the archive, adds the remote, and pullsorg.telegram.desktopsystem-wide. The Discover backend is deliberate — without it a flatpak updates only from the command line, which is the trap the Discord.debis 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 file —flatpak 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 inlineGPGKey=and the standalonedl.flathub.org/repo/flathub.gpg. Same primary key both times.fetch_keygave up its fingerprint check to acheck_fprhelper, since apt and flatpak now reach the same pin by different routes.Two bugs this surfaced
apt-get installis 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.${a[@]+"${a[@]}"}.MISSINGcan legitimately be empty now, and bash 3.2 — what the macOS CI leg runs the tests under — cannot expand an empty array underset -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 qapasses.