<!-- 
The contents of this Documentation are subject to the Public Documentation
License Version 1.01 (the "License"); you may only use this Documentation if
you comply with the terms of this License. A copy of the License is
available at http://www.opensolaris.org/os/community/documentation/license.
-->

<chapter id="ips_dev_cmds"><title>Advanced IPS Commands</title><highlights><para>The following sections describe the IPS commands used to set up a repository,
publish packages to a repository, and retrieve the package contents from a
repository.</para><itemizedlist><listitem><para><olink type="auto-generated" targetptr="pkgsend" remap="internal"></olink></para>
</listitem><listitem><para><olink type="auto-generated" targetptr="actions" remap="internal"></olink></para>
</listitem><listitem><para><olink type="auto-generated" targetptr="depot_server" remap="internal"></olink></para>
</listitem><listitem><para><olink type="auto-generated" targetptr="pkgrecv" remap="internal"></olink></para>
</listitem>
</itemizedlist>
</highlights><sect1 id="pkgsend"><title>The Publication Client pkgsend(1)</title><para>The image packaging system publication client, <command>pkgsend</command>,
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 <olink type="auto-generated" targetptr="actions" remap="internal">Actions in IPS</olink>.</para><para>The <citerefentry><refentrytitle>pkgsend</refentrytitle><manvolnum>1</manvolnum></citerefentry> command supports the following options.</para><table frame="topbot" pgwide="1" id="gimoi"><title><command>pkgsend(1)</command> Options</title><tgroup cols="2" colsep="0" rowsep="0"><colspec colwidth="21.13*"/><colspec colwidth="78.87*"/><thead><row rowsep="1"><entry><para>Option</para>
</entry><entry><para>Description</para>
</entry>
</row>
</thead><tbody><row><entry><para><option>s</option> <replaceable>repo_uri</replaceable></para>
</entry><entry><para>Specify a different repository server. The default repository is <literal>http://localhost:10000</literal>.</para>
</entry>
</row><row><entry><para><option>?</option> or <option>-help</option></para>
</entry><entry><para>Display usage message.</para>
</entry>
</row>
</tbody>
</tgroup>
</table><para>The <citerefentry><refentrytitle>pkgsend</refentrytitle><manvolnum>1</manvolnum></citerefentry> command supports the following sub commands.</para><table frame="topbot" pgwide="1" id="ghnpq"><title><command>pkgsend(1)</command> Subcommands</title><tgroup cols="2" colsep="0" rowsep="0"><colspec colwidth="21.13*"/><colspec colwidth="78.87*"/><thead><row rowsep="1"><entry><para>Subcommand</para>
</entry><entry><para>Description</para>
</entry>
</row>
</thead><tbody><row><entry><para><command>create-repository</command></para>
</entry><entry><para>Creates a new repository at the specified location if it does not already
exist. This subcommand is only supported for <literal>file://</literal> repository
locations for the OpenSolaris 2009.06 release.</para>
</entry>
</row><row><entry><para><command>open</command></para>
</entry><entry><para> Begins a transaction on the package specified by <replaceable>pkg_fmri</replaceable>.
A <literal>transaction_id</literal> is printed to the screen when the command
executes successfully.</para><para>Syntax : <command>pkgsend open <option>en</option> <replaceable>pkg_fmri</replaceable></command></para><itemizedlist><listitem override="none"><para><option>e</option>&ndash; Use this option
to prepend <literal>export PKG_TRANS_ID=</literal> to the <literal>transaction_id</literal>. This option can be used by the shell to evaluate the output and
set the environment variable <literal>PKG_TANS_ID</literal>. This environment
variable can be used when executing future <command>pkgsend</command> commands <emphasis role="strong">within the same transaction</emphasis>. If the           -n
option is given, the transaction ID is displayed as a           string; </para>
</listitem><listitem override="none"><para><option>n</option> Use this option to display
the transaction ID as a string.</para>
</listitem>
</itemizedlist>
</entry>
</row><row><entry><para><command>add</command></para>
</entry><entry><para>Adds an action to the current  transaction. </para><para>Syntax : <command>pkgsend add <replaceable>actions pkg_fmri</replaceable></command></para>
</entry>
</row><row><entry><para><command>include</command></para>
</entry><entry><para>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 <command>add</command>, <command>open</command> or <command>close</command> sub commands.</para><para>Syntax : <command>pkgsend include [<option>d</option> <replaceable>basedir</replaceable>] <replaceable>filename</replaceable></command></para>
</entry>
</row><row><entry><para><command>import</command> <replaceable>bundlefile</replaceable></para>
</entry><entry><para>Adds each given bundlefile into the current transaction. An <literal>SVR4</literal> package
is an example of a bundlefile.</para><para>Syntax : <command>pkgsend import [<option>T</option> <replaceable>pattern</replaceable>] <replaceable>bundlefile</replaceable></command></para><para>Use the following shell matching rules with the <replaceable>pattern</replaceable> 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.</para><note><para>The basename refers to the last component of a path name. For
example, in the path <filename>/usr/bin/ls</filename>, the basename is <filename>ls</filename>.</para>
</note><itemizedlist><listitem><para><literal>*</literal> &ndash; Matches everything.</para>
</listitem><listitem><para><literal>?</literal> &ndash; Matches any single character.</para>
</listitem><listitem><para><literal>[seq]</literal> &ndash; Matches any character in
sequence.</para>
</listitem><listitem><para><literal>[!seq]</literal> &mdash; Matches any character not
in sequence.</para>
</listitem>
</itemizedlist><note><para>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 <literal>.py</literal> that are installed to have the same
timestamp on the filesystem as is recorded in the compiled versions <literal>(.pyc)</literal> of those files.</para>
</note>
</entry>
</row><row><entry><para>close</para>
</entry><entry><para>Close the current transaction.</para><para>Syntax : <command>pkgsend close [-A]</command></para><para>The <option>A</option> 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.</para>
</entry>
</row>
</tbody>
</tgroup>
</table><sect2 id="ghnpx"><title>Limitations of the <command>pkgsend(1)</command> Command</title><para>Note the following limitations of using the <literal>pkgsend</literal> command:</para><itemizedlist><listitem><para>Use the <command>pkgsend</command> command only if one or
two packages at a time are being published to the repository.</para>
</listitem><listitem><para>The <command>pkgsend</command> command does not resolve dependencies.
If more than one package is being published to the repository, you must manually
resolve all package dependencies.</para>
</listitem>
</itemizedlist><note><para>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.</para>
</note>
</sect2>
</sect1><sect1 id="actions"><title>Actions in IPS</title><para>IPS manages software in units of packages. Packaging a product aids
in easy distribution and installation of the software product.</para><para>A package is a collection of files, directories, links, drivers, and
dependencies in a defined format. This collection represents the installable
objects of a package. In IPS terminology, this collection is referred to as <emphasis>actions</emphasis>.</para><para>Actions are  described in a package's manifest. Every action consists
primarily of  its name and a key attribute.  Together, these attributes refer
to a unique object and include a version history.  Actions can have other
attributes.  Some of these attributes are interpreted directly by the packaging
system, while others are useful only to the system administrator or the end
user.</para><para>If you have multiple actions in a manifest, the order in which they
are placed <emphasis role="strong">does not matter</emphasis>. All actions
are appropriately sorted before they are executed.</para><note><para>The attributes of a package are different from the attributes
of an action. To learn about the supported tags and attributes for a package,
see <olink type="auto-generated" targetptr="tags-attrib" remap="internal">Package
Tags and Attributes</olink> section .</para>
</note><para>Typically, only an action's key attribute is required, though some actions
might work properly only with a more complete set of attributes.</para><para> The following list provides an overview of the type of actions and
their standard attributes that are available with IPS. For additional details,
see the <citerefentry><refentrytitle>pkg</refentrytitle><manvolnum>5</manvolnum></citerefentry> man page.</para><note><para><citerefentry><refentrytitle>pkg</refentrytitle><manvolnum>5</manvolnum></citerefentry> refers to the image packaging system and is different from
the <command>pkg(1)</command> command, which is the retrieval client and is
used to create, install, and manage images on the system</para>
</note><note><para>The following table shows a list of the actions and their <emphasis>key</emphasis> attributes. For a complete list, refer to the <ulink url="http://opensolaris.org/sc/src/pkg/gate/src/man/pkg.5.txt" type="text">pkg(5)</ulink> man page.</para>
</note><table frame="topbot" pgwide="1" id="act_attrib"><title>Actions and Key Attributes</title><tgroup cols="2" colsep="0" rowsep="0"><colspec colwidth="14.45*"/><colspec colwidth="85.55*"/><thead><row rowsep="1"><entry><para>Action</para>
</entry><entry><para>Description and Key Attributes</para>
</entry>
</row>
</thead><tbody><row><entry><para><emphasis role="strong">Directory</emphasis></para>
</entry><entry><para>The <emphasis>directory</emphasis> action represents a directory as
a file system object.</para><para><emphasis role="strong">path</emphasis> &ndash; The file system path
where the file is installed.</para>
</entry>
</row><row><entry><para><emphasis role="strong">File</emphasis></para>
</entry><entry><para>The <emphasis>file</emphasis> action represents an ordinary file as
a file system object.</para><para><emphasis role="strong">path</emphasis> &ndash; The file system path
where the file is installed.</para>
</entry>
</row><row><entry><para><emphasis role="strong">Link</emphasis></para>
</entry><entry><para>The <emphasis>link</emphasis> action represents a symbolic link.</para><para><emphasis role="strong">path &ndash; </emphasis>The file system path
where the <constant>symlink</constant> is installed.</para>
</entry>
</row><row><entry><para><emphasis role="strong">Hardlink</emphasis></para>
</entry><entry><para>The <emphasis>hardlink</emphasis> action represents a physical link.</para><para><emphasis role="strong">path &ndash; </emphasis>The file system path
where the link is installed.</para>
</entry>
</row><row><entry><para><emphasis role="strong">Driver</emphasis></para>
</entry><entry><para>The <emphasis>driver</emphasis> action represents a device driver. 
It does not reference  a payload. the driver files must be installed as file
actions.</para><para><emphasis role="strong">name &ndash;</emphasis> The name of the driver.
 This is usually, but not always, the file name of the driver binary.</para>
