summaryrefslogtreecommitdiff
path: root/usr/src/man/man1/pkgtrans.1
blob: dd128d66fb6dbaaf434d148d9b2a27964f571c99 (plain)
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
'\" te
.\" Copyright 1989 AT&T
.\" Copyright (c) 2007, Sun Microsystems, Inc.  All Rights Reserved
.\" Copyright (c) 2017 Peter Tribble.
.\" 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 PKGTRANS 1 "Mar 2, 2017"
.SH NAME
pkgtrans \- translate package format
.SH SYNOPSIS
.LP
.nf
\fBpkgtrans\fR [\fB-inos\fR] \fIdevice1\fR \fIdevice2\fR [\fIpkginst\fR]...
.fi

.SH DESCRIPTION
.LP
The \fBpkgtrans\fR utility translates an installable package from one format to
another. It translates:
.RS +4
.TP
.ie t \(bu
.el o
a file system format to a datastream
.RE
.RS +4
.TP
.ie t \(bu
.el o
a datastream to a file system format
.RE
.RS +4
.TP
.ie t \(bu
.el o
one file system format to another file system format
.RE
.SH OPTIONS
.LP
The options and arguments for this command are:
.sp
.ne 2
.na
\fB\fB-i\fR\fR
.ad
.RS 15n
Copies only the \fBpkginfo\fR(4) and \fBpkgmap\fR(4) files.
.RE

.sp
.ne 2
.na
\fB\fB-n\fR\fR
.ad
.RS 15n
Creates a new instance of the package on the destination device if any instance
of this package already exists, up to the number specified by the \fBMAXINST\fR
variable in the \fBpkginfo\fR(4) file.
.RE

.sp
.ne 2
.na
\fB\fB-o\fR\fR
.ad
.RS 15n
Overwrites the same instance on the destination device. Package instance will
be overwritten if it already exists.
.RE

.sp
.ne 2
.na
\fB\fB-s\fR\fR
.ad
.RS 15n
Indicates that the package should be written to \fIdevice2\fR as a datastream
rather than as a file system. The default behavior is to write a file system
format on devices that support both formats.
.RE

.SH OPERANDS
.ne 2
.na
\fB\fIdevice1\fR\fR
.ad
.RS 11n
Indicates the source device. The package or packages on this device will be
translated and placed on \fIdevice2\fR. See DEVICE SPECIFIERS, below.
.RE

.sp
.ne 2
.na
\fB\fIdevice2\fR\fR
.ad
.RS 11n
Indicates the destination device. Translated packages will be placed on this
device. See DEVICE SPECIFIERS, below.
.RE

.sp
.ne 2
.na
\fB\fIpkginst\fR\fR
.ad
.RS 11n
Specifies which package instance or instances on \fIdevice1\fR should be
translated. The token \fBall\fR may be used to indicate all packages.
\fBpkginst.*\fR can be used to indicate all instances of a package. If no
packages are defined, a prompt shows all packages on the device and asks which
to translate.
.sp
The asterisk character (\fB*\fR) is a special character to some shells and may
need to be escaped. In the C-Shell, the \fB*\fR must be surrounded by single
quotes (\fB\&'\fR) or preceded by a backslash (\fB\e\fR).
.RE

.SH DEVICE SPECIFIERS
.LP
Packaging tools, including \fBpkgtrans\fR, \fBpkgadd\fR(1M), and
\fBpkgchk\fR(1M), have options for specifying a package location by specifying
the device on which it resides. Listed below are the device types that a
package can be stored to and retrieved from. Note that source and destination
devices cannot be the same.
.sp
.ne 2
.na
\fBdevice\fR
.ad
.RS 16n
Packages can be stored to a character or block device by specifying the device
identifier as the device. Common examples of this device type are
\fB/dev/rmt/0\fR for a removable magnetic tape and \fB/floppy/floppy0\fR for
the first floppy disk on the system. \fBpkgtrans\fR can also produce regular
file system files in a stream format, which is suitable for storage on a
character device, web server, or as input to \fBpkgadd\fR(1M).
.RE

.sp
.ne 2
.na
\fBdevice alias\fR
.ad
.RS 16n
Devices that have been specified in \fB/etc/device.tab\fR are eligible for
being the recipient or source of a package. Common examples of this type of
device specification are \fBspool\fR (the default package device location) and
\fBdisk1\fR. These names correspond to devices specified in
\fB/etc/device.tab\fR
.RE

.sp
.ne 2
.na
\fBdirectory\fR
.ad
.RS 16n
Packages can be stored onto a directory by specifying an absolute path to a
file system directory. The package contents reside in a directory within the
specified directory. The package directory name must be identical to its
\fBPKG\fR specification in the \fBpkginfo\fR(4) file. An example device
specification of this type is \fB/export/packages\fR.
.RE

.SH EXAMPLES
.LP
\fBExample 1 \fRTranslating All Packages on the Floppy Disk
.sp
.LP
The following example translates all packages on the floppy drive
\fB/dev/diskette\fR and places the translations on \fB/tmp\fR:

.sp
.in +2
.nf
example% pkgtrans /dev/diskette /tmp all
.fi
.in -2
.sp

.LP
\fBExample 2 \fRTranslating Packages on \fB/tmp\fR
.sp
.LP
The following example translates packages \fBpkg1\fR and \fBpkg2\fR on
\fB/tmp\fR and places their translations (that is, a datastream) on the
\fB9track1\fR output device:

.sp
.in +2
.nf
example% pkgtrans /tmp 9track1 pkg1 pkg2
.fi
.in -2
.sp

.LP
\fBExample 3 \fRTranslating Packages on \fB/tmp\fR
.sp
.LP
The following example translates \fBpkg1\fR and \fBpkg2\fR on \fB/tmp\fR and
places them on the diskette in a datastream format:

.sp
.in +2
.nf
example% pkgtrans -s /tmp /dev/diskette pkg1 pkg2
.fi
.in -2
.sp

.LP
\fBExample 4 \fRTranslating a Package Datastream
.sp
.LP
The following example translates a package datastream into a file system format
package:

.sp
.in +2
.nf
example%  pkgtrans /tmp/pkg1.pkg ~/tmp pkg1
.fi
.in -2
.sp

.SH ENVIRONMENT VARIABLES
.LP
The \fBMAXINST\fR variable is set in the \fBpkginfo\fR(4) file and declares the
maximum number of package instances.
.SH EXIT STATUS
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 6n
Successful completion.
.RE

.sp
.ne 2
.na
\fB\fB>0\fR\fR
.ad
.RS 6n
An error occurred.
.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	See below.
.TE

.sp
.LP
The command-line syntax is Evolving.
.SH SEE ALSO
.LP
\fBpkginfo\fR(1), \fBpkgmk\fR(1), \fBpkgparam\fR(1), \fBpkgproto\fR(1),
\fBinstallf\fR(1M), \fBpkgadd\fR(1M), \fBpkgask\fR(1M), \fBpkgrm\fR(1M),
\fBremovef\fR(1M), \fBpkginfo\fR(4), \fBpkgmap\fR(4), \fBattributes\fR(5),
\fBlargefile\fR(5)
.sp
.LP
\fIApplication Packaging Developer\&'s Guide\fR
.SH NOTES
.LP
By default, \fBpkgtrans\fR does not translate any instance of a package if any
instance of that package already exists on the destination device. Using the
\fB-n\fR option creates a new instance if an instance of this package already
exists.  Using the \fB-o\fR option overwrites an instance of this package if it
already exists. Neither of these options are useful if the destination device
is a datastream.
.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(1M), \fBpkgtrans\fR and other package commands can process a
datastream of  up to 4 GB.