debfetcher: Pragmatic .deb installer/updater for non-Debian distros


2023-06-29

If there is one thing I miss in non-Debian based distros, it would be official, fast updates of packages such as Signal-Desktop, Element-Desktop, Spotify or Brave. In e. g. Ubuntu, you can add a third-party apt repo and simply install the .deb packages.

After moving away from Ubuntu back to Gentoo I wanted a convenient way to install those. That's why I quickly created a script, called debfetcher. It checks the apt repo for newest versions, downloads the .deb and installs the binaries.

Why not check out their git and build them from source?
Those all are essentially browsers (or Electron-based). As such, building them takes a long time. Using official pre-built packages is a pragmatic choice.

What about distro packages?
Some of those have a rather fast-paced release cycle. The distros are thus often not always up to date, sometimes releases are missed and at times you get them with a delay of several days or weeks. Otoh, they can also be quite quick... it's inconsistent.

Furthermore, they don't always build them from source (if available) either. They (especially Gentoo) tend to use the same principle as debfetcher anyway by simply fetching the .deb. But their "template"(.ebuild in gentoo, template in voidlinux, PKGBUILD in archlinux, ...) needs manual version bumps by the package maintainer. This sometimes may take a while, given most maintainers are volunteers.

What's the problem if the version is a little bit outdated?
As long as there are no critical bugs, security issues or incompatibilities present, none of course. But you don't always know whether this is the case or not.

What about flatpak?
The flatpak packages are not official, they are community maintained and also simply download pre-built binaries. I have some other issues with flatpak, if however it works for you, use it. As a quick day project of mine, debfetcher does not want to compete with anything out there.

Target audience
Overall, debfetcher fills a small niche for those who do not use a Debian-based distro, but would like the use the official .deb builds, with timely convenient updates.

debfetcher also allows a user-level installation, meaning it can be used in a way which does not pollute your /

Limitations
debfetcher does not fetch dependencies. A typical desktop installation usually has those anyway though, especially for the examples given above.

Examples


An example execution:
$ ./debfetcher.sh upgrade
brave: Checking for new version...
brave: Verifying apt repository PGP signature...
brave: Already up to date
element-desktop: Checking for new version...
element-desktop: Verifying apt repository PGP signature...
element-desktop: Will upgrade element-desktop from 1.11.33 to 1.11.34
element-desktop: Fetching .deb...
element-desktop: Verifying checksums...
element-desktop: Installing: version 1.11.34, file: /tmp/debfetcher/element-desktop_1.11.34_amd64.deb
signal: Checking for new version...
signal: Verifying apt repository PGP signature...
signal: Will upgrade signal from 6.21.0 to 6.22.0
signal: Fetching .deb...
signal: Verifying checksums...
signal: Installing: version 6.22.0, file: /tmp/debfetcher/signal-desktop_6.22.0_amd64.deb
spotify: Checking for new version...
spotify: Verifying apt repository PGP signature...
spotify: Will upgrade spotify from 1:1.2.8.923.g4f94bf0d to 1:1.2.11.916.geb595a67
spotify: Fetching .deb...
spotify: Verifying checksums...
spotify: Installing: version 1:1.2.11.916.geb595a67, file: /tmp/debfetcher/spotify-client_1.2.11.916.geb595a67_amd64.deb

Download / Repo


github repo


For comments/remarks: Contact me

Disclaimer: Opinions are my own. If you act on the information presented in this post, you are doing so at your own risk.