Is Linux getting friendlier to portability?

Any other tech-related topics
Post Reply
Message
Author
User avatar
Midas
Posts: 6710
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Is Linux getting friendlier to portability?

#1 Post by Midas »

Recently, I have witnessed a growing debate on new(ish) bundling schemes for packing Linux programs so they run independently of the user's choice of distro. Such discussions mainly center around the following solutions:
I have also seen mention of other formats -- namely Orbital Apps (https://www.orbital-apps.com/) -- but they seem to be outliers to the debate.

For a good intro to their relative merits, i found https://www.fossmint.com/flatpak-appima ... hey-stack/ enlightening. There's also a comprehensive comparison table at https://github.com/AppImage/AppImageKit ... comparison.

I'm no guru and most conversations seem to focus on sandboxing apps from the OS and bundling required dependencies, with only lateral mention to portability in the local TPFC sense. Still, this might be a good place to start if researching portability in a different platform.

§) I was unable to connect to Snap's official URL with my SeaMonkey; alternative info at https://developer.ubuntu.com/snapcraft.

skunkos
Posts: 65
Joined: Mon Sep 29, 2014 12:55 am

Re: Is Linux getting friendlier to portability?

#2 Post by skunkos »

Basically, Linux is MORE friendlier to application bundles and addresses portability problem better than Windows.

