On Jul 23, 2008, at 10:23 PM, James Carlson wrote: > Fredrich Maney writes: >> I've always advocated that software should be compiled/built in >> version specific directories with links from the standard locations >> to >> the current version, like so: >> >> link /usr/local to /opt >> place Apache 2.2.8 source in /opt/apache/2.2.8-src >> compile and install it into /opt/apache/2.2.8 >> link the appropriate binaries into /opt/bin/ >> >> It does, if you keep multiple versions around, sometimes become a >> little complicated, however it does allow for very quick upgrades and >> rollbacks in the event of problems. > > I'd find that hard to advocate by itself. Managing multiple versions > is something that the software packaging system ought to provide in a > consistent way across the system, rather than just asking each > software developer to roll his own private solution. > > There are other important considerations besides the directory name, > including common configuration files (across versions), address space > pollution by multiple-version libraries, and potentially forcing > dependent projects to deliver per-version bits for each dependency; a > geometric explosion. > > I think versioning is a much harder problem than just directory names > and symlinks ... if it's done well.
I wish this could be handled by some form of union mounts. Let's say you install some applications in /opt/foo-version and /opt/bar-version like the above apache example. Then you could do something like "mount -F union /opt/foo-version /opt/local" and "mount -F union /opt/ bar-version /opt/local". If you upgrade the foo application then you unmount the current version and mount the new one. If each application you install is installed in its own ZFS file system then maybe ZFS could take care of the union mount. If there is a conflict you could resolve the conflict by the order in which the individual file systems are mounted. Users would only require /opt/local/bin (or some other standards compliant path) in their PATH. If users were allowed to do their own union mounts they could even build their own collection of software. It would be easy to find which package a file belongs to since you could find out from which file system the file originated. The binaries in a package would still access config files etc. using the / opt/foo-version path. Krister _______________________________________________ opensolaris-discuss mailing list opensolaris-discuss@opensolaris.org