Slashdot Mirror


Best Cross-Distro Installation Tools for Linux?

swillden asks: "I need to package up some commercial Linux software for multiple distributions (Red Hat Enterprise 3 and 4, Fedora, Novell Desktop, SuSE Professional and Enterprise, Mandrake and Debian), and I'm wondering what tools others have found useful. The software is closed source and needs to be very easy to install. This has been an ongoing problem for commercial software on Linux for some time. Has there been any progress?" "So far, the options I'm looking into are:
  1. Create distribution-specific packages using each distribution's tools. Nice in lots of ways, but a lot of work for ~11 different distributions.
  2. Use a commercial cross-distro installer like InstallShield. This is what the previous developers chose.
  3. Use one of the open source cross-distro installers, like autopackage or Loki.
  4. Write a custom installer.
I really would like to provide distro-specific packages, to make use of the native dependency management solutions and to make the software fit nicely into each system, but implementing, testing and supporting all of those installers may be too costly. It may also exclude any other Linux distributions unnecessarily.

I don't like the current InstallShield installer for multiple reasons. First, it's written in Java which is fine except that it can only run if a JRE is present. Requiring users to install a JRE so they can run the installer to install a (non-Java) product is really annoying. Also, it doesn't really know how to do any proper dependency management, so the developers had to take the approach of installing everything that might be required, often duplicating tools that might already be on the system, and sometimes even creating conflicts. Obviously this approach doesn't integrate with the native package management at all.

The Loki installer has some of the same limitations as InstallShield, but it doesn't require Java and it's very scriptable, so I could probably write code to do the dependency checking and be smarter about what to install.

Autopackage looks very interesting, and I'm going to take all of the docs with me to read on a flight this afternoon. However, I'm concerned that it may be unstable, as it's just reached a 1.0 release.

Finally, I could always just write an installer from scratch, but that may be even more work than creating all the distro-specific packages."

