Example installation: Gopher

Gopher is a protocol for simple exhange of information. The Gopher package contains several programs (e.g. a server program and a client program). As an example of installation of an ordinary (text oriented) UNIX program we install the Gopher client.

We start by installing the source code on the file server khym.:

khym:/store/store/khym$ mkdir gopher
khym:/store/store/khym$ cd gopher
khym:/store/store/khym/gopher$ ftp ugle.unit.no

Fetch the source code, then check that it is OK to unpack here:

khym:/store/store/khym/gopher$ zcat gopher1.03.tar.Z | tar tvf -
rwxr-xr-x1147/10      0 Aug 31 23:47 1992 gopher1.03/
rw-r--r--1147/10   1876 Jun 25 02:14 1992 gopher1.03/README
rwxr-xr-x1147/10      0 Sep  2 23:07 1992 gopher1.03/gopherd/
...

This looks good, so we do an actual unpack:

khym:/store/store/khym/gopher$ zcat gopher1.03.tar.Z | tar xvf -
... (lots of output)

Change the name of the top level directory:

khym:/store/store/khym/gopher$ mv gopher1.03 src-1.03

Trash the tar-file, which we don't need any longer:

khym:/store/store/khym/gopher$ rm gopher1.03.tar.Z

Then we create the build tree for Sun Sparc machines on the file server khym. The tool shadow should be smart enough that we can accept the default values it presents:

khym:/store/store/khym/gopher$ shadow
Which machine? [khym] ?
Which application? [gopher] ?
What version? [1.03] ?
What architechture(s) [sparc] ?
Protecting original source in src-1.03
Shadowing from ../src-1.03 to src-1.03-sparc
/store/store/khym/gopher/src-1.03/gopherd:
/store/store/khym/gopher/src-1.03/gopher:
      [...]
/store/store/khym/gopher/src-1.03/examples/Sample Directory:
/store/store/khym/gopher/src-1.03/examples/Sample Directory/.cap:
/store/store/khym/gopher/src-1.03/examples/Sample Directory/wais-index:
Making version tree ver-1.03

Then we come to the tricky part of the installation: You have to read the README and the INSTALL files of the source code and configure the application approprately. It is difficult to give any general guidelines here, since almost every program has its own unique configuration scheme.

In this example we have to edit Makefile.config (the simplest way to do it is by issuing the command fix Makefile.config) and then issue the command make client. In Makefile.config we had to change the directories /store/bin and /store/lib instead of /usr/local/bin and /usr/local/lib. In addition we will have to add the location of the local gopher-server.

On Sun machines we need to make sure that all networking applications are loaded with the argument -lresolv. This ensures that the applications use DNS to look up machines.

Following these modification the compilation should be straightforward. This brings us to the next stage in the "storification process": the Installation.

This program consists of so few files that it is simplest to do the intallation by hand. The first thing we do is to issue a make -n command (tells make to print what it will do following a given make rule, but not to actually do it):

khym:/store/store/khym/gopher/src-1.03-sparc/gopher$ make -n install
    install -c gopher /store/bin
    install -c gopher.hlp /store/lib

This looks OK, so we do:

khym:/store/store/khym/gopher/src-1.03-sparc/gopher$
     mkdir ../../ver-1.03/bin
khym:/store/store/khym/gopher/src-1.03-sparc/gopher$
     mkdir ../../ver-1.03/lib
khym:/store/store/khym/gopher/src-1.03-sparc/gopher$
     cp gopher ../../ver-1.03/bin/gopher@sparc
khym:/store/store/khym/gopher/src-1.03-sparc/gopher$
     cp gopher.hlp ../../ver-1.03/lib/gopher.hlp

The manual page can be found in the doc/ catalogue of the source code. We install that as well:

khym:/store/store/khym/gopher/src-1.03-sparc/doc$
      mkdir ../../ver-1.03/man
khym:/store/store/khym/gopher/src-1.03-sparc/doc$
      mkdir ../../ver-1.03/man/man1
