Subject: Re: Bash Configuration Question
To: mowestusa <mowestusa@yahoo.com>
From: Kevin Brunelle <kruptos@mlinux.org>
List: netbsd-help
Date: 08/16/2006 16:59:59
Hey Steve.

> I have read in the NetBSD Guide about installing the
> pkgscr tree. It seems as if Michael is suggesting
> setting my PKG_PATH to that downloaded tree instead of
> the ftp site like the wiki suggested. So I wondered:
>
> 1. Is this a better method for installing programs in
> NetBSD?

I have read his response and, to be honest, I think it may have been a typo.  
The only way that should have worked was if the binary packages were stored 
there.  They usually are under /usr/pkgsrc/packages/All if they are on the 
local filesystem under /usr/pkgsrc.

> 2. How does one download and install the pkgscr tree
> after a base install? (I didn't find clear
> instructions in the guide or the pkgscr guide on this
> especially if I have simply a CLI.) It seems like
> there isn't wget installed or even lynx.

You can use ftp to grab the tarball

ftp ftp://ftp.netbsd.org/pub/pkgsrc/pkgsrc-2006Q2/pkgsrc-2006Q2.tar.gz

And then you use tar to unpack it where you want (cd /usr
tar xzvf pkgsrc-2006Q2.tar.gz)

The most common way (for me at least) is to use cvs to grab it.  You'll want 
to read the page on upgrading to stable or current to fully understand how to 
setup cvs (you need to set a couple variable to tell it what to do at first).  
cvs checkout pkgsrc
or
cvs checkout -rpkgsrc-2006Q2 pkgsrc

The first command here will give you the current state of pkgsrc.  The second 
will be the same as the tarball.  Once you use cvs you can just update the 
thing with "cvs update -dP" from within /usr/pkgsrc.

> 3. I'm primarily intested in simply installing binary
> packages, but when I use pkg_add with the ftp site as
> the PKG_PATH resolve dependancies automatically or
> does that only happen when you compile from the pkgscr
> tree?

They are automatically resolved and downloaded as long as PKG_PATH is set 
correctly.  The only issue you'll have that may make you seek pkgsrc is when 
the program you want isn't available as a pre-built package.

> 4. If I point the PKG_PATH to the pkgscr tree will it
> work to download and install the binaries?

No.  Point it at the ftp site location you were going to use.

> Sorry for all the questions by I'm trying to wrap my
> head around the pkgscr and all of its programs. I have
> read the pkgscr guide (the first part for those who
> simply want to use the program installer, because at
> this point I don't want to learn how to maintain and
> submit my own packages).

You're fine.  The cvs thing is confusing at first and I missed it myself until 
I reread a lot of things.  I suspect you'll be very happy with binary 
packages for now.  So set PKG_PATH to the ftp:// location and just start 
installing away.

-Kevin