Node:Building, Next:, Previous:Requirements, Up:Installation



Building SFS

Once you have setup your system as described in Requirements, you are ready to build SFS.

  1. Create a user, sfs-user, and group, sfs-group, for SFS on your system. By default, SFS expects the both sfs-user and sfs-group to be called sfs. For instance, you might add the following line to /etc/passwd:
    sfs:*:71:71:Self-certifying file system:/:/bin/true
    

    And the following line to /etc/group:

    sfs:*:71:
    

    Do not put any users in sfs-group, not even root. Any user in sfs-group will not be able to make regular use of the SFS file system. Moreover, having an unprivileged users in sfs-group causes a security hole.

  2. Unpack the SFS sources. For instance, run the commands:
    % gzip -dc sfs-0.6.tar.gz | tar xvf -
    % cd sfs-0.6
    

    If you determined that you need gmp see Requirements, you should unpack gmp into the top-level of the SFS source tree:

    % gzip -dc ../gmp-2.0.2.tar.gz | tar xvf -
    

  3. Set your CC and CXX environment variables to point to the C and C++ compilers you wish to use to compile SFS. Unless you are using OpenBSD-2.6, your operating system will not come with a recent enough version of gcc see Requirements.

  4. Configure the sources for your system with the command ./configure. You may additionally specify the following options:

    --with-sfsuser=sfs-user
    If the user you created for SFS is not called sfs. Do not use an existing account for sfs-user--even a trusted account--as processes running with that user ID will not be able to access SFS. [Note: If you later change your mind about user-name, you do not need to recompile SFS, sfs_config.]
    --with-sfsgroup=sfs-group
    If the user you created for SFS does not have the same name as sfs-user. [Note: If you later change your mind about user-group, you do not need to recompile SFS.]
    --with-gmp=gmp-path
    To specify where configure should look for gmp (for example, gmp-path might be /usr/local).
    --with-sfsdir=sfsdir
    To specify a location for SFS to put its working files. The default is /var/sfs. [You can change this later, sfs_config.]
    --with-etcdir=etcdir
    To specify where SFS should search for host-specific configuration files. The default is /etc/sfs.
    --datadir=datadir
    Where SFS places its data files. The default is /usr/local/share.

    configure accepts all the traditional GNU configuration options such as --prefix. It also has several options that are only for developers. Do not use the --enable-repo or --enable-shlib options (unless you are a gcc maintainer looking for some wicked test cases for your compiler).

  5. Build the sources by running make.
  6. Install the binaries by running make install. If you are short on disk space, you can alternatively install stripped binaries by running make install-strip.
  7. That's it. Fire up the client daemon by running sfscd.