openafs/doc/xml/QuickStartUnix/a10401.html
Chas Williams 52557c982e xml-docbook-documentation-first-pass-20060915
needs more massaging to make it fit the tree, but, get it here first
2006-09-16 01:13:22 +00:00

997 lines
14 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML
><HEAD
><TITLE
>Appendix A. Building AFS from Source Code</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="AFS Quick Beginnings"
HREF="book1.html"><LINK
REL="PREVIOUS"
TITLE="Installing Additional Client Machines"
HREF="c8044.html"><LINK
REL="NEXT"
TITLE="Index"
HREF="i10650.html"></HEAD
><BODY
CLASS="appendix"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>AFS Quick Beginnings: Version 3.6</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="c8044.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="i10650.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="appendix"
><H1
><A
NAME="HDRWQ163"
></A
>Appendix A. Appendix A. Building AFS from Source Code</H1
><P
>This chapter describes how to build AFS from source code. </P
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="HDRWQ164"
>Loading the Source Files</A
></H1
><P
>Working on an AFS client machine, perform these steps to load the AFS source tree from the AFS Source Distribution.
<OL
TYPE="1"
><LI
><P
>Create and mount a volume for housing the AFS source tree. These instructions name the volume <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>src.afs</B
></SPAN
> and mount it at the <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs/</B
></SPAN
><VAR
CLASS="replaceable"
>cellname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs/src</B
></SPAN
> directory.</P
><P
>Setting the <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>-maxquota</B
></SPAN
> argument to <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>0</B
></SPAN
> (zero) sets an
unlimited quota on the volume, which enables you to copy all of the files into the volume without exceeding its quota. If
you wish, you can set the volume's quota to a finite value after you complete the copying operation. At that point, use
the <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>vos examine</B
></SPAN
> command to determine how much space the volume is occupying. Then issue
the <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>fs setquota</B
></SPAN
> command to set a quota that is slightly larger.</P
><PRE
CLASS="programlisting"
>&#13; # <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>vos create</B
></SPAN
> &#60;<VAR
CLASS="replaceable"
>machine name</VAR
>&#62; &#60;<VAR
CLASS="replaceable"
>partition name</VAR
>&#62; <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>src.afs -maxquota 0</B
></SPAN
>
# <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>cd /afs/.</B
></SPAN
><VAR
CLASS="replaceable"
>cellname</VAR
>
# <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>mkdir afs</B
></SPAN
>
# <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>fs mkmount afs/src src.afs</B
></SPAN
>
# <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>vos release root.cell</B
></SPAN
>
# <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>fs checkvolumes</B
></SPAN
>
</PRE
></LI
><LI
><P
>On the local <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/cdrom</B
></SPAN
> directory, mount the CD-ROM that contains the AFS source files.
For instructions on mounting CD-ROMs (either locally or remotely via NFS), consult the operating system documentation.
</P
></LI
><LI
><P
>Copy the source files from the CD-ROM into the newly created volume. <PRE
CLASS="programlisting"
>&#13; # <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>cd /cdrom/src</B
></SPAN
>
# <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>cp -rp * /afs/.</B
></SPAN
><VAR
CLASS="replaceable"
>cellname</VAR
>/<SPAN
CLASS="bold"
><B
CLASS="emphasis"
>afs/src</B
></SPAN
>
</PRE
></P
></LI
></OL
></P
></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="HDRWQ165"
>Compiling AFS Binaries Using the washtool Program</A
></H1
><P
>The AFS distribution includes the <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>washtool</B
></SPAN
> program for managing a hierarchy of software
development projects. The program builds project trees for program editing, compilation, and installation. <OL
TYPE="1"
><LI
><P
>Create a subdirectory under the <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs/.</B
></SPAN
><VAR
CLASS="replaceable"
>cellname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs</B
></SPAN
> directory for each system type for which you will build AFS binaries. Creating and mounting a
volume for each system type is recommended, but you can also simply use the <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>mkdir</B
></SPAN
>
command. If you create a new volume, grant it an unlimited quota to avoid running out of space during the build process.
<PRE
CLASS="programlisting"
>&#13; # <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>cd /afs/.</B
></SPAN
><VAR
CLASS="replaceable"
>cellname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs</B
></SPAN
>
</PRE
></P
><P
>If creating a new volume:</P
><PRE
CLASS="programlisting"
>&#13; # <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>vos create</B
></SPAN
> &#60;<VAR
CLASS="replaceable"
>machine name</VAR
>&#62; &#60;<VAR
CLASS="replaceable"
>partition name</VAR
>&#62; <VAR
CLASS="replaceable"
>sysname</VAR
> <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>-maxquota 0</B
></SPAN
>
# <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>fs mkmount</B
></SPAN
> <VAR
CLASS="replaceable"
>sysname</VAR
> <VAR
CLASS="replaceable"
>sysname</VAR
>
</PRE
><P
>If not creating a new volume:</P
><PRE
CLASS="programlisting"
>&#13; # <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>mkdir</B
></SPAN
> <VAR
CLASS="replaceable"
>sysname</VAR
>
</PRE
></LI
><LI
><P
>In the directory for each system type, create subdirectories called <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>dest</B
></SPAN
>, <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>dest/bin</B
></SPAN
>, and <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>obj</B
></SPAN
>. If you plan to use the
<SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>@sys</I
></SPAN
> variable in pathnames that refer to these directories, then you must use the conventional system
names listed in the <SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>IBM AFS Release Notes</I
></SPAN
>. <PRE
CLASS="programlisting"
>&#13; # <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>cd</B
></SPAN
> <VAR
CLASS="replaceable"
>sysname</VAR
>
# <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>mkdir dest</B
></SPAN
>
# <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>mkdir dest/bin</B
></SPAN
>
# <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>mkdir obj</B
></SPAN
>
</PRE
></P
></LI
><LI
><P
>Create the indicated directories and symbolic links in the <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs/.</B
></SPAN
><VAR
CLASS="replaceable"
>cellname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs</B
></SPAN
> directory.
<PRE
CLASS="programlisting"
>&#13; # <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>cd /afs/.</B
></SPAN
><VAR
CLASS="replaceable"
>cellname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs</B
></SPAN
>
# <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>ln -s @sys/dest dest</B
></SPAN
>
# <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>ln -s @sys/obj obj</B
></SPAN
>
# <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>ln -s . PARENT</B
></SPAN
>
# <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>ln -s src/Makefile Makefile</B
></SPAN
>
</PRE
></P
><P
>The following is an example directory listing for the <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs/.</B
></SPAN
><VAR
CLASS="replaceable"
>cellname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs</B
></SPAN
> directory after
completing the preceding steps. It includes two example system types.</P
><PRE
CLASS="programlisting"
>&#13; lrwxr-xr-x admin 12 Jun 18 11:26 Makefile-&#62;src/Makefile
lrwxr-xr-x admin 1 Jun 18 11:26 PARENT -&#62; .
lrwxr-xr-x admin 9 Jun 18 11:25 dest -&#62; @sys/dest
lrwxr-xr-x admin 8 Jun 18 11:25 obj -&#62; @sys/obj
drwxrwxrwx admin 4096 Jun 18 11:24 rcs
drwxrwxrwx admin 2048 Jun 18 11:27 rs_aix42
drwxrwxrwx admin 2048 Jun 18 11:10 src
drwxrwxrwx admin 2048 Jun 18 11:27 sun4x_56
</PRE
></LI
><LI
><P
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>(Optional)</B
></SPAN
> By default, the build procedure writes its results into a destination
directory for each system type called <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs/.</B
></SPAN
><VAR
CLASS="replaceable"
>cellname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs/</B
></SPAN
><VAR
CLASS="replaceable"
>sysname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/dest</B
></SPAN
>. To write the results
to a different destination directory, create a link from the <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>dest</B
></SPAN
> directory to it.
<PRE
CLASS="programlisting"
>&#13; # <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>cd /afs/.</B
></SPAN
><VAR
CLASS="replaceable"
>cellname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs/</B
></SPAN
><VAR
CLASS="replaceable"
>sysname</VAR
>
# <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>ln -s</B
></SPAN
> <VAR
CLASS="replaceable"
>full_path_of_alternate_directory</VAR
> <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>dest</B
></SPAN
>
</PRE
> </P
></LI
><LI
><P
>For each system type you plan to build, copy the binary for the <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>washtool</B
></SPAN
> program to
the directory specified in the AFS <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>Makefile</B
></SPAN
>, which is <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs/</B
></SPAN
><VAR
CLASS="replaceable"
>cellname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs/</B
></SPAN
><VAR
CLASS="replaceable"
>sysname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/dest/bin</B
></SPAN
>. If you prefer to
store the program in a different directory, you can use the WASHTOOL variable on the <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>make</B
></SPAN
>
command line as described in Step <A
HREF="a10401.html#LIWQ166"
>6</A
>.</P
><P
>If there is a volume that houses the AFS binaries for each system type (as recommended), the conventional location
for the <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>washtool</B
></SPAN
> binary is the <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs/</B
></SPAN
><VAR
CLASS="replaceable"
>cellname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/</B
></SPAN
><VAR
CLASS="replaceable"
>sysname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/usr/afsws/bin</B
></SPAN
> directory. Use
the following instruction to copy it.</P
><PRE
CLASS="programlisting"
>&#13; # <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>cd /afs/</B
></SPAN
><VAR
CLASS="replaceable"
>cellname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/</B
></SPAN
><VAR
CLASS="replaceable"
>sysname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/usr/afsws/bin</B
></SPAN
>
# <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>cp washtool</B
></SPAN
> <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs/.</B
></SPAN
><VAR
CLASS="replaceable"
>cellname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs/</B
></SPAN
><VAR
CLASS="replaceable"
>sysname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/dest/bin</B
></SPAN
>
</PRE
><P
>Otherwise, mount the (binary) AFS CD-ROM for this system type on the local <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/cdrom</B
></SPAN
>
directory, and copy the <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>washtool</B
></SPAN
> binary directly from it.</P
><PRE
CLASS="programlisting"
>&#13; # <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>cd /cdrom/</B
></SPAN
><VAR
CLASS="replaceable"
>sysname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/bin</B
></SPAN
>
# <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>cp washtool</B
></SPAN
> <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs/.</B
></SPAN
><VAR
CLASS="replaceable"
>cellname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs/</B
></SPAN
><VAR
CLASS="replaceable"
>sysname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/dest/bin</B
></SPAN
>
</PRE
></LI
><LI
><P
><A
NAME="LIWQ166"
></A
>Working in the <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs/.</B
></SPAN
><VAR
CLASS="replaceable"
>cellname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs</B
></SPAN
> directory on a
machine of the system type for which you are building AFS, issue the <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>make install</B
></SPAN
>
command. Set the SYS_NAME variable to the appropriate system type name.</P
><P
>If the <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>washtool</B
></SPAN
> binary is not in the conventional directory (<SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs/</B
></SPAN
><VAR
CLASS="replaceable"
>cellname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs/</B
></SPAN
><VAR
CLASS="replaceable"
>sysname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/dest/bin</B
></SPAN
>), set the
WASHTOOL variable to the alternate full pathname of the binary.</P
><PRE
CLASS="programlisting"
>&#13; # <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>cd /afs/.</B
></SPAN
><VAR
CLASS="replaceable"
>cellname</VAR
><SPAN
CLASS="bold"
><B
CLASS="emphasis"
>/afs</B
></SPAN
>
# <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>make SYS_NAME=</B
></SPAN
><VAR
CLASS="replaceable"
>sysname</VAR
> [<SPAN
CLASS="bold"
><B
CLASS="emphasis"
>WASHTOOL=</B
></SPAN
><VAR
CLASS="replaceable"
>alternate_washtool_directory</VAR
>] <SPAN
CLASS="bold"
><B
CLASS="emphasis"
>install</B
></SPAN
>
</PRE
></LI
></OL
></P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="c8044.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="book1.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="i10650.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Installing Additional Client Machines</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Index</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>