Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Software Linux Business

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:
  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."
This discussion has been archived. No new comments can be posted.

Best Cross-Distro Installation Tools for Linux?

Comments Filter:
  • Fairly simple... (Score:4, Interesting)

    by wolf31o2 ( 778801 ) on Friday September 16, 2005 @02:41PM (#13578385)

    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.

  • by kosmosik ( 654958 ) <kos AT kosmosik DOT net> on Friday September 16, 2005 @03:10PM (#13578674) Homepage
    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 [freedesktop.org]
    http://www.freedesktop.org/wiki/Standards_2fshared _2dmime_2dinfo_2dspec [freedesktop.org]
    http://www.freedesktop.org/wiki/Standards_2fshared _2dmime_2dinfo_2dspec [freedesktop.org]

    When you will use those standards it will work seamlesly on any distro that supports them (all mentioned by you do).
  • by spitzak ( 4019 ) on Friday September 16, 2005 @04:33PM (#13579748) Homepage
    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.

"Gravitation cannot be held responsible for people falling in love." -- Albert Einstein

Working...