1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
|
'\" te
.\" Copyright (c) 2017 Peter Tribble.
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
.\" Copyright 1989 AT&T
.\" 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.
.\" 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.
.\" 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]
.TH PKGADD 1M "Mar 2, 2017"
.SH NAME
pkgadd \- transfer software packages to the system
.SH SYNOPSIS
.LP
.nf
\fBpkgadd\fR [\fB-nv\fR] [\fB-a\fR \fIadmin\fR] [\fB-G\fR] [ [\fB-M\fR] \fB-R\fR \fIroot_path\fR]
[\fB-r\fR \fIresponse\fR] [\fB-V\fR \fIfs_file\fR]
[\fB-d\fR \fIdevice\fR | \fB-d\fR \fIdatastream\fR \fIpkginst\fR | all]
[\fIpkginst\fR | \fB-Y\fR \fIcategory\fR [\fI, category\fR]...]
.fi
.LP
.nf
\fBpkgadd\fR \fB-s\fR [\fB-d\fR \fIdevice\fR | \fB-d\fR \fIdatastream\fR \fIpkginst\fR | all]
[\fIpkginst\fR | \fB-Y\fR \fIcategory\fR [\fI, category\fR]...]
.fi
.SH DESCRIPTION
.LP
\fBpkgadd\fR transfers the contents of a software package from the distribution
medium or directory to install it onto the system. Used without the \fB-d\fR
\fIdevice\fR source specifier, \fBpkgadd\fR looks in the default spool
directory (\fB/var/spool/pkg\fR) for the package. Used with the \fB-s\fR
option, it writes the package to a spool directory instead of installing it.
.sp
.LP
The \fBpkgadd\fR utility requires an amount of temporary space the size of the
package that is being installed. \fBpkgadd\fR determines which temporary
directory to use by checking for the existence of the \fB$TMPDIR\fR environment
variable. If \fB$TMPDIR\fR is not defined, \fBpkgadd\fR uses \fBP_tmpdir\fR
from \fBstdio.h\fR. \fBP_tmpdir\fR has a default of \fB/var/tmp/\fR.
.sp
.LP
Certain unbundled and third-party packages are no longer entirely compatible
with the latest version of \fBpkgadd\fR. These packages require user
interaction throughout the installation and not just at the very beginning, or
require that their request scripts be run as the root user.
.sp
.LP
To install these older packages (released prior to Solaris 2.4), set the
following environment variable: \fBNONABI_SCRIPTS=TRUE\fR
.sp
.LP
As long as this environment variable is set, \fBpkgadd\fR permits keyboard
interaction throughout the installation and package request scripts are run as
\fBroot\fR.
.sp
.LP
If you have package request scripts that require running as user \fBroot\fR
(instead of \fBnoaccess\fR [the default] or user \fBinstall\fR), use the
\fBrscript_alt\fR parameter in the \fBadmin\fR(4) file to make an appropriate
selection. See \fBadmin\fR(4).
.sp
.LP
Note that, in Solaris 8 and Solaris 9, the default user when running a request
script was either \fBroot\fR or \fBnobody\fR, depending on the operating
system's patch level. In the current release, the default user is
\fBnoaccess\fR.
.sp
.LP
When running \fBpkgadd\fR in the global zone (see \fBzones\fR(5)), a package
that contains a request script (see \fBpkgask\fR(1M)) is added only to the
global zone. The package is not propagated to any current or
yet-to-be-installed non-global zone. This behavior mimics the effect of the
\fB-G\fR option, described below.
.sp
.LP
Package commands are \fBlargefile\fR(5)-aware. They handle files larger than 2
GB in the same way they handle smaller files. In their current implementations,
\fBpkgadd\fR, \fBpkgtrans\fR(1) and other package commands can process a
datastream of up to 4 GB.
.sp
.LP
The \fB-d\fR, \fB-Y\fR, and \fIpkginst\fR arguments shown in the SYNOPSIS are
described under OPERANDS, following OPTIONS.
.SH OPTIONS
.LP
The supported options are described as follows. The \fB-d\fR \fIdevice\fR
source specifier is described under OPERANDS, below.
.sp
.ne 2
.na
\fB\fB\fR\fB-a\fR \fIadmin\fR\fR
.ad
.sp .6
.RS 4n
Define an installation administration file, \fIadmin\fR, to be used in place of
the default administration file. The token \fBnone\fR overrides the use of any
\fIadmin\fR file, and thus forces interaction with the user. Unless a full path
name is given, \fBpkgadd\fR first looks in the current working directory for
the administration file. If the specified administration file is not in the
current working directory, \fBpkgadd\fR looks in the
\fB/var/sadm/install/admin\fR directory for the administration file.
.RE
.sp
.ne 2
.na
\fB\fB-G\fR\fR
.ad
.sp .6
.RS 4n
Add package(s) in the current zone only. When used in the global zone, the
package is added to the global zone only and is not propagated to any existing
or yet-to-be-created non-global zone. When used in a non-global zone, the
package(s) are added to the non-global zone only.
.sp
This option causes package installation to fail if, in the \fBpkginfo\fR file
for a package, \fBSUNW_PKG_ALLZONES\fR is set to true. See \fBpkginfo\fR(4).
.RE
.sp
.ne 2
.na
\fB\fB-M\fR\fR
.ad
.sp .6
.RS 4n
Instruct \fBpkgadd\fR not to use the \fB$\fR\fIroot_path\fR\fB/etc/vfstab\fR
file for determining the client's mount points. This option assumes the mount
points are correct on the server and it behaves consistently with Solaris 2.5
and earlier releases.
.RE
.sp
.ne 2
.na
\fB\fB-n\fR\fR
.ad
.sp .6
.RS 4n
Installation occurs in non-interactive mode. Suppress output of the list of
installed files. The default mode is interactive.
.RE
.sp
.ne 2
.na
\fB\fB\fR\fB-r\fR \fIresponse\fR\fR
.ad
.sp .6
.RS 4n
Identify a file or directory which contains output from a previous
\fBpkgask\fR(1M) session. This file supplies the interaction responses that
would be requested by the package in interactive mode. \fIresponse\fR must be a
full pathname.
.RE
.sp
.ne 2
.na
\fB\fB-R\fR \fIroot_path\fR\fR
.ad
.sp .6
.RS 4n
Define the full path name of a directory to use as the \fIroot_path\fR. All
files, including package system information files, are relocated to a directory
tree starting in the specified \fIroot_path\fR. The \fIroot_path\fR may be
specified when installing to a client from a server (for example,
\fB/export/root/client1\fR).
.LP
Note -
.sp
.RS 2
The root file system of any non-global zones must not be referenced with the
\fB-R\fR option. Doing so might damage the global zone's file system, might
compromise the security of the global zone, and might damage the non-global
zone's file system. See \fBzones\fR(5).
.RE
.RE
.sp
.ne 2
.na
\fB\fB\fR\fB-s\fR \fIspool\fR\fR
.ad
.sp .6
.RS 4n
Write the package into the directory \fIspool\fR instead of installing it.
.RE
.sp
.ne 2
.na
\fB\fB-v\fR\fR
.ad
.sp .6
.RS 4n
Trace all of the scripts that get executed by \fBpkgadd\fR, located in the
\fIpkginst\fR\fB/install\fR directory. This option is used for debugging the
procedural and non-procedural scripts.
.RE
.sp
.ne 2
.na
\fB\fB-V\fR \fIfs_file\fR\fR
.ad
.sp .6
.RS 4n
Specify an alternative \fIfs_file\fR to map the client's file systems. For
example, used in situations where the \fB$\fR\fIroot_path\fR\fB/etc/vfstab\fR
file is non-existent or unreliable.
.RE
.sp
.LP
When executed without options or operands, \fBpkgadd\fR uses
\fB/var/spool/pkg\fR (the default spool directory).
.SH OPERANDS
.LP
The following operands are supported:
.SS "Sources"
.LP
By default, pkgadd looks in the \fB/var/spool/pkg\fR directory when searching
for instances of a package to install or spool. Optionally, the source for the
package instances to be installed or spooled can be specified using:
.sp
.ne 2
.na
\fB\fB-d\fR \fIdevice\fR\fR
.ad
.br
.na
\fB\fB-d\fR \fIdatastream\fR \fIpkgname\fR,... | \fBall\fR\fR
.ad
.sp .6
.RS 4n
Install or copy a package from \fIdevice\fR. \fIdevice\fR can be any of the
following:
.RS +4
.TP
.ie t \(bu
.el o
A full path name to a directory or the identifiers for tape, floppy disk, or
removable disk (for example, \fB/var/tmp\fR or
\fB/floppy/\fIfloppy_name\fR\fR).
.RE
.RS +4
.TP
.ie t \(bu
.el o
A device alias (for example, \fB/floppy/floppy0\fR).
.RE
.RS +4
.TP
.ie t \(bu
.el o
A datastream created by \fBpkgtrans\fR (see \fBpkgtrans\fR(1)).
.RE
The second form of the \fB-d\fR specifier, above, indicates the syntax you use
when specifying a datastream. In this case you must specify either a
comma-separated list of package names or the keyword \fBall\fR.
.RE
.SS "Instances"
.LP
By default, \fBpkgadd\fR searches the specified source, and presents an
interactive menu allowing the user to select which package instances found on
the source are to be installed. As an alternative, the package instances to be
installed can be specified using:
.sp
.ne 2
.na
\fB\fIpkginst\fR\fR
.ad
.sp .6
.RS 4n
The package instance or list of instances to be installed. The token \fBall\fR
may be used to refer to all packages available on the source medium. The format
\fIpkginst\fR\fB\&.*\fR can be used to indicate all instances of a package.
.sp
The asterisk character (\fB*\fR) is a special character to some shells and may
need to be escaped. In the C-Shell, the asterisk must be surrounded by single
quotes (\fB\&'\fR) or preceded by a backslash (\fB\e\fR).
.RE
.sp
.ne 2
.na
\fB\fB-Y\fR \fIcategory\fR[,\fIcategory\fR...]\fR
.ad
.sp .6
.RS 4n
Install packages based on the value of the \fBCATEGORY\fR parameter stored in
the package's \fBpkginfo\fR(4) file. All packages on the source medium whose
\fBCATEGORY\fR matches one of the specified categories will be selected for
installation or spooling.
.RE
.SH EXAMPLES
.LP
\fBExample 1 \fRInstalling a Package from a Solaris DVD
.sp
.LP
The following example installs a package from a Solaris DVD. You are prompted
for the name of the package you want to install.
.sp
.in +2
.nf
example# \fBpkgadd -d /cdrom/cdrom0/s0/Solaris_10/Product\fR
.fi
.in -2
.sp
.LP
\fBExample 2 \fRInstalling a Set of Packages from a Datastream
.sp
.LP
The example command shown below installs all of the packages in the datastream
specified by the \fB-d\fR source specifier. Prior to this command, this
datastream must have been created with the \fBpkgtrans\fR(1) command.
.sp
.in +2
.nf
example# \fBpkgadd -d /var/tmp/datastream all\fR
.fi
.in -2
.sp
.sp
.LP
The keyword \fBall\fR specifies that all of the packages found in the
designated datastream will be installed.
.SH EXIT STATUS
.ne 2
.na
\fB\fB0\fR\fR
.ad
.sp .6
.RS 4n
Successful completion
.RE
.sp
.ne 2
.na
\fB\fB1\fR\fR
.ad
.sp .6
.RS 4n
Fatal error.
.RE
.sp
.ne 2
.na
\fB\fB2\fR\fR
.ad
.sp .6
.RS 4n
Warning.
.RE
.sp
.ne 2
.na
\fB\fB3\fR\fR
.ad
.sp .6
.RS 4n
Interruption.
.RE
.sp
.ne 2
.na
\fB\fB4\fR\fR
.ad
.sp .6
.RS 4n
Administration.
.RE
.sp
.ne 2
.na
\fB\fB5\fR\fR
.ad
.sp .6
.RS 4n
Administration. Interaction is required. Do not use \fBpkgadd\fR \fB-n\fR.
.RE
.sp
.ne 2
.na
\fB\fB10\fR\fR
.ad
.sp .6
.RS 4n
Reboot after installation of all packages.
.RE
.sp
.ne 2
.na
\fB\fB20\fR\fR
.ad
.sp .6
.RS 4n
Reboot after installation of this package.
.RE
.SH FILES
.ne 2
.na
\fB\fB/var/sadm/install/logs/\fR\fR
.ad
.sp .6
.RS 4n
Location where \fBpkgadd\fR logs an instance of software installation.
.RE
.SH ATTRIBUTES
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
Interface Stability Evolving
.TE
.SH SEE ALSO
.LP
\fBpkginfo\fR(1), \fBpkgmk\fR(1), \fBpkgparam\fR(1), \fBpkgproto\fR(1),
\fBpkgtrans\fR(1), \fBinstallf\fR(1M), \fBpkgadm\fR(1M), \fBpkgask\fR(1M),
\fBpkgchk\fR(1M), \fBpkgrm\fR(1M), \fBremovef\fR(1M), \fBadmin\fR(4),
\fBpkginfo\fR(4), \fBattributes\fR(5), \fBlargefile\fR(5), \fBzones\fR(5)
.SH NOTES
.LP
When transferring a package to a spool directory, the \fB-r\fR, \fB-n\fR, and
\fB-a\fR options cannot be used.
.sp
.LP
The \fB-r\fR option can be used to indicate a directory name as well as a
filename. The directory can contain numerous response files, each sharing the
name of the package with which it should be associated. This would be used, for
example, when adding multiple interactive packages with one invocation of
\fBpkgadd\fR. In this situation, each package would need a response file. If
you create response files with the same name as the package (for example,
\fBpkinst1\fR and \fBpkinst2\fR), then name the directory in which these files
reside after the \fB-r\fR.
.sp
.LP
The \fB-n\fR option causes the installation to halt if any interaction is
needed to complete it.
.sp
.LP
If the default \fIadmin\fR file is too restrictive, the administration file may
need to be modified to allow for total non-interaction during a package
installation. See \fBadmin\fR(4) for details.
|