Slashdot Mirror


Petreley On Simplifying Software Installation for Linux

markcappel writes "RAM, bandwidth, and disk space are cheap while system administrator time is expensive. That's the basis for Nicholas Petreley's 3,250-word outline for making Linux software installation painless and cross-distro." The summary paragraph gives some hint as to why this isn't likely to happen anytime soon.

6 of 292 comments (clear)

  1. Re:Gentoo by sirius_bbr · · Score: 5, Interesting

    I tried it (gentoo) some time ago. After two weeks of frustration I moved back to debian.

    For me it was more like
    1. emerge
    2 come back in 8 hours and then:
    a. see whole bunch of compilation errors,
    b. dependencies were not sorted out correct, so nothing works
    c. combination of above

    I specially liked (still do) the optimization potential (where debian is stuck at i386), but it didn't work for me.

    --
    this sig has intentionally been left blank
  2. Re:Static linking problems by Ed+Avis · · Score: 4, Interesting

    Static linking is a seriously bad idea. Part of the job of a packager is to arrange the app so it doesn't include its own copies of packages but uses the standard ones available on the system (and states these dependencies explicitly, so the installer can resolve them automatically).

    Take zlib as an example of a library that is commonly used. When a security hole was found in zlib a few months ago, dynamically linked packages can be fixed by replacing the zlib library. This is as it should be. But those that for some reason disdained to use the standard installed libz.so and insisted on static linking needed to be rebuilt and reinstalled.

    (OK I have mostly just restated what the parent post said, so mod him up and not me.)

    Quite apart from the stupidity of having ten different copies of the same library loaded into memory rather than sharing it between processes (and RAM may be cheap, but not cheap enough that you want to do this... consider also the CPU cache).

    A similar problem applies to an app which includes copies of libraries in its own package. This is a bit like static linking in that it too means more work to update a library and higher disk/RAM usage.

    Finally there is a philosophical issue. What right has FooEdit got to say that it needs libfred exactly version 1.823.281a3, and not only that exact version but the exact binary image included in the package? The app should be written to a published interface of the library and then work with whatever version is installed. If the interface provided by libfred changes, the new version should be installed with a different soname, that is libfred.so.2 rather than libfred.so.1. It's true that some libraries make backwards-incompatible changes without updating the sonames, but the answer then is to fix those libraries.

    --
    -- Ed Avis ed@membled.com
  3. No no no! by FooBarWidget · · Score: 4, Interesting

    First of all, RAM and disk space are NOT cheap. I spent 60 euros for 256 MB RAM, that's is not cheap (it's more than 120 Dutch guilders for goodness's sake!). A 60 GB harddisk still costs more than 200 euros. Again: not cheap. Until I can buy 256 MB RAM for 10 euros or less, and 60 GB harddisks for less than 90 euros, I call them everything but cheap.

    What's even less cheap is bandwidth. Not everybody has broadband. Heck, many people can't get broadband. I have many friends who are still using 56k. It's just wrong to alienate them under the philosophy "bandwidth is cheap".
    And just look at how expensive broadband is (at least here): 1 mbit downstream and 128 kbit upstream (cable), for 52 euros per month (more than 110 Dutch guilders!), that's just insane. And I even have a data limit.

    There is no excuse for wasting resources. Resources are NOT cheap dispite what everbody claims.

  4. Re:Word by Anonymous Coward · · Score: 4, Interesting

    The article is surprisingly dense for such a word count -- yet is easy to read.

    Petreley is undoubtedly getting the grip of this "writing thing"... ;-)

    Seriously, though, however smart and logical are his conclusions, one thing bothers me: the installation should be simplified but "right", too.

    I mean, there are other objectives besides being easy.

    Last week I tried to install Red Hat 8.0 on a Pentium 75Mhz with 32MB RAM (testing an old machine as X-terminals). It didn't work.
    The installation froze at the first package -- glibc (it was a network installation) -- probably due to lack of memory (as evidenced by free et al.).

    Why? It was a textmode installation. I know from past experience that older versions of Red Hat would install ok (I used to have smaller computers).

    My suspect is that Red Hat has become too easy -- and bloated. Mind you, I opted for Red Hat instead of Slack or Debian because of my recent experiences, in which RH showed to recognize hardware better than others.

    I hope Petreley's proposed simplification, when implemented, takes size into consideration. The way it is (using static libs, for instance), it seems the other way.

    The article as a whole, though, present neat ideas and it's one of the best I've recently read.

  5. Apple has it right by wowbagger · · Score: 4, Interesting
    From what I am given to understand of the way the Mac OS 10.* handles such things, Apple got it more closely to right.

    As I see it, the following things need to happen to really make application installation be very clean under any Unix like operating system:
    1. All apps install in their own directory under /usr/[vender name]/[app name] - the reason for including the vender name is so that when two venders release different apps with the same name (Phoenix comes to mind) you can still dis-ambiguate it. Also allow apps to install into ~/apps/[vender name]/[app name] to allow for non-root installation.
    2. Under an app's directory, create the following subdirs:
      • [arch]/bin - any binaries that are OS/CPU dependent.
      • bin - shell scripts to correctly pick the right [arch]/bin file.
      • man - man pages for the app
      • html - help files in HTML, suitable for browsing
      • [arch]/lib - any shared libraries specific to the app.
      • system - desktop icons and description files, perferably in a WM-agnostic format, MIME type files, magic files (for the file command, and a description of each program in the app, giving the type(s) of application for each binary (e.g. Application/Mapping; Application/Route Planning).

    3. Shells and WMs are extended to search under /usr/*/*/bin for programs, /usr/*/*/man for man pages, etc.
    4. Programs shall look for ~/.{vender]/[appname] for their per-user storage area, and will create this as needed.
    5. The system must provide an API for asking if a given library/application/whatever is installed.
    6. The system must provide an API for installing a missing component - this API should be able to *somehow* locate an appropriate package. The requesting app will provide a list of acceptable items (e.g. need libfoo.so.0.1.6,libfoo.so.0.1,libfoo.so.0)
    7. This is the biggest item, so I'm really going to stress it:
      PACKAGE CREATORS MUST BE HELD ACCOUNTABLE FOR BEING OVERLY ANAL-RETENTIVE ABOUT WHAT PACKAGES THEY REQUIRE

      Too damn many times I've tried to install FOO, only to be told by the packaging system "FOO needs BAR". But FOO doesn't *need* BAR, it just works "better" if BAR is present (e.g. the XFree packages from RedHat requiring kernel-drm to install, but working just fine (minus accelerated OpenGL) without it).

    Were venders to do this, then a program install could be handled by a simple shell script - untar to /tmp, run script to install needed pre-reqs, move files to final location.

    The system could provide a means to access the HTML (a simple, stupid server bound to a local port, maybe?) so that you could browse all installed apps' help files online.

    As a final fanciness, you could have an automatic process to symlink apps into a /usr/apps/[application class] directory, so that if you wanted to find all word processing apps you could
    ls /usr/apps/WordProcessors
    and see them.
  6. Not always a problem by Simon · · Score: 5, Interesting
    Just want point out that problems with shared libraries aren't universal. Years ago AmigaOS had shared libraries that basically worked without significant administration problems, or a 'dll hell'.

    Important features of the way AmigaOS libraries worked:

    * All libraries were versioned, but not on the file system level. Each library contained a version number in it's header.

    * Versions of the same library were always backwards compatible. This was Law. Software using an old version of a library must continue to work on future versions. This also meant that developers had to think out thier library API beforehand (because you would have to maintain that API). Libraries could be extended though with extra functions.

    * Application programs had to 'open' libraries before using them. When opening a library an application would specify the minimum version that it required of the library. (If no matching or later version was found then the program would have to exit gracefully).

    * There tended to be few (compared to Linux anyway) libraries. Libraries tended to be biggish. A few big libraries instead of many tiny libraries. This made them manageable.

    * The backwards compatibility rule/law for libraries meant that software could bring it's own version of a library and update the existing version of that library, but *only* if it was a more up-to-date version.

    As a previous poster pointed out, a lot of the problem would disappear if people (library writers) maintained compatible interfaces for the same library soname. I'm pretty sure that this is the way it was designed to work.

    anyway, a FYI.

    --
    Simon