Subject: Re: Location of packages
To: Daniel R. Killoran,Ph.D. <drk@shore.net>
From: Michael G. Schabert <mikeride@prez.org>
List: port-mac68k
Date: 08/06/1999 15:58:35
>>yes, I know
>>you know that you're talking about the pkgsrc kinda packages, but you're
>>referring to separate entities as far as the /usr/pkg and /usr/pkgsrc.
>>/usr/pkgsrc is where the package TREE goes...i.e. if you wanted to see what
>>packages are available,
>
>By "available", do you mean "are presently installed on the system & are
>callable", or do you mean "are part of the ensemble of packages you can
>download & install if you want them"?

I'll take "c" :)

>>you look there. Or if you want to install a package
>>by source, you go to /usr/pkgsrc/category/package_name and type "make
>>install". /usr/pkg, however, is where the binaries and acompanying files go
>>when you INSTALL a particular package (unless it's an X11 package, in which
>>case it still goes into the "regular" /usr/X11R6/bin).
>>
>
>Ok, lets see if I can straighten out my terminology:
>
>Let's call the file "pkgsrc.tgz" (and its expansions) that is found in the
>NetBSD distribution at "NetBSD-1.4/source/pkgsrc.tgz" the "initial
>packages".
>Now I blithely put this on my disk using the Installer, and it went in the
>top-level directory /. If I understand the docs correctly, I should have
>put it under /usr. Am I right so far? (As I say, it was no problem to move
>it there.)

Yes, it should be a directory, /usr/pkgsrc/ with all of the categories
below that.

>Now say I want to install "addnerd" (what a name!). "find" locates it in
>/usr/pkgsrc/sysutils/addnerd. I go there and type:
>
>make
>
>and after a while it tells me that addnerd-1.6 doesn't exist on this
>system, then it tries to download it, which doesn't work because, among
>other things, it isn't connected to the net.

OK, first, let me mention that there's even 2 different ways to get
packages, & 2 separate directories on the FTP server to get them from...

Way 1) Source compile...that's what you tried to do when you typed "make".
With this method, it downloads the "real" source for addnerd...i.e. the
source you'd get if you went to the (not-necessarily-NetBSD) addnerd web
site or whathaveyou. Then it throws in any changes to make the sources
NetBSD-ready, & compiles them. Had you been connected to the 'Net, it would
have churned for quite awhile, & then spit out all the binaries, but they
still wouldn't be quite where they'll need to be. You would then have to
type "make install", which would set up all permissions, copy the files to
the /usr/pkg/hierarchy (bin, sbin, share etc are all under there too), and
finally would register them with the highly-sophisticated package database
system built into the system.

If you (like you seem to) want to get the files by yourself, instead of the
automagic system, then the proper place to put them is
/usr/pkgsrc/distfiles. Otherwise, you'd have to tell make where you put
them.

Way 2) Download a binary installation...you can download, basically, what
someone else got when they did the "make" without the make install. Then
you use "pkg_add whateverpackageyou'vegot" and it will do the install stuff
for you.
You can put the binary tarballs anywhere you want, because you can just
type "pkg_add /path/to/whatever.tgz"...or just do the pkg_add from the same
directory as the tarball.

>Ok, now I have already downloaded the package "addnerd-1.6" from the ftp
>site. The question now arises: Where should I put it for this installation
>scheme to work?

That depends on which exact one you got (i.e. the source tarball or the
binary tarball). The source tarballs are in the
ftp://ftp.netbsd.org/pub/NetBSD/packages/distfiles

The binary tarballs are in
ftp://ftp.netbsd.org/pub/NetBSD/packages/version_of_netbsd_you're_using/mac68k/

>And what is the function of the files in "NetBSD-1.4/pkgsrc"? (addnerd
>doesn't seem to be among them).

I'll assume that you meant ftp://ftp.netbsd.org/pub/NetBSD/packages/1.4/mac68k

Those would be the binary tarballs. Since userland programs sometimes rely
on the version of your libs, there are different pre-compiled binary
versions of packages for the various releases.

>Oh, ok, so I don't have to do anything about it then?

Nope :)



Hope this helps,
Mike
Bikers don't *DO* taglines.