Figure 4-1 shows how the files that make up the ODB product are grouped into subsets. As the figure shows, the physical location of a file is not necessarily a factor in determining the subset to which it belongs.
You specify the subsets and the files that each subset contains in a master inventory file. In a key file, you specify the product attributes, such as the product name and version, and the subset definitions. With these two files in place -- the master inventory and key file -- you can run the kits utility to create the subsets and control files in the output directory.
Figure 4-2 shows the contents of the output directory after the kits utility has run.
You perform the same steps when creating subsets for user products,
kernel products, and foreign device kits. This chapter describes how to create
the master inventory and key files, and how to use the kits
utility to create subsets and subset control files. This chapter uses the
ODB product to illustrate these tasks.
Figure 4-1: Grouping Files into Subsets
Figure 4-2: Contents of the ODB output Directory
The first time
you process a kit, the master inventory file is empty. You must enter one
record for each file that belongs on the kit. To get an initial list of these
files, you can use the newinv command. Specify the file
name of the empty master inventory file and the pathname of the source hierarchy's
top-level directory. For example:
This command invokes newinv on the master inventory
file for the ODB product. It specifies the pathname to the source hierarchy
as a relative path from the current directory (data).
The newinv utility produces a list of files that
are present in the source hierarchy and places you in the vi
editor, or the editor specified by your EDITOR environment
variable, so that you can make the required changes. Remove the entries for
any files that should not appear on the kit, and add the flags, pathname,
and subset identifier for each entry that should appear on the kit.
The master inventory file contains one record for each file in the kit.
Each record in the master inventory file consists of three fields, described
in Table 4-1.
4.1 Creating the Master Inventory File
You can
create a master inventory file with any text editor you like, or create the
file with the touch command. The master inventory file
name must consist of the product code and version, with the letters mi as a suffix. For example:
% touch OAT100.mi
% newinv OAT100.mi ../src
Caution
Example 4-1 shows that the ODB kit has two subsets. The OATODB100 subset contains utilities and libraries and must be installed if the product is to be used. The OATODBDOC100 subset contains the product's documentation and is not required to make the product work.
In the example, the ./usr/opt directory has the RESERVED subset identifier, indicating that setld
should not allow the directory to be overwritten if it exists on the customer's
system. The Flags field is set to 0 (zero), indicating that this directory
cannot change and that it is not linked to another directory on the customer's
system. On the other hand, the /usr/opt/OAT100/bin/attr
file has the OATODB100 subset identifier, indicating that
the file belongs in the specified subset. The Flags field is set to 4, indicating
that the file may change and that it has a link to another file on the customer's
system.
For subsequent updates to the kit, use the existing version of the master
inventory file for the input file. The newinv utility
performs the following additional steps:
As shown in the example, the key file is divided into two sections separated
by a line that contains two percent signs (%%),
as follows:
Example 4-1: Master Inventory File for the ODB Kit
0 . RESERVED
0 ./usr/opt RESERVED
0 ./usr/opt/OAT100/OATODBDOC.Links OATODBDOC100
0 ./usr/opt/OAT100/bin OATODB100
4 ./usr/opt/OAT100/bin/attr OATODB100
4 ./usr/opt/OAT100/bin/dcb.spr OATODB100
4 ./usr/opt/OAT100/bin/dcb_defaults OATODB100
4 ./usr/opt/OAT100/bin/dcb_diag.sed OATODB100
4 ./usr/opt/OAT100/bin/docbld OATODB100
4 ./usr/opt/OAT100/bin/unstamp OATODB100
0 ./usr/opt/OAT100/lib OATODB100
0 ./usr/opt/OAT100/lib/br OATODB100
4 ./usr/opt/OAT100/lib/br/README.dcb OATODB100
4 ./usr/opt/OAT100/lib/br/attr.1 OATODBDOC100
4 ./usr/opt/OAT100/lib/br/dcb.ps OATODBDOC100
4 ./usr/opt/OAT100/lib/br/docbld.1 OATODBDOC100
4 ./usr/opt/OAT100/lib/br/unstamp.1 OATODBDOC100
0 ./usr/opt/OAT100/lib/doclib OATODB100
0 ./usr/opt/OAT100/lib/doclib/templates OATODB100
4 ./usr/opt/OAT100/lib/doclib/templates/conv.braces OATODB100
.
.
.
4.2 Creating the Key File
The key file identifies
the product that the kit represents, such as its name, version number, and
the name of the master inventory file for the kit. You create this file in
the data directory with any text editor that you like. Its name must consist
of the product code and version, with the letter k as a
suffix. For example, OAT100.k is the key file for the
ODB kit. Example 4-2 illustrates this key file.
Example 4-2: Key File for the ODB Kit
# Product-level attributes
#
NAME='Orpheus Authoring Tools'
CODE=OAT
VERS=100
MI=OAT100.mi
COMPRESS=1
#
# Subset definitions
#
%%
OATODB100 . 0 'Document-Building Tools'
OATODBDOC100 . 2 'Document Tools Documentation'
The kits utility performs the following steps and
reports its progress:
The subset files and the INSTCTRL file are constituents
of the final kit.
4.3 Running the kits Utility
After
you create the master inventory and key files, you create subsets by running
the kits utility. This command requires three arguments:
Note
For example, the following command builds the subsets for the ODB product
kit:
% cd /dcb_tools/data
% kits OAT100.k ../src ../output
Table 4-5 describes the three fields
in each record.
4.3.1 Compression Flag File
The setld utility uses the presence of the compression flag file (product-id.comp) to determine whether the subset files
are compressed. The compression flag is an empty file whose name consists
of the product code and the version number with the string comp
as a suffix; for example, OAT100.comp.
4.3.2 Image Data File
The setld utility uses the image data file to verify that the subset
images it loads from the installation media are uncorrupted before the actual
installation process begins. The image data file name consists of the product's
unique three-letter name with the string image for a suffix.
The image data file contains one record for each subset in the kit. The
following example illustrates OAT.image, the image data
file for the ODB kit:
15923 70 OATODB100
24305 400 OATODBDOC100
Specifies a descriptive product name and subset identifier.
Specifies a descriptive subset identifier.
Specifies (in bytes) the space the subset requires in the root file system.
Specifies (in bytes) the amount of the usr file system
the subset requires.
Specifies (in bytes) the amount of the var file system
the subset requires.
Specifies disk volume identification information as two colon-separated
integers (the volume number of the disk that contains the subset archive and
the number of disks required to contain the subset archive).
Specifies the tape volume number and subset's location on the tape as
two colon-separated integers (the volume number of the tape that contains
the subset archive and the file offset at which the subset archive begins).
On tape volumes, the first three files are reserved for a bootable operating
system image and are not used by setld. An offset of 0
(zero) indicates the fourth file on the tape. The fourth file is a tar archive named INSTCTRL, which contains the
kit's installation control files (listed in Table 4-4).
Specifies a dependency list (reserved -- see Table 4-3).
Specifies subset control flag bits.
The following example illustrates OATODBDOC100.ctrl, the control file for the ODB kit's OATODBDOC100
subset:
Each record of the inventory is composed of 12 fields separated by tab
characters. Table 4-6 describes the contents
of these fields.
4.3.3 Subset Control Files
The setld utility uses the subset control files as a source of descriptive
information about subsets. A control file for each subset contains the following
fields:
NAME='Orpheus Authoring Tools OATODBDOC100'
DESC='Document Tools Documentation'
ROOTSIZE=0
USRSIZE=522090
VARSIZE=0
NVOLS=1:2
MTLOC=1:1
DEPS="."
FLAGS=34816
4.3.4 Subset Inventory File
The subset
inventory file describes each file in the subset, listing its size, checksum,
permissions, and other information. The kits command generates
this information, which reflects the exact state of the files in the source
hierarchy from which the kit was built. The setld utility
uses the information to duplicate that state, thus transferring an exact copy
of the source hierarchy to the customer's system. Example 4-3
shows the inventory file, OATODBDOC100.inv, for the ODB
kit's OATODBDOC100 subset. The backslashes (\) in this example indicate line continuation and are not
present in the actual file.
Example 4-3: Sample Subset Inventory File
4 983 01851 1065 0 100644 3/21/91 100 f\
./usr/opt/OAT100/lib/br/attr.1 none OATODBDOC100
4 424997 63356 1065 10 100644 4/15/91 100 f\
./usr/opt/OAT100/lib/br/dcb.ps none OATODBDOC100
4 7283 03448 1065 10 100644 4/15/91 100 f\
./usr/opt/OAT100/lib/br/docbld.1 none OATODBDOC100
4 6911 37501 1065 0 100644 3/21/91 100 f\
./usr/opt/OAT100/lib/br/docbld.5 none OATODBDOC100
4 985 41926 1065 0 100644 3/21/91 100 f\
./usr/opt/OAT100/lib/br/unstamp.1 none OATODBDOC100