Installation Instructions
-------------------------

Usually all you have to do is:

	perl Makefile.PL
	make
	make test
	make install
	make clean

If that fails, regard the following instructions step by step.

Options:

-> Support for Solaris VxFS should be added automatically if the module
   is installed. If not, #define or #undef SOLARIS_VXFS in config.h

-> On a Linux NFS server you may want to fix your rpc.rquotad
   See (2c) below for instructions.

-> If you want support for AFS, you need the arla package and the Kerberos
   libraries to make the appropriate AFS calls (tested with AFS from Transarc).
   See (2d) below.


1)  On Linux systems make sure you have configured your kernel with quota
    support. You also need the quota utilities and headers. E.g., with
    the SuSE Linux 6.0 distribution you'll find them in package ap::quota.
    If your distribution doesn't include the package you can get it from
    ftp://ftp.etter.ch/pub/linux/kernel/subsystems/quota/all.tar.gz
    (also available at other Linux mirrors). See also (2c) below.

2)  Generate the hints file.

 a) Should be done by Makefile.PL for all supported systems. If not, and
    there is a file below hints/ for your operating system (maybe for a
    previous release), just create a link named "config.h" to that file:
    ln -s hints/my-os.h config.h

 b) Else, use hints/none.h to create a config.h of your own. Check which
    #includes you need in the online manuals. Contact me before you invest
    a lot of time, it might already be done.

    Edit Makefile.PL to maybe add/delete some libraries. Usually you'll
    need only librpcsvc for the quota RPC mechanism. If you don't have
    this library or it lacks the quota routines, #define MY_XDR in
    config.h to include the routines provided with this module. If you
    don't have /usr/include/rpcsvc/rquota.h, include "include/rquota.h"
    instead. If you don't need RPC at all, just define NO_RPC.

 c) If you use Linux on a NFS server, you should keep
    #define LINUX_RQUOTAD_BUG as long as you don't have a correctly working
    rpc.rquotad. To achieve that, simply replace line 58 in rquota_server.c
    "*blksize = st.st_blksize;" with "*blksize = 1024;". Then recompile
    (you may need to add #include <asm/types.h> for __u32). While you're
    at it you may also want to fix another bug in rpc.rquotad (although
    in my module I have a workaround for it). After line 192 in
    function getquotainfo() add after the call to memcpy():
    {
      struct timeval tv;
      gettimeofday(&tv, NULL);
      if (result.getquota_rslt_u.gqr_rquota.rq_btimeleft > tv.tv_sec)
	result.getquota_rslt_u.gqr_rquota.rq_btimeleft -= tv.tv_sec;
      else
	result.getquota_rslt_u.gqr_rquota.rq_btimeleft = 0;
      if (result.getquota_rslt_u.gqr_rquota.rq_ftimeleft > tv.tv_sec)
	result.getquota_rslt_u.gqr_rquota.rq_ftimeleft -= tv.tv_sec;
      else
	result.getquota_rslt_u.gqr_rquota.rq_ftimeleft = 0;
    }

 d) If you want support for AFS, you first need to install the Arla
    package (for Linux be sure to install the static libs too). Then
    edit the hints file by inserting your paths to the Kerberos library
    and headers at the appropriate places. The Makefile.PL tries to detect
    automatically if AFS is preset on a system. If that fails, edit
    the Makefile.PL to always define $hasafs (and drop me a mail).

3)  Generate the Makefile: perl Makefile.PL

4)  Compile the module: make

5)  Run "make test" to check if the module routines do work correctly.
    (Since release 1.0 you can test the module without installing)

    The contrib directory contains some additional examples, donated by
    users. No guarantee from me that they do anything useful or don't
    format your hard drive.

6)  To install the module in your perl tree:  "make install"
    You may need to su root before this step.

7)  Before you start for another OS, type "make clean"

Please mail me any changes in the hints files or Makefile.PL you had to
apply to get the package to compile. Please remember to include in your
mail the name of used OS and version numbers of OS (uname -rs) and module.

Tom
---
tom.zoerner@informatik.uni-erlangen.de