khym:/store/store/khym/gopher/src-1.03-sparc/doc$
     cp gopher.1 ../../ver-1.03/man/man1/gopher.1

The Sun Sparc installation of the gopher program is complete. However, we wish to install this application for the SGI platform as well. Since most servers are exported read only to other machines we can't normally write to the /store/store/khym/gopher directory when compiling on another machine. Therefore, the STORE system supports shadow directories on other machines than the main installation server for a particular package:

flory:/store/store/flory (405)$ mkdir gopher-c
flory:/store/store/flory (406)$ cd gopher-c
flory:/store/store/flory/gopher-c (407)$ shadow
Which machine? [flory] ?
Which application? [gopher-c] ?
What version? [1.03] ?
Using server on khym, app name gopher
What architechture(s) [sgi] ?
Shadowing from /store/store/khym/gopher/src-1.03 to src-1.03-sgi
/store/store/khym/gopher/src-1.03/gopherd:
/store/store/khym/gopher/src-1.03/gopher:
/store/store/khym/gopher/src-1.03/object:
  [...]
/store/store/khym/gopher/src-1.03/examples/Sample Directory/.cap:
/store/store/khym/gopher/src-1.03/examples/Sample Directory/wais-index:
Making version tree ver-1.03
flory:/store/store/flory/gopher-c (408)$ cd src-1.03-sgi/
flory:/store/store/flory/gopher-c/src-1.03-sgi (409)$ fix Makefile.config

From here on, the going is easy. We can start out with the changes we did to make the application compile on the Sun architecture, and, if necessary, add flags for the SGI platform. Then we compile the application.

We log in on the machine khym again and copy the gopher application compiled for SGI:

khym:/store/store/khym/gopher/ver-1.03/bin$
      cp /store/store/flory/gopher-c/src-1.03-sgi/gopher/gopher gopher@sgi

The only thing left is updating the registration of the newly installed package. Here, the only thing actually entered by the user is a lot of <return>s to accept the default, and one +sgi to update the "Architectures" field to include sgi.

khym:/store/store/khym/gopher$ register
What application [/store/store/khym/gopher] ? 
Application is already registered, updating...
Short name  ... ... [gopher] ? 
Full name . ... ... [Gopher] ? 
Version ... ... ... [1.03] ? 
Program Type .. ... (? for liste) [FO] ? 
License Type .. ... (? for liste) [Fri] ? 
Signature . ... ... [AHJ] ? 
Short Description . ... ... ... (max 30 chars) [Gopher information service] ?
   ==>                              <==
Architectures . ... [sparc] ? +sgi
Manual Pages .. ... ('=' to reevaluate) [1-files 2-kb] ? 
Other Documentation ('=' to reevaluate) [none] ? 
Emacs Info  ... ... ('=' to reevaluate) [none] ? 
Online Help ... ... [some, /store/lib/gopher.hlp] ? 
Examples .. ... ... ('=' to reevaluate) [none] ? 
Init Files  ... ... ('=' to reevaluate) [none] ? 
Importance  ... ... [3] ? 
Source Code ... ... ('=' to reevaluate) [162-files 728-kb] ? 
Source  ... ... ... [boombox.micro.umn.edu] ? 
Nightly Command ... [] ? 
Not Links . ... ... [] ? 
Current description is:
: Is used to read information from the international network of
: gopher servers.
: May also be used as an interface to X.500, archie, anon.ftp, etc.
Do you want to edit the description [N]? 
khym:/store/store/khym/gopher$

We can wait until the nightly commands are run for the links to be created, or if we are impatient to test the installation we can use linkup:

khym:/store/store/khym/gopher$ linkup
Which linktree? [khym] ?
Which server? [khym] ?
Which application? [gopher] ?
Missing link to ++/khym/gopher/ver-1.03/bin/gopher@sparc
Missing link to ++/khym/gopher/ver-1.03/lib/gopher.hlp
Missing link to ++/khym/gopher/ver-1.03/man/man1/gopher.1
done

Up : Installing software in STORE, Previous: Handling documentation, Next : Example installation: Xgopher.

Index

arnej@lise.unit.no