A proposal for S

A proposal for S
A software management system

Executive Summery:

All Unix file structure seem to grown in unintended and unfortunate ways. Suboptimalitys creep into the system and engineers and admins are spending time dealing with them on a daily basis. S is primarily a set of polices and procedures for removing most of these Suboptimalitys in regard to the software tools of the Unix file structure.

Problem statement:

Most companies have no consistent company standard for where and how software packages should be installed on its UNIX systems. This has lead to tools being installed in users home directories, project directories, group directories as well as dedicated tool repositories. The lack of policy and procedure typically leads to tool maintainers updating, or reconfiguring tools in ways that negatively impact user productivity. Users spend needless time searching for tools, configuring there environments and tracking down tool related bugs. Admins spend needless time multiply installing tools, backing up redundant files and helping users debug there environments and resolving tool issues.

Goal:

Devise and implement a consistent standard for installing tools on the UNIX network. The standard should be simple and easy to use, decrease wasted effort and allow everyone to get back to the more rewarding fractions of there jobs.

Solution Requirements:

State of the Art:

Note: This section isn't finished yet.
I'm not sure if this should or should not be here.
  1. /bin
  2. /usr/local/bin
  3. stow
  4. graft
  5. encap
  6. modules
  7. s

Proposed solution:

S

The first thing to remember is that 'S' is simple. S is nothing more than an agreed on directory structure and mounting scheme. It is the logical equivalent of having all the machinists in your workshop understand that whatever tool they might want can always be found in the tool chest over in the corner.

Continuing on with the machine shop analogy there are a few things too examine about tools. The first is that some tools work together and others do not. In the physical world the differences are metric vs standard; in the computer world the difference is computer architecture or OS revision. A wrench may be ether metric or standard, but either way it is still a wrench. In the Unix world there can be different compiles of gcc for different architectures, but each separate compile is still a gcc compiler. Past the analogy, there will be older and newer versions of given tools, suited to different tasks.

S is a directory hierarchy that maps these exact three concepts into a filesystem there is the type or architecture of a tool. Then the tool typically has a name like vcs or wrench, then there are different versions of the tools.

	 | OS-arch | toolname | version | < the tool its self >

	e.g.
		( base)(  OS - arch  )(tool name  )( version ) < the tool its self > 
		/adm/sm/Solaris7/sparc/gnutools/gcc/2.91.66-o1/ .. 
		/adm/sm/Solaris7/sparc/gnutools/gcc/2.91.66-o2/ .. 
		/adm/sm/Solaris7/i386/gnutools/gcc/2.91.66-o1/ .. 
		/adm/sm/Solaris7/i386/gnutools/gcc/2.91.66-o2/ .. 
		/adm/sm/Linux-2.3.0/mips/synopsys/vcs/broken_version/ .. 

To make NFS[1] automounting happy we should fix the size of the OS-arch too two or three directorys in depth. The tool name and version can be any free form directory structure that is most convenient to the users and maintainers.

For each host that is using S we will mount that machines appropreate os-arch directory under another mount point so that users can build there enviroments to be os-neutral. That directory will be /adm/s which will turn the above examples into useable tools installed as.

                ( base)(  OS - arch  )(tool name  )( version ) < the tool its self >
	
                /adm/s/gnutools/gcc/2.91.66-o1/ ..
                /adm/s/gnutools/gcc/2.91.66-o2/ ..

	
		/adm/s/gnutools/gcc/2.91.66-o1/ ..
		/adm/s/gnutools/gcc/2.91.66-o2/ ..

	 
		/adm/s/synopsys/vcs/broken_version/ .. 


No mater what architecture a user may be on, the /adm/s/gnutools/gcc/2.91.66-o1/bin/gcc will be the correct one (hopefully).

Each tool will be installed in it's own directory as if it were alone. In GNU-autoconf terminology they will each have there own --prefix. Each tool is to pretend that it is in it's own equivilant of /usr/local/bin/. This will allow us to use graft or stow and combine muiltiple tools in one place for simple use by users.

There are a few extra directorys. The .src directory for any source code, tarballs, pkgfiles, etc. that constitue the rest of the instatlation. Idealy there should be enough material there to diagnose or reinstall that specific version of the tool in case of problems. The .s directory is an extra optional directory for storing S specific files. The files will be used for user <-> admin comunication and posibly a tool regression testing system.


	../bin
          /sbin
	  /lib 
	  /include
	  /man
	  /info
	  (etc.)
	  /.src 
	  /.s	
 

User <-> Maintainer communication:

There is both an implicent and explicit methods for maintainers to communicate with users. The simplest form of communication is the file permissions on the tool directory. If the maintainer wishes to dissalow access to a tool all they will need to do is chmod the tools directory to enable or disable a tool. A more verbose form of communication will hopefully come from the .s directory. Whenever a new tool is installed a general tool description, pointers to responsible people, and documentation should be placed in the .s directory (The exact structure has yet to be defined.). This data will then be fed into a webserver which should allow easy access to that information.

Having the docs close at hand is a win win senario for both users and admins... who are users themselves after all.

Automatic enviroment installation:

In .s there will be shell fragments in the sys-V startup script style. If any application needs enviroment variables set, that can be done automaticly for the users.

Everyone gets there own /usr/local

By using graft, stow, or scripts users quickly and easily build there own sets of tools. Nolonger will paths have to be 20 elemets long and traverse thousands of commands, they can be only what is required for the job, and always the correct version.

An rough example of a graft based script for building a /usr/local/ equivilant.


#!/bin/sh

echo ""
version="1.0.4"

echo Version $version

targetdir="$HOME/ag"

echo targetdir $targetdir

echo ""
/bin/find $targetdir | wc -l
/bin/du -sk $targetdir
umask 022
echo "rm ing old $targetdir"
/bin/rm -rf $targetdir
echo "mking new $targetdir"
/bin/mkdir $targetdir

echo "grafting $targetdir"


/adm/s/util/graft/2.3/bin/graft -i -t $targetdir \
	/adm/s/data/stats/r/1.2.3 \
	/adm/s/util/graft/2.3 \
        /adm/s/data/vis/gnuplot/3.7.1_gd \
	/adm/s/dev/bison/1.28 \
	/adm/s/dev/flex/2.5.4a \
        /adm/s/dev/gcc-fake-cc/1 \
        /adm/s/dev/gcc/2.95.3  \
        /adm/s/dev/binutils/2.11 \
        /adm/s/dev/gmake/3.79.1  \
        /adm/s/dev/perl/5.005_03 



echo "building whatis database"
/usr/bin/catman -w -M $targetdir/man
	

echo ""
/bin/find $targetdir | wc -l
/bin/du -sk $targetdir


But what good does it do?

Future direction

Footnotes:

  1. NFS, the Network File System. It sucks, but so does gravit, and gravity is damn usefull too.

Contributors:

Alphabeticly