Subject: Re: pkg_comp on other platforms
To: None <>
From: =?ISO-8859-15?Q?Joachim_K=F6nig-Baltes?= <>
List: tech-pkg
Date: 06/20/2006 10:15:04
Louis Guillaume wrote:

> pkg_comp is ONLY_FOR_PLATFORM= NetBSD-*-* for obvious reasons.
> But I find it to be such a wonderful tool I'd be interested in helping
> to identify the minimum required components in the chroot environment on
> Linux, AIX and Mac OS X.
> Has anyone else begun work on this?

Yes, I have modified pkg_comp to:

- use null/lofs/bind mounts on NetBSD/Solaris/Linux for "creating" the
   OS in the chroot instead of installing binary sets. This saves space.
   Ideas are based on

- create device nodes and directories (/dev/, /var/..., /tmp/...)

- copy necessary files that can not easily be mounted, e.g. /etc,

- added support for mounting /usr/pkg and /usr/pkgsrc into the chrooted
   ro-mounted /usr in order to be able to use standard paths

This works fairly well for me on NetBSD, Solaris 9 and Debian Sarge. I
can even use pkg_comp on NetBSD for creating Debian packages (in a
chroot with only Debian binary stuff under Linux emulation).

I'll clean up my patch and send it to the author of pkg_comp.