</entry>
</row><row><entry><para><emphasis role="strong">Depend</emphasis> </para>
</entry><entry><para>The <emphasis>depend</emphasis> action represents a dependency between
packages.  A package  might depend on another package to work or to install.
 Dependencies are optional.</para><para>No key attribute is defined.</para>
</entry>
</row><row><entry><para><emphasis role="strong">License</emphasis> </para>
</entry><entry><para>The license action represents a license or other information associated
with the package contents.  A package can deliver licenses or disclaimers
to the package installer  through the use of the license action. The payload
of the license action is delivered into the image metadata directory associated
with the package.</para><para><emphasis role="strong">license &ndash;</emphasis> The keyword identifying
the license type, for use in filter and query operations.</para>
</entry>
</row><row><entry><para><emphasis role="strong">Legacy</emphasis></para>
</entry><entry><para>The legacy action represents package data used by a legacy packaging
system.  The attributes associated with this action are added to the legacy
system's databases so that the tools querying those databases might operate
as if the legacy package were actually installed.</para><para><emphasis role="strong">pkg &ndash;</emphasis> The abbreviation for
the package being installed.  The name of the package in the package FMRI
is the default value.</para>
</entry>
</row><row><entry><para><emphasis role="strong">Set</emphasis></para>
</entry><entry><para>The <emphasis>set</emphasis> action represents a package-level attribute,
such as the  package description.</para><para>No key attribute is defined.</para>
</entry>
</row><row><entry><para><emphasis role="strong">Group</emphasis></para>
</entry><entry><para>The <emphasis>group</emphasis> action defines a <trademark class="registered">UNIX</trademark> group as defined in <literal>group(4)</literal>.
 No support  is present for group passwords.  Groups defined with this action
