Subject: Re: Building from CDROM
To: None <>
From: Bernd Sieker <>
List: tech-pkg
Date: 11/16/1998 21:48:38
On 16.11.98, 15:20:09, Dan Herman wrote:
> Hi,
>   I have the NetBSD 1.3.2 CDROM set and would like to know if it is
> possible to build packages directly from the CDROM.  Or is it necessary
> to copy the required files to a writeable disk.  I apoligize if this
> information is available somewhere else, but I have spent a good amount
> of time searching for it already.  Any information, hints, references,
> etc... would be greatly appreciated.

The obvious idea seems to be to extract the pkgsrc archive to the disk
(it's just a few MB) and make a symbolic link /usr/pkgsrc/distfiles
pointing to the actual distfiles directory on the CD.

If pkgsrc (or any other source) is unpacked on the CDs (I don't know
them), you might want to "mount_union" a writeable direcotory on the
hard disk "over" the CD-ROM.

Build a custom kernel that has the UNION filesystem enabled and do
e. g. like this:

  mkdir -p /usr/CD-Unions/NetBSD-1.3.2-CD1
  mount_union /usr/CD-Unions/NetBSD-1.3.2-CD1 /cdrom

(assuming /cdrom is your CD-ROM mountpoint, the CD-ROM must already be
mounted there!)

This enables virtual writing on the CD-ROM, so you can build packages
directly in an unpacked source tree on the CD-ROM. Only new files will
be written to hard disk, unmodified source files will still be on the
CD only.

I've done this a lot times and it works very well.

> 				Thank you,
> 				Dan Herman

Bernd Sieker