9 of 61 comments (clear)

  1. Re:Source? by walt-sjc · · Score: 3, Informative

    You can do what Sun, adobe, vmware, and others do. Create a statically linked package with your own installer. You can also release distro specific packages for the common distros, and use the generic binary for all the others. Gives the best of both worlds and doesn't leave out people that prefer obscure distros.

  2. Plain tarball by yason · · Score: 3, Informative

    Native packages are better than a custom installer that doesn't integrate with the distribution and doesn't grok dependencies using existing libraries wisely.

    My suggestion would be simply to provide a neutral .tar.gz or .tar.bz2 of your application. The tarball would unpack into one directory in which all required files are, including the main executable which could be run straight from that directory. For many, even that would be enough. Gnome and KDE come with built-in archive managers that unpack a tarball somewhere with a single click, and likewise run executable or .sh scripts from Nautilus/Konqueror.

    However, the ultimate key here would be to tweak your license to allow re-packing that directory verbatim for redistribution in a Linux distro: if your software is good enough, distribution makers will use their RPM/DEB packing power and merge your software for you for the benefit of themselves and the users of their distribution. I shall remind you that they've already went lengths to provide installation packages for software that doesn't allow being included in their Linux distribution. Compare that to a simple tarball that could be simply repacked by anyone. If your software is good, it would be a service to the community.

  3. Informative? by Hey,+Retard... · · Score: 3, Informative

    ...did you read the summary? It's closed source and commercial. He's not looking for someone to maintain it or for a distro to pick it up.

  4. Fairly simple... by wolf31o2 · · Score: 3, Interesting

    Well, even though you made it sound almost impossible, all of those distributions except for one use RPM. It really is quite easy to build a RPM file that will work on all of those distributions. You then have to support two things, RPM and DPKG. A properly-written RPM spec file will work on any of those distributions. The hardest part is figuring out the dependencies and specifying them in the spec file, which not limiting anything to specific versions, other than where absolutely necessary.

    Having worked with both RPM and ebuilds, I tend to prefer the Loki Setup method for distributing cross-distribution packages. It works on every distribution, and tends to be fairly easy to work with in general. While your package won't be tracked by the distribution's own package menagement, you're talking about creating a commercial software package. It should probably be installing into /opt/$packagename anyway and be fairly self-contained. This seems to work well for commercial software.

  5. loki_setup... by netfunk · · Score: 4, Informative

    ...has been working great for me, for several commercial games like Unreal Tournament 2004. Over the past five years, I've shipped several products using it, both on commercial CDs and downloadable installers.

    It _is_ a little quirky in some regards, but once you get it working, it pretty much works everywhere.

    If you use it, please use our codefork at http://icculus.org/loki_setup/, since the Loki Games version died with Loki, and we've put several man months of further development into it since (largely improving things as we ship new software with previously unexpected requirements, a MacOS X port, more archive formats and other enhancements). We're pretty fast to respond when someone has a bug, too.

    Otherwise, I'd say give people a tarball and let them sort it out. :) Yes, trying to make distro-specific packages is SO BAD as to make this a better option...even between the various RPM-based distros.

    Someone DID mention that it's nice to enable those distros to repackage it in their preferred format, if there's a want, and I think that's an interesting idea as long as you don't rely on people to show up and do it. Gentoo, for instance, provides their own packages for most of the games I've shipped, which will even extract the data off the retail CDs if need be, etc...this empowers Gentoo users to have a consistent experience, but they can still use my loki_setup based installer if they want, as can those without a "real" distro package. This seems to be the least-messy solution at the moment, and it allows the distro maintainers to compete on features while you maintain a single, decent and universal solution yourself.

    At least, this works well for me. Your mileage may vary.

    --ryan.

    --
    Don't say, "don't quote me," because if no one quotes you, you probably haven't said a thing worth saying.
  6. Statically linked compile packaged as RPM. by kosmosik · · Score: 2, Interesting

    Well compile it statically as every lib used by this app will be compiled in so you won't need to track any dependencies.

    Then put this compile in f.e. /opt/myapp.

    Then wrap this in RPM package - that will do for all RPM based. For Debian do Deb file and you are done with it:

    1. Static compile
    2. Build RPM from it (simple script)
    3. Build Deb from it (simple script)

    You can do this on one system, in totally automated manner - just script it.

    But also it highly depends on kind of your software and what the installer needs to do:

    1. add some symlinks?
    2. register as service?
    3. add to menu?
    4. register MIME type?

    Etc. etc.

    1. Is quite easy - just contain the symlinks (f.e. /opt/myapp/bin/myapp -> /usr/bin/myapp) in package and they will get installed.

    2. This is tricky - you need to issue proper command on post instalation script - this is shitty because different distros have different init/service styles. So here is a lot to do/test.

    3. and 4. are now standardized as FreeDesktop, just include *.desktop file along with corresponding icon and *.xml file for MIME config in your package - these files need to go to the proper dir thou. But it is specified by standard and can be overriden by env variable (but usually is not - what for?):

    http://www.freedesktop.org/wiki/Standards_2fmenu_2 dspec
    http://www.freedesktop.org/wiki/Standards_2fshared _2dmime_2dinfo_2dspec
    http://www.freedesktop.org/wiki/Standards_2fshared _2dmime_2dinfo_2dspec

    When you will use those standards it will work seamlesly on any distro that supports them (all mentioned by you do).

  7. Use an "app directory" by spitzak · · Score: 2, Interesting

    This is what we do. I'm not claiming it's perfect, but our software has been installed on several Linux distributions we have never even seen, with no problems.

    1. Link the program with "-Wl,--rpath,'$${ORIGIN}'" This makes it look in the same directory as the program itself for shared libraries, as though you set LD_LIBRARY_PATH to that directory.

    1a. If your program needs other info, use readlink("/proc/self/exe") to find out where you are. Delete everything after the last slash and put the name of your configuration file there and you have the name of it.

    2. Put the executable into a directory named after your app. Copy all the .so files that you think the user will not have from /usr/lib into this same directory. In our case this is libtcl8.4.so and libfreetype.so.6 and the libraries used by the Intel C compiler (libcxaguard.so.5, libimf.so, libsvml.so). Put all the configuration files in there as well. Make sure it works without LD_LIBRARY_PATH set (use ldd on the executable to see what it is using).

    3. Write some kind of installer that lets the user select where this directory is and unpacks the data there. If you want it to work from the command line the installer can also make a symbolic link from /usr/bin to the executable. In our case we used a self-extracting zip file, where the executable is tacked onto the start and normal libzip is used to extract it (we statically link libz and stuff so we are sure it works).

    4. If the user can't stand the fact that the wrong .so file is used, they can go in the app directory and rename the local copy so it is not found and their system one is found.

    5. If an end user complains that it does not work, they will probably have an error message telling you exactly the name of the .so file that is missing. Add that to your future distributions, and give them a copy to put in their app directory.

  8. Multi-Distro Packaging Tools by Kvorg · · Score: 2, Informative
    I am a bit surprized most replies are rather dismissive and not many tools have been suggested to actually solve the problem suggested. If you think of it, there are actually only two wide-spread formats: rpm and deb. And all big distributions have their convoulted ways of installing these two packages even when they are not native to them. If you can cover those two formats with packages for different distributions (Fedora, Madriva, Debian, different Debian-based distros), you can reach many users. Some tools, of course, offer more, including non-linux packages. I can give several examples from the top of my bookmarks:

    OpenPKG seems like an interesting portable packaging framework. I would be interested to hear from people that have had any exeprience with this.

    PkgWrite is a perl tool that builds debian and rpm packages from a single spec file. GNU/LGLP with liberal relicensing. I suppose it will not save any dependancy issues for you.

    EMP is a commercial solution, offering native packages (debian, redhat, solaris, HPUX etc.) and script-based installs. It costs $99, has a stale web site and I never tried it. But for commercial software, perhaps it can help you.

    STOW is a free perl-based fancy package manager that was pushed by IBM at one time.

    But at the end of the day, it is not very difficult to prepare debian and rpm package specs, build chrooted building environemnts and support several distros. Users are really happy when they can apt-get install your software, even if it is binary-only and from your own server. If you don't have nasty kernel dependencies, chrooted building environment might be easier than it seems. And you will only ever be sure in the case of binary distribution if you can build and test your package yourself. And if you have users who want graphical installers, you can always trick Loki to install a standard package. Which should be its default behaivour anywyay, IMHO.

    --
    -Kvorg
  9. Native Packages by pete-classic · · Score: 2, Insightful

    If you are going to ask people to pay for your software it would be in your best interest to provide them with native packages. I'm sure your other three options sound tempting but I think it's worth your while to avoid the "pain in the ass to install" or "broke when I upgraded" or "broke my upgrade" or "can't get it to work on the server running the other program we need that uses a non-native install" stigmas.

    Have you considered contacting people who do 3rd party packages for the commercial* distros you want to target? (For example Dag Wieers** for Red Hat.) I imagine you could negotiate one-off contracts easily and, if your selling your software for real money, relatively inexpensively. This sort of guy would find this a simple task and could build you a high quality package that would probably pay for itself in reduced support costs.

    -Peter

    * Go with official packagers of non-commercial distros. They don't have the same conflict of interests.

    ** I know nothing of Dag except that I use his packages and they work great. I surmise that he knows more about Red Hat packages than anyone you're likely to hire.