OpenSolaris 2009.06 Image Packaging System Guide
Previous Next

The Publication Client pkgsend(1)

The image packaging system publication client, pkgsend, enables the publication of new packages and new package versions to an image packaging repository. Each publication is structured as a transaction. Transactions can contain actions as described in the section Actions in IPS.

The pkgsend(1) command supports the following options.

Table 5-1 pkgsend(1) Options

Option

Description

-s repo_uri

Specify a different repository server. The default repository is http://localhost:10000.

-? or --help

Display usage message.

The pkgsend(1) command supports the following sub commands.

Table 5-2 pkgsend(1) Subcommands

Subcommand

Description

create-repository

Creates a new repository at the specified location if it does not already exist. This subcommand is only supported for file:// repository locations for the OpenSolaris 2009.06 release.

open

Begins a transaction on the package specified by pkg_fmri. A transaction_id is printed to the screen when the command executes successfully.

Syntax : pkgsend open -en pkg_fmri

  • -e– Use this option to prepend export PKG_TRANS_ID= to the transaction_id. This option can be used by the shell to evaluate the output and set the environment variable PKG_TANS_ID. This environment variable can be used when executing future pkgsend commands within the same transaction. If the -n option is given, the transaction ID is displayed as a string;

  • -n Use this option to display the transaction ID as a string.

add

Adds an action to the current transaction.

Syntax : pkgsend add actions pkg_fmri

include

Adds multiple actions present in each manifest file to the current transaction. Each line in the file should be the string representation of an action. Do not use this sub command with the add, open or close sub commands.

Syntax : pkgsend include [-d basedir] filename

import bundlefile

Adds each given bundlefile into the current transaction. An SVR4 package is an example of a bundlefile.

Syntax : pkgsend import [-T pattern] bundlefile

Use the following shell matching rules with the pattern option to add the timestamp of the file to the action of that file, if the basename of the files in the bundle match the optional patterns.


Note - The basename refers to the last component of a path name. For example, in the path /usr/bin/ls, the basename is ls.


  • * – Matches everything.

  • ? – Matches any single character.

  • [seq] – Matches any character in sequence.

  • [!seq] — Matches any character not in sequence.


Note - When a timestamp is added to a file's actions, the file will be installed with precisely that timestamp, regardless of the actual time of installation. This is particularly useful in cases where the software requires a particular timestamp on the files it reads. For instance, python wants the executable files .py that are installed to have the same timestamp on the filesystem as is recorded in the compiled versions (.pyc) of those files.


close

Close the current transaction.

Syntax : pkgsend close [-A]

The -A option abandons the current transaction. Use this option to remove all information of a transaction such as package and file information, from a server when a transaction is canceled before it is completed.

Limitations of the pkgsend(1) Command

Note the following limitations of using the pkgsend command:

  • Use the pkgsend command only if one or two packages at a time are being published to the repository.

  • The pkgsend command does not resolve dependencies. If more than one package is being published to the repository, you must manually resolve all package dependencies.


Note - When you are publishing a newer version of a package to the repository, specify the FMRI of the package correctly. The new version of the package will coexist with any prior version already in the repository.


Previous Next