Is Linux getting friendlier to portability?

Any topic that does not fit into the other categories.
Post Reply
Message
Author
User avatar
Midas
Posts: 4120
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Is Linux getting friendlier to portability?

#1 Post by Midas » Tue Apr 10, 2018 3:47 am

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: 59
Joined: Mon Sep 29, 2014 12:55 am

Re: Is Linux getting friendlier to portability?

#2 Post by skunkos » 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.

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

Re: Is Linux getting friendlier to portability?

#3 Post by Midas » 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%'. :?
Last edited by Midas on Wed Apr 11, 2018 4:57 am, edited 1 time in total.

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

Re: Is Linux getting friendlier to portability?

#4 Post by SYSTEM » Wed Apr 11, 2018 4:00 am

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 11th playlist: January 26, 2018

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

Re: Is Linux getting friendlier to portability?

#5 Post by Midas » Wed Apr 11, 2018 5:01 am

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: 59
Joined: Mon Sep 29, 2014 12:55 am

Re: Is Linux getting friendlier to portability?

#6 Post by skunkos » 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.

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

Re: Is Linux getting friendlier to portability?

#7 Post by skunkos » 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.

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: 59
Joined: Mon Sep 29, 2014 12:55 am

Re: Is Linux getting friendlier to portability?

#8 Post by skunkos » Thu Apr 12, 2018 3:35 am

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: 1758
Joined: Sat Jul 31, 2010 1:19 am
Location: Helsinki, Finland

Re: Is Linux getting friendlier to portability?

#9 Post by SYSTEM » Thu Apr 12, 2018 4:15 am

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 11th playlist: January 26, 2018

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

Re: Is Linux getting friendlier to portability?

#10 Post by Midas » Thu Apr 12, 2018 4:56 am

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

Post Reply