1. It allows to clearly separate files which belong to application from the rest of the system.
2. It allows to easily create packages for all major Linux distributions (https://github.com/jordansissel/fpm).
3. Your system does not get messed and filled with crazy OS files by the time. When you uninstall a package, all its persistent files are gone, no leftovers are left behind (except for configuration files, which are stored in WELL-DEFINED user folder, not spread all over in 100000 folders).
4. AppImage is probably easiest solution to bundle your app+dependencies into single executable.
5. Overall administration of installed software is a piece of cake when compared with Windows. You can update literally all programs with single command line command, no restarts after updates needed (except when you need to load new kernel urgently), no forcing of adware, spyware and updates. No unwanted telemetry. Openness.

User avatar
Midas
Posts: 6710
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Is Linux getting friendlier to portability?

#3 Post by Midas »

Your point 3. is probably the last standing hurdle to portability in our sense, then... it sounds a lot similar to Windows '%APPDATA%'. :?
Last edited by Midas on Wed Apr 11, 2018 4:57 am, edited 1 time in total.

User avatar
SYSTEM
Posts: 2041
Joined: Sat Jul 31, 2010 1:19 am
Location: Helsinki, Finland

Re: Is Linux getting friendlier to portability?

#4 Post by SYSTEM »

skunkos wrote: Wed Apr 11, 2018 12:15 am Basically, Linux is MORE friendlier to application bundles and addresses portability problem better than Windows.

1. It allows to clearly separate files which belong to application from the rest of the system.
2. It allows to easily create packages for all major Linux distributions (https://github.com/jordansissel/fpm).
3. Your system does not get messed and filled with crazy OS files by the time. When you uninstall a package, all its persistent files are gone, no leftovers are left behind (except for configuration files, which are stored in WELL-DEFINED user folder, not spread all over in 100000 folders).
4. AppImage is probably easiest solution to bundle your app+dependencies into single executable.
5. Overall administration of installed software is a piece of cake when compared with Windows. You can update literally all programs with single command line command, no restarts after updates needed (except when you need to load new kernel urgently), no forcing of adware, spyware and updates. No unwanted telemetry. Openness.
Now this is just false. GNU/Linux distributions suffer from much worse portability problems than Windows.

Most importantly, a Windows program is bundled with its dependencies, whereas a GNU/Linux program is stored in a package that depends on other packages, so that installing program X automatically installs all its dependencies as well. If you attempt to run a program without installing its dependencies, it will crash on startup. Worse, because dependencies of dependencies are also handled this way, programs/libraries tend to require very recent versions, and different versions aren't binary compatible, even bundling the dependencies won't help you if you're running pretty much anything except the distro the program was compiled for. The exception is if you're using a container such as AppImage, Flatpak or Snap; see OP.

Regarding point 2, FPM is used by almost nobody as far as I know.

Regarding your remark in point 3, the folder to store configuration files has been well-defined on Windows ever since Windows NT 3.1 (1993). It's %APPDATA%.
My YouTube channel | Release date of my 13th playlist: August 24, 2020

User avatar
Midas
Posts: 6710
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Is Linux getting friendlier to portability?

#5 Post by Midas »

IMHO, the first step to achieving portability is to find/create a tool similar to Regshot/Primo that works on every Linux distro. :idea:

skunkos
Posts: 65
Joined: Mon Sep 29, 2014 12:55 am

Re: Is Linux getting friendlier to portability?

#6 Post by skunkos »

Most importantly, a Windows program is bundled with its dependencies,
This is only your wet wish, brother. Big percentage of Windows applications rely on libraries installed system-wide (c/win/system32 folder) which is just wrong, because there is no guarantee, that the actual DLL is really installed on the system. This cannot happen on Linux, because package manager ensures that all dependencies are correctly installed.

skunkos
Posts: 65
Joined: Mon Sep 29, 2014 12:55 am

Re: Is Linux getting friendlier to portability?

#7 Post by skunkos »

Worse, because dependencies of dependencies are also handled this way, programs/libraries tend to require very recent versions, and different versions aren't binary compatible
This is in practice not a problem. Vast majority of apps available for example in Arch Linux does depende on the same version of dependent library and when this library is update in main Arch repository, then all other packages which depend on it are recompiled to reflect the change.

Dependency hell is problem of Windows, not Linux. Oh wait, Windows does not even actually try to solve these kinds of problems. It is just better for each program to include its own version of library in its folder. This is nice until there is a critical security bug in the library. I guess you do not fix all different instances of one library (for example OpenSSL). The overal design of application files layout on Windows is so much more broken than Linux' one.
Regarding your remark in point 3, the folder to store configuration files has been well-defined on Windows ever since Windows NT 3.1 (1993). It's %APPDATA%.
Which is more or less ignored by many apps which just write to which ever locations they like so you have temporary files scattered in C:\users\xx C:\users\xx\AppData\..... Windows application launched by normal user can create folders in c\ or any other drive (if default security is not tweaked), except for system folder (program files, windows, etc). This is not the case on Linux. Linux app launched by non-privileged user cannot write into arbitrary locations. It can write into relatively small subset of directory (/home/user/, /tmp - usually auto-destroyed after reboot, /var/ - depends on distro). So, to infact to destroy all user-data of your system is BY FAR easier on Linux than on Windows. On Windows, it is sometimes just better to completely wipe drive and reinstall Windows.

skunkos
Posts: 65
Joined: Mon Sep 29, 2014 12:55 am

Re: Is Linux getting friendlier to portability?

#8 Post by skunkos »

Midas wrote: Wed Apr 11, 2018 3:46 am Your point 3. is probably the last standing hurdle to portability in our sense, then... it sounds a lot similar to Windows '%APPDATA%'. :?
Yes, in theory, you are right. Problem is that Windows application often use many other directiories to store temp/user data.

User avatar
SYSTEM
Posts: 2041
Joined: Sat Jul 31, 2010 1:19 am
Location: Helsinki, Finland

Re: Is Linux getting friendlier to portability?

#9 Post by SYSTEM »

skunkos wrote: Thu Apr 12, 2018 3:25 am
Most importantly, a Windows program is bundled with its dependencies,
This is only your wet wish, brother. Big percentage of Windows applications rely on libraries installed system-wide (c/win/system32 folder) which is just wrong, because there is no guarantee, that the actual DLL is really installed on the system. This cannot happen on Linux, because package manager ensures that all dependencies are correctly installed.
Depending on system-wide libraries is a terrible practice on Windows and very rare in my experience. AFAIK, it used to be a problem in Windows 9x days (with countless incompetent developers doing it), but not really today.
skunkos wrote: Thu Apr 12, 2018 3:34 am
Worse, because dependencies of dependencies are also handled this way, programs/libraries tend to require very recent versions, and different versions aren't binary compatible
This is in practice not a problem. Vast majority of apps available for example in Arch Linux does depende on the same version of dependent library and when this library is update in main Arch repository, then all other packages which depend on it are recompiled to reflect the change.
Of course. That's exactly how GNU/Linux distributions deal with dependencies, and it's indeed a superior way as long as you don't need portability. And that was my point: package managers deal with dependencies in an excellent way, but it means that you can't just run programs from an external drive unless 1) they're compiled for the same distro (and distro version!) or 2) they have been packaged into a container such as Flatpak.
skunkos wrote: Thu Apr 12, 2018 3:34 am Dependency hell is problem of Windows, not Linux. Oh wait, Windows does not even actually try to solve these kinds of problems. It is just better for each program to include its own version of library in its folder. This is nice until there is a critical security bug in the library. I guess you do not fix all different instances of one library (for example OpenSSL). The overal design of application files layout on Windows is so much more broken than Linux' one.
Indeed, that's a valid problem - but the Windows model has a nice unintended advantage: it allows portability.
My YouTube channel | Release date of my 13th playlist: August 24, 2020

User avatar
Midas
Posts: 6710
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Is Linux getting friendlier to portability?

#10 Post by Midas »

SYSTEM wrote: The Windows model has a nice unintended advantage: it allows portability.
Excellent point -- and the motive behind my OP. 8)

EDIT: for a more in-depth overview, check the following article...

