Best Cross-Distro Installation Tools for Linux? 61
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:
- Create distribution-specific packages using each distribution's tools. Nice in lots of ways, but a lot of work for ~11 different distributions.
- Use a commercial cross-distro installer like InstallShield. This is what the previous developers chose.
- Use one of the open source cross-distro installers, like autopackage or Loki.
- Write a custom installer.
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."
Fairly simple... (Score:4, 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.
Statically linked compile packaged as RPM. (Score:3, Interesting)
Then put this compile in f.e.
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.
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_
http://www.freedesktop.org/wiki/Standards_2fshare
http://www.freedesktop.org/wiki/Standards_2fshare
When you will use those standards it will work seamlesly on any distro that supports them (all mentioned by you do).
Use an "app directory" (Score:3, Interesting)
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
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
4. If the user can't stand the fact that the wrong
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