Subject: Re: Using pkgsrc for an OpenSolaris distro
To: Moinak Ghosh <Moinak.Ghosh@Sun.COM>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 12/28/2005 09:28:52
I have used pkgsrc to develop an entire Linux distribution. This includes 
all components (all files). I started this over three years ago and 
continue to work on it. I packaged glibc, linux-kernel, XFree86 (it was 
not in pkgsrc at that time and new packages are different), util-linux, 
vixie-cron and many others. Many of these packages are in pkgsrc-wip and 
some in regular pkgsrc now.

I used LOCALBASE as /usr. At first, that had various problems, but almost 
all are fixed now. (I have a few small changes in my own pkgsrc related to 
this.)

I made a packages to install essential configurations.

And I made a package to copy some essential binaries to /bin and /sbin.

There has been a little discussion on how to have pkgsrc manage some 
packages that are using a LOCALBASE of /. But I have not done that.

One idea is to add a variable prefix for PLISTs and patch a few packages 
to install correctly. Maybe like: LOCALBASE=/ and OTHERBASE=usr/,
then a package like coreutils could allow installing some items directly 
to the /bin and others to /usr/bin and the PLIST could be like:

bin/${GNU_PROGRAM_PREFIX}cp
${OTHERBASE}bin/${GNU_PROGRAM_PREFIX}csplit
${OTHERBASE}bin/${GNU_PROGRAM_PREFIX}cut
bin/${GNU_PROGRAM_PREFIX}date
...
${OTHERBASE}man/man1/${GNU_PROGRAM_PREFIX}cp.1
${OTHERBASE}man/man1/${GNU_PROGRAM_PREFIX}csplit.1
${OTHERBASE}man/man1/${GNU_PROGRAM_PREFIX}cut.1
${OTHERBASE}man/man1/${GNU_PROGRAM_PREFIX}date.1

(and PKGLOCALEDIR has the ${OTHERBASE} too)

So for now my glibc and kernel are all installed to /usr/, my configs 
(PKG_SYSCONFBASE) go to /etc, and my VARBASE is /var.

Yes, you can use pkgsrc to package all components.

By the way, pkgsrc is a good choice for your distribution, because often 
patches are added for portability and not operating specific.

  Jeremy C. Reed

  	  	 	 technical support & remote administration
 	  	 	 http://www.pugetsoundtechnology.com/