bart_rules

Description

The bart_rules file is a text file that is used by the
bart(1M) command. The rules file determines which files to validate and which
file attributes of those files to ignore.

Some lines are ignored by the manifest comparison tool. Ignored lines include
blank lines, lines that consist only of white space, and comments that
begin with #.

The rules file supports three directives: CHECK, IGNORE, and a subtree directive,
which is an absolute path name and optional pattern matching modifiers. Each
CHECK, IGNORE, and subtree directive must be on a separate line. Bart
supports continuation of long lines using a backslash (\). The rules file
uses the directives to create logical blocks.

Rule Blocks

Rule blocks are composed of statements that are created by using directives
and arguments.

There are three types of blocks:

Global Block

The first block in the file. The block is considered ``global'' if it specifies CHECK and IGNORE statements, but no previous subtree statement. A global block pertains to all subsequent blocks.

Local block

A block that specifies CHECK and IGNORE statements as well as a subtree directive. The rules in this block pertain to files and directories found in the specified subtree.

Heir block

A block that contains a null CHECK statement, no arguments. This block inherits the global CHECK statements and IGNORE statements.

The order in which CHECK and IGNORE statements appear in blocks is
important. The bart command processes CHECK and IGNORE statements in the order
in which they are read, with later statements overriding earlier statements.

Subtree specifications must appear one per line. Each specification must begin with
an absolute path name. Optionally, each specification can be followed by pattern-matching
arguments.

When a file system being tracked belongs to more than one subtree
directive, bart performs the following resolution steps:

Applies the CHECK and IGNORE statements set in the global block. Note that all CHECK and IGNORE statements are processed in order.

Finds the last subtree directive that matches the file.

Processes the CHECK and IGNORE statements that belong to the last matching subtree directive. These statements are processed in the order in which they are read, overriding global settings.

Pattern Matching Statements

There are two types of pattern matching statements

AND

For a given subtree directive, all pattern matching statements are logically ANDed with the subtree. Patterns have the following syntax:

Wildcards are permitted for both the subtree and pattern matching statements.

The exclamation point (!) character represents logical NOT.

A pattern that terminates with a slash is a subtree. The absence of a slash indicates that the pattern is not a directory. The subtree itself does not require an end slash.

For example, the following subtree example includes the contents of /home/nickiso/src except for object files, core files, and all of the SCCS subtrees. Note that directory names that terminate with .o and directories named core are not excluded because the patterns specified do not terminate with /.