Following up on my packaging blog entry at
<http://blogs.sun.com/GullFOSS/entry/bits2boxes>, today I want to
concentrate on the details of sharing packages across products: OOo is
conceptionally built on top of URE, so it would make sense to split OOo
into URE plus current OOo's top half. Derivatives like Sun's StarOffice
and StarSuite, or Brasilian BrOffice share many parts with plain OOo, so
it would make sense to split those into a common OOo core plus plain OOo
finish, StarOffice finish, StarSuite finish, BrOffice finish. And so on.
There are generally two approaches to achieve that: You start with a
given product P that is today installed at a specific file system
location L (e.g., OOo 2.2 by default goes to a tree rooted at
/opt/openoffice.org2.2 on Unix). Now, when you split product P into two
parts P1 and P2, you can either install P1 to a file system location L1
and P2 to a different location L2, and make sure that your product's
code can cope with that distribution, or install P1 and P2 to a common
file system location L, and your product's code is effectively run in
the same environment it is running in today. Which approach is better?
Advantages of the two-tree approach (P = P1 + P2 spread across L1 and L2):
- Packages can be reused across products. Typical package formats
(Linux rpm, Solaris packages, Windows msi, etc.) contain (default) file
system locations where the package content will be installed. If both
OOo and StarOffice expect the core packages at, say,
/opt/openoffice-core, the exact same packages can be used for the core
part of both OOo and StarOffice. This saves resources for both the
supplier of multiple products and the consumer of multiple products
(e.g., installing both URE and OOo on a machine would not install any
duplicate files under /org/openffice/ure and /org/openoffice.org2.2, as
happens today). With the one-tree approach, on the other hand, either
otherwise identical packages would have to be created in different
versions containing different paths for the different products, or
packages would have to be installed with complicated mechanisms (e.g.,
rpm --prefix, where wrong usage would lead to a nonfunctional
installation), or all products would have to be lumped together under a
single path.
- Increased flexibility. Once an application's code is prepared to be
spread across two or more trees, it is probably also quite resilient to
other layout changes, like pressing it into the layout preferred by some
Linux distribution.
Advantages of the one-tree approach (P = P1 + P2 merged at L):
- No changes to the code base needed. I did a little experiment where I
compared OOo and StarOffice en-US rpm installation sets on unxlngi6.pro
SRC680m203, installed the common files to an /opt/openoffice.org2.2 tree
and the StarOffice only files to an /opt/staroffice8 tree, and tried to
successfully start soffice and execute the
smoketestoo_native/data/smoketestdoc.sxw:1.2. I had to hack about a
dozen places where the current code base was not prepared for such a
distributed layout. A very conservative extrapolation from this single
product, single platform, just survive the smoke test experiment to a
general solution would be to assume that it revealed a fourth of all
problems in the code base. Continuing with a conservative estimation of
one man week to solve each problem (coding and testing), this would
roughly mean a man year of work.
- A single entry point for users. It might be advantageous if all the
files (executables, readmes, etc.) that make up the application's
command line user interface are grouped in a single location where the
user will most likely expect them. This is problematic if files are
spread across two trees (e.g., if the soffice executable is identical
across OOo and StarOffice, it would be in the core tree, but a user
would probably expect it in the StarOffice tree; for a user, it would
probably be an implementation detail of StarOffice that it comes with an
additional core tree beside the StarOffice tree).
Can you think of any other (dis-)advantages of the two approaches? Are
there any constraints imposed by additional package formats (e.g., even
if it were a brittle solution, is it theoretically possible to relocate
packages a la rpm --prefix for package formats like non-rpm Linux or Mac
OS X, or would those be show stoppers anyway)?
-Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]