initially  have no user-list. Users can be added with the user action.</para><para>No key attribute is defined.</para>
</entry>
</row><row><entry><para><emphasis role="strong">User</emphasis></para>
</entry><entry><para>The <emphasis>User </emphasis> action defines a UNIX user as defined
in <literal>/etc/passwd</literal>, <literal>/etc/shadow</literal>, <literal>/etc/group,</literal> and <literal>/etc/ftpd/ftpusers</literal> files.  Users defined
with this attribute have entries added to the appropriate files.</para><para>No key attribute is defined.</para>
</entry>
</row>
</tbody>
</tgroup>
</table><sect2 id="tags-attrib"><title>Package Attributes and Tags</title><para>You can set the attributes and tags of a package with the <literal>set</literal> action.</para><para>Packages carry information about themselves in the form of metadata,
which is also informally known as attributes and tags. Attributes refer to
settings that apply to an entire package. Tags are the settings that affect
individual files within a package. The developer who develops the package
provides specific information about the package through the tags and attributes. </para><para>The <literal>pkg</literal> attribute is the attribute that is common
to all packages, regardless of any particular OS platforms that a specific
package might target.</para><para> The IPS packages can contain the following set of tags and attributes.</para><table frame="topbot" pgwide="1" id="pkgattrib"><title>Package Attributes</title><tgroup cols="2" colsep="0" rowsep="0"><colspec colwidth="21.13*"/><colspec colwidth="78.87*"/><thead><row rowsep="1"><entry><para>Attribute</para>
</entry><entry><para>Description</para>
</entry>
</row>
</thead><tbody><row><entry><para><emphasis role="strong">Package Name</emphasis> : <literal>pkg.name</literal></para>
</entry><entry><para>Short, descriptive name of the package.</para>
</entry>
</row><row><entry><para><emphasis role="strong">Package Description</emphasis> : <literal>pkg.description</literal></para>
</entry><entry><para>A short paragraph describing the package.</para>
</entry>
</row><row><entry><para><emphasis role="strong">Package URL</emphasis>: <literal>pkg.detailed_url</literal> </para>
</entry><entry><para>Provides links to sites with further information about the package.</para>
</entry>
</row>
</tbody>
</tgroup>
</table><table frame="topbot" pgwide="1" id="tags"><title>Tags</title><tgroup cols="2" colsep="0" rowsep="0"><colspec colwidth="21.13*"/><colspec colwidth="78.87*"/><thead><row rowsep="1"><entry><para>Tag</para>
</entry><entry><para>Description</para>
</entry>
</row>
</thead><tbody><row><entry><para><emphasis role="strong">Debug Information</emphasis>: <literal>pkg.debug</literal></para>
</entry><entry><para>Specifies if the package needs to be installed in a debug configuration.</para>
</entry>
</row><row><entry><para><literal>ISA</literal></para>
</entry><entry><para>Distinguishes between different x86 platforms.</para>
</entry>
</row>
</tbody>
</tgroup>
</table><para>The <literal>opensolaris</literal> attribute is the attribute that is
common to all OpenSolaris packages. </para><note><para>In the following table, except for the <literal>ISA</literal> attribute,
all attributes have <literal>opensolaris</literal> appended to them. For example,
the attribute <literal>arc.url</literal> should be specified as <literal>opensolaris.arc_url</literal>.</para>
</note><table frame="topbot" pgwide="1" id="os_attrib"><title>OpenSolaris Attributes</title><tgroup cols="2" colsep="0" rowsep="0"><colspec colwidth="25.58*"/><colspec colwidth="74.42*"/><thead><row rowsep="1"><entry><para>OpenSolaris Attribute</para>
</entry><entry><para>Description</para>
</entry>
</row>
</thead><tbody><row><entry><para><literal>arc_url</literal></para>
</entry><entry><para>One or more URLs associated with the ARC case(s) associated with the
component(s) delivered by the package.</para>
</entry>
</row><row><entry><para><literal>maintainer</literal></para>
</entry><entry><para>A human&mdash;readable string describing the entity that <emphasis role="strong">provides</emphasis> the package. For an individual, this string
is the individual's name, or name and email address.</para>
</entry>
</row><row><entry><para><literal>variant.arch</literal></para>
</entry><entry><para>Identifies actions particular to the architecture, <literal>x86</literal> or <literal>SPARC</literal>.</para>
</entry>
</row><row><entry><para><literal>upstream</literal></para>
</entry><entry><para>A human&mdash;readable string describing the entity that <emphasis role="strong">creates</emphasis> the software.  For an individual, this string
is expected to be the individual's name, or name and email.</para>
</entry>
</row><row><entry><para><literal>upstream_url</literal></para>
</entry><entry><para>A URL associated with the entity that creates the software delivered
within the package.</para>
</entry>
</row><row><entry><para><literal>source_url</literal></para>
</entry><entry><para>A URL to the source code bundle, if appropriate, for the package.</para>
</entry>
</row><row><entry><para><literal>repository_url</literal></para>
</entry><entry><para>A URL to the source code repository, if appropriate, for the package.</para>
</entry>
</row><row><entry><para><literal>repository_changeset</literal></para>
</entry><entry><para>A change-set ID for the version of the source code contained in <literal>opensolaris.repository_url</literal> attribute.</para>
</entry>
</row><row><entry><para><literal>gui.classification</literal></para>
</entry><entry><para>A list of labels classifying the package into the categories shared
among <command>pkg(5)</command>graphical clients.</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect2>
</sect1><sect1 id="depot_server"><title>Overview of the <command>pkg.depotd</command> Depot
Server</title><para>The <citerefentry><refentrytitle>pkg</refentrytitle><manvolnum>1</manvolnum></citerefentry> command makes requests of the repository, also called the
depot server, for catalogs and packages. The <citerefentry><refentrytitle>pkgsend</refentrytitle><manvolnum>1</manvolnum></citerefentry> command sends new
versions of packages to the depot server. The depot server is typically run
as a service on the system. Package and software  developers can run private
copies for various testing purposes. The <command>pkg.depotd</command> service
is managed by the service  management facility, <command>smf(5)</command>,
under the service identifier: <literal>svc:/application/pkg/server</literal>.
Because the depot server expects to be run by a <command>smf(5)</command> restarter,
it does not run as a daemon process. Error messages are generally sent to
standard display, or to the <citerefentry><refentrytitle>syslogd</refentrytitle><manvolnum>1</manvolnum></citerefentry> system.</para><para>The pkg.depotd(1M) command is also used with the SMF commands to set
up a mirror repository. For an example of the <citerefentry><refentrytitle> pkg.depotd</refentrytitle><manvolnum>1M</manvolnum></citerefentry> options and its usage
with the SMF commands, see <olink type="auto-generated" targetptr="ghnok" remap="internal"></olink>.</para><para> The <literal>pkg.depotd</literal> server is usually configured through
the <citerefentry><refentrytitle>smf</refentrytitle><manvolnum>1</manvolnum></citerefentry> properties associated with its service instance. The following
properties are recognized.</para><table frame="topbot" pgwide="1"><title><literal>pkg.depotd(1M)</literal> Properties</title><tgroup cols="2" colsep="1" rowsep="1"><colspec colwidth="50*"/><colspec colwidth="50*"/><tbody><row><entry><para>Property</para>
</entry><entry><para>Description</para>
</entry>
</row><row><entry><para><command>pkg/inst_root</command></para>
</entry><entry><para>The file system path where this instance of the depot server should
look for its repository data. The default value is <literal>/var/pkg/repo</literal>.</para>
</entry>
</row><row><entry><para><command>pkg/port</command></para>
</entry><entry><para>The port number on which this instance of the depot server should listen
for incoming package requests.</para>
</entry>
</row><row><entry><para><command>pkg/proxy_base</command></para>
</entry><entry><para>This property is used to change the base URL for the depot server. This
is useful when the depot server is running behind a web server in a reverse
proxy configuration.</para>
</entry>
</row><row><entry><para><command>pkg/socket_timeout</command></para>
</entry><entry><para>The maximum number of seconds the server should wait for a response
from a client before closing a connection.</para>
</entry>
</row><row><entry><para><command>pkg/threads</command></para>
</entry><entry><para>The number of threads that the depot server will initiate to serve requests
from the client. The default value is 10.</para>
</entry>
</row><row><entry><para><command>pkg/log_access</command></para>
</entry><entry><para>The destination for any access&mdash;related information logged by the
depot server. The destination could be one of the following:</para><itemizedlist><listitem><para><literal>stdout</literal></para>
</listitem><listitem><para><literal>stderr</literal></para>
</listitem><listitem><para>No destination. This is the default value.</para>
</listitem><listitem><para>An absolute path name.</para>
</listitem>
</itemizedlist>
</entry>
</row><row><entry><para><command>pkg/log_errors</command></para>
</entry><entry><para>The destination for any errors or other related information logged by
the depot server. The destination could be one of the following :</para><itemizedlist><listitem><para><literal>stdout</literal></para>
</listitem><listitem><para><literal>stderr</literal>. This is the default value.</para>
</listitem><listitem><para>No destination</para>
</listitem><listitem><para>An absolute path name.</para>
</listitem>
</itemizedlist>
</entry>
</row><row><entry><para><command>pkg/mirror (boolean)</command></para>
</entry><entry><para>This property indicates whether package mirror mode  is used. When true,
publishing and metadata operations are disabled and only a limited browser
user interface is provided.<emphasis role="strong"> This property may not
be true when pkg/readonly is true </emphasis>. The default value is false.</para>
</entry>
</row>
</tbody>
</tgroup>
</table><para>The <citerefentry><refentrytitle>pkg.depotd</refentrytitle><manvolnum>1M</manvolnum></citerefentry> command has the following options to alter the default settings
from the service instance.</para><table frame="topbot" pgwide="1"><title><citerefentry><refentrytitle>pkg.depotd</refentrytitle><manvolnum>1M</manvolnum></citerefentry> Options</title><tgroup cols="2" colsep="1" rowsep="1"><colspec colwidth="50*"/><colspec colwidth="50*"/><tbody><row><entry><para>Option</para>
</entry><entry><para>Description</para>
</entry>
</row><row><entry><para><option>d</option> <replaceable>repo_dir</replaceable></para>
</entry><entry><para>Specifies a different repository directory. Overrides <command>pkg/inst_root</command> with the value given by <replaceable>repo_dir</replaceable>.</para>
</entry>
</row><row><entry><para><option>p</option> <replaceable>port</replaceable></para>
</entry><entry><para>Specifies a different port number. Overrides <citerefentry><refentrytitle>pkg/port</refentrytitle></citerefentry> with the value given by <replaceable>port</replaceable>.</para>
</entry>
</row><row><entry><para><option>s</option><replaceable>threads</replaceable></para>
</entry><entry><para>Overrides <citerefentry><refentrytitle>pkg/threads</refentrytitle></citerefentry>with the value given by <replaceable>threads</replaceable>.</para>
</entry>
</row><row><entry><para><option>t</option> <replaceable>socket_timeout</replaceable></para>
</entry><entry><para>Overrides <citerefentry><refentrytitle>pkg/socket_timeout</refentrytitle></citerefentry>with the value given by <replaceable>socket_timeout</replaceable>.</para>
</entry>
</row><row><entry><para><option>-cfg-file</option> <replaceable>cfg_file</replaceable></para>
</entry><entry><para>Overrides <citerefentry><refentrytitle>pkg/cfg_file</refentrytitle></citerefentry>with the value given by <replaceable>cfg_file</replaceable>.</para>
</entry>
</row><row><entry><para><option>-content-root</option> <replaceable>root_dir</replaceable></para>
</entry><entry><para>Overrides <citerefentry><refentrytitle>pkg/content_root</refentrytitle></citerefentry>with the value given by <replaceable>root_dir</replaceable>.</para>
</entry>
</row><row><entry><para><option>-debug</option> <replaceable>features</replaceable></para>
</entry><entry><para>Overrides <citerefentry><refentrytitle>pkg/debug</refentrytitle></citerefentry>with the value given by <replaceable>features</replaceable>.</para>
</entry>
</row><row><entry><para><option>-log-access</option> <replaceable>dest</replaceable></para>
</entry><entry><para>Overrides <citerefentry><refentrytitle>pkg/log_access</refentrytitle></citerefentry> with the value given by <replaceable>dest</replaceable>.</para>
</entry>
</row><row><entry><para><option>-log-errors</option> <replaceable>destination</replaceable></para>
</entry><entry><para>Overrides <command>pkg/log_errors</command> with the value given by <replaceable>destination</replaceable>.</para>
</entry>
</row><row><entry><para><option>-proxy-base</option> <replaceable>url</replaceable></para>
</entry><entry><para>Overrides <command>pkg/proxy_base</command> with the value given by <replaceable>url</replaceable>.</para>
</entry>
</row><row><entry><para><option>-mirror</option></para>
</entry><entry><para>Overrides <command>pkg/mirror</command> and sets the value to True.</para>
</entry>
</row><row><entry><para><option>-readonly</option></para>
</entry><entry><para>Disables modifying operations, such as those initiated by <citerefentry><refentrytitle>pkgsend</refentrytitle><manvolnum>1M</manvolnum></citerefentry>.
Retrieval operations are still available.</para>
</entry>
</row><row><entry><para><option>-rebuild</option></para>
</entry><entry><para>Destroys any existing repository catalog and then recreates on startup. </para>
</entry>
</row><row><entry><para><option>-writable-root</option></para>
</entry><entry><para>Overrides <command>pkg/writable_root</command> with the value given
by <replaceable>path</replaceable>.</para>
</entry>
</row><row><entry><para><option>-ssl-key-file</option></para>
</entry><entry><para>Overrides <command>pkg/ssl_key_file</command> with the value given by <replaceable>source</replaceable>.</para>
</entry>
</row><row><entry><para><option>-ssl-dialog</option></para>
</entry><entry><para>Overrides <command>pkg/ssl_dialog</command> with the value given by <replaceable>type</replaceable>.</para>
</entry>
</row><row><entry><para><option>-ssl-cert-file</option></para>
</entry><entry><para>Overrides <command>pkg/ssl_cert_file</command> with the value given
by <replaceable>source</replaceable>.</para>
</entry>
</row>
</tbody>
</tgroup>
</table><para>For further information, see the <ulink url="http://opensolaris.org/sc/src/pkg/gate/src/man/pkg.depotd.1m.txt" type="text">pkg.depotd(1M)</ulink> man page.</para><example id="ggczp"><title><emphasis role="strong">Enabling the Depot Server</emphasis></title><para>Type the following command as <emphasis role="strong">root</emphasis> user
to enable the depot server. In this example, <literal>application/pkg/server</literal> is
the depot server.</para><screen># svcadm enable application/pkg/server</screen>
</example><example id="ggczo"><title><emphasis role="strong">Changing the Listening
Port of The Depot Server</emphasis></title><para>Type the following sequence of commands as <emphasis role="strong">root</emphasis> user
to change the listening port of the depot server. This example sets the listening
port of the depot server to 9999.</para><screen># svccfg -s application/pkg/server set pkg/port = 9999
# svcadm refresh application/pkg/server
# svcadm restart application/pkg/server</screen>
</example>
</sect1><sect1 id="pkgrecv"><title><citerefentry><refentrytitle>pkgrecv</refentrytitle><manvolnum>1</manvolnum></citerefentry>, Content Retrieval Utility</title><para>The <command>pkgrecv</command> command enables the user to retrieve
the manifest and contents of a package from a package repository. The contents
can be retrieved in a format that enables the user to modify the package and
republish it by using the <command>pkgsend</command> command. </para><para>The <command>pkgrecv</command> command is complementary to the <command>pkgsend</command> command.</para><para>The following options are supported with the <command>pkgrecv</command> command.</para><table frame="topbot" id="ghnqh"><title>pkgrecv Options</title><tgroup cols="2" colsep="0" rowsep="0"><colspec colwidth="50*"/><colspec colwidth="50*"/><tbody><row><entry><para><option>s</option> <replaceable>repo_url</replaceable></para>
</entry><entry><para>Specifies the url or address of the server from where you want to receive
the package contents.</para>
</entry>
</row><row><entry><para><option>k</option></para>
</entry><entry><para>Keeps the individual package contents compressed.</para>
</entry>
</row><row><entry><para><option>d</option> <replaceable>directory</replaceable></para>
</entry><entry><para>The directory where the package contents should be placed. The default
location is the current working directory.</para>
</entry>
</row><row><entry><para><option>n</option></para>
</entry><entry><para>Lists the most recent versions of the packages available at the specified
server. The package contents are not downloaded.</para><para><emphasis role="strong">Example:</emphasis> List the most recent versions
of the packages available at <replaceable>test-server</replaceable>.</para><screen># pkgrecv &mdash;s http://test-server &mdash;n
pkg:/SUNWlibC@0.5.11,5.11-0.79:20080221T125720Z
pkg:/SUNWfreetype2@0.5.11,5.11-0.79:20080221T123955Z
pkg:/SUNWlibm@0.5.11,5.11-0.79:20080221T125728Z
pkg:/SUNWliboil@0.5.11,5.11-0.79:20080221T125730Z</screen><para><emphasis role="strong">Example :</emphasis> Receives the <literal>SUNWlibC</literal>, <literal>SUNWfreetype</literal>, and <literal>SUNWlibm</literal> 
packages from the test server.</para><screen># pkgrecv -s http://test 
SUNWlibC@0.5.11,5.11-0.79:20080221T125720Z
SUNWfreetype2@0.5.11,5.11-0.79:20080221T123955Z
SUNWlibm@0.5.11,5.11-0.79:20080221T125728Z

$ ls -d SUNW*
SUNWfreetype2  SUNWlibC  SUNWlibm</screen>
</entry>
</row>
</tbody>
</tgroup>
</table><para>For further information, see the <ulink url="http://opensolaris.org/sc/src/pkg/gate/src/man/pkgrecv.1.txt" type="text">pkgrecv(1)</ulink> man page.</para>
</sect1>
</chapter>