clearaudit

Non-clearmake build and shell command auditing facility for dynamic views

APPLICABILITY


Product

Command Type

ClearCase


command


Platform

UNIX


Windows

SYNOPSIS

clearaudit [ [ -c ] shell_cmd ]

DESCRIPTION

NOTE: clearaudit is applicable to dynamic views only.

The clearaudit command runs an audited shell with the same view and working directory as the current process. MVFS files created within an audited shell (or any of its children) are derived objects (DOs). When it exits, an audited shell creates a configuration record (CR) and associates it with each of the newly created DOs.

The CR and DOs produced by clearaudit are similar to those created by clearmake. They can be listed, compared, and deleted with the same cleartool commands used for other DOs (see below). They can be shared with other views through explicit winkin commands, but they cannot be winked in by clearmake. They can be checked in as DO versions. For more information about configuration records, see Building Software.

clearaudit itself is not a shell. It starts an audit and then executes an underlying shell. clearaudit determines which shell to run as follows:

View Context

On UNIX systems, the process from which you invoke clearaudit must have a view context: set view or working directory view. In either case, the audited process is set to that view. An error occurs if the invoking process has no view context, or if its working directory view differs from its set view. (See the pwv reference page.)

On Windows systems as well, the process from which you invoke clearaudit must have a view context for the audited process. An error occurs if the invoking process has no view context.

Location of Temporary Build Files

clearaudit creates temporary build files in the directory specified by the CCASE_AUDIT_TMPDIR environment variable. If this EV is not set or is set to an empty value, clearaudit creates temporary files in the directory specified as follows:

All temporary files are deleted when clearaudit exits. If the value of CCASE_AUDIT_TMPDIR is a directory under a VOB-tag, clearaudit prints an error message and exits.

Auditing Any Process

clearaudit can be used to document the work performed by any process. For example, you can use clearaudit to audit the creation of a UNIX tar(1) file or a Windows backup operation, producing a configuration record that describes exactly which files and/or versions were archived.

Auditing a Non-ClearCase make

You can also use clearaudit to produce derived objects and configuration records for software builds performed with another make program, such as UNIX make(1) or Windows nmake. Follow these guidelines:

UNIX Systems Only-Auditing a Shell Script

A shell script that begins with the following line is executed in an audited shell:

#! /usr/atria/bin/clearaudit

Be sure that the process from which the script is invoked has CLEARAUDIT_SHELL set, as described above.

OPTIONS AND ARGUMENTS

-c

Most UNIX shells (including sh, csh, tcsh, and ksh) and some Windows shells (including cmd.exe), require the use of the -c option, which tells the shell what command to execute. This option must precede any shell_cmd arguments.
shell_cmd

One or more words, which are passed as arguments to $CLEARAUDIT_SHELL, $SHELL, or /bin/sh (UNIX); or to %CLEARAUDIT_SHELL%, %COMSPEC%, or cmd.exe (Windows).

EXAMPLES

SEE ALSO

catcr, clearmake, diffcr, lsdo, omake, pwv, rmdo, scrubber, setview, make(1), sh(1), tar(1), Building Software