pkgsend - Image Packaging System publication client
/usr/bin/pkgsend [options] command [cmd_options] [operands]
/usr/bin/pkgsend generate [-T pattern] [-u] [--target file] source ...
/usr/bin/pkgsend publish [-b bundle]... [-d source]... [-s repo_uri_or_path] [--key ssl_key --cert ssl_cert]... [-T pattern] [--no-catalog] [manifest ...]
pkgsend enables the publication of new packages and new package versions to an image packaging repository using package manifests. To create or manage repositories, see pkgrepo(1). To create package archives from packages in an existing repository, see pkgrecv(1). For more information about package manifests, see pkg(7).
After a pkgsend publish operation, if your repo_uri_or_path repository must support pkg search operations, run pkgrepo refresh on the repository to update search indexes.
The following options are supported:
Display a usage message.
The following subcommands are supported:
Read each source (such as an SVR4 package, a directory, or a tar file) and emit the manifest that describes the source to stdout.
The output manifest can then be annotated, have dependencies added or analyzed using pkgdepend, and have its correctness verified using pkglint before being passed to the publish subcommand.
The following are supported sources:
Filesystem format SVR4 packages
Datastream format SVR4 packages
If the base name of files in the source match the patterns specified with –T, the timestamp of the file is added to the action for that file. The pattern uses shell matching rules:
Matches any single character.
Matches any character in seq.
Matches any character not in seq.
When the specified source is a directory, there is no clear way to distinguish a file action from a hardlink action when there are multiple path names for a single inode. Normally, the first one found in the file system walk is treated as a file and the rest as hardlinks. This can be arbitrary, depending on the implementation of the file system. To specify which path names should be treated as files, pass each path name as an argument to the –-target option. This option has no effect on other types of sources because they are capable of expressing which path names are files and which are hardlinks.
When SVR4 packages are provided as a source, pkgsend checks that no files with class action scripts are present and no preinstall, postinstall, preremove, or postremove scripts are present. An exception is made for any SMF manifests installed with the manifest class. BASEDIR is removed from all relocatable paths.
The SVR4 DESC parameter is converted to a pkg.description value. The SVR4 NAME parameter is converted to a pkg.summary value.
When generating a manifest based on a directory, the owner and group for each file and directory defaults to root and bin respectively. To use the owner and group information set on the files and directories instead, specify –u.
Publish a package using the specified package manifests to the target package repository, retrieving files for the package from the provided sources. If multiple manifests are specified, they are joined in the order provided. If a manifest is not specified, the manifest is read from stdin.
If not specified, pkgsend publish adds the build version to the package FMRI. The publish tool also adds the timestamp (the current time in UTC) to the package FMRI. See the pkg(7) man page for information about the version string of a package FMRI.
If multiple pkgsend publish processes might be publishing to the same –s repository simultaneously, specifying the –-no-catalog option is recommended. See the description of the –-no-catalog option below.
Add the specified bundle to the list of sources to search when looking for files in the manifest. Bundles are sources such as tar files and SVR4 packages. If this option is specified multiple times, sources are searched in the order they appear on the command line. If both –b and – d are specified, –d sources are searched first. For a description of supported bundles and how they are used, refer to the generate subcommand above.
Add the specified directory to the list of sources to search when looking for files in the manifest. If this option is specified multiple times, sources are searched in the order they appear on the command line. For a description of supported sources and how they are used, refer to the generate subcommand above.
Publish the package to the repository located at the given URI or file system path. See the “Notes” section below for more information about restrictions and suggestions for publication. See also the “Environment Variables” section.
Use the –-key option to specify a client SSL key file to use for package retrieval from an HTTPS repository. Use the –-cert option to specify a client SSL certificate file to use for package retrieval from an HTTPS repository. This option pair can be specified multiple times.
Do not add the package to the publisher's catalog. This option is recommended whenever multiple packages are being published at one time because updates to publisher catalogs must be performed serially. Publication performance might be significantly reduced if this option is not used when multiple processes are simultaneously publishing packages. After publication is complete, the new packages can be added to the respective publisher catalogs by using the pkgrepo refresh command.
For a description of the –T option, see the generate subcommand above.
Seconds to wait trying to connect during transport operations (for each attempt) before the client aborts the operation. A value of 0 means wait indefinitely.
Default value: 60
Seconds below the lowspeed limit (1024 bytes/second) during transport operations before the client aborts the operation. A value of 0 means do not abort the operation.
Default value: 30
Maximum number of transient transport errors before the client aborts the operation. A value of 0 means do not abort the operation.
Default value: 4
Maximum number of HTTP or HTTPS redirects allowed during transport operations before a connection is aborted. A value of 0 means do not abort the operation.
Default value: 5
Maximum number of transport attempts per host before the client aborts the operation. A value of 0 means do not abort the operation.
Default value: 4
HTTP or HTTPS proxy server. Use the following syntax to set either http_proxy or https_proxy:
List of host names that should not go through any proxy. If set to asterisk (*) only, all hosts are matched: no hosts will be proxied. Use the following syntax to set no_proxy:
no_proxy [* | host[,host]...]
The path or URI of the destination repository.
Create a package using pkgsend generate and publish it.
$ pkgsend generate /path/to/proto > /path/to/manifests/foo.p5m
Add the package FMRI for the example.com publisher to the beginning of foo.p5m.
set name=pkg.fmri value=pkg://email@example.com
The resulting manifest should look like this:
set name=pkg.fmri value=pkg://firstname.lastname@example.org dir group=sys mode=0755 owner=root path=usr dir group=bin mode=0755 owner=root path=usr/bin file usr/bin/foo group=bin mode=0555 owner=root path=usr/bin/foo
$ pkgsend publish -s http://example.com:10000 -d /path/to/proto \ /path/to/manifests/foo.p5mExample 2 Create and Publish a Trivial Package
Create a manifest for publisher example.com containing the following lines:
set name=pkg.fmri value=pkg://email@example.com file /exdir/foo mode=0555 owner=root group=bin path=/usr/bin/foo
Publish the package:
$ pkgsend publish -s http://example.com:10000 -d /exdirExample 3 Use a Preexisting Manifest
Publish a package using file system based publication and a preexisting manifest.
$ pkgsend publish -s /tmp/example_repo -d /tmp/pkg_files \ /tmp/pkg_manifest
The following exit values are returned:
An error occurred.
Invalid command line options were specified.
An unanticipated exception occurred.
See attributes(7) for descriptions of the following attributes:
Because of publication protocol limitations, file system based publication must be used when publishing individual package files that are greater than 128 MB in size. File system based publication is also recommended when access control for a repository is needed.
When using file system based publication, any pkg.depotd processes that are serving the target repository must be restarted after publication is completed for the changes to be reflected in its web interface or search responses. See pkg.depotd(8) for more information.