magic-wormhole
magic-wormhole copied to clipboard
Provide portable version for Linux
Please provide a portable version (application bundle) for Linux that can be run without the need to install anything first on the machine, for example an AppImage.
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.
This would address the Linux part of https://github.com/warner/magic-wormhole/issues/173.
Although this could be possible, it would again, be a HUGE file as most of what it uses are not available by default on live images etc.
This is related to #208 , which I'm already working through, I can take a look at this next :)
Is there a good comparison of AppImage, snapcraft and flatpak? They all sound very similar to me and I'd like to understand the pros and cons of each approach.
@meejah http://lmgtfy.com/?q=AppImage%2C+snapcraft+and+flatpak
Okay, so which of those results is the "good" one...? ;)
In my experience, AppImage tends to be the simplest system for distributing portable applications (it's probably also the easiest to understand for less experienced Linux users). It also works quite well with systems where you don't have root access, and works on very old distributions if the AppImage is compiled on an old enough base system.
From what I've seen, Flatpak and Snap seem to focus on more robust (but more complex) application distribution; they require some sort of runtime to be installed, and aren't as easy to get started with (for end-users downloading your application).
I have successfully built many AppImages and could help in the process – it's also easy to automate AppImage builds using CI systems like Travis.
Why not just build a small package like youtube-dl does?
@djmattyg007 this would certainly be possible but not give you all of the advantages stated in my original post.
I really like to see such a project getting more publicity lately, it actually deserves it. You're making an essential problem of using a computer, exchanging files, become really simple (heck, I could exchange the code via telephone, that is like how some of the most used remote support tools do it), but also really secure. Great to see such a project evolve over time. I'll certainly use it from time to time in the future, now that I know about it.
The AppImage team and its users (greetings to @Calinou) would like to help you with the process, you're not alone. @probonopd probably just intended to get you interested and wanted to make sure that you're willing to build and later maintain the AppImage, because both is really important. The process is rather simple, we've documented it to some extent on this page. We're interested in providing a more complete documentation on this, so getting experience is another reason we're interested to help with packaging Python apps.
As a passionate Python user, I'm aware of packaging Python apps to AppImages is not as easy as it should and could. But it's certainly doable and, even better, can be automated pretty easily, and in my experience most flexible (that is, version agnostic) recipes (that's what AppImage build scripts are called) work forever, with just minor maintenance required from time to time.
I think it's time to write something like stdeb for AppImages...
@probonopd When I download youtube-dl from this page:
https://rg3.github.io/youtube-dl/download.html
I get a binary that has all of these advantages:
- An application packaged as a python executable script that 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 python executable script file, make it executable, and run
- No unpacking or installation necessary
- No root needed
- No system libraries changed
- Works out of the box, only need python installed (which almost all Linux distributions have pre-installed)
- No desktop integration necessary as it (like wormhole) is a command-line application
- The python executable script is usually small enough that delta updates are unnecessary
- Can optionally GPG2-sign your python executable script, this isn't magic
- Works on Live ISOs (python is more likely to be installed than anything to manage AppImages)
- Can use the same python executable script file when dual-booting multiple distributions
Here is an overview of a basic collection of scripts to create a distributable python executable script used by youtube-dl.
Following this approach would address the Linux part of #173, without needing anything other than python.
@djmattyg007 indeed such a script would be good to have.
My point is that for a command-line application, using any sort of containerised application image format is complete overkill.
As long as the command-line application does not need any Python modules and such.
@djmattyg007 you cannot compare youtube-dl with wormhole and claim both work like the same. Let me explain this below.
First of all, youtube-dl has no install_requires declared in its setup.py. This means that it can run off a basic Python installation, and doesn't use anything but the standard library. wormhole on the other hand does have a bunch of requirements. It won't run with just a basic standard library, it requires several modules of which some depend on compiled binaries. Some dependencies have themselves dependencies which require other libraries that need to be installed on the system or bundled with wormhole.
Thus, the following claims are just wrong:
- Works out of the box, only need python installed (which almost all Linux distributions have pre-installed)
- No unpacking or installation necessary
- No system libraries changed
- The python executable script is usually small enough that delta updates are unnecessary
- Works on Live ISOs (python is more likely to be installed than anything to manage AppImages)
- Can use the same python executable script file when dual-booting multiple distributions
As you can see, there's more to do than just creating a Python egg and ship that. There's tons of dependencies that, for a portable application bundle, need to be distributed, too. Thus, the UX of a Python egg in comparison to an application bundle is way worse.
I've had success doing this sort of thing with pyinstaller which can also target Mac OS.
So has anyone tried it with PyInstaller yet?
For Linux, this option just opened up: https://github.com/Intoli/exodus
@srk I don't see how that'd work for any Python related packaging, as you can't bundle any "auxiliary files" such as Python code files. Please elaborate.
Ah, not the extra files. Suggestion withdrawn.
Just a little update, we have made making AppImages for Python apps a lot simpler last year by developing linuxdeploy and linuxdeploy-plugin-qt. Example projects are appimagelint and appimagecraft.
No fault to Warner, the package ecosystem for Python is just a mess and I finally gave up. I'm using croc instead, which was inspired by wormhole, but as it is written in Golang it compiles down to a single static binary with few dependencies. Runs cross-platform.
https://github.com/schollz/croc
related: Suggestion: would Nuitka (nuitka.net) provide useful standalone binaries? #255