User Commands pkgsend(1) NAME pkgsend - image packaging system publication client SYNOPSIS /usr/bin/pkgsend [options] command [cmd_options] [operands] /usr/bin/pkgsend create-repository --set-property = ... /usr/bin/pkgsend open [-en] pkg_fmri /usr/bin/pkgsend add action arguments /usr/bin/pkgsend import [-T pattern] bundlefile ... /usr/bin/pkgsend include [-d basedir] ... [manifest] ... /usr/bin/pkgsend publish [-d basedir] ... pkg_fmri [manifest] ... /usr/bin/pkgsend close [-A | --no-index] /usr/bin/pkgsend refresh-index DESCRIPTION pkgsend allows the publication of new packages and new package versions to an image packaging repository. Each publication is structured as a transaction; multiple invocations of pkgsend through a transaction allow the addition of resources and the transaction submission. OPTIONS The following options are supported: -s repo_uri A URI representing the location of the target repository. The default value is http://localhost:10000/. --help or -? Displays a usage message. SUBCOMMANDS The following subcommands are supported: create-repository Creates a new repository at the provided location if it does not already exist. Only supported for 'file://' repository locations at this time. Initial repository configuration values can be provided using the --set-property option. It may also be specified multiple times. See pkg.depotd(1M) for a full list of repository properties. open [-en] pkg_fmri Begin a transaction on the package and version specified by pkg_fmri. By default, or if the -e option is given, a successfully opened transaction's ID will be published in a form suitable for use with eval(1), to set the PKG_TRANS_ID environment variable. This form can be convenient for delivering a package transaction from a shell script, for example. If the -n option is given, the transaction ID is displayed as a string; this may be more useful in situations where shell scripting is not an available option. add action arguments Add a resource associated with an action to the current transaction. Requires transaction context. See ACTIONS below. import [-T pattern] bundlefile ... Add each given bundlefile (such as a SVR4 package) into the current transaction. If the basename of files in the bundle match the optional pattern(s), the timestamp of the file is added to the action for that file. The pattern uses shell matching rules: * matches everything ? matches any single character [seq] matches any character in seq [!seq] matches any character not in seq include [-d basedir] ... [manifest] ... Add resources associated with the multiple actions present in each manifest file to the current transaction. If no files are specified, the standard input is read. Each line in the file should be the string representation of an action. In particular, the "add" token as described above should not be present, nor should there be open and close tokens representing transaction boundaries. For those actions with datastreams, the path to the file containing the data should be the second word on the line; for file actions if this is set to "NOHASH" the value of the "path" attribute is used instead. If the user specifies the -d option, basedir is prepended to the search path when locating files in the manifest. Multiple -d options have their directories searched in the order they appear on the command line. close [-A] Close current transaction. With -A, abandon the current transaction. With --no-index, do not update the repository's search indices. publish [ -d basedir] ... fmri [manifest] ... Combines open, include and close in a single operation. generate [ -T pattern] bundlefile ... Read each given bundlefile (such as an SVR4 package, directory, tarfile, etc) and emit the manifest describing the bundlefile to the stdout. The -T option works as in the import command. The repo argument or PKG_TRANS_ID is not used with this subcommand. Once obtained, the manifest can be annotated, have dependencies analyzed, added, etc before being passed to the publish or import subcommands. refresh-index Update the repository's search indices. Should be used after closing one or more transactions using --no-index. ENVIRONMENT VARIABLES The following environment variables are supported: PKG_TRANS_ID Identifier to use for this transaction. If undefined (and no alternative means of specifying a transaction is given), subcommands requiring transaction context will fail. ACTIONS Each resource within a package must be associated with an action. See pkg(5) for a complete list of actions. If an action has an associated payload, the path to the payload must be the first argument after the action name. (At present, the file and license actions have payloads.) All other attributes are specified as a list of name-value pairs, and may be given in any order. An action must always have a key attribute; however, some actions may require additional attributes to work correctly. Arbitrary attributes, beyond those defined for a given action, may be included in the action. Such attributes are expected to follow defined conventions such that they carry appropriate meaning or avoid collision with attributes from other action providers; specific attributes that cause additional operations, known as "actuators", are documented in pkg(5). depend type= fmri= [ property_list ] Make this package version dependent on the give package FMRI. Valid depend_types are require and optional. dir mode= owner= group= path= \ [ property_list ] Deliver a directory with the listed attributes into the transaction. driver name= perms= class= alias= \ [ property_list ] Deliver driver configuration with the listed attributes into the transaction. Multiple alias entries may be given to record multiple device aliases. file src_path mode= owner= group= \ path= [ property_list ] Deliver a file with the listed attributes into the transaction. group groupname= gid= [ property_list ] Deliver a group definition as defined in group(4). If the group ID, or gid, is omitted, the first free group under 100 will be assigned at installation time. See pkg(5) for additional details, and relation to the user action below. hardlink path= target= [ property_list ] Deliver a link with given path, pointing to the given target. legacy category= desc= hotline= \ name= pkg= vendor= version= \ [ property_list ] Deliver sufficient metadata, as given by the various fields, to represent a System V package with name given by legacy_pkg. license src_path license= \ [ property_list ] Deliver, into the image packaging metadata, the license file at src_path, labelled by the given license value. link path= target= [ property_list ] Deliver a symbolic link with given path, pointing to the given target. set name= value= [ property_list ] Deliver a "package property" defined by the given name and value. user username= password= uid= \ group= gcos-field= home-dir= \ login-shell= group-list= \ ftpuser={true|false} lastchng= min= \ max= warn= inactive= \ expire= flag= [ property_list ] Deliver a user account, as defined in passwd(4), shadow(4), group(4), and ftpusers(4). If the user ID, or uid, is omitted, then the first free user ID under 100 will be assigned at installation time. The primary group, specified by group, must exist prior to the action's execution; this condition can be ensured by having a group action deliver the group definition in the same package as the user action, or by having a depend action that expresses a requirement on a package possessing a group action. See pkg(5) for additional details. EXAMPLES Example 1: Create a trivial package. $ eval `pkgsend open example@1.0-1` $ pkgsend add file example mode=0555 owner=root group=bin \ path=/usr/bin/example $ pkgsend close Example 2: Create a new repository suitable for use with pkgsend or with a pkg(5) depot server. $ pkgsend -s file:///tmp/example_repo create-repository \ --set-property publisher.prefix=opensolaris.org EXIT STATUS The following exit values are returned: 0 Everything worked. 1 Something bad happened. 2 Invalid command line options were specified. FILES ATTRIBUTES See attributes(5) for descriptions of the following attri- butes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Availability | | |_____________________________|_____________________________| SEE ALSO eval(1), pkg.depotd(1M), ftpusers(4), group(4), passwd(4), shadow(4), attributes(5), pkg(5) NOTES The image packaging system is an under-development feature. Command names, invocation, formats, and operations are all subject to change. Development is hosted in the OpenSolaris community at http://opensolaris.org/os/project/pkg/ Other package bundle formats can be created. Other forms of package publication, via the underlying Python API or via the web API, are also possible.