Should you use universal packages?

Forum Forums General Tips and Tricks Should you use universal packages?

  • This topic has 10 replies, 7 voices, and was last updated Nov 30-5:25 pm by ModdIt.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #94388
    Member
    PPC

      I do use applications packed in universal package.

      What are “univeral packages”?

      *What are packages:
      First of all, for the non initiated- what is an “universal” package? Any OS that allows you to install something inside it, does so using a package for that app you are adding to it. There is no stardard for packaging apps. Windows uses .msi, Apple may use another format, Linux uses several (antiX and Debian use .deb, but there is also .rpm, etc).
      Usually different packaging formats are not compatible with other formats. Since each “packaging format” requires it’s own manager, a program that allows users to install or remove applications packaged in the relevant format, we can’t direcly use Windows .msi packages or .rpm packages on antiX (there are ways to try to go around that, if you really need to).

      *What are dependencies:
      One of the problems with packages is dependencies. If you want to install something, for example, a game, it can require that multiple other programs (and only certain versions of those programs) are already installed in your system. A good example for folks from my generation is this: did you ever try to install a Windows game and you had to install DirectX or some GL related files? Yes. Those are dependencies. They do exist in any system, even in Windows. You usually do not notice that in Windows because it tends to pack almost any possible depedency it can. But try to play an old game, say some 15 years old or so, on the latest Windows version- you probably can’t. Do you know why? For several reasons, one being that the essential arquitecture of the OS changed… the other is that the game can’t find the dependencies it requires…


      *”Dependencies hell”:

      If you are a long time Linux user, and/or you like to tinker and try out all kinds of software, you probably ran into dependency hell once or twice- this happens when you want to install an app that requires one dependencie. And that dependencie requires another dependencie, and that depencie requires another… and so on.
      It can also happen that you need to install a dependecie that is in a different version of what another app requires- you install a new app and it runs, but you break one or more apps that are in your system.

      *Why “universal packages” came to be:
      To try to solve dependency problems and incompatibility between diferent packaging formats (ex: something packaged for Red Hat Linux does not run on Debian), someone though about creating a package format that includes (almost)everything the app requires ro run. That way it can run on almost any system, no matter if its Debian, Arch, Red Hat, etc based… the developer only has to create a single package, saving work and time.

      *Kinds of “universal packages”:
      The most used “universal packages” in the world, currently are Snaps, Flatpaks and Appimages.

      -Snaps
      Snaps are backed by Canonical, the corporation behind Ubuntu. The main part of the system is closed source and it depends (ironic, I know) on systemd, that is not used on some OS, like antiX. If ever they solve that dependency on systemd, probably they will run on antiX also.

      -Flatpaks
      Flatpaks do run on antiX – you need to first install the flatpak package manager (called, you gessed it, flatpak), then set up one or more repositories, to point to where it will try to get packages, and then you can install any flatpak you want.
      This format comes with pros and cons – you can install what you want, but antiX does not include any GUI for installing and managing flatpaks- you have to use the terminal to install/delete them, change their permitions (when needed- to allow those apps to access the web or your files), and even run them, using an impossible to remember name that always has to include two dots. And flapaks usually do not obey the theme you are using in your system- if you are using a dark theme, you get a bliding white flatpak app. they are trying to fix that as I speak. also, out of the box, flatpaks do not show up on antix menu, once installed- so you have to use the terminal to run them.
      Some systems, like our brothers over at MX-Linux do have flatpak support on their Package Installer. Gnome allows their users to install flatpak support to their app store, etc. antix does not have any out of the box GUI support for flatpaks.
      You don’t mind using the terminal to install and run apps and have no problem doing that for flatpaks? Great. BUT there’s another catch. Flatpaks install their own dependecies, in flatpak format (that does not interfere with your system files at all, and can never break your system, ever). This means that if you want to install flatseal, a flatpak app that is a handy GUI to manage the permitions of flapak apps, to install a program that’s less than 200kb, you may end up installing over half a Gig of dependencies- so they do that a lot of space and if you are on a metered or very slow internet connection, it will be painfull…

      On the plus side: flatpaks are safe- they only connect to the network if you explicitly let them, or they can only read your files (on your system, on your home folder, etc) if you explicitly let them. They are contained, something apart from the rest of your system. No flatpak you install, by design, can ever break your system.
      And since antiX is Debian based and Debian is known for having stable (tested and safe, but older versions) of apps on their repos, a universal format, such as flatpak is a nice way to have the latest version of an app you need – that is not available in the repo OR is only available in an older version, that lacks a feature you require.
      The default flatpak repository has a on-line app store: https://flathub.org/
      Once you have flatpak (the package manager) installed and set up, search for the app you want, click the copy button on the “Install” section and paste it in the terminal. Confirm that you want to install the app and all it’s dependecies by pressing enter, and it installs everything for you. If antix, by default, picked up the folder where .desktop files for flatpaks are installed, it would be almost the ideal way to install and run the latest versions of some apps, or test software whitout risking breaking your system.

      – Appimages – my most used “universal package” format.
      Appimages are to Linux what portabe apps are to Windows – a single compressed file that has, inside it, (almost) every single dependencie the app requires. If it’s attributs are set to “executable” you can run that file- it uncompressed on the flie and automaticly executes the app inside it.
      You can run them from any File Manager, no terminal needed.
      On the con side- they are not integrated in the menu – you have to either always run the appiamge file you want from the File Manager or create a .desktop file for it, so it appears in the menu (this is not has hard as it sound, but still, daunting for newbies). Usually appimages also have problems following your system’s theme.
      They can be slow starting up, because you are uncompressing a very large file on the fly.
      There is no real “App Store” to get all the existing appimages available, but Appimages allow me to run the latest Gimp version without having to install it. A new version comes up? I just have to download it, make it exectable and click it.
      By design, appimages do not have, or need a real App Store.

      Conclusion:
      Despite having their cons, I do think that flatpaks and appimages are a part of Linux, and antiX’s future- they allow us to have the most recent versions of apps or even to (easily) run apps that are not available on the repositories, in a safe way. Answering my own question- you should not use universal packages if you don’t want to. But you should if you want to run the latest versions of many apps, without risking breaking your system, particulary if hard drive space (and network traffic) is not a concern for you. It’s almost like having a bleeding edge OS, without the blood that sometimes spill…

      P.

      • This topic was modified 5 months, 1 week ago by PPC.
      • This topic was modified 5 months, 1 week ago by PPC.
      • This topic was modified 5 months, 1 week ago by PPC.
      #94397
      Member
      blur13
        Helpful
        Up
        0
        ::

        PPC,

        Nice writeup!

        My take: If you want to have bleeding edge use Sid. If you want “stable” but with a few programs at the cutting edge its worth checking the MX repos, they package quite a few popular programs.

        Personally I dislike universal packages because they are inefficent, its much better having a native build both in terms of speed and size.

        • This reply was modified 5 months, 1 week ago by blur13.
        #94403
        Moderator
        BobC
          Helpful
          Up
          0
          ::

          I look for a .deb first, and if the program doesn’t offer any, then I try to figure out how to build an executable myself, like I did for drawing.

          Sometimes I have found packages that could be converted, like from .rpm, if I recall, but I haven’t tried that recently.

          If nothing still, then I will try an appimage, for example balenaetcher.

          If no appimage is available, I might try a flatpack, but have been burned by them filling the disk volume on me under root, which I consider terrible, for example pinta.

          I don’t recall if I have any snap packs installed.

          SystemD has hurt Linux badly by dividing it’s base and rendering so many things incompatible, IMO. It has been a big win for MS from that respect.

          • This reply was modified 5 months, 1 week ago by BobC.
          #94407
          Moderator
          Brian Masinick
            Helpful
            Up
            0
            ::

            When the flatpak, snap and appimage technology first arrived I was guardedly encouraged.

            These days if I can’t find a deb package
            1) my interest in whatever it is goes down considerably
            2) if I still have interest I either look for an archive package binary or in a few cases I have built from sources while doing something else in parallel.

            No interest at all in any of these bundles; they’re inefficient and as far as I am concerned they are nothing more than another attempt to lock users into the ecosystem of whoever created that style of bundle [Red Hat, Ubuntu… Some other huge company]

            For enterprises, fine. For me I have better things to do with my time and limited resources.

            --
            Brian Masinick

            #94410
            Member
            ModdIt
              Helpful
              Up
              0
              ::

              Possibly one of the most used universal packages is Firefox as downloaded from Mozilla, unmpack
              give it execute rights and run it.

              Personaly my take is no flatpacks or snaps, reason same as Mr Masinik posted, an imitation apple
              or goog play store is the last thing I want to support.

              Appimage is to my mind less problematic and can often be unpacked and run, in all the cases I looked
              at it is only carrying what is really needed and uses system rescources as and where neccesary.
              It is not universal in the sense that GLIB version must fit. That does, I think also apply to the
              proprietry package formats none of which I have used to date.

              Good example to look at is UngoogledChromium, compare an unpacked appimage and the universal zipped
              package contents, they are pretty near the same and free of some app store to be changed at will of IBM
              or Mr Shuttleworth. IBM controls red hat these days..

              #94415
              Member
              PPC
                Helpful
                Up
                0
                ::

                I just corrected the title (the original one was from my first draft of this post).

                I agree with most of what has been posted on this forum.

                I’ve always been too scared of running sid or similar proposals in anything other than a Virtual machine. I’m too scared of breaking my system.

                On flatpaks – they do seem to be a rather missuse of disk space – demanding hundreds of mb’s of dependencies, for very small apps. – Installing bob’s Drawing .deb file saved me some 700mb of disk space, when compared to the (older) flatpak version. I keep expecting that, if I install more and more flatpaks, it would eventually stop demanding to install gigant dependencies. It never did that. Do you want to install the latest version of an app that is available in flatpak format?… Or that has an old version .deb that is some 2mb in size? Sure, install 700mb of dependencies… It just keeps adding and adding more and more dependencies. Eventually, flatpak will have all the dependencies needed to install any app- but I also will run out of disk space in this potato pc…

                Unfortunatly in about 20 years, I only sucessfully compile a couple of apps- I’m lazy that way. So compiling from source is not my thing.

                Like Moddit said – if you count directly using (unpacked zipped) binaries as being a “universal package”, then yes, I’ve been using Ungoogled Chromium, Firefox and many other apps, over the years, in that “universal package”.

                Appimages also provide a nice alternative way to run them- instead of always uncompressing them to use the app inside- I run them, and copy the files inside the mount point to a folder- that’s the way I currently use the briliant OpenOffice.org 64bits appimage, available on this forum.- But that’s because I run that app daily. Since I only use Gimp when I have to, I just keep it’s (compressed, regular) appimage on my Applications folder. That way my system has less installed packages, updates faster, and it’s easy to copy the file to a pendrive and use it anywhere- I think of appimages both as portable apps and the “source” for ready to run binaries. Just uncompress them, create a .desktop file and they are in your system, no extra uncompress time needed. True that they also take a bit more of disk space than regulary installed .deb package – but no way near what flatpaks demand!

                There are even some very nice ideas, like the “Core” suite of apps – that includes light versions of some essential system apps, like a File Manager, Documents reader, Calendar, etc… that is, as far as I can tell, only available under flatpak format – yes, a light app that requires 650mb of dependencies… Sigh. Yet, I’m testing CoreFM…

                Edit and side note – I did install CoreFM – wow- for all the wrong reasons – it’s in fact a light apps – it seems to use some 16mb of RAM – but it simply does not launch files with the associated file type (example- I can’t open a .txt file) and there are some icons missing- I have no icons for folders, and no back/forward buttons? ZZZfm is looking better by the minute! Even rox-filer works better, and all that without eating a large chunck of my hard drive! So, yes, universal packages do save their problems, it’s not the bed of roses it’s cracked up to be… 🙂

                P.

                • This reply was modified 5 months, 1 week ago by PPC.
                #94448
                Member
                blur13
                  Helpful
                  Up
                  0
                  ::

                  Heres an idea:

                  Keep a small 20 GB partition with a sid install where you can have the latest version of less frequently used programs, ie Gimp. You can easily access whatever files you create since its on the same HD. In fact, you can edit files directly on your main partition. Want to play the latest version of Wesnoth with improved AI. Boot into your sid install. Want to simply try out the latest version of some program, to see if the new features are worth the hassle of finding a .deb or compiling, then boot into your sid install. I’ve tried this myself and I think its a pretty good concept. I have to admit, I find Sid to be quite stable, I have yet to brick my system.

                  #94449
                  Moderator
                  Brian Masinick
                    Helpful
                    Up
                    0
                    ::

                    Heres an idea:

                    Keep a small 20 GB partition with a sid install where you can have the latest version of less frequently used programs, ie Gimp. You can easily access whatever files you create since its on the same HD. In fact, you can edit files directly on your main partition. Want to play the latest version of Wesnoth with improved AI. Boot into your sid install. Want to simply try out the latest version of some program, to see if the new features are worth the hassle of finding a .deb or compiling, then boot into your sid install. I’ve tried this myself and I think its a pretty good concept. I have to admit, I find Sid to be quite stable, I have yet to brick my system.

                    I can tell you, based on years and years of using various systems and distributions that Sid is not anywhere NEAR the most unstable system, in spite of the name and the wording. The only thing “unstable” about it in my opinion are the packaging dependencies; those are not in 100% of the cases completely correct, but they’re quickly corrected. To get the very latest software and have a “reasonable” chance that it’ll work, Sid is good.

                    In comparison, using Arch, Gentoo, and a few derivatives of these types of systems over the years, you are FAR MORE LIKELY to destroy your system, maybe ALL of your distributions if you are not watching closely, if you use any of these for a long time and don’t become a true expert and learn every possible nuance; that’s not necessary with Sid. In fact, the ONLY caution I’d give about Sid or Debian in general is that within 1-2 weeks before and after a release, you MIGHT want to hold off on a large number of package changes, because those are the most “risky” time periods – just before release, packaging groups try to get their new work or anything they want to make it into the release packaged. Usually they are OK, but a few incorrect packaging errors are about the only limited risk; stay away then and you reduce that risk to very near zero. Similarly, after code freeze, nothing gets changed, but once the release is complete, there is a great onslaught of changes; again, no super high risk, but sometimes a package goes in and a library might not reach a local repo until later, so there is a package/library mismatch risk when there are large numbers of changes. Again, not a HIGH risk, but in extreme cases you may experience breakage; avoid this window and as mentioned above, “no problem”.

                    I had around a dozen distributions on a Dell Dimension 4100 desktop ~15 years ago, and I was about ready to reorganize a few distros, their positioning on the disk, and the sizes of the partition, so I was ready to literally BREAK a few of them, so I beat on Sid. I *HAD* to do some absolutely STUPID things to get anything to even malfunction, so eventually I WIPED the system with one of those classic “boo-boo” moves – which is also effective to remove, (though not technically COMPLETELY remove): from root: rm -rf /

                    That will delete all files and directories. To truly wipe, it’s best to rewrite a disk over and over again with varying combinations of ones and zeros in order to totally obliterate any attempts to recover data or content in any possible way.

                    Anyway, Sid is a lot more stable than many commercial systems in my opinion. Though I often use antiX, I can (and have, many times), used Debian Sid, sidux, Kanotix, KNOPPIX, or siduction for what I’d consider to be important tasks, and they are more than up to the challenge; the user simply has to pay attention when updating software to make sure that all packages and libraries match the rest of the infrastructure; if they do, they work as well as anything else, and any defects are due to new software that may get an update – such defects are generally fixed promptly too and unless you heavily utilize the features of many apps, you may or may not even spot defects unless you do a deep dive looking for them.

                    None of this is to suggest that defects are absent; all software is prone to a few defects; they’re just not usually “show stopper” defects.

                    --
                    Brian Masinick

                    #94451
                    Forum Admin
                    rokytnji
                      Helpful
                      Up
                      0
                      ::

                      I guess I come from the school.

                      ” Got enough on my plate already ”

                      I have not needed any special packages outside of my repos . But then. This package stuff is all new to me.
                      So thanks for helpful explanations there, PPC.

                      Still learning something new every day. 😀

                      Sometimes I drive a crooked road to get my mind straight.
                      Not all who Wander are Lost.
                      I'm not outa place. I'm from outer space.

                      Linux Registered User # 475019
                      How to Search for AntiX solutions to your problems

                      #94464
                      Member
                      techore
                        Helpful
                        Up
                        0
                        ::

                        Regarding “*Why ‘universal packages’ came to be:”
                        The original intent of virtual applications was for an entirely different purpose: centralized services for distributed clients and applications needing client side data or compute. @PPC explanation is correct if looking at more recent history–not suggesting changes are desirable. Later, I observed them being used for software piracy, portable applications on external media, then adoption by software developers and distributors to reduce customer inquiries or ease the burden of supporting multiple platforms as stated by @PPC.

                        Professionally, I used application virtualization for a number of projects including a 1,000 seat call center. It worked well, but on a personal level, I found snap and flatpaks to be sub optimal as stated by others in this thread. At times, they simply didn’t work, required security policy changes, large storage requirements, or ignored system-wide settings.

                        I believe there is a better solution to application virtualization. An antiX User Repository (XUR). 😀

                        The one thing I miss in Debian based distro’s coming from Arch is AUR. AUR has it’s own set of problems but I never found myself needing to use snap or flatpaks for I found *almost* everything in AUR if not availble from the official repository.

                        I admire and appreciate all the antiX contributors that package software.

                        @PPC, I forgot to state this.. very well written article. Well done!

                        • This reply was modified 5 months, 1 week ago by techore.
                        #94525
                        Member
                        ModdIt
                          Helpful
                          Up
                          0
                          ::

                          Agree with Mr masinik on sid, its mostly harmless.
                          Remember Buntu is based on it and sid packages have already moved from experimental,
                          that is unstable or if you always have a live stick to run it fun.
                          If you need Nvidia drivers pin them, my drivers will still not work with 6 series kernels,
                          they were often broken on stable too though.

                          Like techore I missed AUR for a while, now I can often compile anything I want to play with
                          which has not reached debian experimental.

                        Viewing 11 posts - 1 through 11 (of 11 total)
                        • You must be logged in to reply to this topic.