Gleb Gleb - 10 months ago 92
Linux Question

How to implement auto-update electron app on Linux

I use electron to create cross-platform application. For Windows and Mac it could be done by electron tools, like autoUpdate, Squirrel, so on.

The problem is only with Linux. I have built a .deb package for Ubuntu. But I can't find any "step-by-step" instruction or comprehensive info about it.

I'm not familiar with java and hadn't experience with creating apps for Linux.

So the main questions are:

  1. What is a standard auto-update process using distribution's package manager? Who should do download and install update and restart an app.

  2. What are another ways to solve the issue. What is the best practise to create custom update?

  3. What are the differences between .deb, .rpm packages and what are the differences between Ubuntu and Fedora?

All information will be helpful, even the it (info) will not be related to electron app.


Answer Source

There really is nothing standard in the *nix world. You will always have to support specific ditributions, and each of these distribution can in turn have multiple possible ways of creating an auto-updater.

To your questions:

  1. There is no standard way.

  2. That depends on your way of actually distributing he package. If you plan on using package managers like rpm/apt-get/apt install, then each of these managers has a specific way of configuring your application to be among those packages that are checked for automatic updates.

  3. Difference between .rpm / .deb:

    Main difference for a package maintainer (I think that would be 'developer' in Debian lingo) is the way package meta-data and accompanying scripts come together. Link

    Difference between Ubuntu & Fedora: As creating a detailed answer on this questions would both be too lengthy and too much effort to maintain, check out this blog post detailing the differences between these two distributions.