lbry-desktop icon indicating copy to clipboard operation
lbry-desktop copied to clipboard

Use AppImage for Linux builds

Open zedeus opened this issue 9 years ago • 29 comments

AppImage allows you to make a single executable that can run on any Linux distribution with no setup or dependencies required. According to @filipnyquist electron-builder already has support for it, so the daemon just needs some changes.

zedeus avatar Jul 06 '17 18:07 zedeus

Please convince me that we want this, including downsides.

lyoshenka avatar Jul 06 '17 21:07 lyoshenka

  • Works with most reasonably recent desktop Linux distributions. Well, almost.

  • AppImageKit and its predecessor, klik, have been in the making for over a decade.

  • AppImages can be downloaded and run without installation or the need for root rights.

  • The key idea of the AppImage format is one app = one file. Every AppImage contains an app and all the files the app needs to run. In other words, each AppImage has no dependencies other than what is included in the targeted base operating system(s).

filipnyquist avatar Jul 07 '17 13:07 filipnyquist

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.

probonopd avatar Jul 24 '17 00:07 probonopd

What are the downsides to using AppImage?

lyoshenka avatar Jul 24 '17 16:07 lyoshenka

It is work to set it up and keep current. It is not integrated with the system's package management (which some consider a downside; others consider it a bug plus).

probonopd avatar Jul 24 '17 19:07 probonopd

With more users coming onboard, we need a universal installation method on Linux that will work across Distributions. If Appimage is intended to be that, we should pursue this further.

tzarebczan avatar Aug 02 '17 19:08 tzarebczan

@zestyr - we also had some discussion on flatpak here: https://github.com/lbryio/lbry-app/issues/570

Do you know which would be the better route to go in order to support the most Linux distros?

I see some comparisons here: https://www.reddit.com/r/linux/comments/59njka/the_biggest_winner_of_snap_v_flatpak_is_appimage/ https://www.reddit.com/r/linux/comments/4kxbqp/appimage_snaps_flatpak_pros_and_cons_comparison/

tzarebczan avatar Sep 18 '17 15:09 tzarebczan

Unlike Flatpak packages and other solutions, AppImages run on most Linux systems out of the box, do not need root, and involve no complicated commands on the command line.

probonopd avatar Sep 18 '17 18:09 probonopd

Per discussion still happening on #570, it doesn't seem like there is a consensus regarding AppImage vs. Flatpak.

I'm open to changing this, but it's unlikely we're adding 2 new ways to package an app on our least popular OS.

kauffj avatar Sep 19 '17 13:09 kauffj

Throwing my hat in; I'm a Fedora user that started playing around with lbry this weekend (exciting project!). Seeing only a .deb I had to build from source, which unfortunately requires setting up a bunch of deps, c libs, nvm, python virtualenv etc. I'm pretty used to having to do this, but I would have liked to have something like an AppImage if I'm just trying out the project.

I prefer Flatpak, but I'm mostly indifferent as long as there is a portable option. If you're evaluating runtimes, I would also consider snappy. They're pretty much the 3 competing solutions, with as far as I can tell, no clear front-runner.

eriknelson avatar Sep 19 '17 14:09 eriknelson

Thanks @eriknelson and glad you were able to still get this set up.

We'll look to get this fixed. Let me know if you'd be interested to contribute on this or elsewhere.

kauffj avatar Sep 19 '17 18:09 kauffj

This thread is about AppImage though.

Check out the AppImage support built into electron-builder. Should really make it easy to produce an AppImage.

probonopd avatar Sep 21 '17 15:09 probonopd

Since we're using electron-builder which supports AppImage, I would recommend going for AppImage.

IGassmann avatar Dec 12 '17 16:12 IGassmann

Someone already built flatpak support, it think that bridges the gap we were missing (unless I'm mistaken).

https://flathub.org/repo/appstream/io.lbry.lbry-app.flatpakref

tzarebczan avatar Dec 12 '17 16:12 tzarebczan

As a Linux user, I have no strong opinions about packaging (the existing .deb works fine for me).

To me the best improvement to make here is a better upgrade process (most likely via apt, though possibly just via in-app upgrades). I'd lean towards whatever packaging makes this easiest, though if we can easily distribute both FlatPak and AppImage I'm fine with both.

kauffj avatar Dec 12 '17 17:12 kauffj

This may be possible using the publish features of electron-builder. We could publish the app on Bintray which has access from apt if I'm not mistaken.

IGassmann avatar Dec 12 '17 17:12 IGassmann

@IGassmann have you looked at what Alex is doing in https://github.com/lbryio/lbry-app/issues/808? Will publish work well with auto-updates?. apt is ubuntu-specific, which is all we're targeting now, but if there's a good solution to install the app and keep it updated on other linux flavors, that would be great.

lyoshenka avatar Dec 12 '17 19:12 lyoshenka

I'll look if it's feasible when https://github.com/lbryio/lbry-app/issues/808 will be merged.

IGassmann avatar Dec 12 '17 19:12 IGassmann

New reasons for using AppImage:

IGassmann avatar Jan 19 '18 16:01 IGassmann

An AppImage still seems not to be available from the GitHub Releases page.

probonopd avatar Mar 08 '18 17:03 probonopd