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