|Skip Navigation Links|
|Exit Print View|
|man pages section 1: User Commands Oracle Solaris 11.1 Information Library|
- Image Packaging System publication client
/usr/bin/pkgsend [options] command [cmd_options] [operands]
/usr/bin/pkgsend generate [-T pattern] [--target file] source ...
/usr/bin/pkgsend publish [-b bundle ...] [-d source ...] [-s repo_uri_or_path] [-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(5).
After a pkgsend operation, run pkgrepo refresh or pkgrepo rebuild on the repository to build 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. In the output manifest, file and dir actions have owner set to root and group set to bin.
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.
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(5) man page for information about the version string of a package FMRI.
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.
Do not add the package to the publisher's catalog. This option is recommended whenever multiple packages are being published at one time as updates to publisher catalogs must be performed serially. Once publication is complete, the refresh subcommand of pkgrepo can be used to add the new packages to the respective publisher catalogs.
For a descriptions of the -T option, see the generate subcommand above.
The path or URI of the destination repository.
Example 1 Generate and Publish a Package
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.p5m
Example 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 /exdir
Example 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(5) 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(1M) for more information.