2 .\" Copyright 1989 AT&T
3 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH PKGMK 1 "Oct 30, 2007"
9 pkgmk \- produce an installable package
13 \fBpkgmk\fR [\fB-o\fR] [\fB-a\fR \fIarch\fR] [\fB-b\fR \fIbase_src_dir\fR] [\fB-d\fR \fIdevice\fR]
14 [\fB-f\fR \fIprototype\fR] [\fB-l\fR \fIlimit\fR] [\fB-p\fR \fIpstamp\fR] [\fB-r\fR \fIroot_path\fR]
15 [\fB-v\fR \fIversion\fR] [\fIvariable=value\fR]... [\fIpkginst\fR]
21 The \fBpkgmk\fR utility produces an installable package to be used as input to
22 the \fBpkgadd\fR(1M) command. The package contents is in directory structure
26 The command uses the package \fBprototype\fR(4) file as input and creates a
27 \fBpkgmap\fR(4) file. The contents for each entry in the \fBprototype\fR file
28 is copied to the appropriate output location. Information concerning the
29 contents (checksum, file size, modification date) is computed and stored in the
30 \fBpkgmap\fR file, along with attribute information specified in the
34 \fBpkgmk\fR searches for the files listed in the \fBprototype\fR(4) file as
35 described in the following conditions. \fBNote:\fR If a prototype file contains
36 the explicit location of the file to include in the package, then the following
37 search explanations do not apply.
41 If neither \fB-b\fR nor \fB-r\fR options are specified, the file name
42 component of each file path listed in the \fBprototype\fR(4) file is expected
43 to be found in the same directory as the \fBprototype\fR(4) file
48 If \fB-b\fR is specified as a relative path (without a leading "\fB/\fR"),
49 then \fIbase_src_dir\fR is prepended to the relative file paths from the
50 \fBprototype\fR(4) file. The resulting path is searched for in the
51 \fIroot_path\fR directories. If a \fIroot_path\fR is not specified, it defaults
57 If \fB-b\fR is specified as an absolute path (with a leading "\fB/\fR"),
58 then \fIbase_src_dir\fR is prepended to the relative paths from the
59 \fBprototype\fR(4) file and the result is the location of the file.
60 \fIroot_path\fR is \fBnot\fR searched.
65 If \fB-r\fR is specified, then full file paths are used from the
66 \fBprototype\fR(4) file. Relative paths have \fIbase_src_dir\fR prepended. If
67 \fIbase_src_dir\fR is not specified, it defaults to \fB""\fR. The resulting
68 path is searched for in each directory of the \fIroot_path\fR.
72 If you created your prototype file using \fB"pkgproto a/relative/path"\fRor
73 \fB"pkgproto a/relative/path=install/path"\fR, you should use the \fB-r\fR
74 \fIroot_path\fR option to specify the location of \fBa/relative/path\fR so that
75 \fBpkgmk\fR can correctly locate your source files.
78 Package commands, including \fBpkgmk\fR, are \fBlargefile\fR(5)-aware. They
79 handle files larger than 2 GB in the same way they handle smaller files. In
80 their current implementations, \fBpkgadd\fR(1M), \fBpkgtrans\fR(1) and other
81 package commands can process a datastream of up to 4 GB.
85 The following options are supported:
89 \fB\fB-a\fR \fIarch\fR\fR
92 Overrides the architecture information provided in the \fBpkginfo\fR(4) file
99 \fB\fB-b\fR \fIbase_src_dir\fR\fR
102 Prepends the indicated \fIbase_src_dir\fR to locate relocatable objects on the
103 source machine. Use this option to search for all objects in the prototype
104 file. \fBpkgmk\fR expects to find the objects in /\fIbase_src_dir\fR or to
105 locate the objects by use of the \fB-b\fR and \fB-r\fR options, respectively.
111 \fB\fB-d\fR \fIdevice\fR\fR
114 Creates the package on \fIdevice\fR. \fIdevice\fR can be an absolute directory
115 pathname or the identifiers for a floppy disk or removable disk (for example,
116 \fB/dev/diskette\fR). The default device is the installation spool directory
117 (\fB/var/spool/pkg\fR).
123 \fB\fB-f\fR \fIprototype\fR\fR
126 Uses the file \fIprototype\fR as input to the command. The default
127 \fIprototype\fR filename is [\fBPp\fR]\fBrototype\fR.
133 \fB\fB-l\fR \fIlimit\fR\fR
136 Specifies the maximum size in 512 byte blocks of the output device as
137 \fBlimit\fR. By default, if the output file is a directory or a mountable
138 device, \fBpkgmk\fR employs the \fBdf\fR(1M) command to dynamically calculate
139 the amount of available space on the output device. This option is useful in
140 conjunction with \fBpkgtrans\fR(1) to create a package with a datastream
150 Overwrites the same instance; package instance is overwritten if it already
157 \fB\fB-p\fR \fIpstamp\fR\fR
160 Overrides the production stamp definition in the \fBpkginfo\fR(4) file with
167 \fB\fB-r\fR \fIroot_path\fR\fR
170 Uses the indicated \fIroot_path\fR with the source pathname appended to locate
171 objects on the source machine, using a comma (\fB,\fR) as the separator for the
172 path elements. If this option is specified, look for the full destination path
173 in each of the directories specified. If neither \fB-b\fR nor \fB-r\fR is
174 specified, look for the leaf filename in the current directory.
180 \fB\fB-v\fR \fIversion\fR\fR
183 Overrides the version information provided in the \fBpkginfo\fR(4) file with
190 \fB\fIvariable=value\fR\fR
193 Places the indicated variable in the packaging environment. (See
194 \fBprototype\fR(4) for definitions of variable specifications.)
200 The following operand is supported:
207 A package designation by its instance. An instance can be the package
208 abbreviation or a specific instance (for example, \fBinst.1\fR or
209 \fBinst.2\fR). All instances of a package can be requested by \fBinst.*\fR. The
210 asterisk character (\fB*\fR) is a special character to some shells and might
211 need to be escaped. In the C-Shell, \fB*\fR must be surrounded by single quotes
212 (\fB\&'\fR) or preceded by a backslash (\e).
218 The following exit values are returned:
225 Successful completion.
240 \fBpkgparam\fR(1), \fBpkgproto\fR(1), \fBpkgtrans\fR(1), \fBuname\fR(1),
241 \fBdf\fR(1M), \fBpkgadd\fR(1M), \fBpkginfo\fR(4), \fBpkgmap\fR(4),
242 \fBprototype\fR(4), \fBattributes\fR(5), \fBlargefile\fR(5)
245 \fIApplication Packaging Developer\&'s Guide\fR
249 Architecture information is provided on the command line with the \fB-a\fR
250 option or in the \fBprototype\fR(4) file. If no architecture information is
251 supplied, \fBpkgmk\fR uses the output of \fBuname\fR \fB-m\fR (see
255 Version information is provided on the command line with the \fB-v\fR option or
256 in the \fBpkginfo\fR(4) file. If no version information is supplied, a default
257 based on the current date is provided.
260 Command line definitions for both architecture and version override the
261 \fBprototype\fR(4) definitions.
264 \fBpkgmk\fR fails if one of the following invalid combinations of zone-related
269 Both \fBSUNW_PKG_ALLZONES\fR and \fBSUNW_PKG_THISZONE\fR are set to
275 \fBSUNW_PKG_HOLLOW\fR is set to \fBTRUE\fR and \fBSUNW_PKG_ALLZONES\fR is
281 The package contains a request script and \fBSUNW_PKG_THISZONE\fR set to
286 For additional information regarding these parameters, see \fBpkginfo\fR(4).