================================
 FilePath Building Instructions
================================


Prerequisites
-------------

In order to build filepath, you need to install:

1. Kernel packages based on the kernel level currently in use.
   RHEL: kernel-headers
         kernel-devel
         Note: RHEL 8 requires elfutils-libelf and elfutils-libelf-devel packages to be installed separately.
   SLES: kernel-macros (noarch)
         kernel-devel (noarch) 
         kernel-source (noarch)
		 kernel-default-devel (arch dependent)
		 
   Ubuntu: linux-headers

2. GCC compiler (gcc)

3. Packaging utility

3a. For RHEL or SLES: RPM building utility (rpmbuild)
    On RHEL, it could be packaged in 'rpm-build'
    On SLES, it is part of the 'rpm' package. Depnding on how
	         the system is setup you may need the rpm-build package.

3b. For Ubuntu: dpkg-deb, which is part of standard package 'dpkg'

4. GNU make (make)


Building the package
--------------------

1. Extract the code, e.g.:
   $ tar xzf jbb_gpl.tar.gz

2. Go to jbb_gpl directory:
   $ cd jbb_gpl

3. Build the package

3a. RHEL or SLES

    Run make with RELNUM parameter to compile the code and build filepath RPM
    for your client version, for example:
    for RHEL:
    $ make RELNUM=8.1.7.0
    for SLES
    $ make RELNUM=8.1.7.0 SUSE=1
   
    Notes:
      1. Filepath version (RELNUM) must match your TSM client version.
      2. The make process requires root permissions to generate RPM. It
         utilizes 'sudo' command for that purpose. If you build as non-root,
         you may be prompted for your password. You must be in the sudoers
         list.
   
    If there were no errors during build, the RPM is generated and placed in the
    current directory. You can then install the filepath and JBB packages using the 
	'rpm' command, e.g.:
    $ rpm -i TIVsm-filepath-8.1.7-0.x86_64.rpm TIVsm-JBB.x86_64.rpm

3b. Ubuntu

    Run make with RELNUM parameter and deb target to compile the code and build 
    filepath deb package for your client version, for example:
    $ make RELNUM=8.1.7-0 deb

    Note: filepath version (RELNUM) must match your TSM client version.
   
    If there were no errors during build, the deb package is generated and placed in
    the current directory. You can then install the filepath and JBB packages using the 
	'dpkg' command, e.g.:
    $ dpkg -i tivsm-filepath-8.1.7-0.deb tivsm-jbb.amd64.deb

    	

Using the package on multiple systems
-------------------------------------

If you have multiple machines with identical kernel levels, you can reuse the
package you've just built without building it on each and every system.
Simply transfer the package file from your build machine and install it on those
systems.


Filepath module and SELinux
---------------------------

SELinux will not allow the Filepath module to be installed because it is not 
distributed with the running kernel.  Do the following to add an exception to 
allow Filepath to be installed:
   ausearch -c 'insmod' --raw | audit2allow -M filepath
   semodule -i filepath.pp

Then run:
   /etc/init.d/filepath start   


Source code modifications
-------------------------

IBM supports user-compiled filepath module as long as no code modifications
have been done by the user.


Other Notes
-----------

To use JBB you must also install the TIVsm-JBB package whhich is included with 
the BA Client install packages.  The start order for running JBB is to install and
start the filepath driver first and then install, configure and start the tsmjbbd. 
The tsmjbbd is configured using the tsmjbbd.ini file located in the Spectrum 
Protect install directory.
