[11272] | 1 | .TH LOCKERS 7 "6 March 1998" |
---|
[7757] | 2 | .ds ]W MIT Athena |
---|
| 3 | .SH NAME |
---|
| 4 | lockers - description of Athena locker organization conventions |
---|
| 5 | .SH DESCRIPTION |
---|
| 6 | |
---|
| 7 | There are many possible ways to provide binaries for multiple |
---|
| 8 | architectures in some organization under a single filesystem. Athena |
---|
| 9 | suggests and supports a particular convention for doing this. |
---|
| 10 | |
---|
| 11 | The primary purpose of this convention is to provide a standard way of |
---|
| 12 | separating machine dependent binaries into different directories for |
---|
| 13 | ease of use and maintenance. Generality, backwards compatibility, and |
---|
| 14 | neatness also count. |
---|
| 15 | |
---|
| 16 | .SH MACHINE DEPENDENT FILES |
---|
| 17 | |
---|
| 18 | In order to avoid any sort of clutter in the top level directory of a |
---|
| 19 | locker, all machine dependent directories are placed under a directory |
---|
| 20 | called \fIarch\fR. Under \fIarch\fR is one directory, for each |
---|
| 21 | supported platform, named after the AFS "@sys" values (pmax_ul4, |
---|
| 22 | sun4m_53, etc.). Under each of these directories are directories |
---|
| 23 | containing a specific type of machine dependent data, such as binaries |
---|
| 24 | or libraries (bin, lib, etc.). |
---|
| 25 | |
---|
| 26 | For example, a locker containing libraries and binaries might look |
---|
| 27 | like: |
---|
| 28 | |
---|
| 29 | /mit/locker/arch/ |
---|
| 30 | pmax_ul4/ |
---|
| 31 | bin/ |
---|
| 32 | lib/ |
---|
| 33 | rs_aix32/ |
---|
| 34 | bin/ |
---|
| 35 | lib/ |
---|
| 36 | sgi_52/ |
---|
| 37 | bin/ |
---|
| 38 | lib/ |
---|
| 39 | sun4m_53/ |
---|
| 40 | bin/ |
---|
| 41 | lib/ |
---|
| 42 | |
---|
| 43 | Possibilities for data subdirectories include bin, lib, etc, man, and |
---|
| 44 | build. |
---|
| 45 | |
---|
| 46 | Note that due to the fact there is binary compatibility across |
---|
| 47 | multiple AFS "@sys" values, there will also be many symbolic links: |
---|
| 48 | |
---|
| 49 | /mit/locker/arch/ |
---|
| 50 | sun4c_51 -> sun4m_53 |
---|
| 51 | sun4c_53 -> sun4m_53 |
---|
| 52 | sun4m_51 -> sun4m_53 |
---|
| 53 | |
---|
| 54 | Note also that the string "@sys" should never be used literally, |
---|
| 55 | except in convenience symlinks described below; the string |
---|
| 56 | "$ATHENA_SYS" should be used instead. Continue reading for more |
---|
| 57 | details. |
---|
| 58 | |
---|
| 59 | .SH MACHINE INDEPENDENT FILES |
---|
| 60 | |
---|
| 61 | Many files, such as manual pages or data files, may be the same for |
---|
| 62 | all machine architectures. Currently, the only defined convention for |
---|
| 63 | such files applies only to manual pages. That convention is simply |
---|
| 64 | that, in the top level directory of a locker there is a directory |
---|
| 65 | called "man" that follows the conventions for manual directories |
---|
| 66 | followed by most flavors of Unix. |
---|
| 67 | |
---|
| 68 | Note that the \fIadd\fR command also supports the possibility of |
---|
| 69 | machine specific manual pages when modifying the MANPATH, in that it |
---|
| 70 | first checks for the existence of the directory arch/@sys/man prior |
---|
| 71 | to falling back on man itself. |
---|
| 72 | |
---|
| 73 | .SH CONVENIENCE SYMLINKS |
---|
| 74 | |
---|
| 75 | While the \fIadd\fR command deals for the user with finding the |
---|
| 76 | appropriate binary directory for their platform, some users sometimes |
---|
| 77 | do not use \fIadd\fR, instead typing explicit paths on their own. |
---|
| 78 | This could become tedious when they need to type "cd |
---|
| 79 | /mit/lockername/arch/pmax_ul4/bin." For the user's convenience then, |
---|
| 80 | we suggest that you make a link "bin -> arch/@sys/bin" and possibly |
---|
| 81 | others (for lib, etc.) as it makes sense. This is the \fIonly\fR case |
---|
| 82 | where we suggest using the explicit string "@sys." See the end of the |
---|
| 83 | section \fIUSER SUPPORT\fR, below, for the reasons. |
---|
| 84 | |
---|
| 85 | .SH BACKWARDS COMPATIBILITY AND BINARY LAYOUT |
---|
| 86 | |
---|
| 87 | The previous file layout conventions included only standards for |
---|
| 88 | binary and manual directories, and no suggestions for hierarchies to |
---|
| 89 | avoid clutter or other general hints. The main convention was that the |
---|
| 90 | output from \fImachtype\fR(1) be used to generate a binary directory |
---|
| 91 | for a given platform, e.g. `machtype`bin (decmipsbin, sun4bin, etc.). |
---|
| 92 | Because of the inflexibility of the shell \fIbindir\fR variable, we |
---|
| 93 | cannot simply tell everyone to begin using arch/@sys/bin for their |
---|
| 94 | binary directories. Old lockers may still be using `machtype`bin and |
---|
| 95 | not the new convention, and there is no practical way to update the |
---|
| 96 | entire world simultaneously. Therefore, lockers should contain |
---|
| 97 | structures such as |
---|
| 98 | |
---|
| 99 | /mit/locker/ |
---|
| 100 | arch/pmax_ul4/bin |
---|
| 101 | decmipsbin -> arch/pmax_ul4/bin |
---|
| 102 | |
---|
| 103 | That is, there should be compatibility symlinks provided from the old |
---|
| 104 | convention to the new convention, for such platforms as were supported |
---|
| 105 | under the old convention. Those platforms are vax, rt, decmips, sun4, |
---|
| 106 | and rsaix. New platforms, such as SGI, need not provide these symlinks |
---|
| 107 | as they don't have an old bindir value to worry about. |
---|
| 108 | |
---|
| 109 | .SH USER SUPPORT |
---|
| 110 | |
---|
| 111 | There are four forms of support provided to the user for handling |
---|
| 112 | locker conventions: the \fIadd\fR command, the \fIathdir\fR command, |
---|
| 113 | the \fIbindir\fR C shell variable, and the \fIATHENA_SYS\fR |
---|
| 114 | environment variable. |
---|
| 115 | |
---|
| 116 | The \fIadd\fR command (see \fIadd\fR(1) for details on use), for |
---|
| 117 | binary directories, initially checks for the existence of the new |
---|
| 118 | style binary directory. If it finds it, it adds that to the user's |
---|
| 119 | search path. If not, it falls back to the old \fImachtype\fR based |
---|
| 120 | convention. Similiarly, in order to more easily support machine |
---|
| 121 | dependent manual pages, it checks for an arch/@sys/man directory |
---|
| 122 | before falling back to the traditional man directory. |
---|
| 123 | |
---|
| 124 | The \fIathdir\fR command is in some ways a generalization of the |
---|
| 125 | \fIadd\fR command. The most important functionality it provides is as |
---|
| 126 | a replacement for the use of the /mit/locker/`machtype`bin string. |
---|
| 127 | `athdir /mit/locker` should now be used instead, and will work |
---|
| 128 | correctly whether old or new directory conventions are in use in |
---|
| 129 | that locker. \fIathdir\fR is also potentially useful for finding |
---|
| 130 | library or include directories from inside of makefiles. See |
---|
| 131 | \fIathdir\fR(1) for details. |
---|
| 132 | |
---|
| 133 | The \fIbindir\fR variable, on older platforms, is set to the value |
---|
| 134 | `machtype`bin. On newer platforms, it is set to arch/@sys/bin. Note |
---|
| 135 | that it is not set literally to arch/@sys/bin, but to arch/(the value |
---|
| 136 | of @sys)/bin; the literal string @sys should never be used except in |
---|
| 137 | convenience symlinks. |
---|
| 138 | |
---|
| 139 | The \fIATHENA_SYS\fR environment variable is used lieu of the AFS |
---|
| 140 | string @sys. In all cases, it should be equal to what @sys resolves to |
---|
| 141 | for any particular platform. So in shell scripts, makefiles, etc., one |
---|
| 142 | should never attempt to find one's libraries with a string such as |
---|
| 143 | "arch/@sys/lib" but rather "arch/$ATHENA_SYS/lib." It is usually |
---|
| 144 | preferable to use \fIathdir\fR, however. |
---|
| 145 | |
---|
| 146 | \fIATHENA_SYS\fR is derived in the global cshrc from the output of |
---|
| 147 | ``machtype -S''. |
---|
| 148 | |
---|
| 149 | Avoidance of the literal string ``@sys'' is done in order to keep the |
---|
| 150 | locker conventions filesystem independent. If for some reason a locker |
---|
| 151 | is copied to (or is maintained in) NFS space, it will still work |
---|
| 152 | correctly. If AFS is translated through some other medium which does |
---|
| 153 | not magically know how to cope with the "@sys" string properly, it |
---|
| 154 | will also still work correctly. If Athena migrates to another kind of |
---|
| 155 | filesystem that does not support the use of "@sys," nothing will need |
---|
| 156 | to be done to update lockers and everything will still work. |
---|
| 157 | |
---|
[11272] | 158 | .SH OPERATING SYSTEM COMPATIBILITY SUPPORT |
---|
| 159 | |
---|
| 160 | As mentioned above, a given operating system may have the ability to |
---|
| 161 | run binaries from various @sys values. For example, a sun4x_56 system |
---|
| 162 | can run binaries from sun4x_55 and sun4m_54. In part to ease the |
---|
| 163 | transition of machines to new operating systems, where ordinarily they |
---|
| 164 | would find no support initially for their @sys values in lockers, |
---|
| 165 | there is the environment variable \fIATHENA_SYS_COMPAT\fR. This |
---|
| 166 | variable is a colon separated list of fallback @sys values which are |
---|
| 167 | known to be generally compatible with the current system. So in the |
---|
| 168 | above example, this variable might be set to sun4x_55:sun4m_54 to |
---|
| 169 | enable lockers that have not yet been updated for the new operating |
---|
| 170 | system to continue to function. Both \fIadd\fR(1) and \fIathdir\fR(1) |
---|
| 171 | support this variable. |
---|
| 172 | |
---|
[7757] | 173 | .SH MAINTENANCE SUPPORT |
---|
| 174 | |
---|
| 175 | The \fIlockers\fR locker contains tools to aid in the maintenance of |
---|
| 176 | lockers. "add lockers; man lockertools" for more information. |
---|
| 177 | |
---|
[20646] | 178 | .SH SUGGESTIONS ON CONFIGURING SOFTWARE |
---|
[7757] | 179 | |
---|
[20646] | 180 | Many software packages use autoconf-generated configure scripts. |
---|
| 181 | These packages can generally be configured for a locker with a command |
---|
| 182 | like "./configure --prefix=/mit/lockername |
---|
| 183 | --exec-prefix=/mit/lockername/arch/$ATHENA_SYS". This command will |
---|
| 184 | configure the program to install its shared data files directly under |
---|
| 185 | /mit/lockername, and to install architecture-dependent materials under |
---|
| 186 | the appropriate arch directory. |
---|
[7757] | 187 | |
---|
[20646] | 188 | Alternatively, one could configure with simply "./configure |
---|
| 189 | --prefix=/mit/lockername/arch/$ATHENA_SYS" to install all materials |
---|
| 190 | under the appropriate arch directory. This option may waste space, |
---|
| 191 | but may also be more resistant to flaws in the package (e.g. the |
---|
| 192 | package might install architecture-dependent materials under the |
---|
| 193 | prefix instead of the exec-prefix, or an installation of a newer |
---|
| 194 | version of the package might break an older installation for an older |
---|
| 195 | platform by overwriting the shared data area). |
---|
| 196 | |
---|
| 197 | Some software in lockers is configured to use the full AFS path as a |
---|
| 198 | prefix instead of /mit/lockername. This practice is not recommended |
---|
| 199 | because it is incompatible with the local-lockers framework. It is |
---|
| 200 | also not recommended to use arch/@sys (instead of arch/$ATHENA_SYS) in |
---|
| 201 | the prefix, since that can fail when the software is used via |
---|
| 202 | \fIATHENA_SYS_COMPAT\fR. |
---|
| 203 | |
---|
[7757] | 204 | .SH SEE ALSO |
---|
| 205 | |
---|
| 206 | add(1), athdir(1), machtype(1), athena-ws discuss meeting, txns |
---|
[20646] | 207 | 1932-1961 more or less, /etc/athena/local-lockers.conf |
---|