Subject: Re: Dumb question re package source
To: Andrew White <awhite@arc.corp.mot.com>
From: Bill Studenmund <wrstuden@zembu.com>
List: port-macppc
Date: 04/23/2001 11:21:20
On Mon, 23 Apr 2001, Andrew White wrote:

> Navigating the packages web pages (ie
> "ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/README.html" and children),
> I can find out how to pull down precompiled packages and install them. 
> However, I can't find any way to pull down the source of a particular
> package directly from the web and build from source.
> 
> I know I can pull down the source for the ENTIRE packages collection, but
> for obvious reasons this is not desirable.  And due to security issues I
> can't pull use the package command.

As Thomas mentioned, I think you don't understand what the pgksrc
collection is. It is a tarball which goes in /usr/pkgsrc (thought you can
put it anywhere). The top level has some directories for infrastructure
(mk, pkgtools), then there are directories for each category. In each
category is each package. Each package though does NOT include the source
for that package (except for a few small, special cases). It does though
contain patches to the distributed source, and a checksum to make sure you
downloaded the right file (checks against trojans, and also download
corruption).

When you go to make a package (cd to its directory and type make), the
first things which happen are the pkg system checks for missing dependent
packages (if you're building a perl module, you need to have perl
installed for instance), and then the pkg system downloads the source for
the package.

> Is there a simple link to select that will slurp down the source for a
> package?

No, since the source which gets built is a combination of both the tar
ball on the net and the patches to it. They are kept in different places.

> A practical example:  I want to get MRT.  It's not in the list of built
> packages at
> "ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/net/mrt/README.html". 
> Fine, I'll grab the source and build it myself.
> 
> However, any documentation seems to assume that I WILL (read MUST) use the
> package tree to do so.  Is there a way to grab the source of a SPECIFIC
> package via HTTP/FTP without bringing the rest of the tree with it (more
> specifically, via HTTP/FTP NOT on a NetBSD box)?
> 
> There is a link on the NetBSD MRT package page to the "Installation from
> source", but that basically drops me back into "download the entire pkgsrc
> distro system", and that is not an option.

Why not? It's only 9 MB gzipped. Yes, it will use a large number of
inodes, but it's not that bad. :-)

Take care,

Bill