Normalize temporary directory path

The archive and temporary file handling classes expect to operate
on absolute paths. If a user specifies a relative path via the
command line --tmp-dir switch it must be normalized before being
passed to these classes to provide correct behaviour. Failing to
do this causes a variety of errors: the final archive cannot be
created since the path is constructed incorrectly and temporary
files are not cleaned up since they are not at the "expected"
location.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Restore --build command line option

Releases of sos prior to 3.0 included the '--build' option to
disable creation of a compressed archive and to leave the
temporary build tree in place. This was removed with the
reorganisation of the archive classes to support in-line
archiving. Since all supported policies are now using an archive
that derives from FileCacheArchive (commit 0178d5f) the option
can be re-introduced.

Archive classes that do not accumulate files in a temporary
directory will return the path to the in-progress archive file.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Fix foreman and katello for sos-3.x

The foreman and katello plug-ins committed in 4650d3f use the
sos-2.2 APIs and class names. This breaks sos since the plug-ins
will not load under 3.0.

Fix up the modules to use the new names and API conventions and
ensure that they load correctly.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Fix traceback when sar module is force-enabled

Forward port of the following sos-2.2 fix:

commit d4e3bcc3ed247d8d9a1228c3661b6456f534daf4
Author: Bryn M. Reeves <bmr@redhat.com>
Date:   Mon Aug 12 18:42:48 2013 +0100

    Fix traceback when sar module is force-enabled

    The sar plug-in assumes that when it runs the /var/lib/sa
    directory and binaries exist (they are part of checkenabled() for
    this module).

    This leads to a traceback when the plug-in lists a non-existent
    directory on hosts where sar is not installed but '-o sar' is
    specified on the command line.

    Catch the exception and exit gracefully.

    (Edited by bmr to improve error message logged).

    Signed-off-by: David Kutálek <dkutalek@redhat.com>
    Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Fix regex substitution in openhpi plug-in

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Add simple nfs plug-in

There has been an nfsserver plug-in for some time however no
corresponding client-side data is collected.

This was added to sos-2.2 earlier this year. This commit is a
forward port of those changes:

    commit 71066b4a7d4fd97692b50bf231ad6810df5ec3d0
    Author: root <root@rhel6-vm2.(none)>
    Date:   Wed Jul 10 17:11:52 2013 +0100

        Collect additional nfs-client relevant files

        Additional NFS client-side data collection:

            "/etc/nfsmount.conf",
            "/proc/fs/nfsfs/servers",
            "/proc/fs/nfsfs/volumes"

        Signed-off-by: Bryn M. Reeves <bmr@redhat.com>

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Fix typo in yum add_forbidden_paths()

The PKI files that should be omitted are in /etc/pki/entitlement,
not /etc/pki/entitlements as the plug-in currently uses.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>