User avatar
Midas
Posts: 6710
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Is Linux getting friendlier to portability?

#11 Post by Midas »

Wow! This looks really interesting, will have to test it sometime:
Winepak is a Flatpak repository for Microsoft Windows applications bundled with Wine. Its aim is to "make installing and running (Windows/Wine) applications Just Work", by including the runtimes required to run the software/game under Linux.

User avatar
Midas
Posts: 6710
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Is Linux getting friendlier to portability?

#12 Post by Midas »

Having had time to test AppImage(d) software in different Linux distros, I can confirm that they just work without any installation after downloading.

The snag here might be the config files are apparently saved to dot.files at the user's 'home' location, so they're not really portable in our sense and have to be remade on each computer -- on the bright side, they survive program erasure...

The Linux version of Textosaurus (https://www.portablefreeware.com/?id=2921) is an easy example.

User avatar
Midas
Posts: 6710
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Linux (apparently) NOT getting friendlier to portability

#13 Post by Midas »

While presenting details of his testing of a recent release of Falkon (AKA Qupzilla; https://www.portablefreeware.com/?id=2319), some remarks casually made by Jesse Smith in the latest Distrowatch Weekly triggered my alarm regarding the chances of success for any of these Linux portability solutions:
The Snap package I could skip as snaps will not run on MX as snaps do not work on distributions that do not run systemd as the default init process.
I think my experiment with getting Falkon up and running on my machines demonstrates that while portable package formats (such as Flatpak and Snap) have their uses, they are not the silver bullet many in the Linux community were hoping they would be. Snaps are tied to a specific init system, while the Flatpak option proved to be a huge download, was cut off from system resources, and required several work-arounds. Both formats would be unable to integrate with other tools that might want to launch a web browser, greatly limiting their usefulness. In the past I have used an AppImage to get around some of these problems, but even then the browser only works like a native application if it is unpacked from the AppImage archive and manually installed somewhere. The AppImage, on its own, is not effective beyond running some tests.

Even overlooking partisan system design quarrels, there's no arguing this doesn't bid well for any of the formats involved.

On a somewhat broader scope, an industry analyst traces a similar somber outlook after listening to Linus Torvalds and the Linux Mint crew:
The world is not made up of desktop Linux users. For the million or so of us, there are hundreds of millions who want an easy-to-use desktop that's not Windows, doesn't require buying a Mac, and comes with broad software and hardware support. [...] Let's try to make this happen shall we? Otherwise, the traditional Linux desktop, in all its variations, will remain a niche operating system for power users.

User avatar
SYSTEM
Posts: 2041
Joined: Sat Jul 31, 2010 1:19 am
Location: Helsinki, Finland

Re: Linux (apparently) NOT getting friendlier to portability

#14 Post by SYSTEM »

Midas wrote: Sat Apr 13, 2019 5:06 am
The Snap package I could skip as snaps will not run on MX as snaps do not work on distributions that do not run systemd as the default init process.
I think my experiment with getting Falkon up and running on my machines demonstrates that while portable package formats (such as Flatpak and Snap) have their uses, they are not the silver bullet many in the Linux community were hoping they would be. Snaps are tied to a specific init system, while the Flatpak option proved to be a huge download, was cut off from system resources, and required several work-arounds. Both formats would be unable to integrate with other tools that might want to launch a web browser, greatly limiting their usefulness. In the past I have used an AppImage to get around some of these problems, but even then the browser only works like a native application if it is unpacked from the AppImage archive and manually installed somewhere. The AppImage, on its own, is not effective beyond running some tests.

Even overlooking partisan system design quarrels, there's no arguing this doesn't bid well for any of the formats involved.
I think portable package formats would work better for smaller apps instead of a full-fledged web browser. A small app would have much less dependencies (= smaller package), and it wouldn't need to access system dictionaries or integrate with tools which attempt to launch a browser.
My YouTube channel | Release date of my 13th playlist: August 24, 2020

User avatar
Midas
Posts: 6710
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Is Linux getting friendlier to portability?

#15 Post by Midas »

Following up on previous posts on the subject, here's a pretty in-depth technical analysis of the current 3 main packaging formats from Linuxland.

Linux Package Managers Compared – AppImage vs Snap vs Flatpak

Another article from the same site details how to search for these so-called "Universal Linux Apps".

Search Linux Applications On AppImage, Flathub And Snapcraft Platforms

A final quote for a summary of the advantages of AppImage, the format closest to our local definition of portability here at TPFC, IMHO.

The Advantages Of Appimage Software

Why is the issue proving to be so thorny in the homeland of free and open software? Well, the intricacies of the filesystem conventions might be one (big?) factor. To know more, jump to this recent explainer.

Filesystem Hierarchy Standard

Post Reply