Slashdot Mirror


Bundled Applications for GNU/Linux?

munehiro asks: "As an addicted GNU/Linux and Mac OS X user I recently tried to install binaries and libraries on a Linux box using an approximation of the elegant and clean approach known as the Mac OS X bundle (everything about each app or lib under a different directory) as opposed to the Linux standard approach 'everything under a common prefix' (normally /usr or /usr/local) with applications and libraries mixed in the standard subdirs bin, lib, share and so on, and found administration life much easier. What do other, more experienced readers think about the problems and improvements related to dropping the current Linux approach for a 'bundle-like' one in Linux distributions?"

148 comments

  1. darwinports by russellh · · Score: 2, Informative

    I think DarwinPorts is working on something like this. Unless I'm mistaken of course...

    --
    must... stay... awake...
  2. Correct me... by Doctor+O · · Score: 3, Insightful

    ...but to me it seems that the approach is the way to go. Install/uninstall by cp/rm or drag/drop, whatever you prefer. Ressource waste definitely is no reason for today's machines, at least on the desktop.

    --
    Who is General Failure and why is he reading my hard disk?
    1. Re:Correct me... by Bat_Masterson · · Score: 1

      You can emulate both approaches with symbolic links (or even hard links). See Pkglink.

    2. Re:Correct me... by lpontiac · · Score: 1

      Libraries aren't about saving disk space, they're about saving space in memory, and also about having exactly one version of the library on the system, which the packaging software will update as required. (Particularly important security-wise).

    3. Re:Correct me... by Doctor+O · · Score: 1

      Ah, ACK. Good point. Although using something jailesque for only allowing the proper app to use the insecure lib would greatly help as an exploit would not only have to find that insecure version but also first gain the rights to run it.

      Yeah, users/groups work fine, but any additional layer of security helps, and it's not so much of a performance hit unless you're in big business. We have a handful of FreeBSD servers containing lotsa jails for users, and they work great. No performance hassles expect when Doctor M runs his braindead SQL queries again to collect statistics from his 30 gig DB by selecting about everything in there instead of generating clever small SQL queries and doing the same thing in 10 MB of memory and seconds instead of minutes of full memory + swap.

      --
      Who is General Failure and why is he reading my hard disk?
  3. Mostly great by WMD_88 · · Score: 2

    It's great to work with...simple as hell. But, I wonder...what if a lib needs to be replaced (updated), will all the bundles get the new version?

    1. Re:Mostly great by Vaevictis666 · · Score: 1
      I don't think that's necessarily a worry unless people are using a cvs version of the package.

      If (for example) zlib needed updating, you would need to get a new version of the entire package, for every package that used zlib. Or at least a diff between packages. Much more inefficient, but at least this way you're guaranteed the package got tested with the new zlib.

    2. Re:Mostly great by XeresRazor · · Score: 1

      So setup a central lib repository with a way for each lib to report it's version and the app simply checks the system lib directory to see if there's an updated compatible version of the library, if not it defaults to it's own version of the lib. I'm pretty sure OS X uses a similiar system (uses major and minor version numbers to indicate compatability breaks).

    3. Re:Mostly great by susehat · · Score: 1

      Well, the libs would be in a different bundle. You would update the lib bundle, and the app would simply load the new lib - assuming that nothing critical has changed, there would be no error.

    4. Re:Mostly great by Anonymous Coward · · Score: 0

      Thats exactly how Linux distros work today you know.

    5. Re:Mostly great by MS_is_the_best · · Score: 1

      Great, but... I already have /usr/lib and /usr/local/lib.

      People whining about a central approach should learn a package manager (rpm/deb/whatever), which works fine.

    6. Re:Mostly great by spitzak · · Score: 1

      Most such bugs are in libraries that are generally available, like libjpeg.

      The things that are included in an app "bundle" are things like the correct version of Qt. As far as I know there has never been a "security bug fix" of these. Instead all updates are "the new version" which requires the program to be recompiled.

      In any case, if they remain shared libraries, the knowledgable user can delete the instance from the bundle and it will use the main shared one.

  4. Dupes in system...=space tradeoff by da5idnetlimit.com · · Score: 1

    I have a Linux Fileserver with system on a 2.5 gigs HDD + 4-5 large hdds.

    With the present organisation, if two programs must use a lib, they both access only this lib, wich is present once only.

    with the bundle system, I have as many times the same lib as I have softs using it. Okay you can get a 400 gigs hdd easily nowadays, but my system only has this poor 2.5 gigs for system... some use even smaller hdds/flash drives.

    + when upgrading my debian box (easy apt-get) I have to upload on library once, not everytimes for every soft...

    => more hdd space, more files, more bandwith and time to upgrade in the minus vs convenience in the plus.

    Choose your tradeoff.

    --
    It takes 40+ muscles to frown, but only four to extend your arm and bitchslap the motherfucker
    1. Re:Dupes in system...=space tradeoff by Methlin · · Score: 2, Interesting

      How about the best of both worlds using hard links? As an added bonus uninstalling the last application that uses a particular library will remove the library as well instead of leaving it around as cruft. Of course this requires the libs and applications exist on the same filesystem.

    2. Re:Dupes in system...=space tradeoff by Bat_Masterson · · Score: 2, Informative

      You can have the best of both worlds with symbolic links. A tool like Pkglink can do most of the heavy lifting and also give you the ability to have multiple versions of the software installed.

    3. Re:Dupes in system...=space tradeoff by gl4ss · · Score: 1

      i wouldnt think that to be as much of a problem as downloading gigabytes of crap every time you need to really update just 100mbytes..

      --
      world was created 5 seconds before this post as it is.
    4. Re:Dupes in system...=space tradeoff by MBCook · · Score: 1
      You missunderstand the idea. You would still have shared libraries. Here is the idea (explain through Mac OS):

      You want to install a new piece of software. You insert the CD and it's window opens up in Finder (like Windows Explorer). You open up your hard drive and browse to where you want the program to go (in OS X I think it's "Applications"). You then drag the program from the CD to that folder. But you don't drag the program, plus it's data files, plus this, plus that, you drag just the program. One file.

      You get tired of it? Want to uninstall it? OK. Go find the program in the Applications folder again. Take it, and drag it to the trash. It's uninstalled.

      It's this kind of simplicity that the poster is (I assume) talking about. You'd install the libraries the same way. This avoids having the program in /usr/bin/coolApp, documentation in /usr/share/doc/coolApp, global config in /etc/coolApp.conf, and so on. It makes life much easier.

      Moving is easy too. If you go rename the MS Office directory or move it to c:\Office from c:\Program Files\Office, what happens? All hell breaks loose. But with a Mac, you should be able to (haven't tried it in years because I'm forced to use PCs, but I think it still works) just move the file. Don't want it in Applications? Drag it somewhere else (~/Cool Apps/ maybe) and when you double click on it, it runs just like always. When you upgrade from 3.4 to 4.0, you don't get that LOVELY headache where many programs (on Windows) like to put themselves in "C:\Program Files\NeatProg 3.4" and leave the directory behind. You could either install OVER it (and have it in a badly named folder), or install along side it and then delete the old one. AOL is terrible for this. Nothing weird like that.

      Now don't missunderstand. The app still has it's data files and such. They are all hidden inside the "executable" .app file. I think there are tools to look inside. There are additions to this (like when a program is run it should put a COPY of it's config files in a directory (/system/preferences/whoknowswhat maybe?). Then the user can go find that file (if they want) and edit it. Next time you launch the program it would notice that and accept the changes. I'm not too sure beyond the basic idea, but I know it's there.

      THIS is what we should all strive for. Installing can't get easier (makes sense too, you copy the program to your computer and it's installed). Uninstalling is simply as intuitive (how many computer "n00bs" have you seen delete an icon from the desktop or Start Menu and think the program is gone?). It is easy, and makes sense. When you delete something you don't have to go hunting all over the filesystem for all it's little bits. Sure package managers and uninstallers do that for you, but god help you if you've moved anything. And it seems like at least half the time they don't get rid of everything.

      It is just soo much easier.

      PS: I doubt if you had to copy libs on your PC (like everything was statically linked) you wouldn't see the size go up THAT much as long as a choice few (X, QT, etc) stayed in one place.

      --
      Comment forecast: Bits of genius surrounded by a sea of mediocrity.
    5. Re:Dupes in system...=space tradeoff by stuuf · · Score: 3, Interesting

      Sounds like what they did with GTK+ on windows. Apparently anyone who wants to install a GTK+ (other than GIMP) cannot be trusted to download and install GTK+ first, so they have to bundle it into the installer. So, once you install Gaim, GIMP, Ethereal, GTK Radiant, etc. you end up with 3 or 4 copies of the GTK+ libs scattered around (The most absurd one I've seen is Ethereal, which stuffs into the installer two versions of the app, one linked with GTK 1.x, the other with GTK 2.x, and both GTK runtime versions, for a plump 17MB installer). Whenever this approach is used, space is always wasted because of duplicates, and it makes it more difficult to update a shared library without reinstalling each application using it. Installing applications into their own separate locations does make administration easier. One of the only advantages to the current system is that you can have a PATH variable with a finite number of directories (/bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin) and every application is quickly accessible from a shell command line. Now that many programs are launched form a desktop menu instead of the command line, this is not always needed. But bundling libraries with applications usually impedes maintenance and administration. It's also unnecessary because most package management systems (portage, apt, rpm, etc.) handle dependencies automatically (portage also has the depclean command to remove unneeded library packages).

      --

      Everyone is born right-handed; only the greatest overcome it

    6. Re:Dupes in system...=space tradeoff by peragrin · · Score: 1

      You are correct but are talking about two different points that play off of each other.

      Every mac file has two points. one for data and a resource. if the pointer to the data doesn't match the pointer in the resource for the data location it gets automatically updated. So if you move a file an alias which uses the resource to find the file, starts looking for it.

      Now OS X doesn't use a lot of shared installed libraries from what I can tell, it appears most of them are installed to begin with. So installing KDE and Gnome would require the same approach still. Yet installing Firefox, or mozilla, would jjust use libraries already installed.

      --
      i thought once I was found, but it was only a dream.
    7. Re:Dupes in system...=space tradeoff by theapodan · · Score: 1

      This is the approach that Syllable takes, or will take, with one application file representing the entire application. I think that this is a great idea. I don't know if it's been implemented yet, but there's been some heavy discussion on the mailing list.

    8. Re:Dupes in system...=space tradeoff by byolinux · · Score: 1

      Just to add a bit of clarity...

      A .app is just a directory. Mac OS X sees .app extension and treats it as an application. Inside are various directories called things like MacOS and Resources.

      This comes from the NeXTSTEP era, when a single '.app' would run on multiple architectures.

      I also believe RiscOS did something similar... a file with a ! at the start (ie. !Draw, !Paint, !Browser) would be treated as an application, and would really be a folder with a set of files inside, including a loader, icon, etc.

    9. Re:Dupes in system...=space tradeoff by MS_is_the_best · · Score: 1

      Yeah, but you still need the shared libraries.. So that is one thing where 'rm a dir' would not work.

      Secondly data is also shared a lot (for example icons). If I update my theme, I want to update automatically all my programs the same theme. Etc.

      I really fail to see the advantage of the 'bundled' approach. It is just creates a dependency hell of symlinks..

      I do see why the semi-bundled appraoch on windows is a mess, but please do not take this to linux.

      My idea: a package manager. Double clicking on myprogram.deb/rpm installs it, Double clicking a list of installed applications (for example in synaptic) de-installs it and takes track of the dependencies. What could be easier?

    10. Re:Dupes in system...=space tradeoff by harrkev · · Score: 1

      Linux already HAS one file for each application.

      CSH is one file.
      BASH is one file.
      LS is one.
      MKDIR is one file.

      I am not sure what the complaining is about!

      --
      "-1 Troll" is the apparently the same as "-1 I disagree with you."
    11. Re:Dupes in system...=space tradeoff by harrkev · · Score: 1

      The solution is the path is easy.

      Have one directory called "links" or something like that. Each application can create a symbolic link to the main executables in that directory. Then, other than the obvious links to /usr/bin and the like, you just have "links" in your path.

      On my sun workstation, one tools tell me "absurdly long path truncated" or something like that. But I have to keep the path long in order to get access to all of the tools that I use on a daily basis. Nice.

      --
      "-1 Troll" is the apparently the same as "-1 I disagree with you."
    12. Re:Dupes in system...=space tradeoff by theapodan · · Score: 1

      What about bashrc? What about the libraries to support bash if its not compiled statically? Why not integrate these into ONE file, to use superfluous capitalization? That's what I'm complaining about, I want to be able to copy and paste one single file and have the entire application move. Meta-files, sort of like folders, but with an architecture separate from the filesystem.

    13. Re:Dupes in system...=space tradeoff by stevo3232 · · Score: 1

      On your comment on GTK+ on Windows, I know for a fact that GIMP and GAIM both do not bundle in GTK and force you to install it seperately, and will share a GTK+ install. I'm pretty sure Glade for Windows acts this way as well, so maybe its just a few GTK+ on Windows apps that you're using that have this problem. Thanks, Stephen Clement

      --
      s.clementmonkey@sympatico.ca, remove the 'monkey'.
    14. Re:Dupes in system...=space tradeoff by Anonymous Coward · · Score: 0
      Your sig is out of date!

      I humbly submit for your perusal:
      while (true) {
      print ("This is the infinite sig...");
      }
  5. GNUstep has, and always will, do this by aperezbios · · Score: 2, Insightful

    Hi there,

    GNUstep (http://www.gnustep.org) applications use application bundles as well. This tends to piss off a lot of anal-retentive folk, especially in the anal-retentive Debian Developer reality, but we do it because it ACTUALLY MAKES SENSE. It doesn't make sense to have stuff for one app in ten different non-parentally-unified folders.

    I strongly suggest you check it out, if you've not previously. I'd personally like to see a unified AppBundle Freedesktop standard. Rox also uses AppBundles, as far as I know, and it would be nice to have a unified and mutually agreed upon format for them. Maybe you'd be up to the task of coordinating it. If so, subscribe to the gnustep-discuss mailing list (see the website for a link) and let's see what we can work out.

    1. Re:GNUstep has, and always will, do this by Bat_Masterson · · Score: 2, Informative

      Of course, the problems with this is that, if everyone follows this approach, then PATH variables can become HUGE! Also, there can be unintended side-effects in the ordering of the PATH variable.

    2. Re:GNUstep has, and always will, do this by Enrico+Pulatzo · · Score: 1

      Symlinks provide a simple way to overcome the huge path problem. Just put a symlink to /somepath and put /somepath in your $PATH.

    3. Re:GNUstep has, and always will, do this by Bat_Masterson · · Score: 1

      True and this is what various package managers do (like Pkglink). Without the package manager approach, the next problem is keeping track of what to symlink.

    4. Re:GNUstep has, and always will, do this by peragrin · · Score: 1

      Just to point out the obvious.

      GnuStep is based off of Next Step which was bought by Apple and was used as a basis for OS X.

      next step was also founded by Steve Jobs. The similar idea of everything intergrated for the application staying around isn't surprising.

      --
      i thought once I was found, but it was only a dream.
    5. Re:GNUstep has, and always will, do this by knightbg · · Score: 1

      No, the added directories do not need to be added to the PATH.

      GNUStep (and OSX, and whatever other NEXT derived system you'd like to bring up that uses app bundles) require only that you refer the system to the bundle, not to the executable inside of it. With GNUStep, this is generally done with an "openapp" command which does reside on the PATH. For example, when I run "openapp Ink", openapp only needs to know where the applications directory is, and it looks for the the Ink executable, and everything that goes along with it, in a directory called Ink.app in the GNUStep applications directory. There is no reason to add every application's directory to the path.

    6. Re:GNUstep has, and always will, do this by Bat_Masterson · · Score: 1

      This seems like an unnecessary expense. You're incurring an executable execution (openapp) to find out where the actual executable is. Other UNIX systems would cache the names of all executables in the PATH to speed up finding the one you want.

    7. Re:GNUstep has, and always will, do this by hey! · · Score: 1

      Well, don't you think that the PATH variable technique has outlived its usefulness?

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    8. Re:GNUstep has, and always will, do this by idiotnot · · Score: 1

      Uh, what's the big deal about one more exec? openapp is a very small program that runs quickly. It isn't like you're having to fire up oowriter to start a program.

      In fact, most of the time, starting a program undet the NeXT/Open/GNUstep/OSX environments, you're doing the clicky-da-purty-picture thing, not running the app from the command line. On the NeXTstep 3.3 machine here next to me, the unix programs are unix programs that you run directly, and the NeXT programs are the ones wtih app containers. It's a question of apples (no pun intended) and oranges -- you have app containers for the big graphical applications, and the stuff that runs on the command-line, you do the old-fashioned way.

    9. Re:GNUstep has, and always will, do this by xouumalperxe · · Score: 1

      I just have to say it. They have an unified parent folder. it's /

  6. Like ROX desktop ?? by fuzzy1 · · Score: 1

    This is the way I would like all programs. No more
    chasing around the disk to remove stray bits.

    Same idea as having all user data under one branch so we can back it all up.

    rcb

    --
    We create our society every time we interact with each other. What kind of society did you create today?
  7. Try Gobolinux, or GNU Stow by forsetti · · Score: 3, Informative

    Gobolinux: http://gobolinux.org/
    Stow: http://www.gnu.org/software/stow/stow.html

    I think you will find that you are not alone ...

    --
    10b||~10b -- aah, what a question!
    1. Re:Try Gobolinux, or GNU Stow by nicolas.e · · Score: 1

      I totally agree with the parent poster.
      Stow is the solution to the problem.

      Here's how it works : every piece of software is installed in /usr/local/stow/package-name. (with, for example ./configure;make;make install prefix=/usr/local/stow/package-name.

      Then, you run stow, and it maintains symlinks in /usr/local/bin... and everything works seamlessly. No problems with statically linked libraries or whatever.

      If you want to delete a package, just delete it, and rerun stow to clean the symlinks.

  8. Absolute common sense by XO · · Score: 1

    If someone would make USE of the Library versioning system, and -then- make SANE use of LIBRARIES, then this would be an absolute no-brainer.

    You put your LIBRARIES in a common directory. Everything else that relates to a piece of software is in it's own directory.

    LIBRARIES ARE THINGS THAT ARE MEANT TO BE SHARED BY MULTIPLE SOFTWARES.

    When I go to install some program, and find I have to install 8,000 different libraries, that are mostly only used by that ONE piece of software.. that really farking pisses me off.

    Any software that requires anything beyond (a) it's executeable (b) a configuration file, should have it's own directory where all of it's stuff goes.

    --
    "Champagne for my real friends - and real pain for my sham friends!" http://ericblade.postalboard.com/
    1. Re:Absolute common sense by Gloume · · Score: 1

      This is an excellent point. For the people complaining about PATH vars, we just need intelligent path handling. For example PATH=/software that contains package directories, each with a bin subdirectory. When searching for binaries in the path look in /software/*/bin.

    2. Re:Absolute common sense by Bat_Masterson · · Score: 1

      Potentially, libraries are not the only thing that is shared amongst programs. Plus, the designer of a program may build a library that is intended to be shared, but no one comes and shares it -- who's fault is that?

    3. Re:Absolute common sense by XO · · Score: 1

      I can't think of anything else that should be shared between applications.

      Well, if no one shares it, that's fine. It's still a library, and libraries belong in one place. (although groups of libraries that belong together should be in their own directory from there)

      And instead of having libgtk1.2-62 or whatever the heck i have, and having libgtk2.0-2.6.1-121 or whatever it is i currently have, shouldn't i just have

      libgtk1
      libgtk2

      ? At least until interfaces become broken, then oh my god, i might get libgtk3 ?

      --
      "Champagne for my real friends - and real pain for my sham friends!" http://ericblade.postalboard.com/
  9. It's called /opt by LeninZhiv · · Score: 4, Insightful

    I'm sure many will correct me if I'm not hearing you right, but it should be noted that there is a widely-accepted and fully GNU/Linuxy way to have an application housed with its own directory tree (organised however the application wants) in /opt.

    The filesystem hierarchy standard also provides /usr/local in cases where the UNIX filesystem hierarchy is adhered to (with /usr or even /. used if the software is included in the default disto/UNIX version).

    1. Re:It's called /opt by thegrassyknowl · · Score: 2, Insightful

      It's possible to build and install a package into /opt/packages/packagename-1.2.3.4/[bin][lib][sbin]

      And then symlink anything that it would have installed in /usr/[bin][lib][sbin] back to /usr/local/wherever. It makes removing the package pretty easy. Remove /opt/pacakage/packagename-1.2.3.4 and then check /usr/local for dangling links...

      Then there is only one copy of programs, libraries, and everything else but its all symlinked so that the packages can be all contained within their own dir.

      --
      I drink to make other people interesting!
    2. Re:It's called /opt by thegrassyknowl · · Score: 1

      I forgot to add that there are tools to automate doing this too - the Linux From Scratch book describes using this method and provides a few links to tools that can manage it.

      --
      I drink to make other people interesting!
    3. Re:It's called /opt by tuggy · · Score: 1

      i dont usually compile anything as i found everything i need in the repositories :)
      but, when i download software that doesnt need configure && make && make install, i just put it in /opt and make symlinks also. works really well and does not get lost :)

      some examples include: skype, blender, realplayer, acrobat reader..

    4. Re:It's called /opt by thisissilly · · Score: 1
      I used this system back in the 1990s for admining a large (at the time) SGI machine, with the program opt_depot.

      Worked rather well.

    5. Re:It's called /opt by babbage · · Score: 1
      The way OSX bundles functionality in directories isn't really the same as the /opt or /usr/local trees on GNU/Linux or Unix. The latter are places where users can customize a system with their own software, but it's just a housekeeping matter, really.

      On OSX, on the other hand, you're actually bundling up functionality in a self-contained wrapper: applications go in .app directories, libraries go in .framework directories, installers go in .pkg directories, etc. These bundles can, in turn, contain other bundles, so for example a .mpkg bundle can installl multiple packages which are also available for installation as separate, atomic entities.

      Each bundle has a standard hierarchy, with leaf-nodes for the actual executable file (and any helper code), a separate .nib file or tree for the interface code, localization strings for one or more languages, the icon to display in the Finder, etc.

      To the Finder user, this all looks like one monolithic file that can be moved around the filesystem as you like, but from the command line it can all be easily browsed; moreover, you can do things like swap out chunks of the bundle to replace or extend functionality -- for example, you can replace the .nib to change the interface, or you can add or remove localization bundles.

      Additionally, there are tools to set these trees up for developers at the start of a project, so all you have to do is fill in the blanks.

      In theory, there's even support for including binaries for multiple hardware/software platforms, so for example if OSX were ever ported to x86 hardware (it won't be, but bear with me), the hooks are there to add an MacOS/x86 or even Linux/x86 or Win32/x86 set of executables. And again, to the user, it all just looks like one double-clickable application file in the Finder.

      This goes well beyond what the basic /opt tree provides, and it would be a great addition to GNU/Linux or even Windows...

  10. Global updates by SanityInAnarchy · · Score: 3, Insightful

    To what extreme does this go? For example, where is the standard C library?

    Suppose there's a major security flaw in a reasonably popular library. If each package must keep everything inside its own folders, then the library update only goes to apps which are maintained actively -- and which noticed that the library was updated.

    If, on the other hand, we use traditional UNIX, then one file is replaced in /lib, and at worst we get a warning that something some program is doing with that library is depricated and will be removed. But this gives the individual program maintainers more time to update, because they don't have to rush things out the door to make the security patch. They have until the next library release to get with the program.

    And, resource management DOES matter. There is no good reason that my dad, a commodity/stock broker, needs 512 megs of RAM on his machine -- except for the use of this kind of design. It's not just how much memory it takes up on disk, if you have to load glibc fifty times into RAM, you've got problems.

    --
    Don't thank God, thank a doctor!
    1. Re:Global updates by Otter · · Score: 1

      Obviously requiring every application to install and load its own copies of base Unix, Carbon and Cocoa libraries would be insane and obviously Apple doesn't do that.

    2. Re:Global updates by calica · · Score: 1

      App dirs can check the system dirs first. You load a single shared lib. It is upgradable. A standard Linux desktop will already have the common libs installed and updated. And this has the advantage of working over ssh X forwarded connections without installing all the dependencies. Very handy.

    3. Re:Global updates by Matthias+Wiesmann · · Score: 1
      To what extreme does this go? For example, where is the standard C library?
      On Mac OS X the C library is in the System Framework. Frameworks are bundles that contain shared libraries and support files. Frameworks can be either in /System/Library/Frameworks/, /Library/Frameworks/, /Network/Library/Frameworks/ ~/Library/Frameworks/ or inside the application.
      Suppose there's a major security flaw in a reasonably popular library. If each package must keep everything inside its own folders, then the library update only goes to apps which are maintained actively -- and which noticed that the library was updated.
      You update the System framework.
      If, on the other hand, we use traditional UNIX, then one file is replaced in /lib, and at worst we get a warning that something some program is doing with that library is depricated and will be removed. But this gives the individual program maintainers more time to update, because they don't have to rush things out the door to make the security patch. They have until the next library release to get with the program.
      The idea of bundles is not so much to replace the Unix way than to improve it. To simplify management and define where things are. The idea of the bundle is that is allows you to store libraries within your application bundle it is in no way an obligation. You can decide to share your library or not and where this shared library is installed (common, network, or user).
      And, resource management DOES matter. There is no good reason that my dad, a commodity/stock broker, needs 512 megs of RAM on his machine -- except for the use of this kind of design. It's not just how much memory it takes up on disk, if you have to load glibc fifty times into RAM, you've got problems.
      This is true, but shared library are only more economical if they are used by more than one application. This is certainly the case with LibC, but go over the libraries in /usr/local/lib and ask yourself, how many of theose libraries are really used by more than one program?
    4. Re:Global updates by bbuR_bbuB · · Score: 1

      And this has the advantage of working over ssh X forwarded connections without installing all the dependencies.

      ... what exactly are you talking about here? For all intents and purposes, remote X sessions (including ssh forwarded ones) are executed entirely on the host running the X client (X client==X-based program, X server==Program that displays X applications). No dependencies to worry about, because the only thing the server is doing is displaying the graphical information the X client tells it to.

      So, once again, what the hell are you talking about?

    5. Re:Global updates by calica · · Score: 1

      What you say is correct but you're not thinking of the consequences of that design. All execution happens on the X client side which then uses RPC (gross oversimplification) to communicate with X server. Since all execution happens on the client, all deps must be satisfied on the client. If the client doesn't have an X runtime (xlib, gtk, qt, etc), it just won't run.

      With app bundles you can move the bundle to a random machine (say headless with no X installed) and have it work. All the libs (including xlib) are in the bundle so you have no dependency problems.

    6. Re:Global updates by Anonymous Coward · · Score: 0

      Regarding resource management--

      If we did it right, then each app would come with its own libc, etc. BUT, with versioning, dld (the dynamic loader, aka run-time linker) would be able to tell if a specific version of a library was already in memory for another process and just start sharing with that instead of double-loading the same code. If disk space is really a concern, then you could put together a fixer tool, that runs from cron, that searches the filesystem for identical libraries and executables then hard-links them all together.

      As for patching one app and not the other, or apps coming with different versions of libc, et al. We kinda have the reverse of that today - what if libc gets patched and that breaks an old app that was not tested with it? If you want truly independent installations, then they must by definition, be self-contained, no ifs and or buts.

  11. I couldn't care less! by Roadkills-R-Us · · Score: 2, Insightful

    I've worked on OSes that used both methods, as well as others. Either of the two mentioned here is fine. You just spend a few minutes learning how your system does it, and deal with it.

    There are, IMO, much better uses of good engeineers' and programmers' time, than fighting this battle.

    Any logical approach, that's my preferred approach. And both of these are logical enough.

  12. Hardlinks and package managers by SanityInAnarchy · · Score: 1

    How much harder is it to do "emerge -C program" as opposed to "rm -rf /usr/share/program"?

    And yes, we do like all user data under one branch, so we can back it up. Personally, I also like all config data under one branch, even if it isn't anywhere near the programs that use it, so that it can be backed up.

    Plus, how often do you install/uninstall programs? How often do you use them? You use less RAM when you don't have to cache two copies of the same library because there's no more /lib. But installing/uninstalling MIGHT be slightly slower, and WILL be just as easy.

    --
    Don't thank God, thank a doctor!
  13. Doesn't scale well by Anonymous Coward · · Score: 2, Informative

    For each application I would have to add an entry to
    PATH and possibly LD_LIBRARY_PATH, either globally or (even worse) in each user's profile file.
    With package management systems such as dpkg and rpm maintaining the /usr hierarchy, I don't think there is any advantage in moving each library/application to
    a different directory. There is even software available that will track where files are placed when locally compiled
    packages are installed. So, where's the advantage? I see lots of
    drawbacks and no real benefits.
    I generally follow the rule that software installed under /usr should be maintained entirely by the package manager; locally compiled software belongs under /usr/local.

    1. Re:Doesn't scale well by mschiller · · Score: 1

      You're thinking too much inside the Unix/Linux Box.
      LD_LIBRARY_PATH and PATH are both constructs that are artificial.. For example:

      For the PATH: There is several potential work arounds:
      1) All applications go in a standardized root directory ala /Applications [MacOS] or /opt.
      2) Either with meta data or with an extension [such as .app] the bundle is identified as an Application Bundle.
      3) Inside the bundle a ./bin/application_name file exists that is the executable. The Shell automatically searched the /Application directory, because it's called out in the PATH. then it automatically says oh.. the user is calling XYZ app, it's really going to be XYZ.app/bin/XYZ and executes that. This will work great for programs that normally only need a single executable. Clearly you could extend this rationale to find ALL executables by just extending the PATH concept to automatically add all the bin/ directories of all Applications bundles in the Path... Simple eh?

      Same applies to LD_LIBRARY_PATH, although to save disk space you might want to apply the soft link approach others have discussed....

  14. A great Idea by Hacksaw · · Score: 1

    It's sad that it takes Apple to get the obvious going.

    A good system would work as follows:

    Base system (everything needed to get the system up into a usuable at all state, but no serious apps beyond vi) in /bin /lib /sbin /etc /man.

    The secondary set of basic apps (like grep, find, cut, and so on) in /usr/bin /usr/lib, etc.

    Add on apps (like gcc, emacs, Quake3, etc) in mini hierarchies: /apps/gcc/bin /apps/gcc/lib...

    Common libraries anywhere convenient (probably /apps/commonlibs/) and soft linked into the lib directory of the mini hierarchy.

    The same goes for stuff normally in /usr/share.

    If the package can't work without it, it should be softlinked into the mini hierarchy.

    The result is that it's extremely obvious what stuff an application needs without having to use special tools and look up possibly outdated docs.

    This also means that it's obvious how to do version management. You would have a tool called addpath that would allow you to add an app to your path (or to the system path) and otherwise manage things so that you only had the apps your wanted there, but it'd be very easy to find out what you were missing.

    If you installed a new version of something, it would overwrite the old one. It'd just remind you to remove the old path, and put in the new one. That way testing new programs becomes easier.

    --

    All the technology in the world won't hide your lack of vision, talent, or understanding.

    1. Re:A great Idea by rburgess3 · · Score: 1

      no no no, you got it all wrong... :)

      Base system (everything needed to get the system up into a usuable at all state, but no serious apps beyond emacs) in /bin /lib /sbin /etc /man.

      see, once you do that, you're done. Simple really.

    2. Re:A great Idea by Hacksaw · · Score: 1

      Your scheme has merit. The reason I suggest the division is because what I call the basic system apps are also all ones that should be tagged and watched by a tripwire like mechanism to prevent being rooted.

      Also, the apps in /bin and friends would be that which is needed for basic booting, so there'd be a nice obvious division for those using the distribution for embedded work.

      And frankly, I'd actually put emacs into the /apps hierarchy. It's not universal, and it's huge.

      I would put some sort of stripped down emacs like editor in with vi, though.

      --

      All the technology in the world won't hide your lack of vision, talent, or understanding.

    3. Re:A great Idea by rburgess3 · · Score: 1

      I was only being slightly facetious. Acutally, I think that putting emacs in with the 'minimum necessary' section is a good idea because it gives you just about everything you would need to get productive fairly quickly: vi-alike editor, shell, browser, file manager , and when it all inevitably goes horribly wrong, psychologist.

      I was just thinking about this very topic the other day as I contemplated installing linux on my roomie's computer after several abortive attempts to get various versions of Windows installed on it. As an itermediate step for all of these well thought out plans for re-arranging the *nix program methodology, wouldn't adding a top level directory called /config make a LOT of sense?

      If it's got a configuration file, put it in /config. Having X's config file in the same location as Bash's and SAMBA's makes sense. Making even more sense is putting links to the actual files in /config. If it's a per-user config file put it in /config/usrname.

      Does anyone have a handy list of all the flat files used in the distributions of Linux and their 'customary' locations?

    4. Re:A great Idea by Hacksaw · · Score: 1

      That, of course, makes me think about the Unix naming conventions, and how little I like them.

      Some makes sense, like bin and lib. /sbin is the most confused name in Unix. Folks, it means static bin, and is for things which must work even if the shared libraries are broken. It doesn't mean system.

      Then there's man. Okay, it stands for manual. Fine. But the man program shouldn't be called "man", it should be "help".

      Then there's etc. Grrr. This should be conf, or config. The only things typically in /etc or rc files and global config files. And the rc files basically configure the machine.

      We won't talk about Solaris which used to have FIFO's in /etc. I hope they have stopped that egregious behavior.

      Then there's libexec. Are the executables or libraries? Oh, they're executables that are meant to be run by other executables only. How about "helper"?

      Regarding Emacs:

      Let's face it, GNU Emacs is a very short distance from being a complete OS. A message passing kernel and a few drivers (which could be written in elisp) and you're there.

      I have set init=/usr/bin/emacs before, just for shits and giggles. It doesn't handle zombies well, though. ;-)

      --

      All the technology in the world won't hide your lack of vision, talent, or understanding.

  15. Solve the right problem by Rysc · · Score: 2, Insightful

    App bundles are okay for some people, but they are not the holy grail most seem to be touting them as here.

    Sure, library updates are a problem. But that isn't why app bundles are a bad idea.

    App bundles are a bad idea because they solve more problems than exist, and cause more problems than they solve.

    For every definciency in the way UNIX traditionally works there is a workaround. The problems with the system are well known. The system has a very few flaws... but one of those flaws is really glaring to desktop users, especially Mac heads.

    Because they see only what is broken and not what isn't they propose a Mac-like system. The app bundle idea isn't new and it isn't bad, but it does not solve the right problems. It solves one, perhaps two, problems, mostly for one class of users. And, while those problems are being solved, it creates dozens of difficult problems for several classes of users.

    The people who have the new problems tend to be the uber-admins, the developers, and the people who create distros. Those people do not adopt app bundles because the "sense" that they make is non, from thei point of view. In a admin-centric cost-benefit analysis app bundles nearly always lose to the *nix way.

    If someone could figure out a way to solve the problem that app bundles solve for desktop users without screwing over the admins and developers, distros would convert in droves. Since the existing solution is to "Screw different people, screw more people, just unscrew ME!" no one really feels obliged to comply.

    --
    I want my Cowboyneal
    1. Re:Solve the right problem by Blakey+Rat · · Score: 1

      1) Give me an example of these problems you're referring to. I really can't think of any way that app bundles are inferior to the Unix way.

      2) What's wrong with giving the *users* of the system the easiest way of doing things and letting the Administrators or Developers, the people who KNOW computers, doing the troubleshooting? The users can't troubleshoot; Administrators and Developers can.

    2. Re:Solve the right problem by cbr2702 · · Score: 1
      Give me an example of these problems you're referring to. I really can't think of any way that app bundles are inferior to the Unix way

      1) Bandwidth and space usage: Downloading and keeping around 30 copies of the GTK+ library if you have 30 GTK aps is a waste. 2) Security and bug fixes: If there's a problem in a library you want to just fix it, not wait for each developer to release an update for their application with the new library. 3) Memory use: You don't want your system loading a copy of every used library into RAM for each program.

      What's wrong with giving the *users* of the system the easiest way of doing things and letting the Administrators or Developers, the people who KNOW computers, doing the troubleshooting? The users can't troubleshoot; Administrators and Developers can.

      Because the users have to suffer though the slow, buggy, bloated result. There are no benefits to the user that a nice package manager can't solve. If you want to be really "user friendly" you can make an interface to the package manager be a "folder" called "programs" that has an icon for each installed app and gives nice list of options on right click (update, remove...).

      --


      This post written under Gentoo-linux with an SCO IP license.
    3. Re:Solve the right problem by Gilk180 · · Score: 1

      1) Give me an example of these problems you're referring to. I really can't think of any way that app bundles are inferior to the Unix way.

      The most glaringly obvious example is that the current structure is made so that as many files as possible can be 1)mounted on read-only drives 2)shared across machines.

      If you read the fhs, it makes these points very clear. /usr can be mounted read-only and shared by many machines over a network, so updates only have to be done once. To do updates, the drive is remounted read-write temporarily and then reverted to read-only. Being read-only brings both performance and security gains. Sharing saves disk space on clients and centralizes administration. /etc can (usually) be mounted read-only, except when doing config changes, but needs to be specific to a machine. /var needs to be read/write and specific to a machine. /home needs to be read/write, but may be shared.

      2) What's wrong with giving the *users* of the system the easiest way of doing things and letting the Administrators or Developers, the people who KNOW computers, doing the troubleshooting? The users can't troubleshoot; Administrators and Developers can.

      Right now, users are more than welcome to keep packages in their own directory if they want. They can use any system they want and either set their path or link from ~/bin.

      The question I would have for someone proposing the each package is a self contained heirarchy solution is "What are the advantages of using these packages as opposed to using a good package management system?" With a good package manager, if you want to know what files are part of a pachage, ask the package manager. If you want to remove the package, ask the package manager to. If you want to know what is installed, ask the package manager.

    4. Re:Solve the right problem by Blakey+Rat · · Score: 1

      So do what MacOS and Windows do. Get a single window environment and make that one the system default. Then you won't need to load the libraries for every application, because they'll be part of the system. Not every MacOS application has to loads its own copy of Aqua because Aqua comes installed on all Macs. If Linux would team up, get organized, and figure it out, all these problems would be solved.

    5. Re:Solve the right problem by m50d · · Score: 1

      Virtual file systems are the way to go I think. Make there be two "overlays" for your filesystem. Novice users see all the libs and binaries grouped into a single package. Advanced users can see the real unix hierarchy.

      --
      I am trolling
    6. Re:Solve the right problem by Brewst3r · · Score: 1

      Ugh, isn't one of the first rules of usability to not have different views for different levels of users?

    7. Re:Solve the right problem by Anonymous Coward · · Score: 0

      You're thinking about a centrally managed system with multiple users, or a network of centrally managed systems. That's great, if that's your goal. If it's the corporation's computer, or the university's computer, people accept limitations because they are guests on a shared resource.

      But Linux is trying to push from that market, its historical and designed strength, into the personal desktop computer (via the business desktop, of course), and any sense that you don't really own and control your personal computer is frustrating. My Mac is MY computer, and I want to be able to organize things MY way, so the computer makes sense to me. I own the whole thing, not just my home directory, and I get to impose myself and my thinking on the computer to the maximum extent possible. If I don't think like a package manager does, and that's the only way to install software, I'm going to hate my computer.

      This is the same kind of frustration people feel when the computer doesn't respond promptly to their mouse clicks, when Windows makes arbitrary decisions for them, and so on. The computer is supposed to be their tool, not a frustrating enigma that says "NO!" every 10 minutes.
      Application bundles pose some technical challenges, concerns about shared libraries, etc. But the point is to figure out the best user experience, and let the geniuses work out the software details to make that happen. Make Linux say "YES!" and people will say YES back.

    8. Re:Solve the right problem by IpalindromeI · · Score: 1

      Are you feigning ignorance here, or did you really not understand that GTK was an example for any library on your system? Shared libraries exist for a reason: so that multiple applications can use the same library without taking up extra memory. They can't do that if each application is loading its own version inside its own "application directory". Perhaps in your world, windowing systems are the only shared library, but in the real world, Linux standardizing on a particular windowing system will not solve the problem for every other library.

      --

      --
      Promoting critical thinking since 1994.
    9. Re:Solve the right problem by Rysc · · Score: 1

      No.

      Are you a GNOMEite? At a fundamental level computers are different for different levels of users. The thing which improves usabilty is a smooth transition from level to level.

      Don't think that having an "Expert mode" UI is inherently bad, it just happened to be a bad idea for a certain file manager.

      --
      I want my Cowboyneal
    10. Re:Solve the right problem by Rysc · · Score: 1

      This is what I was talking about: People proposing that Linux be forcibly converted to app bundles are thinking "Linux is the new MacOS, everybody's desktop OS." The reality is that Linux cannot be a desktop OS only, it must be *all things to all people*. If you break its usefulness as a corporate desktop or as a server, than you've screwed up.

      Sure, you could have seperate distributions for seperate user bases. If you think that's a good idea, go help with GoboLinux. In the mean time, stop trying to insist that app bundles are god for servers.

      My Mac is MY computer, and I want to be able to organize things MY way, so the computer makes sense to me.

      So run Mac OS 9. Mac OS X has rules you just don't/can't violate, just as Linux distros do.

      Application bundles pose some technical challenges, concerns about shared libraries, etc. But the point is to figure out the best user experience, and let the geniuses work out the software details to make that happen.

      Well it's all about how you define "user" isn't it? When I think user I think me, the user of my computer--and I strongly dislike app bundles. When you think user you think yourself but probably also think the proverbial granma, whereas I think hacker.

      At the moment, I believe the Linux userbase largely fits my definition. If you can find a way to solve the negatives of app bundles, or to make a new system that offers similar benefits while not imposing as nasty side effects, then I'm sure you'll find many interested users.

      In the mean time, back off.

      --
      I want my Cowboyneal
    11. Re:Solve the right problem by Anonymous Coward · · Score: 0

      No, but Linux standardizing on a set of libraries would f***ing help! Every distro needs a set of libraries that is exactly the same, known, and in the same place. If you are a developer for Linux, there is no way you can know what will be on a system and that is _wrong_. It makes it extremely difficult to write an app that will work for everyone. It also makes program installation difficult for users because they don't know what packages they are going to need and it sometimes takes hours to install. Package managers help some, but they are not the whole answer. Even with Debian, it can take several hours to get xmule to work, for instance, because there are so many different packages you need to install first, and the package names aren't always informative.

      J

    12. Re:Solve the right problem by babbage · · Score: 1
      Make there be two "overlays" for your filesystem. Novice users see all the libs and binaries grouped into a single package. Advanced users can see the real unix hierarchy.

      But this is precisely how OSX solves the problem!

      In the Finder, which is how novices and people uniterested in system internals will spend most or all of their time, you only see the application (etc) bundles, and the other functionality is hidden from view. Moreover, key system directories (such as /etc, /var, and /usr) are hidden from view by the magic of the /.hidden file, which specifies a list of directories to hide from the Finder.

      On the command line, bundles are exposed as the little directory trees that they really are, and you have full access to everything that is masked in the finder by /.hidden.

      Moreover, it doesn't make the same, annoying, "where the hell did my shortcuts / files / icons / menu options / etc go???" mistake that recent versions of Windows does. Each view -- the Finder and the command line -- is consistent, predictable, and creates no surprises or mysteries.

      For the most part, the OSX approach seems to both solve the problem and also make most everyone happy.

    13. Re:Solve the right problem by m50d · · Score: 1

      But it still leaves the problem of having to have tons of little folders in your PATH, LD_LIBRARY_PATH etc. (I imagine OSX works a bit differently for these, but enough linux users won't want to change that changing to whatever method OSX uses is unlikely). You need to be able to have novice users see a "bundle" that is actually one file in /usr/bin, a few in /usr/lib, some in /usr/doc and /usr/man, and a folder in /usr/share. And you need to have experts able to see it as it really is. It could easily become a big mess, but if it's done properly, it would be great.

      --
      I am trolling
    14. Re:Solve the right problem by babbage · · Score: 1
      Yeah, I'm not really sure how this organization scheme could be adapted to Linux.

      The $PATH variable works in the usual sense on the command line -- it typically looks for commands in places like /bin, /usr/bin, /usr/local/bin, ~/bin, etc -- but it doesn't appear to be relevant to the GUI, or to the open command which can be used to open files in the GUI (e.g. open -a Safari ~/Sites/index.html).

      As near as I can tell, /Applications is the GUI analogue to */bin directories, and the Finder is just transparently aware of everything under there. If you want to launch a graphical application from the command line, you either invoke it with the open command as noted above, or you invoke it directly as, for example, with the Vim GUI:

      $ /Applications/vim/Vim.app/Contents/MacOS/Vim
      # a console Vim editor session opens up in the Terminal
      $ /Applications/vim/Vim.app/Contents/MacOS/Vim -g
      # a graphical Vim editor session opens up in the GUI
      $

      Meanwhile, in the Finder, all you see in this example is a folder vim under the Applications folder, in which (among a couple of other things I have in the same folder with Vim.app) is a single double-clickable application "Vim" with the usual green logo icon. The structure underneath is not at all apparent from this view.

      I think the way to get this done on Linux would be to extend one of the graphical frameworks -- GNUStep / WindowMaker would be a good candidate -- to have the same bifurcated view that you get between the Aqua GUI and the command line on OSX. I don't know much about GNUStep, but it's possible that it already provides much of what would be needed to do all this...

  16. Don't "path" bundle components! by Jeremiah+Cornelius · · Score: 2, Interesting
    This is the origin of DLL hell - which Windows has been trying to extract itself from for the past 6/7 years!

    Also, executable content in arbitrary locations is a security nightmare...

    --
    "Flyin' in just a sweet place,
    Never been known to fail..."
    1. Re:Don't "path" bundle components! by Bat_Masterson · · Score: 1

      Explain DLL hell and how symbolic links could contribute to it...

      Why do you say "arbitrary"?

    2. Re:Don't "path" bundle components! by Gherald · · Score: 1

      > Why do you say "arbitrary"?

      As in, not: /bin, /usr/bin/ /usr/local/bin, and ~/bin.

    3. Re:Don't "path" bundle components! by Anonymous Coward · · Score: 0

      dll hell is caused by one thing and one thing only. using one name for all versions of a shared dynamically loadable library.

      on linux the convention (i've only really learned from doing linux from scratch) is to include the version in the file name of the shared library.

      so on windows you have;
      c:\windows\system32\comdlg.dll really version 1.23 but this is hidden
      then some other application might have a specific version of a dll and just over write the new one. look this is a major problem on windows. its because of the consistency needs of some customers out weighing the technical considerations.

      on linux you have; /lib/gnomedlbg.1235.so
      so the different version can all coexist. this actually doesnt solve all the problems that can arise from using multiple versions of shared libraries at once, if they explicitly have side effects that create concurrency problems.

      anyway. i call your troll. or is it just mindless buzzwordism.

    4. Re:Don't "path" bundle components! by Bat_Masterson · · Score: 1

      So, DLL hell is a problem with the naming of library files and not where in the directory hierarchy they are placed. Actually, a symlink-based package manager can facilitate managing DLL hell by making more explicit where libraries come from and providing means to decide which version of the library (assuming they aren't version named) can become the default version.

    5. Re:Don't "path" bundle components! by penix1 · · Score: 1

      "dll hell is caused by one thing and one thing only. using one name for all versions of a shared dynamically loadable library."

      I agree and I disagree....Now before you get that look let me explain....

      It is poor programming practice to link to a specific version of a lib. The reason programmers do it is to use an "undocumented feature" that lib provides. This is dangerous as it leads to program bugs that require repair and monitoring of the lib. In the windows world it is much worse because the install program will package in the lib and install it when the program is setup. As an example, your c:\windows\system32\comdlg.dll 1.23 version may be overwritten with 2.31 and later overwritten by 3.21 thus breaking both programs requiring the older versions of the dll.

      Another fact of dll hell is that dll's residing outside of their usual place in c:\windows\system[32] is a security risk and makes it impossible to enforce strict security rules on file permissions (such that they are in windows). This is why programs for win9x are NOT recommended for NT based systems. But even those that are still suffer from dll hell simply becuase of the installer.

      Just my .02

      B.

      --
      This is a sig. This is only a sig. Had this been an actual sig you would have been informed where to tune for more sigs.
  17. make linux more popular to beginners by xxzh · · Score: 1

    This is a little like windows system. It will make system administration more convenient.

    1. Re:make linux more popular to beginners by emilper · · Score: 1

      it will make system administration more convenient Yeah, it will make the security upgrades 100M instead of 25k, fill the RAM etc. Being convenient is not everything. It is conveninent to run everything as root, but it's not the best idea, even if Windows uses it. Hope this idea never gets mainstream ...

    2. Re:make linux more popular to beginners by bbuR_bbuB · · Score: 1

      apt-get update;apt-get upgrade

      Yeah, your system is more convienent. Whatever.

  18. I've known plenty of places that do that. by jd · · Score: 1
    In fact, it's the layout I happen to prefer. I've had too many namespace clashes, because application writers don't pick original names for things.


    Probably the arrangement I've seen the most often is to have a directory tree under /opt, or in /usr/local. The top-most directory is the application name. The directories under that contain the version numbers. Inside of that, you have the usual bin, lib, libexec, share, etc.


    This is much more practical to maintain, on modern Linux systems, as many important systems packages (such as xinetd and ld.so) have directories containing a configuration file for each application, rather than one file for everything. This can be a symlink to the version of the application you want to use, allowing you to change any aspect of your configuration on-the-fly.

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
  19. This scheme has no advantages. by Luarvic · · Score: 5, Insightful
    OK, Let's count advantages and disadvantages of proposed software installation system.

    Advantages:
    • You can easily know which files belong to which software packages
    • You can easily remove the entire package by using simple rm -r command

    All these goals can be easily achieved using any reasonable package menegement system. Now let's see disadvantages:
    • Every time you install package you have to change PATH variable. Existing applications must be restarted to see this change, because environment variables are inherited and can be changed on-the-fly only if application itself is shell or has some shell-like functionality.
    • Many packages have variable files (logs, data, caches, pipes etc.), which are normally placed in /var directory. Often /var resides on separate filesystem, because it has different requirements for speed, reliability, backup and other criteria. Under proposed schema we can not have separate variable filesystem.
    • Shared library dependencies become a nightmare. If you have no version number in package directory name, you can not install different versions of shared library, so forget about compatibility with old packages. If you have version number, library moves to different place every time you upgrade package. Don't forget, that shared library version numbers do not necessarily reflect package version. Instead, they reflect ABI changes.
    • Where are you going to have configuration files? If in the package directory, you must copy them every time you upgrade package. If for some reason you decide to remove package and than install it again, you lose all package's config files.
    • You have problems if you decide to split package into subpackages. Directory structure changes and all applications which use programs or libraries from splitted package must be updated or restarted. The same problem exists when you unite packages together (like fileutils, sh-utils and textutils was united into coreutils package).
    • Relying on PATH environment variable for invoking another programs is somtimes dangerous, especially for system services and set-UID programs. Usually full pathname is used in these cases. What kind of pathname can be used under proposed schema, if invoked program's package name can be changed (splitted into separate packages, united) or program can be moved from one package to another?

    So, what we gain? Nothing. There are some advantages which can be easily achieved another way, but there are very serious disadvantages.
    When managing system, stop thinking in terms of files. Think in terms of software packages. Consider /usr/bin a namespace which contains user-level programs and which is populated when packages are installed. Consider /usr/lib a namespace which contains libraries.
    1. Re:This scheme has no advantages. by holy_robot · · Score: 1

      OR you could use something like graft or stow, which puts everything in its own directory, then symlinks it to where things expect it to be. That eliminates at least half of the problems you list. As far as I know, though, there's nothing one can do about the variable filesystem problem, and where to put conf files is beyond me. Perhaps they should be stored in /etc and symlinked in the package dir instead of the other way 'round.

      That's my 2 cents anyway.

      --
      Just cause you feel it doesn't mean it's there.
    2. Re:This scheme has no advantages. by Blakey+Rat · · Score: 4, Interesting

      Let's go over your list the OS X way. Noting that I'm not an expert:

      1) PATH variable only applies to CLI applications. Apple solves this problem by putting CLI applications in the standard UNIX places.

      2) /users/username/library/application support

      3) Shared libraries cause as many problems as they solve. Modern computers aren't short on RAM or disk space and there's no need to use them.

      4) /users/username/library/preferences

      5) I have no clue what you're talking about on this one.

      6) Bundles should be as self-sufficient as possible. The only external applications they should be calling are those that are *guaranteed* to be there.

    3. Re:This scheme has no advantages. by Luarvic · · Score: 1

      OK, you solve problem for GUI apps, but for CLI apps you still need some kind of package management. Also, you need package management for system services, like database servers, mail, DNS, NTP, etc. Otherwise, how do you know which file belongs to which software package and how can you remove/upgrade packages? But if you already have package management system, why not to use it for GUI apps also?

    4. Re:This scheme has no advantages. by Bill+Barth · · Score: 1

      Why not just use something like cmod to handle all your PATH (MANPATH, LD_LIBRARY_PATH, et. al.) related problems? I've been doing this on my home machines for years and _never_ had a problem. Any packages I build by hand go in /opt/packagename/version_number, and a module file gets created. The extra step saves headaches down the road, and allows me to have multiple versions of the same package installed at the same time. Nothing could be simpler.

      P.S. Don't let the fact that cmod hasn't been updated in 6 or so years throw you. It's like TeX....bugfree.

      --
      Yes...I am a rocket scientist.
    5. Re:This scheme has no advantages. by calica · · Score: 1

      PATH env. Mostly none cmd-line apps. There are zsh configs that search a dir for appdirs and add them to the path.

      Appdirs can search system libs first. They're used just in case. Storage is cheap and plentiful to most people. If it isn't to you, use a more conventional method.

      Config files. A apps check both a system /etc and a user ~/.foo.

      When considering this keep this in mind. This is really targeted towards app developers to distribute their software. Compare it to autopackage and LSB.

    6. Re:This scheme has no advantages. by roystgnr · · Score: 1

      Why not just use something like cmod to handle all your PATH (MANPATH, LD_LIBRARY_PATH, et. al.) related problems?

      For one thing, it's a lesser known software package, which means that after you get your Ph.D. the slackers left administering your old research lab may be forced to learn new tools. ;-)

      Keeping files in FHS locations has a few other benefits: most of your files can be static and shared between computers, and if your applications are FHS compliant then it's not too complex to make most of the filesystem read-only and/or network mounted. Doing so forces you to use something like RPM or DPKG, but their other features like dependency checking and checksumming are nice to have anyway.

    7. Re:This scheme has no advantages. by cowbutt · · Score: 2
      3) Shared libraries cause as many problems as they solve. Modern computers aren't short on RAM or disk space and there's no need to use them.

      Sadly, libraries aren't similarly short of security problems. This is what happens when a library that is commonly statically linked is found to have a security vulnerability.

    8. Re:This scheme has no advantages. by kosmosik · · Score: 1

      > # You can easily know which files belong to which
      > software packages

      Well that was handled already. Just dont put everything to system like "make install" but add another layer to this proces and use package management system. F.e. RPM (I know there are others and do the same, I'll focus RPM only) - if you want to know which files came with package do: rpm -ql foo, if you have a file in FS and want to know which package it belongs to do rpm -qf /somepath/somefile - so this is not an advantage since we can do this with both setups...

      > # You can easily remove the entire package by
      > using simple rm -r command

      Same as with RPM - just issue rpm -e...

      I see other advantages of bundling binaries with libraries - like it is easy to install and deploy on various incompatible systems (think Linux versions) with incompatible ABIs... Also you won't get library dependency error since everys such bulk-package comes with its own libs so no chance of such error.

      But I prefer to use packages prepared for my system, if there is no package for my system I build it myself. If the thing is small enough (one binary) I just compile it, strip it and put into my ~/bin... If the thing is obscure and I don't want to play with packaging it I just compile it (or not with binary only software), make it static with statifier and put *one* binary into my ~/bin... But I usualy have RPMs for anything I am using since it is quite common format and Fedora is quite popular so chances are big that even if given program is not in distribution it is in one of extras repositories or homepage hosts Fedora (or generic) RPMs anyway...

    9. Re:This scheme has no advantages. by kosmosik · · Score: 1

      3 - yes maybe you may have lot of memory and disk space - this may be true. But consider other things like CPU cycles (please don't tell me that "modern computers" talk with CPU because I simply wont belive it) - and having such setup that every app comes with its own libs (so no shared libs causes):

      * More diskspace usage (we have settled on that).
      * More RAM usage (I can settle on fact disks being cheap, RAM is not cheap IMHO and it is never too much of it for me, I don't waste my RAM on crap).
      * More disk operation - this is something you don't have a lot huh? Think - how fast is your I/O? You have plenty of that also?
      * More CPU usage (since it comes from I/O operations).

      Now how does it look? I think we are far from the point where hardware is free, hardware costs so we have to spare it using well designed software.

    10. Re:This scheme has no advantages. by Sabalon · · Score: 1

      While I agree with your points, to be effective, you need, as you said, a decent package management system.

      However - I love /opt when it comes to stuff I install from source - that way I know where it all is.

      What would be nice is a standard way of installing something from a tarball which puts something, lets say /var/genericpackagemanagment, which contains a list of all the files installed, where, and directories created.

      That way, removal becomes something as simple as rm `cat /var/genericpackagemanagment/mytarball`

      Everyone already seems to use automake/autoconf - how about an autoinstall or something like that?

    11. Re:This scheme has no advantages. by Anonymous Coward · · Score: 0

      Full marks for 5, the rest are plain wrong ie: do not address the issues....

  20. Not even worth discussion. by Ogerman · · Score: 3, Insightful

    What do other, more experienced readers think about the problems and improvements related to dropping the current Linux approach for a 'bundle-like' one in Linux distributions?

    OK.. this question is really 1st year CS material, so hopefully this will set all y'all newbie young'ns straight. "Bundling applications," as defined as giving every app it's own copies of used libraries, is just plain stupid if at all avoidable. Here's why:

    1.) What happens when a bug or security flaw is found in a library? Without a shared copy, you must figure out which apps are using it (which may be thousands) and then upgrade every application "bundle" instead of one library for the whole system. And what if some apps are using an older version of the library which nobody bothered to patch?

    2.) Disk caching. Today's hard disks may be really large, but they're still really slow (compared to the rest of the system). If you have to load separate copies of a library for each app, you lose all the benefit of disk caching.

    3.) Memory usage. Shared libraries allow a single copy of the library in memory to be used by multiple applications. This also reduces load time if the library is already in memory. (ie. this is why it makes sense efficiency-wise to use either KDE or GNOME and not a mixture of apps from both) It's also partly why OpenOffice and Firefox take so long to load on Windows compared to Office and IE. (they don't use all the standard windows libraries.)

    4.) Shared libraries are a major driving force in pushing application developers to stay on their toes and keep up with the progress of the library developers.

    5.) You shouldn't be compiling your own apps unless you're their developer or have very specific security or optimization needs. It's a waste of time unless you're learning something in the process. Leave that job to distro package maintainers and do something useful with your time like becoming a better programmer and/or contributing to your favorite app. Once Linux ceases to be a toy for you, you'll avoid compiling everyday software like the plague.

    I could go on for several points, but that should be enough to convince ya. (:

    1. Re:Not even worth discussion. by Ogerman · · Score: 1

      "Bundling applications," as defined as giving every app it's own copies of used libraries, is just plain stupid if at all avoidable.

      On the other hand, I may have originally misread what you were getting at. So, if that's not what you meant, I'm afraid my answer is different..

      Bundling apps / libraries in the sense of giving them their own directory and then symlinking back to some common path like /System/Libraries/KDE or what have you, is not such a bad idea. Check out GoboLinux for a distro aimed at trying this approach.

      However point number 5 from the original post is the same.. Let other people share the workload. Building a system completely from source is a waste of your time. You'd do a lot more good to help the GoboLinux folks instead of duplicating their work on your own.

      Of course, that being said, a good package management system pretty much makes the administrative end of this discussion moot because you can easily track and remove files as needed even though they are dumped into common directories. Projects like GoboLinux just use the reverse approach. All components get a separate directory and it's the symlinks that get dumped into common directories. I think there are pros and cons to both approaches..

    2. Re:Not even worth discussion. by Blakey+Rat · · Score: 1

      This is the problem with Linux developers. Developer-centric thinking, not user-centric thinking. Think like an Apple programmer for a few minutes here:

      1) A security flaw in an application is the responsibility of the company who created that distributed that application and it's their job to inform users and fix it.

      2) Users don't give a crap about this, as long as their applications run. 95% of users don't know how much disk space an application takes up.

      3) Again, users don't give a crap about this. 95% of users can't even tell you how much memory an appliaction is using, or how to find that out.

      4) Not applicable. (But for the record, I think that's total bunk. You could make the exact same argument if each application used their own shared library.)

      5) 95% of the users out there don't know what "compiling" is, nor do they care. They only care that the software works.

      Now here's the kinds of problems that package managers create that users don't want to deal with:

      1) You can't just go to a website, hit download, install the package. Instead, once you know the package exists, you need to go to your package manager application, find it, and download and install it from there. If it's an application that doesn't have a package yet, then you're screwed: You might be able to install it from the website, but doing so could screw up your package management utility.

      2) Ditto with installing from CD.

      3) Users don't want to deal with dependencies. If you tell your computer to download and install, say, a video game, the user doesn't want to see your computer downloading funky-happy-mouse-cursors.pkg... they just want to see the game.

      4) DLL Hell. Enough said.

      If you think like a user, shared libraries create more problems than they solve. The field of computer science won't move forward until every other platform catches up with Apple's philosophy in this regard.

    3. Re:Not even worth discussion. by calica · · Score: 2, Insightful

      I'm wasting mod points replying but this needs to be said.

      App Bundles can be configured to search installed system libraries first. This also solves the security update issue. The bundled libs are only used as a last resort.

      Regarding config files and /var. This is mainly aimed user applications. Would you install MySQL this way? Maybe to play with but NEVER as a server. This is perfect for apps like Gimp, k3b, OpenOffice, Firefox, etc. Config files can always be checked in two locations. A system /etc and a user ~/.foo.conf

      Too apply this idea to the system level look at GoboLinux[http://www.gobolinux.org/] or GNU stow. Both use symlinks to map the individual dirs to a common heirarchy.

    4. Re:Not even worth discussion. by lachlan76 · · Score: 1
      1) A security flaw in an application is the responsibility of the company who created that distributed that application and it's their job to inform users and fix it.

      What if the company has gone out of business? Not to mention that users don't want to have to update everything when a bug is found in something like glibc.

      3) Users don't want to deal with dependencies. If you tell your computer to download and install, say, a video game, the user doesn't want to see your computer downloading funky-happy-mouse-cursors.pkg... they just want to see the game.
      #!/bin/bash

      echo "Downloading dependancies..."
      emerge -o $@ > /dev/null && echo "Done." && emerge $@
      There. All the dependancy output gets piped to /dev/null.

      And there are front-ends too as well remember. Also, if the package manager needs to download the dependancies, that would imply that you'd need to install them manually too. The whole point of a package manager is to avoid dependancy problems.

      Also there is one big, big problem with your attitude here: If the user doesn't know, it doesn't matter

      Memory usage does matter, if you want decent performance. If you load glibc/libpng/whatever 50 times, there will be a performance hit. We all know that. The users will know when their apps are running slower.
    5. Re:Not even worth discussion. by Anonymous Coward · · Score: 0

      > OK.. this question is really 1st year CS material, so hopefully this will set all y'all newbie young'ns straight.

      Then let's apply some 5th year CS to it.

      > "Bundling applications," as defined as giving every app it's own copies of used libraries, is just plain stupid if at all avoidable.

      Why do you interpret the proposal in a stupid way then?

      The solution is so obvious that I have difficulties imagining that you didn't get it. In addition to Application Bundles, there are Library Bundles. An application that uses a library gets a SYMLINK in its directory to the correct library.

      1. The system can automatically determine when a library is not in use any more.

      2. There is only one copy, so updates get to all applications.

      3. You can easily have different incompatible versions. If an old one doesn't get a security patch, you need to upgrade applications depending on it anyway!

      Additionally, like Gobolinux, you can still have the old /usr/bin/ /usr/lib/ directories, which get automagically populated and updated.

    6. Re:Not even worth discussion. by harrkev · · Score: 1

      2) Users don't give a crap about this, as long as their applications run. 95% of users don't know how much disk space an application takes up.

      3) Again, users don't give a crap about this. 95% of users can't even tell you how much memory an appliaction is using, or how to find that out.

      Most users don't know how to check memory usage and/or disk usage.

      But most users DO notice when the hard drive starts making noise and the system slows down (paging).

      And most users DO notice when they have to go deleting stuff to make room on their hard drive.
      --
      "-1 Troll" is the apparently the same as "-1 I disagree with you."
    7. Re:Not even worth discussion. by Ogerman · · Score: 1

      This is the problem with Linux developers. Developer-centric thinking, not user-centric thinking. Think like an Apple programmer for a few minutes here:

      This is the problem with (most) Mac users. Proprietary thinking, not Open Source thinking. so... You've obviously never used a modern Linux distro based on your comments. Besides the ones about not caring about performance, every single one of your points assumes that we're talking about proprietary software from a vendor. In the world of Linux and Open Source, software management is fully automated on all modern distributions. Forget CD's, forget download sites, forget dependancy management, forget compiling, forget having to worry about vendors fixing their software and then sending you manual updates.

      If I want a program called "xyz" installed my system, I run one command and (typically) without any further intervention, the following happens:
      - the latest version of xyz is downloaded from a central repository
      - any dependancies of xyz are automatically downloaded and installed from the same repository
      - if those dependancies broke any other software, new versions of that software are installed as well
      - xyz is installed and configured

      It just doesn't get any more "user-centric" than that. All I need is the name of the program and poof.. it's installed. Here's the best part: with one command I can automatically update every piece of software on my system in one fell swoop -- including all components of the OS. Try that on a Mac.

      No, for the reference, I'm not anti-Mac / anti-Apple.

    8. Re:Not even worth discussion. by Anonymous Coward · · Score: 0

      I can guarantee you that most users are fully aware of the "insufficient memory" and/or "insufficient disk space" windows that pop up when they try to run or install their favorite program in your "let's waste memory and disk space" scheme.

      No, buying more memory and hard drives doesn't change anything. Most users also note the $$$ number on the bill.

  21. Can someone explain the problem a little better? by Stevyn · · Score: 1

    I'm feeling pretty ignorant right now, but can someone please explain what problems are arising from shared libraries under linux? Is this the same as program x needs library y which needs library z but that will screw up program w? Or is this I want to distribute program x that has 20 other dependencies so I'll just put them all together?

  22. Solve the right problem-Other Guy. by Anonymous Coward · · Score: 0

    "Since the existing solution is to "Screw different people, screw more people, just unscrew ME!" no one really feels obliged to comply."

    Ding! Ding! Ding! Got it in one (that and one other guy). That's the problem with all the "suggestions" that developers get. The "suggestor" doesn't understand the domain space, and aren't interested in understanding it. But oh boy do they want YOU to solve it. Sometimes they will have good suggestions, but they should understand that there may be good reasons why they aren't adopted.

  23. Check out zero-install.fs.net & rox.sf.net by markstinson · · Score: 1

    I stumbled across this a couple of years ago - Zero-Install (and the Rox Desktop) at Sourceforge.net. Zero-Install is similar in effect to Bundles, but have the added effect of being installed on demand and shared by all system users - think of it as an Application Cache that you control the "expiration".

    http://zero-install.fs.net
    http://rox.sf.net

  24. It's a step backward by Khazunga · · Score: 2, Informative
    The Unix filesystem hierarchy has network maintenance taken into account. Having program 'bundles' may be great for a single workstation, but is hell for a network-wide system. The FHS explains this much better than I could, so please read the rationale there.

    Personally, I see this like going back to the DOS days. Linux/BSD have been dealing with shared libs in pretty sane ways. Although rpm is sometimes a pain in the butt, Debian's package system and Gentoo's Portage prove that dealing with dependencies automatically is feasible and confortable.

    And, anyhow, for special cases, you can always drop apps into /opt and get the equivalent of a bundle. Oracle does this, vmware does this, as there are countless other cases.

    --
    If at first you don't succeed, skydiving is not for you
    1. Re:It's a step backward by calica · · Score: 1

      Drop your appdirs to /apps and manage it howerver you like. Share it, rsync it, use 0install, whatever.

      The FHS is actually very simplistic. It has a few broad categories (/bin, /usr, /usr/local, /opt) and shoehorns everything into those terms. Systems like this, GoboLinux and stow, offer increased flexibility over the FHS. GoboLinux even provides a FHS similar view of the system.

    2. Re:It's a step backward by Anonymous Coward · · Score: 0

      Agreed, it's like going back to DOS, with %PATH set to an almost infinitely long string, and once that get's boring, a few hundred bacth files in a central location, each starting a different program. In a unix system, this garbage directory would probably contain symlinks instead, but the principle is the same.

      Welcome to MS-DOS 3.0. (did 2.0 even have directories?)

  25. pkgsrc by hubertf · · Score: 1

    pkgsrc us a source-based packaging system that works on MacOS X, Linux and many other operating systems (even Windows, with SFU).

    More information:

    http://www.pkgsrc.org/
    http://www.feyrer.de/Texts/Own/21c3-pkgsrc-slides. pdf

  26. you can do it both ways ... by cs · · Score: 1
    If you have packages with a package management system, then it's often convenient to install under the one tree - the package manager can take care for finding all the package's installed files at need (upgrade, delete, query etc).

    Under such a scheme usually the vendor gets to install in /usr/{bin,lib,...} and third party packages tend to install in /usr/local/{usr,lib,...}.

    For build-for-source it's often good to go your way, often installing in /opt/package-version/{bin,lib,...} and symlink to (say) /opt/bin for $PATH convenience to users.

    One often unstated advantage of the per-package tree approach, aside form having everything in one spot, is that you can install multiple versions of a package at a time (or multiple different builds of the same package). This can be used for testing bleeding edge releases without breaking stuff, and of course for legacy support for other stuff that needs only an older version of something.

    Of course the system has pitfalls. I run most of our "add on" software in the "per package dir in /opt" fashion at my workplace, thus: syncopt, which scales mostly nicely for many workstations wanting this stuff.

    Cheers,

    --
    Cameron Simpson, DoD#743 cs@cskk.id.au http://www.cskk.ezoshosting.com/cs/
  27. Please RTFDocuments before commenting! by Ster · · Score: 1

    Several comments have mentioned concerns like "What if there's a security problem in a commonly used library? You'll have to update all your apps instead of a shared lib!" or "All those extra copies of things will eat up too much RAM and drive space!"

    Please take a few minutes and look at Apple's documentation about how bundles work before rehashing those topics.

    http://developer.apple.com/documentation/MacOSX/Co nceptual/SystemOverview/Bundles/chapter_4_section_ 1.html

    -Ster

  28. Re:Like ROX desktop ?? by spitefulcrow · · Score: 1

    You don't have to chase around the disk to remove stray bits. That's what package managers are for. Assuming you have an intelligent packaging system, it can track all the files that come in a software package and install/remove/update them as necessary. The only thing Gentoo's Portage system can't clean up after (that I've seen) is a kernel tree with leftover object files in it. But the only thing you have to do to fix that is "make distclean" before you "emerge -C =your-kernel-source-x.y.z-a".

    --
    Sorry, my karma just ran over your dogma.
  29. For local packages, stow, for other stuff just deb by Bitsy+Boffin · · Score: 1
    When I (compile &) install something locally I use stow.
    ./configure --prefix=/usr/local/stow/package
    make
    make install
    cd /usr/local/stow
    stow package
    But in general as a debian user, most stuff one needs is in the deb repository so it's just a matter of

    apt-get install package

    --
    NZ Electronics Enthusiasts: Check out my Trade Me Listings
  30. A proper soft file system would be a boon for this by DrSkwid · · Score: 1

    Plan9's soft file systems would really help for this kind of system

    In Plan9 the file tree isn't bound to the disks, it is made up from a series of bind commands (kind of like mount). Where the server for each bind can be anything, from a disk server to an ftp client to a pipe, all it takes is a file descriptor. This file tree is set per process, with children able to inherit their parent's tree or start of with a blank one and bind in devices as necessary (a separate # namespace is used as the seed for devices).

    Although there is a PATH variable it is usually just set to /bin and then one binds in any directories with executable in that one would like to be in the path.

    One has a login script that takes care of the binds for one's user shell

    # bind in my shell scripts
    bind -a $home/bin/rc /bin

    # bind in the compiled binaries for the CPU I happen to be running on
    bind -a $home/bin/$cputype /bin

    This last one is particularly interesting as you may notice that CPU type is involved, thus the same login script works across architectutes. My profile is stored centrally and builds the environment when I log in to any client. Personally I have an x86 terminal and an IPAQ, when I log in I have roughly the same environment.

    When you think that the binds can include *remote* file systems and programs, even the network stack :

    # use the network stack of my freebsd box for all network activity for this process
    srvssh remotefbsdsystem

    (now any activity on /net looks local to any child processes but remotely looks like it's coming from remotefbsdsystem - like an advanced ssh tunnel or VPN. The link between me and remotefreebsdsystem doesn't even need to be over TCP/IP, it could be serial or datakit)

    Plan9 users get hooked on to this feature pretty easily and it is one of the main attractions once you get used to it and it is *very* high up on the wishlist when one tries to work on other systems "oh bugger, I cant do that here, gah why doesn't anyone else have soft file systems!!"

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  31. ROX by An+Audience+of+One · · Score: 2, Informative

    ROX (RiscOS On X) which has a filer, window manager and a session manager uses Application Directories taken from Risc OS. This sounds very similar to Apple Application Bundles.

    Installation is done by copying the directory, and the first time you run it, it will be compiled. You do have to run it from ROX-Filer for this to be supported (just double-click on the application directory), otherwise you have to run a script inside the directory.

    Recently ROX has combined AppDirs with the Zero Install installation method, which uses a caching-remote filesystem. You can run things direct from the server they are distributed on using a virtual filesystem which will locally cache the files.

    There are already a lot of applications written for this.

  32. GNU/Hurd will use that approach by Anonymous Coward · · Score: 0

    RMS proposed such a model for GNU/Hurd packaging.
    http://lists.gnu.org/archive/html/aps- devel/2002-1 2/msg00004.html
    -- Anand Babu

  33. App Bundles by fozzmeister · · Score: 1

    Are nasty as they look like one file, and are actually directories that don't open when you dbl click.

    Linux Package Management takes all the pain away from having everything in / and on a well implemented system (which prob doesn't exist yet) you can have the rpm as an icon for the app, double click, a scrollbar goes across the screen and its done, could not be simpler. Of course apt-get makes this even easier.

    How the application is stored in the filesystem has no impact what so ever on usiblity either, coz a user should be either oblivious to it, or be aware of it, but the ui just works so don't look.

    1. Re:App Bundles by Anonymous Coward · · Score: 0

      "Linux Package Management takes all the pain away"

      That's too funny! You're joking, right? Linux package management, whoop-dee-doo. Even on a user-friendly distro like Mandrake, I've never gotten more than half my programs to install. RPMs are frequently broken. Libraries that programs assume should already be installed aren't. URPMI is broken out of the box (couldn't get anything from "contrib" sources). And when package installation does finish, half the time you can't find the program or figure out how to run it - at least if you're a regular user!

      "How the application is stored in the filesystem has no impact what so ever on usiblity either, coz a user should be either oblivious to it, or be aware of it, but the ui just works so don't look."

      Since when has a Linux UI just worked? Show me where I can drag and drop applications without worrying about dependencies and other crap. You can't!

      I can show you, however. It's OS X, and it's called "application bundles". Greatest thing since sliced bread, and possibly greater.

    2. Re:App Bundles by fozzmeister · · Score: 1

      Application Bundles just don't do dependencies at all. It works because most things are statically linked, both on Windows and Mac OS X. Linux is waaay more library dependant than either of those OS's.

      Package Management does "just work" the problem is a major implementation issue, IE your app isn't compiled for your distro, Or RPM has dependencies of libblah.so.4 when you have libblah.so.5.

      Apt works, and it works perfectly, but like all things its implementation dependant, your reliant on getting a package for you distro, It's a shame there are so many types (oh and RPM is Bunk, Portage or apt is waaaaaay better).

    3. Re:App Bundles by Anonymous Coward · · Score: 0

      Static linked programs make it even harder to replace (or even find) every copy of a library with a security hole than just having 500 copies spread out in 500 different directories.

      Remember the zlib bug from a few months ago? Lots of programs made exactly this mistake.

  34. consider archlinux by rjpiercy2 · · Score: 1

    When I installed archlinux (www.archlinux.org), it installed a 2.4x kernel(2.6x also available), a bash shell (no gui), and an incredible package manager called pacman. From the bash shell and root account, one can pick and choose what they would like from archlinux database of open source software, everything from basic windowing (x.org, XFree86), desktops (gnome, kde), networking (xinetd), gnu tools (bintools), etc... all by typeing bash> pacman {package name} pacman does the rest (loads proper libraries, set config options, etc). This allows the user to customize their linux system with only the apps they need and like. The only downside is that for large packages, a broadband connection is perferable. Check it out! www.archlinux.org

  35. Union mounts? by vertigo · · Score: 1

    Wouldn't it be handy to use union/overlay mounts to unify the namespaces? That way you could give a package its own directory + subdirectories without having to bother with PATH settings. You could simply mount its package directory so the standard locations would be overlayed and the contents of the package directory transparently added to the system-wide directories.

  36. re: darwinports. by JQuick · · Score: 1

    You are correct.
    Unfortunately this is because you are mistaken.

    Darwinports does work on the BSDs, and Solaris as well as on darwin. The new default installation structure is to install files under private directory spaces, but these are not intended to be used from those locations and must be activated by linking the files into canonical paths for use (e.g. /opt/local or /usr/local).

  37. /etc is great by rduke15 · · Score: 2, Insightful

    While I can see the advantages of having every app isolated in it's own directory, I feel that one of the things I really like in Linux is to have all configuration in one, relatively small, pure text hierarchy: /etc.

    I can grep it easily when I look for something, and easily edit the relevant file, which is usually well commented. I cannot grep the entire / tree. Well, I suppose I could, but I certainly don't want to.

    For the rest, grouping all an applications's files together sounds attractive, but I would be happy enough if every app just clearly documented what it did at install time so it's easy to undo. (I don't believe much in "uninstall" programs/scripts, seeing how they (don't quite) work on Windows).

    1. Re:/etc is great by Anonymous Coward · · Score: 0

      While I can see the advantages of having every app isolated in it's own directory, I feel that one of the things I really like in Linux is to have all configuration in one, relatively small, pure text hierarchy: /etc.

      I can grep it easily when I look for something, and easily edit the relevant file, which is usually well commented. I cannot grep the entire / tree. Well, I suppose I could, but I certainly don't want to.


      In addition, you can also simply backup your system configuration by copying /etc to a CD-R. Or export it to other computers over the network to have the same configuration there.
    2. Re:/etc is great by babbage · · Score: 1
      While I can see the advantages of having every app isolated in it's own directory, I feel that one of the things I really like in Linux is to have all configuration in one, relatively small, pure text hierarchy: /etc

      OSX has an answer to this as well. By widely accepted convention:

      • ~/Library/Preferences has user-level application settings
      • /Library/Preferences has system-wide, custom-set application settings
      • /System/Library/Preferences has system-wide, vendor-set application settings
      • /etc has settings for the legacy Unix/BSD software
      • NetInfo has some stuff, but not much anymore...

      So this both embraces & extends the /etc config approach, by allowing not only system level (/etc/*) and user level ~/.* configuration areas, but also draws a distinction between system-wide changes that you have made (/Library/* and system-wide settings that were set by Apple with the operating system, and are liable to be superceded by future OS upgrades (/System/Library).

      With the Apple approach, if you back up the directories /Library, /Applications, and /Users (and if you've customized things, maybe /usr and /private, which is the true container for /etc, /var, and /tmp), then you're all set.

      I can grep [/etc] easily when I look for something, and easily edit the relevant file, which is usually well commented. I cannot grep the entire / tree. Well, I suppose I could, but I certainly don't want to.

      The preference files under {~,,/System}/Library/Preferences/* are generally XML formatted, and can be grepped quickly & fairly easily from the command line. In addition, Apple provides the command defaults which can be used to both read & write these XML files -- for example, defaults read com.apple.Safari TabbedBrowsing or defaults write com.apple.Safari TabbedBrowsing 1.

      For the rest, grouping all an applications's files together sounds attractive, but I would be happy enough if every app just clearly documented what it did at install time so it's easy to undo.

      Vendors that use Apple's package installer end up saving a copy of the installer in /Library/Receipts/*.pkg, under which there will be a *.bom Bill Of Materials file that can be used to find out what an installer added to the system.

      * * * * *

      So, point for point, OSX has remedies for all your concerns. Happy now? :-)

    3. Re:/etc is great by Anonymous Coward · · Score: 0

      So, your solution to "One small directory that's quick and easy to look through" is "a shitload of different directories"?

      I'm starting to get a feeling that Macs are only userfriendly if you are a true Apple fanatic. Because every post about the advantages of the Mac way of doing things really describes a nightmare of some kind.

    4. Re:/etc is great by babbage · · Score: 1
      So, your solution to "One small directory that's quick and easy to look through" is "a shitload of different directories"?

      For values of "shitload" where "shitload" equals "three", yeah.

      • ~/Library/Preferences for user level settings (comparable to ~/.* on other Unix variants
      • /Library/Preferences for system-wide settings as locally configured (comparable to /etc, and the place where nearly anything you want to grep for will be stored)
      • /System/Library/Preferences for system-wide settings as installed with the operating system by Apple (again similar to /etc, but in practice there's little of interest in here and nothing that should be tampered with casually, as Apple reserves the right to stomp on this tree during system upgrades)

      So in practice, there are two places you'd want to look, one in the home directory, one system-wide. This really isn't that different from how other Unix variants work.

      There are a whole lot of annoying idiosyncrasies with OSX, but the file system layout really isn't one of them. Yes, it's much different from how other Unix variants work, but once you get used to it, it's extremely logical, consistent, and predictable; it Makes Sense.

  38. possible but not consistent by b17bmbr · · Score: 1

    i have quanta gold from theKompany. (good on linux, sucks on os x. oh well.) anyways, they bundle all the Qt libs in a single directory. it is theoretically possible, yes, but screws other things up. for example, i had several X clients in my old classroom, and ran them off a P3 933 512MB system. ran fine. but, if i ran 6 copies of mozilla, each with its own libraries, it'd come to a grinding halt. the problem is windowsy really, as with free software it's not usually too hard to update a library. bundled libs are a commercial, not free, way of doing things. technical versus profitable, i guess. os x apps access a set of frameworks, and all specialized frameworks are .app bundle specific, unless yo drag them to /Library/Frameworks. but that's not always possible. it's like those damn activeX controls.

    --
    My problem? I was perfectly gruntled, until some numbnuts came by and dissed me.
  39. klik by bfree · · Score: 1

    One existing user of bundled applications on GNU/Linux is klik which was originally designed for installing additional programs on Knoppix by simply installing the klik client and clicking on links on the klik site. Klik has evolved since it's inception so that now it builds compressed images as bundles, supports 4 distributions (Knoppix 3.7, Kanotix BHZ, Simply MEPIS 2004.04 and Linspire 5.0), can work with dialog|Xdialog aswell as kdialog and firefox|elinks aswell as konqueror and finally offers the entire debian sid archive by klik (and many other changes). This is "next generation" klik, and while it is still evolving it is a very useful tool especially for debian based systems and livecds in particular.

    A lot of the posts in this thread seem to repeat the same arguments against bundles (the duplication and security issues of having shared libraries in bundles) but nobody mentions the prime advantage I see in them. They can be summarised with this present from probono, a cmg of OpenOffice.org 1.9.65 which can run on many distributions (it uses a Linux transparent compressed iso for it's image rather then the normal cramfs to extend compatibility). So you can try out a preview release of ooo2 without having to upgrade any of your system, no need to have a test setup to try it out or wonder what risks you are taking that you might break something trying out experimental software.

    Another aspect which klik deals with in it's own way that hasn't been discussed much here is that klik assumes a base system, the set of all packages installed in all it's supported systems with the minimum expected version being the lowest version in any of the supported distributions. This means that everything in the base system of your distribution is still handled everywhere by it (so updating your base system updates the common packages), everything outside of this will be bundled in any applications which need it.

    Just remember to look at the klik docs and the klik forum if you have any problems.

    --

    Never underestimate the dark side of the Source

  40. Web site won't give me any info from Windows? by PornMaster · · Score: 1

    Unsupported Operating System

    If you were visiting this site with Linux, you could install thousands of applications simply with a klik. You can download a free copy of Linux here. Please come back with a standards compliant operating system and browser.

    This site is optimized for Konqueror and Firefox.


    How narrowminded to not let me scope it out from Windows/IE.

  41. Wild leap by microbox · · Score: 1

    For each application I would have to add an entry to PATH and possibly LD_LIBRARY_PATH

    Let's think outside the box =).

    Since there are applications I want to run, but can't trust (such as p2p, or anything proprietry), it would be great to partition my little secutiry island (I mean my user account) for each application that I run.

    Thus, when I double click on the App I want to run (think OS X application bundles), a script takes care of a chroot jail, setting up resource auditing etc. Nothing need happen to the PATH or LD_LIBRARY_PATH, and all of a sudden I could make in impossible for individual applications to access the network.

    It could be simple and intuitive to the end user. You could delete an application by just... deleting it. All configuration information etc. can we neatly stored in the app bundle.

    OS X also privdes a 'Library' directory where applications can store per-user information and anything that should logically persist outside of the app bundle.... with such a design, you're not burning any bridges.

    Resource usage may be a problem... if something isn't done to manage duplicate copies of the same library in a sensible manor. If I'm not mistaken, UNIX systems load instances of libraries into memory for each process that uses the library... so your main concern is disk space usage.

    Libraries _could_ still be centrally stored, with soft links in the app bundles. All of this could automatically be handled when you run the application. For example, your run script (open on OS X) might identify and keep a hash table of libraries. If it identifies two libraries that are the same (exact binary duplicates) it could move them to a common directory, and provide soft links back to the app bundle. When a bundle is deleted... just hink counting semaphores.

    With next generation file systems, it may be possible to automatically identify all libraries of a certain ilk in one foul swoop and do this automatically, when you copy files... kinda like a copy-on-write smart pointer. This would make it possible to upgrade all app bundles.

    It's all possible, and I think this would be preferrable for end user applications (such as the future Photoshop-Linux), since it's so intuitive to the end user, and gives the application distributor so much flexiblity, since they won't have to consider each different distribution

    Package management systems like rpm, urpmi, yast, apt-get, are very cool, but if I want to compile and install my own program, or run the lastest Firefox (with the latest dependent libraries), I can end up with a mess that can be time consuming to clean up. It requires too much Unix savvy for windoze users.

    If you've ever used OS X (or Mac Classic), and "installed" a program by copying it from a disk onto your hard disk (anywhere), and then later "uninstalled" it by dragging it into the trash... that's simplicity.

    --

    Like all pain, suffering is a signal that something isn't right
  42. consider using the package manager for your distro by buchanmilne · · Score: 1

    Just like about every other distro which has an option to not install all the kitchen sinks ...

    (of course, you left out the libraries that bash requires, like glibc, ncurses or termcap, and I'm guessing you needed at least some tool which is capable of retrieving files from the internet, so you probably needed at least something like wget or curl).

    The only difference is what you type before the package name (ie s/pacman/urpmi/g, or s/pacman/yum install/g, s/pacman/apt-get install/g).

  43. Re:consider using the package manager for your dis by rjpiercy2 · · Score: 1

    Yes, you are correct. Most distros can do a lean install, but archlinux' lean install is about 170M you then use pacman for everything else, and it really is the best package manager I have used. You are also correct that it is more than than kernel and bash - glib, ncurses, binutils, filesystem utils, etc basically everything pacman would need to retrive other packages (it has ftplib embedded into it).

  44. slackware has this. by *SECADM · · Score: 1
    What would be nice is a standard way of installing something from a tarball which puts something, lets say /var/genericpackagemanagment, which contains a list of all the files installed, where, and directories created.

    Slackware has always had this in /var/log/packages.

    In there each package has a text file with a list of files installed for this package.

    The standard way of installing is called "installpkg" and "removepkg".

    --
    sure I'll have a sig.
  45. Philosophical differences? by MoxFulder · · Score: 1

    I think that the MacOS X approach (which is similar to Windows, only cleaner) partly differs from the Linux/Unix approach because of a different software development philosophy.

    Most Linux apps are open source (ok I run Debian so I'm biased). There's a strong emphasis on making things modular. Libraries are generally bundled separately from applications, because as soon as one app has a nifty feature it gets yoinked out and made into a general purpose library/API/framework (think GTK the "Gimp Toolkit").

    Keeping libraries and apps separate fits in with the Linux goal of modularity which I believe is in a feedback loop with the open source philosophy.

    OTOH, MacOS and Windows have a lot of proprietary closed apps. If Microsoft comes up with a new-fangled widget for Media Player, or Apple for iTunes, they don't need or want to make it particularly modular. They keep the support libraries close to the apps. A competing software company, say, MusicMatch, may reinvent the same widget and make their own library.

    I think the Linux approach to program file organization fits better with open source. I do think that keeping all files for an app in one place has some advantages, for example making it easier to keep track of online help. Example: I hate when a gnome app can't find its own help files; these don't need to be used by multiple programs, and they can be replaced with every new version, so they should stay "close to the app" in my opinion.