Subject: Re: Some pkgsrc and -current related questions
To: Gary Parker <G.J.Parker@lboro.ac.uk>
From: Chris Wareham <chris.wareham@iosystems.co.uk>
List: port-sparc
Date: 08/06/2004 15:21:12
Gary Parker wrote:
> Hey hey folks, excuse me while I slip into newbie mode again for a moment.
> 
> I've had a look through documentation and list archives and such and don't
> seem to be able to find an answer for these:
> 
>  - I've got the pkgsrc sources via 'cvs checkout -P pkgsrc', does the CVS
> system automatically know I'm running -current rather than a formal release
> and bring down the current sources automatically or is the pkgsrc stuff
> independent of what OS version you're running?
> 

Pkgsrc is intended to build on a wide range of NetBSD versions, as well
as Linux, Solaris and other operating systems. In practice, some
packages wont build on a particular OS or version, and where known this
is flagged in the makefiles. For example, Mozilla wont work on Motorola
68k based machines or machines running NetBSD 1.4. This can be gleaned
from the following lines in the makefiles:

   # NetBSD-*-m68k builds, but "regchrome" dumps core.
   NOT_FOR_PLATFORM=   NetBSD-1.4.*-* NetBSD-*-m68k

Attempting to build Mozilla on one of these platforms will print a
warning and exit.

>  - In a similar vein, now I have the 200407270000 automatic build running on
> my machine I want to compile my own kernel (and possibly the whole system).
> If I do 'cvs checkout -P src/sys' will this automatically get the source I
> need or do I need to specify a date and the fact that it's the current
> branch?
> 

If you're running -current, then a CVS checkout without specifiying a
branch will get the correct sources. To checkout the latest code for a
specific release branch you have to specify it in the initial checkout.
For instance, to get the latest kernel code from the 1.6 branch use the
following:

   cvs checkout -P -r netbsd-1-6 src/sys

A subsequent CVS update of that source will automatically pull changes
from the 1.6 branch, as this information is stored as metadata in the
source tree you checked out. In other words, you don't need to use the
"-r netbsd-1-6" when doing a CVS update.

See the following link for details:

   http://www.netbsd.org/Documentation/current/#using-anoncvs

>  - When I do 'make -j 3' for something in pkgsrc it fails because it's not
> correctly serializing the download of the code before it starts to actually
> compile. Is there a way I can tell make to only start doing more than one
> job on the *actual* compile job rather than all the pre-build stuff?
> 
> Many questions, I know, hopefully some answers out there...tia
>