User Commands pkgmk(1)
NAME
pkgmk - produce an installable package
SYNOPSIS
pkgmk [-o] [-a arch] [-b basesrcdir] [-d device]
[-f prototype] [-l limit] [-p pstamp] [-r rootpath]
[-v version] [variable=value]... [pkginst]
DESCRIPTION
The pkgmk utility produces an installable package to be used
as input to the pkgadd(1M) command. The package contents is
in directory structure format.
The command uses the package prototype(4) file as input and
creates a pkgmap(4) file. The contents for each entry in the
prototype file is copied to the appropriate output location.
Information concerning the contents (checksum, file size,
modification date) is computed and stored in the pkgmap
file, along with attribute information specified in the pro-
totype file.
pkgmk searches for the files listed in the prototype(4) file
as described in the following conditions. Note: If a proto-
type file contains the explicit location of the file to
include in the package, then the following search explana-
tions do not apply.
1. If neither -b nor -r options are specified, the
file name component of each file path listed in the
prototype(4) file is expected to be found in the
same directory as the prototype(4) file
2. If -b is specified as a relative path (without a
leading "/"), then basesrcdir is prepended to the
relative file paths from the prototype(4) file. The
resulting path is searched for in the rootpath
directories. If a rootpath is not specified, it
defaults to "/".
3. If -b is specified as an absolute path (with a
leading "/"), then basesrcdir is prepended to the
relative paths from the prototype(4) file and the
result is the location of the file. rootpath is
not searched.
4. If -r is specified, then full file paths are used
from the prototype(4) file. Relative paths have
basesrcdir prepended. If basesrcdir is not
specified, it defaults to "". The resulting path is
SunOS 5.11 Last change: 30 Oct 2007 1
User Commands pkgmk(1)
searched for in each directory of the rootpath.
If you created your prototype file using "pkgproto
a/relative/path"or "pkgproto a/relative/path=install/path",
you should use the -r rootpath option to specify the loca-
tion of a/relative/path so that pkgmk can correctly locate
your source files.
Package commands, including pkgmk, are largefile(5)-aware.
They handle files larger than 2 GB in the same way they han-
dle smaller files. In their current implementations,
pkgadd(1M), pkgtrans(1) and other package commands can pro-
cess a datastream of up to 4 GB.
OPTIONS
The following options are supported:
-a arch Overrides the architecture information
provided in the pkginfo(4) file with
arch.
-b basesrcdir Prepends the indicated basesrcdir to
locate relocatable objects on the source
machine. Use this option to search for
all objects in the prototype file. pkgmk
expects to find the objects in
/basesrcdir or to locate the objects by
use of the -b and -r options, respec-
tively.
-d device Creates the package on device. device can
be an absolute directory pathname or the
identifiers for a floppy disk or remov-
able disk (for example, /dev/diskette).
The default device is the installation
spool directory (/var/spool/pkg).
-f prototype Uses the file prototype as input to the
command. The default prototype filename
is [Pp]rototype.
-l limit Specifies the maximum size in 512 byte
blocks of the output device as limit. By
default, if the output file is a direc-
tory or a mountable device, pkgmk employs
the df(1M) command to dynamically
SunOS 5.11 Last change: 30 Oct 2007 2
User Commands pkgmk(1)
calculate the amount of available space
on the output device. This option is use-
ful in conjunction with pkgtrans(1) to
create a package with a datastream for-
mat.
-o Overwrites the same instance; package
instance is overwritten if it already
exists.
-p pstamp Overrides the production stamp definition
in the pkginfo(4) file with pstamp.
-r rootpath Uses the indicated rootpath with the
source pathname appended to locate
objects on the source machine, using a
comma (,) as the separator for the path
elements. If this option is specified,
look for the full destination path in
each of the directories specified. If
neither -b nor -r is specified, look for
the leaf filename in the current direc-
tory.
-v version Overrides the version information pro-
vided in the pkginfo(4) file with ver-
sion.
variable=value Places the indicated variable in the
packaging environment. (See prototype(4)
for definitions of variable specifica-
tions.)
OPERANDS
The following operand is supported:
pkginst A package designation by its instance. An
instance can be the package abbreviation or a
specific instance (for example, inst.1 or
inst.2). All instances of a package can be
requested by inst.*. The asterisk character (*)
is a special character to some shells and might
need to be escaped. In the C-Shell, * must be
surrounded by single quotes (') or preceded by a
backslash (\).
SunOS 5.11 Last change: 30 Oct 2007 3
User Commands pkgmk(1)
EXIT STATUS
The following exit values are returned:
0 Successful completion.
>0 An error occurred.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Availability SUNWcsu
SEE ALSO
pkgparam(1), pkgproto(1), pkgtrans(1), uname(1), df(1M),
pkgadd(1M), pkginfo(4), pkgmap(4), prototype(4), attri-
butes(5), largefile(5)
Application Packaging Developer's Guide
NOTES
Architecture information is provided on the command line
with the -a option or in the prototype(4) file. If no archi-
tecture information is supplied, pkgmk uses the output of
uname -m (see uname(1)).
Version information is provided on the command line with the
-v option or in the pkginfo(4) file. If no version informa-
tion is supplied, a default based on the current date is
provided.
Command line definitions for both architecture and version
override the prototype(4) definitions.
pkgmk fails if one of the following invalid combinations of
zone-related parameters is used:
1. Both SUNWPKGALZONES and SUNWPKGTHISZONE are
set to TRUE.
SunOS 5.11 Last change: 30 Oct 2007 4
User Commands pkgmk(1)
2. SUNWPKGHOLOW is set to TRUE and
SUNWPKGALZONES is set to FALSE.
3. The package contains a request script and
SUNWPKGTHISZONE set to TRUE.
For additional information regarding these parameters, see
pkginfo(4).
SunOS 5.11 Last change: 30 Oct 2007 5
|