src/man/pkgmogrify.1
changeset 2709 14b0ab77bdf1
parent 2523 408a88a59f16
child 2825 0986d57e1337
child 2900 a513907dbf83
equal deleted inserted replaced
2708:4dac3e277ccf 2709:14b0ab77bdf1
     1 '\" te
     1 '\" te
     2 .\" Copyright (c) 2007, 2011, Oracle and/or its
     2 .\" Copyright (c) 2007, 2012, Oracle and/or its
     3 .\" affiliates. All rights reserved.
     3 .\" affiliates. All rights reserved.
     4 .TH pkgmogrify 1 "28 Jul 2011" "SunOS 5.11" "User Commands"
     4 .TH pkgmogrify 1 "4 Jun 2012" "SunOS 5.11" "User Commands"
     5 .SH NAME
     5 .SH NAME
     6 pkgmogrify \- Image Packaging System manifest transmogrifier
     6 pkgmogrify \- Image Packaging System manifest transmogrifier
     7 .SH SYNOPSIS
     7 .SH SYNOPSIS
     8 .LP
     8 .LP
     9 .nf
     9 .nf
    43 The following options are supported:
    43 The following options are supported:
    44 .sp
    44 .sp
    45 .ne 2
    45 .ne 2
    46 .mk
    46 .mk
    47 .na
    47 .na
    48 \fB\fB-D\fR \fIname\fR=\fIvalue\fR\fR
    48 \fB\fB-?\fR\fR
    49 .ad
    49 .ad
    50 .sp .6
    50 .br
    51 .RS 4n
    51 .na
    52 Defines \fIname\fR as a macro, with the value \fIvalue\fR. Macros appear in the input file as \fB$(macro)\fR. Substitution is repeated until no more translations are found. Common idioms include:
    52 \fB\fB--help\fR\fR
       
    53 .ad
       
    54 .sp .6
       
    55 .RS 4n
       
    56 Display a usage message.
       
    57 .RE
       
    58 
       
    59 .sp
       
    60 .ne 2
       
    61 .mk
       
    62 .na
       
    63 \fB\fB-D\fR \fImacro\fR=\fIvalue\fR\fR
       
    64 .ad
       
    65 .sp .6
       
    66 .RS 4n
       
    67 Define \fImacro\fR as a macro, with the value \fIvalue\fR. Macros appear in the input file as \fB$(macro)\fR. Substitution is repeated until no more translations are found. Common idioms include:
    53 .RS +4
    68 .RS +4
    54 .TP
    69 .TP
    55 .ie t \(bu
    70 .ie t \(bu
    56 .el o
    71 .el o
    57 Elimination of lines in a manifest on other architectures by using an architecture-specific tag at the beginning of the line:
    72 Elimination of lines in a manifest on other architectures by using an architecture-specific tag at the beginning of the line:
    82 
    97 
    83 .sp
    98 .sp
    84 .ne 2
    99 .ne 2
    85 .mk
   100 .mk
    86 .na
   101 .na
    87 \fB\fB-I\fR \fIinclude_directory\fR\fR
   102 \fB\fB-I\fR \fIincludedir\fR\fR
    88 .ad
   103 .ad
    89 .sp .6
   104 .sp .6
    90 .RS 4n
   105 .RS 4n
    91 Adds the specified directory to the search path for both files specified on the command line and embedded include directives.
   106 Add the specified directory to the search path for both files specified on the command line and embedded include directives.
    92 .RE
   107 .RE
    93 
   108 
    94 .sp
   109 .sp
    95 .ne 2
   110 .ne 2
    96 .mk
   111 .mk
   133 .sp .6
   148 .sp .6
   134 .RS 4n
   149 .RS 4n
   135 Write comments into the output manifest showing the effect of transforms. This information can aid in debugging.
   150 Write comments into the output manifest showing the effect of transforms. This information can aid in debugging.
   136 .RE
   151 .RE
   137 
   152 
   138 .sp
       
   139 .ne 2
       
   140 .mk
       
   141 .na
       
   142 \fB\fB--help\fR or \fB-?\fR\fR
       
   143 .ad
       
   144 .sp .6
       
   145 .RS 4n
       
   146 Displays a usage message.
       
   147 .RE
       
   148 
       
   149 .SH EMBEDDED DIRECTIVES
   153 .SH EMBEDDED DIRECTIVES
   150 .sp
   154 .sp
   151 .LP
   155 .LP
   152 Two types of directives are supported in manifest files: include directives and transform directives.
   156 Two types of directives are supported in manifest files: include directives and transform directives.
   153 .sp
   157 .sp
   180 .LP
   184 .LP
   181 Matching criteria are of the form:
   185 Matching criteria are of the form:
   182 .sp
   186 .sp
   183 .in +2
   187 .in +2
   184 .nf
   188 .nf
   185 [\fIaction-type\fR ... ] [\fIattribute\fR=<\fIvalue-regexp\fR> ...]
   189 [\fIaction-name\fR ... ] [\fIattribute\fR=<\fIvalue-regexp\fR> ...]
   186 .fi
   190 .fi
   187 .in -2
   191 .in -2
   188 
   192 
   189 .sp
   193 .sp
   190 .LP
   194 .LP
   191 One of the \fIaction-types\fR specified must match. All of the \fIattributes\fR specified must match. The regular expression syntax used is that of Python. For more information about Python regular expression syntax, use the command \fBpydoc re\fR or see more complete documentation at \fBhttp://docs.python.org/dev/howto/regex.html\fR. The regular expression is anchored at the beginning but not at the end. Therefore, a regular expression matching files by their extensions must include a leading \fB\&.*\fR and should include a trailing \fB$\fR.
   195 At least one specified \fIaction-name\fR must match. Every specified \fIattribute\fR must match. Action names and attributes are listed in "Actions" in the \fBpkg\fR(5) man page. The regular expression syntax used is that of Python. For more information about Python regular expression syntax, use the command \fBpydoc re\fR or see more complete documentation at \fBhttp://docs.python.org/dev/howto/regex.html\fR. The regular expression is anchored at the beginning but not at the end. Therefore, a regular expression matching files by their extensions must include a leading \fB\&.*\fR and should include a trailing \fB$\fR.
   192 .sp
   196 .sp
   193 .LP
   197 .LP
   194 Multiple criteria can be specified, separated by spaces.
   198 Multiple criteria can be specified, separated by spaces.
   195 .sp
   199 .sp
   196 .LP
   200 .LP
   315 .el o
   319 .el o
   316 \fBpkg.manifest.lineno\fR refers to the line on which the action was found.
   320 \fBpkg.manifest.lineno\fR refers to the line on which the action was found.
   317 .RE
   321 .RE
   318 .sp
   322 .sp
   319 .LP
   323 .LP
   320 Three synthetic attributes are similar to ones used in \fBpkg\fR(1):
   324 Three synthetic attributes are similar to ones used in \fBpkg\fR:
   321 .RS +4
   325 .RS +4
   322 .TP
   326 .TP
   323 .ie t \(bu
   327 .ie t \(bu
   324 .el o
   328 .el o
   325 \fBaction.hash\fR refers to the hash value of the action if the action carries a payload. For actions with payloads, the \fBset\fR operation can change the hash of the action by operating on the \fBaction.hash\fR attribute.
   329 \fBaction.hash\fR refers to the hash value of the action if the action carries a payload. For actions with payloads, the \fBset\fR operation can change the hash of the action by operating on the \fBaction.hash\fR attribute.
   332 .RE
   336 .RE
   333 .RS +4
   337 .RS +4
   334 .TP
   338 .TP
   335 .ie t \(bu
   339 .ie t \(bu
   336 .el o
   340 .el o
   337 \fBaction.name\fR refers to the name of the action type.
   341 \fBaction.name\fR refers to the name of the action.
   338 .RE
   342 .RE
   339 .sp
   343 .sp
   340 .LP
   344 .LP
   341 If the attribute whose value is requested does not exist, \fBpkgmogrify\fR exits with an error. To prevent exiting with an error, follow the attribute name with \fB;notfound=\fR and a value to substitute in place of the attribute value. For example, \fB%(alias;notfound='no alias')\fR prints the value of the attribute \fBalias\fR if it exists, and prints \fBno alias\fR otherwise.
   345 If the attribute whose value is requested does not exist, \fBpkgmogrify\fR exits with an error. To prevent exiting with an error, follow the attribute name with \fB;notfound=\fR and a value to substitute in place of the attribute value. For example, \fB%(alias;notfound='no alias')\fR prints the value of the attribute \fBalias\fR if it exists, and prints \fBno alias\fR otherwise.
   342 .sp
   346 .sp
   348 .sp
   352 .sp
   349 .LP
   353 .LP
   350 It is useful not only to reference package attributes as if they were action attributes, but also to match on them, and even temporarily modify them. Therefore a synthetic action name, \fBpkg\fR, is available (only in the context of \fBpkgmogrify\fR) for use in these situations.
   354 It is useful not only to reference package attributes as if they were action attributes, but also to match on them, and even temporarily modify them. Therefore a synthetic action name, \fBpkg\fR, is available (only in the context of \fBpkgmogrify\fR) for use in these situations.
   351 .sp
   355 .sp
   352 .LP
   356 .LP
   353 When \fBpkgmogrify\fR finishes reading a manifest specified on the command line and that manifest defined a \fBpkg.fmri\fR package attribute, \fBpkgmogrify\fR creates this synthetic \fBpkg\fR action, whose attributes are the package's attributes. A \fB<transform>\fR directive can then match on this action, just like any other action type.
   357 When \fBpkgmogrify\fR finishes reading a manifest specified on the command line and that manifest defined a \fBpkg.fmri\fR package attribute, \fBpkgmogrify\fR creates this synthetic \fBpkg\fR action, whose attributes are the package's attributes. A \fB<transform>\fR directive can then match on this action, just as it can match on any other action.
   354 .sp
   358 .sp
   355 .LP
   359 .LP
   356 Operations on a \fBpkg\fR action are special in that they take place only in memory and do not directly affect the emitted manifest. For instance, trying to set an attribute on a \fBpkg\fR action via the \fBadd\fR, \fBdefault\fR, or \fBset\fR operations does not result in a \fBset\fR action being added to the manifest, though it will be available for other \fB<transform>\fR directives to match on. Attempting to \fBemit\fR a \fBpkg\fR action causes an error. To add a package attribute, \fBemit\fR a \fBset\fR action instead.
   360 Operations on a \fBpkg\fR action are special in that they take place only in memory and do not directly affect the emitted manifest. For instance, trying to set an attribute on a \fBpkg\fR action via the \fBadd\fR, \fBdefault\fR, or \fBset\fR operations does not result in a \fBset\fR action being added to the manifest, though it will be available for other \fB<transform>\fR directives to match on. Attempting to \fBemit\fR a \fBpkg\fR action causes an error. To add a package attribute, \fBemit\fR a \fBset\fR action instead.
   357 .sp
   361 .sp
   358 .LP
   362 .LP
   578 .ad
   582 .ad
   579 .RS 6n
   583 .RS 6n
   580 .rt  
   584 .rt  
   581 Unexpected processing error.
   585 Unexpected processing error.
   582 .RE
   586 .RE
       
   587 
   583 .SH FILES
   588 .SH FILES
   584 .sp
   589 .sp
   585 .ne 2
   590 .ne 2
   586 .mk
   591 .mk
   587 .na
   592 .na
   588 \fB\fB/usr/share/pkg/transforms\fR\fR
   593 \fB\fB/usr/share/pkg/transforms\fR\fR
   589 .ad
   594 .ad
   590 .sp .6
   595 .sp .6
   591 .RS 4n
   596 .RS 4n
   592 This directory contains files with useful transforms to set facets, 
   597 This directory contains files with useful transforms to set facets, actuators, and other attributes.
   593 actuators and other attributes.
   598 .RE
   594 
   599 
   595 .SH ATTRIBUTES
   600 .SH ATTRIBUTES
   596 .sp
   601 .sp
   597 .LP
   602 .LP
   598 See \fBattributes\fR(5) for descriptions of the following attributes:
   603 See \fBattributes\fR(5) for descriptions of the following attributes: