Subject: Package system, was: FreeBSD killed archie, was: where is top
To: Hauke Fath <hf@melog.de>
From: Alistair Crooks <azcb0@juno.uts.amdahl.com>
List: current-users
Date: 10/15/1997 01:56:55
[Cross-posted to current-users, as they should know about the package
system too - agc]

> At 20:50 14.10.97 -0700, Nathan Gelbard wrote:
> >At 04:55 PM 10/14/97 -0400, you wrote:
> >>
> >>  Can someone point me to the reference version of top?
> >>  Archie is useless for this kind of thing now...
> >
> >Whoah, I havent heard anyone utter 'archie' in years...
> 
> Well, there are tools like Peter Lewis' "Anarchie" on the Mac, and there is
> a www interface to archie <http://ftpsearch.ntnu.no/> which is blazingly
> fast. 
> 
> But our friends from the FreeBSD camp have been successful in a gigantic
> namespace pollution: Whenever the file you are looking for happens to be in
> the FreeBSD port collection you get hundreds of pointers to directories
> which do not contain what you were looking for. Apparently some FreeBSD
> magic can use the coontents to track down the package, but to all that do
> not run FreeBSD the mechanism is a major pain in the back, a bigger one
> even than all the binary L*nux packages carrying the same names.  =8|

In -current, we have the NetBSD package system, which is hugely derived
from the FreeBSD ports system. The way it's set up, you don't have to
know where the sources are - let the package system do the work for
you. The following output shows how to install top (and this is on a
machine behind a firewall).

root@pumpy:/root(1770)# uname -a
NetBSD pumpy.osg.eur.amdahl.com 1.2G NetBSD 1.2G (PUMPY) #7: Thu Sep 11 10:30:37 BST 1997     root@pumpy.osg.eur.amdahl.com:/u/src/sys/arch/i386/compile/PUMPY i386
root@pumpy:/root(1771)# cd /usr/pkgsrc/sysutils/top
root@pumpy:/usr/pkgsrc/sysutils/top(1772)# make && make install
>> top-3.5beta5.tar.gz doesn't seem to exist on this system.
>> Attempting to fetch from ftp://ftp.groupsys.com/pub/top/.
Requesting ftp://ftp.groupsys.com/pub/top/top-3.5beta5.tar.gz (via ftp://orpheus.amdahl.com:80/)
Successfully retrieved file.
>> Checksum OK for top-3.5beta5.tar.gz.
===>  Extracting for top-3.5beta5
===>  Patching for top-3.5beta5
===>  Applying NetBSD patches for top-3.5beta5
===>  Configuring for top-3.5beta5
/bin/cp /usr/pkgsrc/sysutils/top/files/defaults /usr/pkgsrc/sysutils/top/work/top-3.5beta5/.defaults
chmod a-x /usr/pkgsrc/sysutils/top/work/top-3.5beta5/install
 
Reading configuration from last time...
 
Using these settings:
        Bourne Shell   /bin/sh
          C compiler   cc
    Compiler options   -DHAVE_GETOPT -O
         Awk command   awk
     Install command   /usr/bin/install
 
              Module   netbsd13
             LoadMax   5.0
        Default TOPN   -1
        Nominal TOPN   18
       Default Delay   2
Random passwd access   yes
          Table Size   47
               Owner   root
         Group Owner   kmem
                Mode   2755
       bin directory   $(PREFIX)/bin
       man directory   $(PREFIX)/man/man1
       man extension   1
       man style       man
 
Building Makefile...
Building top.local.h...
Building top.1...
Doing a "make clean".
rm -f *.o top core core.* sigdesc.h
To create the executable, type "make".
To install the executable, type "make install".
===>  Building for top-3.5beta5
cc -DHAVE_GETOPT -DORDER -DHAVE_GETOPT -O  -c top.c
awk -f sigconv.awk /usr/include/sys/signal.h >sigdesc.h
cc -DHAVE_GETOPT -DORDER -DHAVE_GETOPT -O  -c commands.c
cc -DHAVE_GETOPT -DORDER -DHAVE_GETOPT -O  -c display.c
cc -DHAVE_GETOPT -DORDER -DHAVE_GETOPT -O  -c screen.c
cc -DHAVE_GETOPT -DORDER -DHAVE_GETOPT -O  -c username.c
cc -DHAVE_GETOPT -DORDER -DHAVE_GETOPT -O  -c utils.c
utils.c: In function `errmsg':
utils.c:348: warning: return discards `const' from pointer target type
cc -DHAVE_GETOPT -DORDER -DHAVE_GETOPT -O  -c version.c
cc -DHAVE_GETOPT -DORDER -DHAVE_GETOPT -O  -c getopt.c
cc "-DOSREV=12G" -DHAVE_GETOPT -DORDER -DHAVE_GETOPT -O -c machine.c
rm -f top
cc -o top top.o commands.o display.o screen.o username.o  utils.o version.o getopt.o machine.o -ltermcap -lm -lkvm
>> Checksum OK for top-3.5beta5.tar.gz.
===>  Installing for top-3.5beta5
/usr/bin/install -o root -m 2755 -g kmem top /usr/pkg/bin
/usr/bin/install top.1 /usr/pkg/man/man1/top.1
strip /usr/pkg/bin/top
===>   Compressing manual pages for top-3.5beta5
===>  Registering installation for top-3.5beta5
root@pumpy:/usr/pkgsrc/sysutils/top(1773)# 

i.e. change to the directory, and type "make && make install". I must
apologise, as it takes all the fun of outwitting search engines, finding
up-to-date source tar-balls, making sure no-one's tampered with the
tar-ball, patching and configuring it for NetBSD etc.

Enjoy,
Alistair

PS. If anyone has a favourite piece of software which they use, and it's
not in the package system, please get in touch with me with a view to
putting said favourite software into the package system. Thanks.