Skip to content

Our own package repo & patched Flatpak for COSMIC applets

custom-repo-flatpak

AstrOS now has its own package repository.

Until now, everything came from the Arch Linux repos. That works great most of the time, but sometimes waiting for a fix upstream isn’t enough. Now we can ship it ourselves in the meantime, like we did with:

cosmic-applets

At the end of September, Flatpak 1.18.4 shipped a batch of security fixes. One of them changed how Flatpak exports an app’s desktop file: instead of copying it as-is, it now only keeps fields from an allowlist.

While this is a good change, COSMIC applets rely on a few extra fields, like X-CosmicApplet, and none of them were on the list. Since then, applets installed as Flatpaks didn’t show up in COSMIC at all. That has been the case for two months now on any rolling distro shipping a modern Flatpak.

COSMIC’s fields were added upstream in October, but haven’t made it into a Flatpak release yet. Even the release from last week doesn’t include it.

So AstrOS now ships Flatpak 1.18.6-1.2 with that fix backported, including a few additional fields needed to run some other applets that didn’t work with just the first patch.

You only need to update to the latest build. If you already installed an applet as a Flatpak, reinstall it once so its desktop file gets exported again.

The repo is hosted on our Forgejo, and every package is built from a public PKGBUILD by our CI. Packages are only used while building AstrOS, and every package is signed and verified before it ends up in an image.

Our repo is mostly meant for patches and packages we want that aren’t in upstream Arch. It may open up possibilities like including brew-proxy in AstrOS (or as an extension) in the future.

Our patched Flatpak isn’t AstrOS-specific, so if you’re on Arch (or an Arch-based distro) and use COSMIC, you can use it too.

First, import and trust our signing key:

Terminal window
wget -O sign.gpg https://code.astros-linux.org/api/packages/AstrOS/arch/repository.key
sudo pacman-key --add sign.gpg
sudo pacman-key --lsign-key 'AstrOS@noreply.code.astros-linux.org'

Then add our repo to the end of /etc/pacman.conf, below [extra]:

[astros.code.astros-linux.org]
SigLevel = Required
Server = https://code.astros-linux.org/api/packages/AstrOS/arch/repo/$arch

And install Flatpak from it once:

Terminal window
sudo pacman -Syu astros.code.astros-linux.org/flatpak

Our Flatpak stays installed until Arch ships a newer version. Don’t forget to reinstall your applets afterwards, just like on AstrOS.