<!-- 
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="learn_ips"><title>Learning About IPS</title><highlights><para>The Image Packaging System software is a network-centric packaging system.</para><note><para>Both IPS and <literal>SVR4</literal> packages are supported for
the OpenSolaris 2009.06 release.</para>
</note><para>With IPS, users can perform the following tasks:</para><itemizedlist><listitem><para>Create and manage images</para>
</listitem><listitem><para>Install new packages and update existing packages</para>
</listitem><listitem><para>Manage and search the software on your system</para>
</listitem>
</itemizedlist><para>With the IPS publication tools, developers can perform the following:</para><itemizedlist><listitem><para>Create and manage packaging repositories</para>
</listitem><listitem><para>Create and publish packages to a packaging repository</para>
</listitem><listitem><para>Provide a content mirror for an existing packaging repository</para>
</listitem><listitem><para>Retrieve the contents of an existing package from a packaging
repository</para>
</listitem><listitem><para>Republish the contents of an existing package to a packaging
repository</para>
</listitem>
</itemizedlist>
</highlights><sect1 id="gilfn"><title>IPS Commands</title><para>The Image Packaging System software provides the following commands:</para><variablelist><varlistentry><term><command>pkg(1)</command></term><listitem><para>A command-line client that can be used to create and manage
images, search package data, and perform software installation, upgrade, and
removal.</para><para>For more information, see the following:</para><itemizedlist><listitem><para><olink type="auto-generated" targetptr="ips_cmds" remap="internal"></olink></para>
</listitem><listitem><para><olink type="auto-generated" targetptr="image" remap="internal"></olink></para>
</listitem><listitem><para><olink type="custom-text" targetptr="pkgtbl" remap="internal">pkg(1) Command
Reference</olink></para>
</listitem>
</itemizedlist>
</listitem>
</varlistentry><varlistentry><term><citerefentry><refentrytitle>pkgsend</refentrytitle><manvolnum>1</manvolnum>
</citerefentry></term><listitem><para>A command-line client that can be used to publish packages,
create package repositories, and manage existing package repositories.</para><para>For more information, see <olink type="auto-generated" targetptr="pkgsend" remap="internal"></olink>.</para>
</listitem>
</varlistentry><varlistentry><term><citerefentry><refentrytitle>pkg.depotd</refentrytitle><manvolnum>1M</manvolnum>
</citerefentry></term><listitem><para>A command-line daemon that can be used to create package repositories,
and manage or provide network access to existing package repositories.</para><para>For more information, see <olink type="auto-generated" targetptr="depot_server" remap="internal"></olink>.</para>
</listitem>
</varlistentry><varlistentry><term><citerefentry><refentrytitle>pkgrecv</refentrytitle><manvolnum>1</manvolnum>
</citerefentry></term><listitem><para> A command-line client used to retrieve the contents of a
package from a package repository.  The retrieved package can then be modified
and republished using the <command>pkgsend</command> command.</para><para>For more information, see <olink type="auto-generated" targetptr="pkgrecv" remap="internal"></olink>.</para>
</listitem>
</varlistentry><varlistentry><term><citerefentry><refentrytitle>packagemanager</refentrytitle><manvolnum>1</manvolnum>
</citerefentry></term><listitem><para>A graphical client used to create and manage images, search
package data, and perform software installation, upgrade, and removal.</para><para>For more information, see <olink type="auto-generated" targetptr="pkg_mgr" remap="internal"></olink>.</para>
</listitem>
</varlistentry>
</variablelist><note><para>The <command>pkg(5)</command> man page describes the Image Packaging
System. The <command>pkg(1)</command> man page describes the image packaging
management client.</para>
</note>
</sect1><sect1 id="ghqhm"><title>What Is an IPS Package?</title><para>A package in IPS is a collection of actions defined by a set of key/value
pairs that represent metadata such as classification, and descriptions, or
other attributes such as path and alias. The key-value pair could also represent
a data payload.  These actions can represent items such as files found in
a file system, or installable objects, such as drivers, services, groups,
and users.</para><para>For more information, see <olink type="auto-generated" targetptr="actions" remap="internal">Actions in IPS</olink>.</para><note><para>An on-disk format has not yet been defined for IPS packages. 
As such, the IPS system does not currently have an equivalent for <filename>.rpm</filename>, <filename>SVR4</filename> packages, or <filename>.nbm</filename> files.</para>
</note><sect2 id="fmri"><title>pkg(1) Uses FMRIs</title><para>Each IPS package is represented by a Fault Management Resource Identifier
(FMRI). FMRIs are used with the <citerefentry><refentrytitle>pkg</refentrytitle><manvolnum>1</manvolnum></citerefentry> command to indicate which packages
to perform operations on.</para><para>The FMRI includes descriptive information about the package, such as
the package name, version information, and date.</para><itemizedlist><para>For example, the FMRI, <literal>pkg://opensolaris.org/library/libc@5.11,5.11-0.75:20071001T163427Z</literal>, consists of the following information:</para><listitem><para>Scheme &ndash; <filename>pkg</filename></para>
</listitem><listitem><para>Publisher &ndash; <filename>opensolaris.org</filename></para>
</listitem><listitem><para>Package Name &ndash; <filename>libc</filename></para>
</listitem><listitem><para>Version String &ndash; Consists of four components :</para><itemizedlist><listitem><para>Component Version &ndash; 5.11</para>
</listitem><listitem><para>Build Version &ndash; 5.11</para>
</listitem><listitem><para>Branch Version &ndash; 0.75</para>
</listitem><listitem><para>Timestamp (when the package was published) &ndash; 20071001T163427Z</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</sect2>
</sect1><sect1 id="ghyer"><title>Publisher versus Repository</title><para>Note the following points with respect to the terms <emphasis>publisher</emphasis> and <emphasis>repository</emphasis>.</para><itemizedlist><listitem><para>A publisher is a person, group of persons, or a corporation
that publishes a package. A forward domain name such as <literal>opensolaris.org</literal> or
a reverse domain name such as <literal>org.opensolaris</literal> is used to
identify the publisher.</para><note><para>The term <emphasis>authority</emphasis> has been replaced by the
term <emphasis>publisher</emphasis> from the OpenSolaris 2009.06 release onwards.</para>
</note>
</listitem><listitem><para>A repository is a location from where packages are retrieved.
 The location is described by an address (URI).</para>
</listitem><listitem><para>A repository contains packages from a single publisher.  However,
a publisher can publish to multiple repositories. </para>
</listitem><listitem><para>A preferred publisher's repository will be used first when
packaging operations are performed.  If the preferred publisher's repository
does not contain a package needed for an operation, the repositories of the
remaining publishers will then be used to satisfy the request. </para>
</listitem><listitem><para>If only one publisher exists, it becomes the preferred publisher.</para>
</listitem>
</itemizedlist>
</sect1>
</chapter>