Electrum: AppImage for Linux

Created on 6 Mar 2018  路  17Comments  路  Source: spesmilo/electrum

Providing the app through an AppImage would be way easier to use than using pip3 to install it.

OS-linux 馃惂 builpackaging 馃摝

All 17 comments

we try to avoid third parties

@ecdsa There might not be third parties here actually.
https://github.com/AppImage/AppImageKit/wiki#-why-should-i-bundle-my-application-as-an-appimage
I am not familiar with AppImage either; seems like a relatively new project.

oh indeed

Yeah that's not a third party thing
Quoting the author of AppImage "Think of it as putting the contents of the deb into a self-mounting ISO.

Providing an AppImage would have, among others, these advantages:

Applications packaged as an AppImage can run on many distributions (including Ubuntu, Fedora, openSUSE, CentOS, elementaryOS, Linux Mint, and others)
One app = one file = super simple for users: just download one AppImage file, make it executable, and run
No unpacking or installation necessary
No root needed
No system libraries changed
Works out of the box, no installation of runtimes needed
Optional desktop integration with appimaged
Optional binary delta updates, e.g., for continuous builds (only download the binary diff) using AppImageUpdate
Can optionally GPG2-sign your AppImages (inside the file)
Works on Live ISOs
Can use the same AppImages when dual-booting multiple distributions

Here is an overview of projects that are already distributing upstream-provided, official AppImages."

So maybe consider reopening this issue?

why would it be easier than pip3 ?

Because you'll just have to download it like an ".exe" file on Windows and launching it by double-clicking it in your file manager. So you basically don't have to use a terminal to use it, which is more user friendly than using pip.
Plus, it provides the other advantages I posted above.

Also requesting an appimage. Installing python3-pyqt5 brings down ~175mb of things I don't need except for electrum, and afterward my VLC is messed up.
An appimage would really clean things up and reduce dependencies. Please reopen this issue and take it more seriously. Thank you.

I don't think the large size of pyqt5 is an argument for a binary; it sounds more like an argument against. Do you think it would be better to distribute a binary that includes that ~175mb?

I guess if someone contributes a clean script to build this, (potentially with a README if needed), also describing/including how to gpg-sign it (unless an additional .asc is fine), then we could distribute it.

It would also be nice to have it deterministic/reproducible, which seems possible though not sure how difficult: https://github.com/electron-userland/electron-builder/issues/2454#issuecomment-357011099

One advantage against the current distribution on linux would be being able to package libsecp256k1 with the app.

What's the difference to a pyinstaller binary? We could release one for Linux as well and it should be as portable as an appimage.

Oh. I did not realise there is such a thing. (pyinstaller binary for linux)

There is 馃槃

The only thing that's not included in the binary is glibc. If the user has a version that's much older than the version found during build the binary might not start. This means it's usually a good idea to build on a system that uses an older version to build the binary (e.g. CentOS).

Apart from that, the process is straight-forward and works the same way as the Windows or macOS build.

@ecdsa Should I create a script that generates such a binary so we can release one on electrum.org?

Electrum already has a snapcraft file, so Snap packages could be easily delivered to all Linux users if the instructions in this comment were followed: https://github.com/spesmilo/electrum/pull/2521#issuecomment-310485648

Yeah but Snap is kind of shady, everything has to go trough Canonical servers

Shady? Haven't all Linux repositories until today been hosted by their respective distributions? Canonical just decided that it would benefit more users if they could make a packaging system that works everywhere...

Snaps also don't work on CentOs and dependency hell prevents a straightforward install of python3-pyqt5 there. Appimages will be of great benefit to some users who might otherwise just give up.

Note: partly because of https://github.com/spesmilo/electrum/issues/4874, and also because of the recent bump of the min python version to 3.6, we are now more interested in having binaries for Linux.

Ideally, they should bundle the ~same things as the Windows and MacOS binaries, i.e. Python itself, PyQt5, libsecp256k1, PyCryptodomex, hidapi/libusb (as well as numerous pure python packages of course)

If the build could be done deterministically in e.g. a docker container, that would be even better.

If someone contributes an AppImage build script, it could get merged. Otherwise I will look into pyinstaller linux binaries as bauerj suggested above, as I am already familiar with pyinstaller.

Was this page helpful?
0 / 5 - 0 ratings