The File System Integrity Check (FSIC) package is a combination of files, programs and a qsg script (see fsic(x-qsg)) that aid in the maintenance of databases within the fsic directory of source, object, and installation trees. |
FSIC is a package, provided as part of the QEF product,
that is used to check the integrity of source, object, and
destination trees.
When qef is run in the FSIC directory in a source tree, it compares the list of existing files against a list of files that are supposed to exist and reports any discrepancies such as missing files, new files, or files without a version system administration file. Similar types of discrepancies are also reported when qef is run in the FSIC directory of an object tree. In this case, the list of existing files and directories for both the object and destination trees are checked against a database that defines the set of files that should exist and the exceptions or extensions to that set for specific configurations. Typically the source tree check is run manually by the project administrator on a regular basis to ensure the completeness and correctness of the source file system. The object tree check should be run automatically as part of the build process and whenever the database is modified. Given the volatility and size of modern software projects, we believe the application of the FSIC package is essential to preserve and protect the health of a software project. This chapter serves to introduce the FSIC system. The definitive documentation is contained in the x_db database x-qfsic, as will be described later, and the manual sections fsic(1), sfsic(1), and bfsic(1). |
|||
FSIC Tools | The following are the tools and files of the FSIC package: | ||
dirsetup fsic | The dirsetup fsic dir-set contains a prototype of a FSIC directory with the required files. It may be used to set up the initial database. | ||
qsg fsic script | This script is all that's needed in the FSIC directory's qeffile. Supported targets are listed in a later section. | ||
bfsic | bfsic is used to compare the lists of existing installed and object file systems against the FSIC database inst.fl, objs.fl, deviates.fl, except/<sysnm>.fl, and<qtree>/lib/bfsic.cf. A list of discrepancies is created in ,p.errors and recognized temporary files are listed in ,i.tmps and ,o.tmps. bfsic is also used to correct the database. | ||
sfsic | sfsic is used to compare the lists of existing source and version system files against the FSIC files.fl list. Typically sfsic is used to modify the database or to create lists of discrepancies, temporary files, and files being edited. | ||
x-qfsic |
This x_db database describes the tools, files, databases,
error messages, and procedures of the FSIC package.
The first (the default) item lists the major items and sections
of the database, as in:
% x-qfsic x-qfsic : file system integrity package eXplanatory D.B. fsic-intro : Introduction to the FSIC package Src : procedure to check the source tree Post : procedure to check the object and installed trees Setup : procedure to set up Post files fsic-programs : the supporting FSIC programs and files fsic-files : files of the fsic directory fsic/qeffile : fsic qeffile script and its contents Src-lists : lists of source files created by Src process Src-files : lists of files possibly produced by Src process Post-files : lists of files possibly produced by Post process sfsic-errors : list of possible errors reported by sfsic bfsic-errors : list of possible errors reported by bfsic bfsic-types : types used in bfsic |
||
<Q>/lib/bfsic.cf | This file is used to specify patterns that match the names of temporary files. Path names that are read from the lists of the installed, and object trees that are matched by a pattern of the bfsic.cf file are output to ,i.tmps and ,o.tmps respectively. See bfsic.cf(x-qef). | ||
<Q>/lib/sfsic.cf |
This file is the default configuration file read by sfsic.
It contains two classes of control lines: file/pattern action
lines and type/pattern action lines.
File/pattern action lines specify actions to be taken when a file
that matches the pattern is encountered.
One of those actions can be to assign a type to file.
For example:
/root.vrs -tgz -w,s.consis applied to files whose leaf name is "root.vrs". The file is assigned types `g' and `z' and also written to the file ,s.cons. The type/pattern action lines specify what actions to take for files with specified types. For example: &Sgs Ss -e07 missing g-file for S type filespecifies that files whose type &ed with types "Sgs" yields types "Ss" are listed as raising error 07.
|
||
rls, fixflist, rmlist | A variety of other tools are used by the FSIC package. Three in particular are important and/or useful. rls is used to create the file lists that are checked. rmlist is used to unlink (i.e., rm or rmdir) files named in its input. fixflist is used to remove entries from a file list for files that do not exist. |
The FSIC directory is normally located in @QefAdm/fsic,
where @QefAdm defaults to QefAdm (if it exists),
or . if it doesn't.
% dirsetup fsic - create QefAdm/fsic/deviates.fl - create QefAdm/fsic/except/example.fl - create QefAdm/fsic/except/read.me; mode=0444 - create QefAdm/fsic/files.fl - create QefAdm/fsic/inst.fl - create QefAdm/fsic/objs.fl - create QefAdm/fsic/qeffile; mode=0444 - create QefAdm/fsic/read.me; mode=0444 - create QefAdm/treedirs/read.me; mode=0444 - create QefAdm/treedirs/treedirs.lst The read.me files are just for documentation. Brief descriptions of the other files follow: |
|||||||||
qeffile |
FSIC qeffile script -- see fsic/qeffile(x-qfsic).
% qef -Ptargets Src: check source directory (source tree only) Checks: check s-files vs. g-files (source tree only) Post: check object and installation trees (object tree only) Setup: build config files if required Note: Only allowed in a subdirectory called fsic.
|
||||||||
files.fl |
list of all known and regular source files -- see files.fl(x-qfsic).
|
||||||||
inst.fl |
list of all known installed tree paths -- see inst.fl(x-qfsic).
|
||||||||
objs.fl |
list of all object tree paths -- see objs.fl(x-qfsic).
|
||||||||
<sysnm>.fl |
exception list -- see <sysnm>.fl(x-qfsic).
|
||||||||
deviates.fl |
list of normal deviations -- see deviates.fl(x-qfsic).
|
||||||||
treedirs.lst |
list of qeffile and *.vrs files used by treedirs -- see treedirs.lst(x-qfsic).
|
The source tree check is accomplished by chdiring to the
source @QefAdm/fsic directory and running qef.
Basically this runs:
# run rls in the source root to write file list to ,tmp % cush -d ../.. -o. ,tmp rls -sf # if using CVS, list of CVS Repository put into ,tmp2 # run sfsic to check list against files.fl % cush -o ,s.errors sfsic -Ffiles.fl -S ,tmpIn addition to the errors written to ,s.errors via the standard output, there are a number of other files that may be produced. What files are created and what they contain is controlled by the sfsic.cf file. The standard sfsic.cf produces, in part, ,s.pfiles -- list of SCCS p-files; ,s.cons -- list of qeffile and *.vrs files (renamed to treedirs.lst; ,s.tmps -- list of temporary files (e.g., core, .nfs*); ,s.asrc -- all source files; ,s.csrc -- C, Yacc, Lex sources; and ,s.osrc -- source files not in ,s.csrc. The last three files are copied to Dist.lst, Csrc.lst, and Osrc.lst if different than the target file. If the version system is RCS, a list of the locked files is produced. |
|||
sfsic errors |
The list of files being edited and lists of the source files and temporary files are useful, but the most important product of the process is the ,s.errors file. This file will contain lines consisting of a filename, a tab, `#' followed by an error code, a brief description of the error, and the types for the file as assigned by the files.fl file and the sfsic.cf processing. The following are example lines: missing # e07 missing g-file for S type file (type=Ss) newfile # e05 new g-file (type=gz)There are thirteen errors that can be raised using the standard sfsic.cf -- see sfsic-errors(x-qfsic). Each error is described in its own x-qfsic item as in: % x-qfsic e05 e05 : new g-file Explanation: The named file exists, but is not any recognizable type thus is assumed to be a g-file, but it is not named in files.fl. To Fix: If the file should not exist, it should be removed: % rm path Otherwise, if the file should be administered, a version file should be created and then registered as `S' type file in files.fl: % vci new path % sfsic -CS path Otherwise, the file should be registered using: % sfsic -CU path # if file is source but unadministered # or % sfsic -CT path # if file is not source but is preserved See also: sfsic-errorsAfter making corrections, qef should be rerun to ensure that the errors have been eliminated and that no new errors have been introduced.
|
Checking the installed and object trees is much like checking
the source tree.
qef is run in the fsic directory in the object tree.
rls is run in both the installed and object trees.
The resulting lists and the FSIC database files are then processed
by bfsic to produce a list of errors (saved in ,p.errors)
and temporary files found in the installed tree (,i.tmps) or
object tree (,o.tmps).
The error messages are much the same as those for the source tree, specifically a file name, a tab and a hash, an `i' or `o' followed by an error code, and a short description of the error. For example: missing # i08 missing inst file (type=L) newinst # i05 new inst file (type=F) missing # o08 missing objs file (type=l) newobj # o05 new objs file (type=f)As is the case with the source errors, the installed and object errors are described in the x-qmisc database. The list of bfsic errors can be retrieved using: % x-qfsic bfsic-errors |
|||||||||||
FSIC_Key |
The installed/object tree checks differ from the source
checks in that they have to check a wide range of
configurations whereas the source check deals with a single tree.
The installed and object trees may differ because of the platform
or because of semantic options.
The except/sysnm.fl file is used to hold exceptions for
a system.
Variations due to semantic options are distinguished using
the setting of @FSIC_Key.
Types for files in the exception list are bound to keys as in:
path Nabwhich indicates that path has type `N' for trees with a @FSIC_Key of either `a' or `b'. Note that @FSIC_Key defaults to `a'. |
||||||||||
Fixing the Database |
bfsic is used to correct or modify the database.
# add newtypes and remove oldtypes for file ... % bfsic -A<newtypes> -R<oldtypes> files ... # add type L for ,p.error named files with error code i08 % bfsic -si08 -AL < ,p.errorsThe following are the types supported by bfsic and their use. Note the UPPER case versions of the flag apply to the installed tree, whereas the lower case version applies to the object tree.
Initially the exception file will not exist. The command % qef Setupwill create any files used by the check that do not exist.
|
||||||||||
Conclusions | The major objective of the FSIC system is to maintain the cleanliness and health of the file systems. Initially with an empty database, it is recommended that you just get close and then use subsequent builds on both the current and other hosts until the database converges on an accurate representation of subject files system trees. Once close to steady-state is reached, the FSIC databases require little care, but do provide a cheap and effective mechanism for ensuring the product and its construction environment are not jeopardized by extraneous or missing files. |
c120.qh - 9.3 - 03/10/22 |