1pkgmk(1)                         User Commands                        pkgmk(1)
2
3
4

NAME

6       pkgmk - produce an installable package
7

SYNOPSIS

9       pkgmk [-o] [-a arch] [-b base_src_dir] [-d device]
10            [-f prototype] [-l limit] [-p pstamp] [-r root_path]
11            [-v version] [variable=value]... [pkginst]
12
13

DESCRIPTION

15       The  pkgmk  utility produces an installable package to be used as input
16       to the pkgadd(1M) command. The package contents is in directory  struc‐
17       ture format.
18
19
20       The  command  uses the package prototype(4) file as input and creates a
21       pkgmap(4) file. The contents for each entry in the  prototype  file  is
22       copied  to  the appropriate output location. Information concerning the
23       contents (checksum, file  size,  modification  date)  is  computed  and
24       stored  in  the pkgmap file, along with attribute information specified
25       in the prototype file.
26
27
28       pkgmk searches for  the  files  listed  in  the  prototype(4)  file  as
29       described  in  the following conditions. Note: If a prototype file con‐
30       tains the explicit location of the file to include in the package, then
31       the following search explanations do not apply.
32
33           1.     If  neither  -b  nor -r options are specified, the file name
34                  component of each file path listed in the prototype(4)  file
35                  is  expected to be found in the same directory as the proto‐
36                  type(4) file
37
38           2.     If -b is specified as a relative  path  (without  a  leading
39                  "/"),  then  base_src_dir  is prepended to the relative file
40                  paths from the prototype(4)  file.  The  resulting  path  is
41                  searched for in the root_path directories. If a root_path is
42                  not specified, it defaults to "/".
43
44           3.     If -b is specified as an absolute path (with a leading "/"),
45                  then  base_src_dir  is  prepended to the relative paths from
46                  the prototype(4) file and the result is the location of  the
47                  file. root_path is not searched.
48
49           4.     If  -r  is specified, then full file paths are used from the
50                  prototype(4)  file.   Relative   paths   have   base_src_dir
51                  prepended.  If base_src_dir is not specified, it defaults to
52                  "". The resulting path is searched for in each directory  of
53                  the root_path.
54
55
56       If  you  created your prototype file using "pkgproto a/relative/path"or
57       "pkgproto  a/relative/path=install/path",  you  should   use   the   -r
58       root_path  option  to  specify  the location of a/relative/path so that
59       pkgmk can correctly locate your source files.
60
61
62       Package commands, including pkgmk, are largefile(5)-aware. They  handle
63       files  larger  than  2 GB in the same way they handle smaller files. In
64       their current implementations, pkgadd(1M), pkgtrans(1) and other  pack‐
65       age commands can process a datastream of  up to 4 GB.
66

OPTIONS

68       The following options are supported:
69
70       -a arch            Overrides  the  architecture information provided in
71                          the pkginfo(4) file with arch.
72
73
74       -b base_src_dir    Prepends the indicated base_src_dir to locate  relo‐
75                          catable  objects  on  the  source  machine. Use this
76                          option to search for all objects  in  the  prototype
77                          file.   pkgmk   expects   to  find  the  objects  in
78                          /base_src_dir or to locate the objects by use of the
79                          -b and -r options, respectively.
80
81
82       -d device          Creates  the  package  on  device.  device can be an
83                          absolute directory pathname or the identifiers for a
84                          floppy   disk   or   removable  disk  (for  example,
85                          /dev/diskette). The default device is the  installa‐
86                          tion spool directory (/var/spool/pkg).
87
88
89       -f prototype       Uses the file prototype as input to the command. The
90                          default prototype filename is [Pp]rototype.
91
92
93       -l limit           Specifies the maximum size in 512 byte blocks of the
94                          output  device  as  limit. By default, if the output
95                          file is a directory or  a  mountable  device,  pkgmk
96                          employs  the df(1M) command to dynamically calculate
97                          the amount of available space on the output  device.
98                          This  option  is  useful  in  conjunction  with pkg‐
99                          trans(1) to create a package with a datastream  for‐
100                          mat.
101
102
103       -o                 Overwrites  the  same  instance; package instance is
104                          overwritten if it already exists.
105
106
107       -p pstamp          Overrides the production  stamp  definition  in  the
108                          pkginfo(4) file with pstamp.
109
110
111       -r root_path       Uses  the  indicated root_path with the source path‐
112                          name  appended  to  locate  objects  on  the  source
113                          machine,  using a comma (,) as the separator for the
114                          path elements. If this option is specified, look for
115                          the full destination path in each of the directories
116                          specified. If neither -b nor -r is  specified,  look
117                          for the leaf filename in the current directory.
118
119
120       -v version         Overrides  the  version  information provided in the
121                          pkginfo(4) file with version.
122
123
124       variable=value     Places the indicated variable in the packaging envi‐
125                          ronment.  (See prototype(4) for definitions of vari‐
126                          able specifications.)
127
128

OPERANDS

130       The following operand is supported:
131
132       pkginst    A package designation by its instance. An  instance  can  be
133                  the  package  abbreviation or a specific instance (for exam‐
134                  ple, inst.1 or inst.2). All instances of a  package  can  be
135                  requested by inst.*. The asterisk character (*) is a special
136                  character to some shells and might need to  be  escaped.  In
137                  the  C-Shell,  *  must be surrounded by single quotes (') or
138                  preceded by a backslash (\).
139
140

EXIT STATUS

142       The following exit values are returned:
143
144       0     Successful completion.
145
146
147       >0    An error occurred.
148
149

ATTRIBUTES

151       See attributes(5) for descriptions of the following attributes:
152
153
154
155
156       ┌─────────────────────────────┬─────────────────────────────┐
157       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
158       ├─────────────────────────────┼─────────────────────────────┤
159       │Availability                 │SUNWcsu                      │
160       └─────────────────────────────┴─────────────────────────────┘
161

SEE ALSO

163       pkgparam(1), pkgproto(1), pkgtrans(1),  uname(1),  df(1M),  pkgadd(1M),
164       pkginfo(4), pkgmap(4), prototype(4), attributes(5), largefile(5)
165
166
167       Application Packaging Developer's Guide
168

NOTES

170       Architecture  information  is  provided on the command line with the -a
171       option or in the prototype(4) file. If no architecture  information  is
172       supplied, pkgmk uses the output of uname -m (see uname(1)).
173
174
175       Version  information is provided on the command line with the -v option
176       or in the pkginfo(4) file. If no version  information  is  supplied,  a
177       default based on the current date is provided.
178
179
180       Command line definitions for both architecture and version override the
181       prototype(4) definitions.
182
183
184       pkgmk fails if one of  the  following  invalid  combinations  of  zone-
185       related parameters is used:
186
187           1.     Both  SUNW_PKG_ALLZONES  and  SUNW_PKG_THISZONE  are  set to
188                  TRUE.
189
190           2.     SUNW_PKG_HOLLOW is set to TRUE and SUNW_PKG_ALLZONES is  set
191                  to FALSE.
192
193           3.     The  package contains a request script and SUNW_PKG_THISZONE
194                  set to TRUE.
195
196
197       For additional information regarding these parameters, see pkginfo(4).
198
199
200
201SunOS 5.11                        30 Oct 2007                         pkgmk(1)
Impressum