« What Makes a Linux Distribution Cool? | Main | New Approach to Building Solaris Packages »

May 7, 2003

Solaris Package Creation Flaw

There is a fundamental flaw with creating packages for Solaris (using the standard pkgmk/pkgadd/pkgrm protocol). Attempting to build perl 5.8.0 package right now (which should go in /usr/local).

Creation of packages is done by installing the package in an autonomous place. The recommendation on sunfreeware is to temporarily point /usr/local at an empty directory when installing so when 'make install' puts it in the local subdirs you can easily package up what was installed.

However . . .

If you point /usr/local at an empty dir for 'make install', then existing /usr/local apps/libs (like necessary gcc files) are unavailable.

If you configure to have installation happen in another dir (like ~) many applications then won't work properly when moved into /usr/local.

If you make install into the default dirs the installed files get mixed in with existing files and makes it difficult to create the package (and ensure that all and only the right files get into the package). Plus then to install the package you need to clean out the non-package installed files.

How to resolve this?

Ideas . . .
- configure packages to go into /usr/local-pkg, pointing that at an empty dir for the build and then point it at /usr/local after the package is installed in /usr/local. This works, but I can't bring myself to add a new link that would render so much useless if removed.
- 'make install' into /usr/local and figure out a good method to determine which files have been added. possibly a find with a -cmin (hoping nothing else would have changed in /usr/local).

Haven't poked around online much . . . maybe other people are facing this same issue.

Posted by mike at May 7, 2003 10:16 PM