CSL: SST Installation

This page derived from a message sent from Joe Shamblin to the SST e-mail list on Sep-09-1997. It describes the process for installing a software package into the SST filesystem, and then making the software available to the user community.

The basic idea for the package system is to allow the administrators to install programs in a central way so that users will be able to add one path to get all of the installed software, at least the stable stuff :-). Following that goal we use a system that allows us to install all of the software in a central directory and create links to the versions that we want to be available. For example a program like emacs would be installed in /usr/pkg/emacs-19.34. The contents of that directory would look like the following:

wjs@login% ls /usr/pkg/emacs-19.34 bin/ com/ info/ libexec/ man/ share/

You will notice that this looks just like the /usr/local/ directory. That is so that when it is linked in there will be links in the correct place; e.g., /usr/local/bin/emacs will be a link to /usr/pkg/emacs-19.34/bin/emacs

wjs@login% ls -la /usr/local/bin/emacs lrwxrwxrwx 1 root lab 31 Sep 9 04:15 /usr/local/bin/emacs -> /auto/pkg/emacs-19.34/bin/emacs*

Perhaps going through an example will be helpful. Here is a session of the installation of screen-3.7.4 in the /auto/sst/pkg/ directory.

wjs@login% cd /var/tmp wjs@login% ftp prep.ai.mit.edu Connected to prep.ai.mit.edu. 220 aeneas FTP server (Version wu-2.4(3) Mon Jun 5 16:40:22 EDT 1995) ready. Name (prep.ai.mit.edu:wjs): ftp 331 Guest login ok, send your complete e-mail address as password. Password: 230-Welcome, archive user! ftp> cd pub/gnu ftp> ls screen* 200 PORT command successful. 150 Opening ASCII mode data connection for file list. screen-3.7.2.tar.gz 226 Transfer complete. remote: screen* 175 bytes received in 0.077 seconds (2.2 Kbytes/s) ftp> bin 200 Type set to I. ftp> get screen-3.7.4.tar.gz 200 PORT command successful. 150 Opening BINARY mode data connection for screen-3.7.4.tar.gz (388138 bytes). local: screen-3.7.4.tar.gz remote: screen-3.7.4.tar.gz 388138 bytes received in 3.1 seconds (1.2e+02 Kbytes/s) ftp> ftp> by 221 Goodbye. wjs@login% /usr/local/bin/tar xvfz screen-3.7.4.tar.gz [much deleted] screen-3.7.4/doc/fdpat.ps screen-3.7.4/doc/screen.info screen-3.7.4/doc/screen.info-1 screen-3.7.4/doc/screen.info-2 wjs@login% cd screen-3.7.4 wjs@login% ./configure --prefix=/auto/sst/pkg/screen-3.7.4 this is screen version 3.7.4 checking for gcc [much deleted] creating Makefile creating doc/Makefile creating config.h Now please check the pathnames in the Makefile and the user configuration section in config.h. Then type 'make' to make screen. Good luck. wjs@login% make AWK=gawk CC="gcc -O" srcdir=. sh ./comm.sh CC="gcc -O" srcdir=. sh ./osdef.sh AWK=gawk srcdir=. sh ./term.sh gcc -c -I. -I. -O screen.c [much deleted] gcc -o screen screen.o ansi.o fileio.o mark.o misc.o resize.o socket.o search.o tty.o term.o window.o utmp.o loadav.o putenv.o help.o termcap.o input.o attacher.o pty.o process.o display.o comm.o kmapdef.o acls.o -lcurses -lelf -lcrypt_d -lcrypt -lsec cd doc; make screen.info screen.info' is up to date. wjs@login% make install ./etc/mkinstalldirs /auto/sst/pkg/screen-3.7.4/bin [much deleted] else true; fi; \ fi wjs@login% ls /auto/sst/pkg screen-3.7.4/ wjs@login% cd /auto/sst wjs@login% ls bin/ info/ man/ pkg/ wjs@login% lndir pkg/screen-3.7.4 pkg/screen-3.7.4/bin: pkg/screen-3.7.4/man: pkg/screen-3.7.4/man/man1: pkg/screen-3.7.4/info:

(lndir just creates a link for every file it finds in the directory where you issue the command.)

Now users with /auto/sst/bin in their PATH will be able to use the newly installed screen program.

There are a few ways to link in these programs. It would be pretty easy to come up with a shell or perl script that removed the links created by the lndir program, and link the new ones into place. There are some existing programs such as:

  stow (http://www.gnu.org/software/stow/stow.html
and
  depot (http://andrew2.andrew.cmu.edu/depot/)
that do this, but these programs have their own shortcomings. It seems something simple like using lndir might be the best bet.

There is also the documentation to deal with. I have been trying to install HTML documentation for all of the programs. In this specific example I would create a directory /auto/sst/pkg/screen-3.7.4/html/screen. After this was linked in it would become /auto/sst/html/screen. This way people know where to find the documents. So in this example, I would have used the program texi2html to create the HTML documentation.

wjs@login% cd doc wjs@login% ls FAQ install.sh* screen.info-1 Makefile screen.1 screen.info-2 Makefile.in screen.info-3 screen.info-4 fdpat.ps screen.info screen.texinfo wjs@login% texi2html screen.texinfo wjs@login% ls FAQ install.sh* screen.info-1 screen.texinfo Makefile screen.1 screen.info-2 screen_toc.html Makefile.in screen.html screen.info-3 fdpat.ps screen.info screen.info-4 wjs@login% mkdir /auto/sst/pkg/screen-3.7.4/html/screen wjs@login% cp *.html !$ cp *.html /auto/sst/pkg/screen-3.7.4/html/screen

I would then have to relink this (usually I would have done this before linking everything into place).

wjs@login% pwd /auto/sst wjs@login% lndir pkg/screen-3.7.4 wjs@login% ls bin/ html/ info/ man/ pkg/ wjs@login% ls html screen/ wjs@login% ls html/screen screen.html@ screen_toc.html@

This process is identical on the SPARCs.

For those who are interested, the machines mount the sst directories relating to their hardware. For the x86 machines, this would be:

wjs@login% df . /auto/sst ( minerva:/vol/vol1/sst/sparc-SunOS_5.8 )

This is done using a feature of the mount command that expands certain variables. The line in the automount map, /etc/auto_import, is:

sst -rw minerva:/vol/vol1/sst/${CPU}-${OSNAME}_${OSREL} sparc SunOS 5.8

Therefore the machines always mount the correct /auto/sst/ directory.

There are still some issues to be addressed, like which packages get linked in, how to keep the database of stuff up to date, how the database will be handled, and many more items. This should provide enough of an example for users to begin playing with this on their own.

Please feel free to ask any questions about this process. All of the administrators are on the mailing list, so you are likely to get a very quick response.