|
prototype is an ASCII file used to specify package information. Each entry in the file describes a single deliverable object. An object may be a
data file, directory, source file, executable object, and so forth. This file is generated by the package developer.
Entries in a prototype file consist of several fields of information separated by white space. Comment lines begin with a ``#'' and are ignored. The fields are
described below and must appear in the order shown.
-
part
- An optional field designating the part number in which the object resides. A part is
a collection of files and is the atomic unit by which a package is processed. A developer can choose criteria for grouping files into a part (for example, based on class). If this field is not used, part
1 is assumed.
-
ftype
- A one-character field that indicates the file type. Valid values are:
-
b
- block special device
-
c
- character special device
-
d
- directory
-
e
- a file to be edited upon installation or removal (may be shared by several packages)
-
f
- a standard executable or data file
-
i
- installation script or information file
-
l
- linked file
-
p
- named pipe
-
s
- symbolic link
-
v
- volatile file (one whose contents are expected to change, like a log file)
-
x
- an exclusive directory accessible only by this package
-
class
- The installation class to which the file belongs. This name must contain only alphanumeric characters and be no longer
than 12 characters. The field is not specified for installation scripts. (admin and all classes beginning with capital letters are reserved class names.)
-
pathname
- The pathname where the file will reside on the target machine, for example, /usr/bin/mail or bin/ras/proc. Relative pathnames (those that do not begin with a slash) indicate that the file is relocatable. The form
path1=path2
may be used for two purposes: to define a link and to define local pathnames.
For linked files, path1 indicates the destination of the link and path2 indicates the source file. (This format is mandatory for linked files.)
For local pathnames, path1 indicates the pathname an object should have on the machine where the entry is to be installed and path2 indicates
either a relative or fixed pathname to a file on the host machine which contains the actual contents.
A pathname may contain a variable specification of the form $variable. If variable begins with a lower case letter, it is a
build variable. If variable begins with an upper case letter, it is an install variable. Build variables are bound at build time. If an install variable is known at build time,
its definition is inserted into the pkginfo(4) file so that it will be available at install
time. If an install variable is not known at build time, it will be bound at install time.
-
major
- The major device number. The field is only specified for block or character special devices.
-
minor
- The minor device number. The field is only specified for block or character special devices.
-
mode
- The octal mode of the file (for example, 0664). A question mark (?) indicates that the mode will be
left unchanged, implying that the file already exists on the target machine. This field is not used for linked files or packaging information files.
The mode can be a variable specification of the form $variable. If variable begins with a lower case letter, it is a build
variable. If variable begins with an upper case letter, it is an install variable. Build variables are bound at build time. If an install variable is known at build time, its
definition is inserted into the pkginfo(4) file so that it will be available at install
time. If an install variable is not known at build time, it will be bound at install time.
-
owner
- The owner of the file (for example, bin or root). The field is limited to 14 characters
in length. A question mark (?) indicates that the owner will be left unchanged, implying that the file already exists on the target machine. This field is not used for linked files or
packaging information files.
The owner can be a variable specification of the form $variable. If variable begins with a lower case letter, it is a build
variable. If variable begins with an upper case letter, it is an install variable. Build variables are bound at build time. If an install variable is known at build time, its
definition is inserted into the pkginfo(4) file so that it will be available at install
time. If an install variable is not known at build time, it will be bound at install time.
-
group
- The group to which the file belongs (for example, bin or sys). The field is limited
to 14 characters in length. A question mark (?) indicates that the group will be left unchanged, implying that the file already exists on the target machine. This field is not used for
linked files or packaging information files.
The group can be a variable specification of the form $variable. If variable begins with a lower case letter, it is a build
variable. If variable begins with an upper case letter, it is an install variable. Build variables are bound at build time. If an install variable is known at build time, its
definition is inserted into the pkginfo(4) file so that it will be available at install
time. If an install variable is not known at build time, it will be bound at install time.
An exclamation point (!) at the beginning of a line indicates that the line contains a command. These commands are used to incorporate files in other directories, to locate objects
on a host machine, and to set permanent defaults. The following commands are available:
-
search
- Specifies a list of directories (separated by white space) to search for when looking for
file contents on the host machine. The base name of the path field is appended to each directory in the ordered list until the file is located. Searches are not recursive.
-
include
- Specifies a pathname which points to another prototype file to include. Note that search requests do not
span include files.
-
default
- Specifies a list of attributes (mode, owner, and group) to be used by default if attribute information is not provided for
prototype entries which require the information. The defaults do not apply to entries in include prototype files.
-
param=value
- Places the indicated parameter in the current environment. Spans
to subsequent included prototype files.
The above commands may have variable substitutions embedded within them, as demonstrated in the two example prototype files below.
Before files are overwritten during installation, they are copied to a temporary pathname. The exception to this rule is files whose mode includes execute permission, unless the file is editable (that
is, ftype is e). For files which meet this exception, the existing version is linked to a temporary pathname, and the original file is removed. This allows
processes which are executing during installation to be overwritten.
|