Update NEWS for OpenAFS 1.9.1
[openafs.git] / INSTALL
1 Copyright 2000, International Business Machines Corporation and others.
2 All Rights Reserved.
3
4 This software has been released under the terms of the IBM Public
5 License.  For details, see the LICENSE file in the top-level
6 directory or online at http://www.openafs.org/dl/license10.html
7
8 Short instructions for sites upgrading from a previous version of AFS:
9 % ./configure --enable-transarc-paths
10 % make
11 % make dest
12
13 will create a Transarc-style dest tree in ${SYS_NAME}/dest where
14 ${SYS_NAME} is the AFS sysname of the system you built for.
15 This assumes if you're building for Linux that your kernel source is
16 in /usr/src/linux.
17
18 Otherwise, please read on.
19
20 Building OpenAFS on UNIX and Linux
21 ----------------------------------
22
23 A  Configuring
24
25    Uncompress the source into a directory of your choice. A directory
26    in afs space is also valid. In the directory that you uncompressed the
27    source in, you will only have an src/ directory.
28
29    1. Pick a system to build for, and note its default AFS sys_name.
30       A directory will be automatically created for binaries to be written
31       into with this name when you build.
32
33       alpha_linux26
34       alpha_nbsd15, alpha_nbsd16
35       amd64_fbsd_80, amd64_fbsd_81, amd64_fbsd_82, amd64_fbsd_83,
36          amd64_fbsd_84, amd64_fbsd_90, amd64_fbsd_91, amd64_fbsd_92,
37          amd64_fbsd_93, amd64_fbsd_100, amd64_fbsd_101
38       amd64_linux26
39       amd64_nbsd20, amd64_nbsd30, amd64_nbsd40
40       arm_linux26, arm64_linux26
41       hp_ux11i, hp_ux110, hp_ux1123 (See notes below for information on
42          getting missing header)
43       hp_ux102 (Client port possible, but db servers and utilities work)
44       i386_fbsd_80, i386_fbsd_81, i386_fbsd_82, i386_fbsd_83,
45          i386_fbsd_84, i386_fbsd_90, i386_fbsd_91, i386_fbsd_92,
46          i386_fbsd_93, i386_fbsd_100, i386_fbsd_101
47       i386_linux26
48       i386_nbsd15, i386_nbsd16, i386_nbsd20, i386_nbsd21, i386_nbsd30,
49          i386_nbsd40
50       i386_obsd31, i386_obsd32, i386_obsd33, i386_obsd34, i386_obsd35,
51          i386_obsd36, i386_obsd37, i386_obsd38, i386_obsd39, i386_obsd40,
52          i386_obsd41
53       i386_umlinux26
54       ia64_hpux1122, ia64_hpux1123
55       ia64_linux26
56       ppc64_linux26
57       ppc_darwin_12, ppc_darwin_13, ppc_darwin_14, ppc_darwin_60,
58          ppc_darwin_70, ppc_darwin_80, ppc_darwin_90
59       ppc_linux26
60       ppc_nbsd16, ppc_nbsd20
61       rs_aix42, rs_aix51, rs_aix52, rs_aix53, rs_aix61
62       s390_linux26
63       s390x_linux26
64       sgi_62, sgi_63, sgi_64, sgi_65 (file server not tested)
65       sparc64_linux26
66       sun4x_58, sun4x_59, sun4x_510, sun4x_511
67          (logging UFS not supported for mixed-use partitions containing
68          client cache)
69       sunx86_58, sunx86_59, sunx86_510, sunx86_511
70          (logging UFS not supported for mixed-use partitions containing
71          client cache)
72       x86_darwin_80, x86_darwin90
73
74    2. Using configure in the top level directory, configure for your
75       AFS system type, providing the necessary flags:
76
77       % ./configure --with-afs-sysname=sun4x_58 --enable-transarc-paths
78
79       If you do not have the "configure" script, or if you modify the
80       source files, you can re-create it by running regen.sh.  You will
81       need autoconf to do this.
82
83       For some systems you need also provide the path in which your kernel
84       headers for your configured kernel can be found.  See the
85       system-specific Notes sections below for details.  If you want to
86       build only the user-space programs and servers and not the kernel
87       module, specify the --disable-kernel-module option on the
88       ./configure command line.
89
90       All binaries, except for the 'fileserver' and 'volserver'
91       executables and their 'da' variants, are stripped of their symbol
92       table information by default.  To enable a debugging build, specify
93       the --enable-debug option on the ./configure command line.  This
94       builds with debugging compiler options and disables stripping of
95       binaries.
96
97       You can also use different combinations of --enable-debug and
98       --enable (or --disable)-strip-binaries for finer control.  One can,
99       for example, compile binaries for debug and strip them anyway.
100       Alternatively, one can compile without debug and force the binaries
101       to not be stripped.  Note that these combinations are not
102       necessarily useful.
103
104       The binaries noted above, 'fileserver' and 'volserver' and their
105       'da' variants, will never be stripped, regardless of any options
106       given to configure.
107
108    There are two modes for directory path handling: "Transarc mode" and
109    "default mode":
110
111    - In Transarc mode, we retain compatibility with Transarc/IBM AFS tools
112      by putting client configuration files in /usr/vice/etc, and server
113      files in /usr/afs under the traditional directory layout.
114    - In default mode, files are located in standardized locations, usually
115      under $(prefix), which defaults to /usr/local.
116    - Client programs, libraries, and related files always go in standard
117      directories under $(prefix).  This rule covers things that would go
118      into $(bindir), $(includedir), $(libdir), $(mandir), and $(sbindir).
119    - Other files get located in the following places:
120
121     Directory     Transarc Mode              Default Mode
122     ============  =========================  ==============================
123     viceetcdir    /usr/vice/etc              $(sysconfdir)/openafs
124     afssrvdir     /usr/afs/bin (servers)     $(libexecdir)/openafs
125     afsconfdir    /usr/afs/etc               $(sysconfdir)/openafs/server
126     afslocaldir   /usr/afs/local             $(localstatedir)/openafs
127     afsdbdir      /usr/afs/db                $(localstatedir)/openafs/db
128     afslogdir     /usr/afs/logs              $(localstatedir)/openafs/logs
129     afsbosconfig  $(afslocaldir)/BosConfig   $(afsconfdir)/BosConfig
130     afsbosserver  $(afsbindir)/bosserver     $(sbindir)/bosserver
131
132    In default mode, you can change all of the variables named above that
133    do not start with "afs" by passing the flags with the same name to
134    configure.  For example, if you want to install the server binaries in
135    /usr/local/lib/openafs instead of /usr/local/libexec/openafs, pass the
136    --libexecdir=/usr/local/lib flag to configure.
137
138    For additional options, see section I below.
139
140 B  Building
141
142    1. Now, you can build OpenAFS.
143
144       % make
145
146    2. Install your build using either "make install" to install
147       into the current system (you will need to be root, and files
148       will be placed as appropriate for Transarc or standard paths),
149       "make install DESTDIR=/some/path" to install into an alternate
150       directory tree, or if you configured with --enable-transarc-paths
151       make dest to create a complete binary tree in the dest directory
152       under the directory named for the sys_name you built for,
153       e.g. sun4x_57/dest or i386_linux26/dest
154
155    3. As appropriate you can clean up or, if you're using Linux, build for
156       another kernel version.
157
158       To clean up:
159
160       % make clean
161
162 C  Problems
163
164    If you have a problem building this source, you may want to visit
165    http://www.openafs.org/ to see if any problems have been reported
166    or to find out how to get more help.
167
168    Mailing lists have been set up to help; More details can be found
169    on the openafs.org site.
170
171 D  Linux Notes
172
173    With current Linux versions, the /lib/modules/`uname -r`/source symlink
174    will be used to locate the kernel headers, but you will need to have
175    the headers and build system for your kernel installed in order to
176    build the kernel module.  These are usually found in a separate package
177    from the kernel, often called something like linux-headers-<version>.
178
179    For older Linux systems, you may also need to provide the path in which
180    your kernel headers for your configured kernel can be found. This
181    should be the path of the directory containing a child directory named
182    "include". So if your version file were
183    /usr/src/linux/include/linux/version.h you would run:
184
185    % ./configure --with-afs-sysname=i386_linux26 \
186        --with-linux-kernel-headers=/usr/src/linux
187
188    Currently you can build for only one Linux kernel at a time, and the
189    version is extracted from the kernel headers in the root you specify.
190
191    To build for another Linux kernel version, determine the sysname for
192    the system type as defined in step A1 for the other kernel version and
193    then run:
194
195       % ./configure --with-afs-sysname=<sysname> \
196           --with-linux-kernel-headers=/usr/src/linux-3.19-i686
197       % make
198
199    Your build tree will now include an additional kernel module for your
200    additional kernel headers. Be aware that if the kernel version string
201    which UTS_RELEASE is defined to in include/linux/version.h matches the
202    last kernel you built for, the previous kernel module will be
203    overwritten.
204
205    The minimum supported Linux kernel is 2.6.18.
206
207 E  HP-UX 11.0 Notes
208
209    HP-UX 11.0 requires a header called vfs_vm.h which HP has provided on
210    their web site.  Go to http://www.hp.com/dspp, choose Software
211    downloads from the side menu, and select Software: HP operating systems
212    and then Operating systems: HP-UX from the select boxes.  The last
213    select box will have an option for downloading vfs_vm.h.
214
215 F  OpenBSD Notes
216
217    If you need to run regen.sh to make the configure script, you should
218    set the environment variable AUTOCONF_VERSION to the installed autoconf
219    version, e.g. 'setenv AUTOCONF_VERSION 2.64' (see 'J' below).
220
221    You need kernel source installed to build OpenAFS.  Use the
222    --with-bsd-kernel-headers= configure option if your kernel source is
223    not in /usr/src/sys.
224
225    src/packaging/OpenBSD/buildpkg.sh will make a tar file for installing
226    the client.  There is no server package, but I am told that "make
227    install" will put server binaries in /usr/afs.
228
229    Your kernel may panic when you try to shutdown after running the
230    OpenAFS client.  To prevent this, change the "dangling vnode" panic in
231    sys/kern/vfs_syscalls.c to a printf and build a new kernel.
232
233    You can't run arla and OpenAFS at the same time.
234
235 G  FreeBSD Notes
236
237    The FreeBSD client supports FreeBSD 10.x and later.  Only the amd64
238    and i386 architectures are supported, but it should not be hard to
239    port to other processors if they are already supported under another
240    operating system.
241
242    You need kernel source installed to build OpenAFS.  Use the
243    --with-bsd-kernel-headers= configure option if your kernel source is
244    not in /usr/src/sys.
245
246    You also need access to your kernel build directory for the opt_global.h
247    include file.  Use the --with-bsd-kernel-build= configure option if your
248    kernel build is not GENERIC in the standard place. If
249    /usr/src/sys/${CPUARCH}/compile/GENERIC does not point to
250    /usr/obj/usr/src/sys/GENERIC you may need to resolve that and retry the
251    build.
252
253 H  AIX notes
254
255    Make sure that your default build environment is 32bit, ie.
256    the OBJECT_MODE environment variable is either unset or set to "32".
257
258    Verify this before doing configure and make. For example, assuming
259    ksh/bash:
260
261    % export OBJECT_MODE=32
262
263    To build aklog (in order to be able to get tokens from your Kerberos v5
264    ticket), you will need Kerberos libraries.  On AIX 6.1, the IBM
265    Kerberos v5 libraries are in the packages krb5.client.rte and
266    krb5.toolkit.adt on the Expansion Pack.
267
268 I  Other configure options
269
270    AFS has a ton of other optional features that must be enabled using
271    configure options.  Here is a summary:
272
273    --enable-bigendian
274    --enable-littleendian
275        These configure options are normally not required and should not be
276        given.  They're only needed if the OpenAFS build system cannot
277        determine the endianness of your system, in which case configure
278        will abort and say to use one of these options.
279
280    --enable-bitmap-later
281        Speeds the startup of the fileserver by deferring reading volume
282        bitmaps until necessary.  Demand attach is a better solution to the
283        same problem.
284
285    --enable-checking
286        Enable compiler warnings when building with GCC and turn compiler
287        warnings into errors so that new warnings will cause compilation
288        failures.  If you are developing patches to contribute to OpenAFS,
289        please build OpenAFS with this flag enabled.  Warning-free code is
290        a requirement for all new submissions to OpenAFS.
291
292    --enable-debug
293    --enable-debug-kernel
294    --enable-debug-lwp
295    --enable-debug-pam
296        Compile the userspace code (for --enable-debug) or the code named
297        by the option with debugging information.  If --enable-debug is
298        given, also do not strip binaries when installing them.
299
300    --enable-linux-d_splice_alias-extra-iput
301        Work around a kernel memory leak present in a few Linux kernels.
302        The only affected mainline kernels are 3.17 to 3.17.2, but this
303        switch will also be required should a distribution backport commit
304        908790fa3b779d37365e6b28e3aa0f6e833020c3 or commit
305        95ad5c291313b66a98a44dc92b57e0b37c1dd589 but not the fix in commit
306        51486b900ee92856b977eacfc5bfbe6565028070 from the linux-stable repo
307        (git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git) or
308        the corresponding changes on other branches. This is impossible to
309        detect automatically. Without this switch, the openafs module will
310        build and work even with affected kernels. But it will leak kernel
311        memory, leading to performance degradation and eventually system
312        failure due to memory exhaustion.
313
314    --enable-linux-syscall-probing
315        OpenAFS now uses keyrings to manage PAGs by default on Linux, which
316        does not require hooking into the system call table.  On older
317        versions of Linux without keyring support, OpenAFS uses groups to
318        manage PAGs and probes for the system call table to hook into it to
319        preserve that group information.  Normally, which method to use is
320        detected automatically, and if keyring support is present, support
321        for system call table probing is not compiled in.  Use this
322        configure option to force inclusion of the system call table
323        probing code even if the kernel appears to support keyrings.
324
325    --enable-namei-fileserver
326        Forces the namei fileserver on platforms (like Solaris 8 and 9)
327        where the inode fileserver is the default.
328
329    --enable-redhat-buildsys
330        Enable compilation of the kernel module for the Red Hat build
331        system kernel.  Use this configure flag when building kernel
332        modules for Red Hat Linux systems.
333
334    --enable-reduced-depends
335        Try to minimize the shared library dependencies encoded in the
336        binaries.  This omits from the link line all the libraries included
337        solely because the Kerberos libraries depend on them and instead
338        links the programs only against libraries whose APIs are called
339        directly.  This will only work with shared Kerberos libraries and
340        will only work on platforms where shared libraries properly encode
341        their own dependencies (such as Linux).  It is intended primarily
342        for building packages for Linux distributions to avoid encoding
343        unnecessary shared library dependencies that make shared library
344        migrations more difficult.  If none of the above made any sense to
345        you, don't bother with this flag.
346
347    --enable-supergroups
348        Enables support of nested groups in the ptserver.  WARNING: Once
349        you make use of this option by nesting one group inside another,
350        the resulting PTS database cannot be correctly and safely used by a
351        ptserver built without this option.  If some of your ptservers were
352        built with this option and some without this option, you will
353        probably corrupt your PTS database.
354
355    --enable-tivoli-tsm
356        Build with the Tivoli TSM API libraries for butc support of the
357        Tivoli backup system.
358
359    --enable-transarc-paths
360        As discussed in A2 above, build for the traditional paths used by
361        the Transarc and IBM AFS distributions instead of the more typical
362        open source /usr/local paths.  Passing this option to configure and
363        then running make dest will generate, in the dest directory, the
364        set of files and directory layout matching a Transarc or IBM AFS
365        tape distribution.
366
367    --enable-warnings
368        Enable compilation warnings when built with GCC.  This is similar
369        to --enable-checking, but new warnings will only be displayed, not
370        cause a build failure.
371
372    It's also possible to disable some standard features.  None of these
373    options are normally needed, but they may be useful in unusual
374    circumstances:
375
376    --disable-kernel-module
377        Even if kernel headers are found, do not attempt to build the
378        kernel module.  On Linux, if you provide this flag, you'll also
379        need to provide --with-afs-sysname, since OpenAFS cannot determine
380        the correct sysname automatically without the kernel headers.
381
382    --disable-optimize
383    --disable-optimize-kernel
384    --disable-optimize-lwp
385    --disable-optimize-pam
386        Disable optimization for the given portion of the OpenAFS code.
387        Usually used either for debugging to avoid code optimization making
388        it harder to use a debugger, or to work around bugs in the compiler
389        optimizers or in the OpenAFS code.
390
391    --disable-pam
392        Do not build the AFS PAM modules.  Normally building them is
393        harmless, but the PAM modules that come with OpenAFS are deprecated
394        and should not be used unless you're still using the OpenAFS
395        kaserver (which is itself deprecated and should not be used).
396
397    --disable-pthreaded-ubik
398        Disable the threaded version of Ubik and install the LWP
399        versions of Ubik servers.
400
401    --disable-strip-binaries
402        Disable stripping of binaries on installation.  You probably want
403        to use --enable-debug instead of this flag to also inclusion of
404        debugging information.
405
406    --disable-unix-sockets
407        Disable use of UNIX domain sockets for fssync.  A TCP connection to
408        localhost will be used instead.
409
410    You may need to pass one or more of the following options to specify
411    paths and locations of files needed by the OpenAFS build process or
412    additional information required by the build process:
413
414    --with-afs-sysname=SYSNAME
415        Specifies the AFS sysname of the target system is SYSNAME.
416        Normally this is determined automatically from the build
417        architecture plus additional information (such as, on Linux, from
418        the kernel headers).  The SYSNAME should be one of the options
419        listed in A2.
420
421    --with-gssapi=DIR
422    --with-gssapi-include=DIR
423    --with-gssapi-lib=DIR
424    --with-krb5[=DIR]
425    --with-krb5-include=DIR
426    --with-krb5-lib=DIR
427        Normally, OpenAFS will automatically build with Kerberos support if
428        Kerberos is found during the build.  If your Kerberos libraries are
429        in an unusual location, however, you may need to pass one or more
430        of these flags.  --with-krb5 forces building with Kerberos support
431        if given and will cause configure to fail if Kerberos is not found.
432        You may optionally specify the root path to your Kerberos
433        installation as an argument to --with-krb5.
434
435        If you have a krb5-config script, it's used to find the flags to
436        build with Kerberos.  If you have no krb5-config script, you can
437        specify the location to the include files with --with-krb5-include
438        and the libraries with --with-krb5-lib.  You may need to do this if
439        Autoconf can't figure out whether to use lib, lib32, or lib64 on
440        your platform.
441
442        --with-gssapi is similar, except for the GSS-API libraries instead
443        of the Kerberos libraries.  If you have to manually set the
444        location of the Kerberos libraries, you may need to do the same
445        thing for the GSS-API libraries.
446
447    --with-libintl=DIR
448    --with-libintl-include=DIR
449    --with-libintl-lib=DIR
450        Specifies the install location of the libintl library, used for
451        internationalization, or separately specifies the location of the
452        header files and libraries.  By default, the default system library
453        paths will be searched.  This library is not required on many
454        platforms.
455
456    --with-roken=PATH
457    --with-roken=internal
458        Specifies the install location of the libroken library.  Specify
459        "internal" to use the embedded libroken library that comes with
460        OpenAFS (the default).  This option is primarily useful for
461        building against a system libroken library if you have one.
462
463    --with-linux-kernel-build=PATH
464    --with-linux-kernel-headers=PATH
465    --with-bsd-kernel-build=PATH
466    --with-bsd-kernel-headers=PATH
467        Specifies the path to the kernel headers and build system.  See the
468        information above for Linux and *BSD systems.
469
470    --with-linux-kernel-packaging
471        Tells the OpenAFS kernel module build system to use conventions
472        appropriate for building modules to include in Linux kernel module
473        packages.  Primarily, this renames the kernel module to openafs.ko
474        rather than libafs-<VERSION>.ko, which is easier to handle in Linux
475        distribution init scripts.
476
477    --with-docbook2pdf=PROGRAM
478        Specifies the program used to convert the DocBook manuals to PDF.
479        Supported choices are fop, dblatex, and docbook2pdf.  By default,
480        the user's path is searched for those programs in that order, and
481        the first one found is used.
482
483    --with-docbook-stylesheets=PATH
484        The location of the DocBook style sheets, used to convert the
485        DocBook manuals to other formats.  By default, a set of likely
486        paths are searched.
487
488    --with-html-xsl=PATH
489        Specifies the XSLT style sheet to convert DocBook manuals into
490        HTML.  The default is html/chunk.xsl.  You may wish to use
491        html/docbook.xsml instead.
492
493    --with-xslt-processor=PROGRAM
494        Specifies the XSLT processor to use to convert the DocBook manuals
495        into HTML.  Supported choices are libxslt, saxon, xalan-j, and
496        xsltproc.  By default, the user's path is searched for those
497        programs in that order, and the first one found is used.
498
499    --with-ctf-tools[=DIR]
500        Location of ctfconvert and ctfmerge. Defaults to detect. These
501        tools create a reduced form of debug information that describes
502        types and function prototypes. This option is only relevant to
503        platforms that provide CTF tools and, at the moment, it is only
504        functional on Solaris (onbld package must be installed).
505
506    There are also some environment variables that you can set to control
507    aspects of the build.  They can be set either on the configure command
508    line (preferred) or in the environment.
509
510    CC
511        The C compiler to use.  Be aware that this is overridden on some
512        architectures that require a specific compiler be used to build the
513        kernel module.  If gcc is used, version 3 or later is required.
514        If clang is used, version 3 or later is required.  (Additional
515        restrictions apply when --enable-checking is used.)
516
517    CFLAGS
518        Additional flags to pass to the C compiler.
519
520    CPP
521        The C preprocessor to use.  Defaults to cpp if found, otherwise
522        $CC -E.
523
524    CPPFLAGS
525        Additional flags to pass to the C preprocessor or compiler.  This
526        is where to put -I options to add paths to the include file search.
527
528    FUSE_CFLAGS
529        Compiler flags required for building applications that use FUSE.
530
531    FUSE_LIBS
532        Libraries required for linking applications that use FUSE.
533
534    KRB5_CONFIG
535        To specify a particular krb5-config script to use, either set the
536        KRB5_CONFIG environment variable or pass it to configure like:
537
538            ./configure KRB5_CONFIG=/path/to/krb5-config
539
540        To not use krb5-config and force library probing even if there is a
541        krb5-config script on your path, set KRB5_CONFIG to a nonexistent
542        path:
543
544            ./configure KRB5_CONFIG=/nonexistent
545
546    LDFLAGS
547        Additional flags to pass to the linker.  This is where to put -L
548        options to add paths to the library search.
549
550    LIBS
551        Additional libraries to link all userspace programs with.
552
553    PKG_CONFIG
554        The path to the pkg-config utility.  Currently, this is only used
555        to locate the flags for building the FUSE version of afsd.
556
557    YACC
558        The yacc implementation to use.  Defaults to bison, byacc, or yacc,
559        whichever is found first.
560
561    YFLAGS
562        Additional flags to pass to yacc.
563
564 J  Creating 'configure'
565
566    Normally you can use the configure script provided with the OpenAFS release
567    tar file, but if you are patching the autoconf logic or building directly
568    from source pulled from the git repository you may need to (re-)generate
569    the configure script.
570
571    To create the configure script autoconf-2.64 or later and libtool-1.9b or
572    later are needed.
573
574    Running the script 'regen.sh' creates the configure script.  In addition
575    to creating the configure script, regen.sh will also, by default, build
576    the man pages, which requires the pod2man utility. Use 'regen.sh -q' to
577    skip building the man pages.
578
579    It is possible to create the configure script on one system to be used on
580    another. Ensure that the files created by 'regen.sh' are copied to the
581    target system.