Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mkpdf(1M) — HP-UX 8.07

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

pdfck(1M)

pdfdiff(1M)

pdf(4)

mkpdf(1M)

NAME

mkpdf − create a Product Description File from a prototype PDF

SYNOPSIS

mkpdf [−c comment_string] [−n] [−r alternate_root] prototype_PDF new_PDF

DESCRIPTION

mkpdf is a program that reads a prototype PDF and generates a new PDF (see pdf(4)) that reflects the current status of the file system files defined by pathnames 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 pathname in prototype_PDF is prefaced with “?”, 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 pathname 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 − is used for either the prototype_PDF or new_PDF, mkpdf assumes that standard input and/or standard output is being used for the approprate value. 

Comments in prototype_PDF are supported as follows: Lines beginning with the 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 the hash character #, and lines containing only the new-line character 0 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. 

Options

−c comment_string 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 file instead of the usual text representation. 

−r alternate_root alternate_root is a string that is prefixed to each pathname in the prototype (after removal of the optional ?) to form a modified pathname to be used to gather attributes for the entry.  Default is an empty string. 

EXAMPLES

Given a file "Proto" with contents:

/bin/basename
/bin/cat
/bin/cc
/bin/dirname
/bin/grep
/bin/ls
/bin/ll::::::::/bin/ls
/bin/su

The command:

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 UX_CORE.  The pathname and linked_to are taken from the prototype PDF.  All other fields are generated from the file system. 

mkpdf /tmp/UX_CORE /system/UX_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 find(1) on all the files in the directory structure under /PRODUCT. A / is edited onto the beginning of each pathname to make it absolute.  The pathnames are then piped to mkpdf. A −r option specifies that a root of /PRODUCT should be prefixed to each pathname while the directory is being searched.  A − in the prototype PDF position specifies that stdin is being used for the prototype PDF file.  The resultant PDF does not contain the /PRODUCT prefix.  Note that with only a list of pathnames, the linked_to field of linked files will not conform to the convention explained in pdf(4).

cd /PRODUCT
find * −print | sed −e ’s:^:/:’ |
mkpdf −r /PRODUCT − PDF

RETURN VALUE

Upon completion, mkpdf returns one of the following values:

1 Returned if non-optional files in the prototype file were not found. 

2 Returned if mkpdf encountered other problems. 

0 Successful completion. 

DIAGNOSTICS

filename: no such file or directory
A non-optional file was not found on the file system and will not appear in the new PDF. 

WARNINGS

Sizes reported do not reflect blocks allocated to directories (including CDFs). 

AUTHOR

mkpdf was developed by HP. 

SEE ALSO

pdfck(1M), pdfdiff(1M), pdf(4). 

Hewlett-Packard Company  —  HP-UX Release 8.05: June 1991

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026