mkpdf - create a Product Description File from a prototype PDF
mkpdf [-c comment_string] [-n] [-r alternate_root] prototype_PDF
The mkpdf program reads a prototype PDF and generates a new PDF (see
pdf(4)) that reflects the current status of the file system files
defined by path names in the prototype file.
If pathname is a directory, the size, version, checksum, and linked_to
target fields are forced to be empty. If the file is a device, the
version, checksum, and linked_to fields are forced to be empty and the
size field contains the major and minor device numbers.
If a path name in prototype_PDF is prefaced with a question mark (?),
the file is assumed to be an optional file. This file is processed in
the same manner as all other files except that, if the file does not
exist, values provided in the prototype are reproduced, and the ?, is
passed through to new_PDF. If a path name is not preceded with ?, and
the file does not exist on the file system, an error is reported and
no entry is added to new_PDF.
If a dash (-) is used for prototype_PDF or new_PDF, mkpdf assumes that
standard input and/or standard output, respectively, is being used for
the appropriate value.
Comments in prototype_PDF are supported as follows: Lines beginning
with the percent character (%) are generally passed through, in order,
to new_PDF, except that any "% Product Description File" and "% total
size is ..." lines are removed to prevent duplication of these
automatically generated lines in new_PDF when prototype_PDF is a PDF.
Lines beginning with a pound character (#), and lines containing only
the newline character (\n) are not passed through to new_PDF. Note
that blank space preceding these special characters is not allowed and
will generally result in error messages about files not found.
A size summary is produced as a comment at the end of the PDF.
-c comment_string Insert a string that contains a comment about the
product for which this PDF is being generated.
This is used as a second comment line of the PDF.
See pdf(4) for a description of the first comment
line. If this option is not specified, no second
comment line is produced.
-n Record numerical representation of user ID from
/etc/passwd and group ID from /etc/group for each
Hewlett-Packard Company - 1 - HP-UX Release 11i: November 2000
file instead of the usual text representation.
-r alternate_root Prefix the string alternate_root to each path name
in the prototype (after removing the optional ?)
to form a modified path name to be used to gather
attributes for the entry. Default is an empty
Given a file Proto with contents:
mkpdf -c "fileset TEST, Release 1.0" Proto -
produces the PDF shown in the EXAMPLE section of pdf(4).
The following example creates a totally new PDF for the fileset
ALBA_CORE. The pathname and linked_to are taken from the prototype
PDF. All other fields are generated from the file system.
mkpdf /tmp/ALBA_CORE /system/ALBA_CORE/new.pdf
The next example shows how to create a completely new PDF from just a
list of files. The PDF for the files under the /PRODUCT directory is
created by executing the find command (see find(1)) on all the files
in the directory structure under /PRODUCT. A / is edited onto the
beginning of each path name to make it absolute. The path names are
then piped to mkpdf. The -r option specifies that a root of /PRODUCT
should be prefixed to each path name while the directory is being
searched. A - in the prototype_PDF position specifies that stdin is
being used for the prototype PDF file. The resulting PDF does not
contain the /PRODUCT prefix. Note that, with only a list of path
names, the linked_to field of linked files will not conform to the
convention explained in pdf(4).
find * -print | sed -e 's:^:/:' |
mkpdf -r /PRODUCT - PDF
Upon completion, mkpdf returns one of the following values:
Hewlett-Packard Company - 2 - HP-UX Release 11i: November 2000
0 Successful completion.
1 Nonoptional files in the prototype file were not found.
2 mkpdf encountered other problems.
filename: no such file or directory
A nonoptional file was not found on the file system and will not
appear in the new PDF.
Sizes reported do not reflect blocks allocated to directories.
Use of PDFs is discouraged since this functionality is obsolete and is
being replaced with Software Distributor (see sd(4)).
mkpdf was developed by HP.
pdfck(1M), pdfdiff(1M), pdf(4).
Hewlett-Packard Company - 3 - HP-UX Release 11i: November 2000