6001 strcat(9f) needs a manpage
[unleashed.git] / usr / src / man / man1 / pkgmk.1
blob9191ace5e209f8fd0268b58843d6ec1bfdaba1f0
1 '\" te
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"
8 .SH NAME
9 pkgmk \- produce an installable package
10 .SH SYNOPSIS
11 .LP
12 .nf
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]
16 .fi
18 .SH DESCRIPTION
19 .sp
20 .LP
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
23 format.
24 .sp
25 .LP
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
31 \fBprototype\fR file.
32 .sp
33 .LP
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.
38 .RS +4
39 .TP
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
44 .RE
45 .RS +4
46 .TP
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
52 to "\fB/\fR".
53 .RE
54 .RS +4
55 .TP
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.
61 .RE
62 .RS +4
63 .TP
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.
69 .RE
70 .sp
71 .LP
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.
76 .sp
77 .LP
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.
82 .SH OPTIONS
83 .sp
84 .LP
85 The following options are supported:
86 .sp
87 .ne 2
88 .na
89 \fB\fB-a\fR \fIarch\fR\fR
90 .ad
91 .RS 19n
92 Overrides the architecture information provided in the \fBpkginfo\fR(4) file
93 with \fIarch\fR.
94 .RE
96 .sp
97 .ne 2
98 .na
99 \fB\fB-b\fR \fIbase_src_dir\fR\fR
101 .RS 19n
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.
109 .ne 2
111 \fB\fB-d\fR \fIdevice\fR\fR
113 .RS 19n
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).
121 .ne 2
123 \fB\fB-f\fR \fIprototype\fR\fR
125 .RS 19n
126 Uses the file \fIprototype\fR as input to the command. The default
127 \fIprototype\fR filename is [\fBPp\fR]\fBrototype\fR.
131 .ne 2
133 \fB\fB-l\fR \fIlimit\fR\fR
135 .RS 19n
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
141 format.
145 .ne 2
147 \fB\fB-o\fR\fR
149 .RS 19n
150 Overwrites the same instance; package instance is overwritten if it already
151 exists.
155 .ne 2
157 \fB\fB-p\fR \fIpstamp\fR\fR
159 .RS 19n
160 Overrides the production stamp definition in the \fBpkginfo\fR(4) file with
161 \fIpstamp\fR.
165 .ne 2
167 \fB\fB-r\fR \fIroot_path\fR\fR
169 .RS 19n
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.
178 .ne 2
180 \fB\fB-v\fR \fIversion\fR\fR
182 .RS 19n
183 Overrides the version information provided in the \fBpkginfo\fR(4) file with
184 \fIversion\fR.
188 .ne 2
190 \fB\fIvariable=value\fR\fR
192 .RS 19n
193 Places the indicated variable in the packaging environment. (See
194 \fBprototype\fR(4) for definitions of variable specifications.)
197 .SH OPERANDS
200 The following operand is supported:
202 .ne 2
204 \fB\fIpkginst\fR\fR
206 .RS 11n
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).
215 .SH EXIT STATUS
218 The following exit values are returned:
220 .ne 2
222 \fB\fB0\fR\fR
224 .RS 6n
225 Successful completion.
229 .ne 2
231 \fB\fB>0\fR\fR
233 .RS 6n
234 An error occurred.
237 .SH SEE ALSO
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
246 .SH NOTES
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
252 \fBuname\fR(1)).
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
265 parameters is used:
266 .RS +4
269 Both \fBSUNW_PKG_ALLZONES\fR and \fBSUNW_PKG_THISZONE\fR are set to
270 \fBTRUE\fR.
272 .RS +4
275 \fBSUNW_PKG_HOLLOW\fR is set to \fBTRUE\fR and \fBSUNW_PKG_ALLZONES\fR is
276 set to \fBFALSE\fR.
278 .RS +4
281 The package contains a request script and \fBSUNW_PKG_THISZONE\fR set to
282 \fBTRUE\fR.
286 For additional information regarding these parameters, see \fBpkginfo\fR(4).