<chapter id="ch4verifypkg-18395"><title>Verifying and Transferring a
Package</title><highlights><para>This chapter describes how to verify your package's integrity and transfer it
to a distribution medium, such as floppy disk or a CD-ROM.</para><para>This is a list of the overview information in this chapter:</para><itemizedlist><listitem><para><olink targetptr="ch4verifypkg-13" remap="internal">Verifying and Transferring a Package
(Task Map)</olink></para>
</listitem><listitem><para><olink targetptr="ch4verifypkg-2" remap="internal">Installing Software Packages</olink></para>
</listitem><listitem><para><olink targetptr="ch4verifypkg-39428" remap="internal">Verifying the Integrity of a
Package</olink></para>
</listitem><listitem><para><olink targetptr="ch4verifypkg-35" remap="internal">Displaying Additional Information About Installed
Packages</olink></para>
</listitem><listitem><para><olink targetptr="ch4verifypkg-34" remap="internal">Removing a Package</olink></para>
</listitem><listitem><para><olink targetptr="ch4verifypkg-32" remap="internal">Transferring a Package to a Distribution
Medium</olink></para>
</listitem>
</itemizedlist>
</highlights><sect1 id="ch4verifypkg-13"><title>Verifying and Transferring a Package (Task Map)</title><para><indexterm><primary>verifying package installation</primary><secondary>the process</secondary></indexterm><indexterm><primary>checking package installation</primary><secondary>the process</secondary></indexterm><indexterm><primary>package</primary><secondary>checking installation</secondary><tertiary>the process</tertiary></indexterm>The
table below describes the steps you should follow in order to verify your package's
integrity and transfer it to a distribution medium.</para><table frame="all" pgwide="1" id="ch4verifypkg-tbl-13"><title>Verifying and Transferring
a Package Task Map</title><tgroup cols="3" colsep="1" rowsep="1"><colspec colwidth="110*"/><colspec colname="col2" colwidth="167*"/><colspec colwidth="119*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions, Go To ...</para>
</entry>
</row>
</thead><tbody><row><entry><para>1. Build Your Package</para>
</entry><entry><para>Build your package on disk.</para>
</entry><entry><para><olink targetptr="ch2buildpkg-22939" remap="internal">Chapter&nbsp;2, Building a Package</olink></para>
</entry>
</row><row><entry><para>2. Install Your Package</para>
</entry><entry><para>Test your package by installing it and making sure that it installs without
errors.</para>
</entry><entry><para><olink targetptr="ch4verifypkg-61" remap="internal">How to Install a Package on a Standalone System
or Server</olink> </para>
</entry>
</row><row><entry><para>3. Verify Your Package's Integrity</para>
</entry><entry><para>Use the pkgchk command to verify the integrity of your package.</para>
</entry><entry><para><olink targetptr="ch4verifypkg-62" remap="internal">How to Verify the Integrity of a Package</olink></para>
</entry>
</row><row><entry><para>4. Obtain Other Package Information</para>
</entry><entry><para><emphasis>Optional</emphasis>. Use the <command>pkginfo</command> and <command>pkgparam</command> commands to  perform package-specific verification.</para>
</entry><entry><para><olink targetptr="ch4verifypkg-35" remap="internal">Displaying Additional Information About Installed
Packages</olink></para>
</entry>
</row><row><entry><para>5. Remove the Installed Package</para>
</entry><entry><para>Use the <command>pkgrm</command> command to remove your installed package from
the system.</para>
</entry><entry><para><olink targetptr="ch4verifypkg-66" remap="internal">How to Remove a Package</olink> </para>
</entry>
</row><row><entry><para>6. Transfer Your Package to a Distribution Medium</para>
</entry><entry><para>Use the <command>pkgtrans</command> command to transfer your package (in package
format) to a distribution medium.</para>
</entry><entry><para><olink targetptr="ch4verifypkg-67" remap="internal">How to Transfer a Package to a Distribution
Medium</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect1><sect1 id="ch4verifypkg-2"><title>Installing Software Packages</title><para><indexterm><primary><command>pkgadd</command> command</primary></indexterm>Software
packages are installed using the <command>pkgadd</command> command. This command transfers
the contents of a software package from the distribution medium or directory and installs
it onto a system.</para><para>This section provides basic installation instructions for installing your package
in order to verify that it installs correctly. </para><sect2 id="ch4verifypkg-14"><title>The Installation Software Database</title><para><indexterm id="ch4verifypkg-ix86"><primary>installation software database</primary></indexterm><indexterm><primary><command>pkgadd</command> command</primary><secondary>and the installation software database</secondary></indexterm><indexterm><primary><command>pkgrm</command> command</primary><secondary>and the installation software database</secondary></indexterm><indexterm><primary><command>pkgchk</command> command</primary></indexterm><indexterm><primary><command>pkginfo</command> command</primary><secondary>and the installation software database</secondary></indexterm>Information for all
packages installed on a system is kept in the installation software database. There
is an entry for every object in a package, with information such as the component
name, where it resides, and its type. An entry contains a record of the package to
which a component belongs; other packages that might reference the component; and
information such as path name, where the component resides and the component type.
Entries are added and removed automatically by the <command>pkgadd</command> and <command>pkgrm</command> commands. You can view the information in the database by using the <command>pkgchk</command> and the <command>pkginfo</command> commands.  </para><para>Two types of information are associated with each package component. The attribute
information describes the component itself. For example, the component's access permissions,
owner ID, and group ID are attribute information. The content information describes
the contents of the component, such as file size and time of last modification. </para><para><indexterm><primary>package</primary><secondary>status</secondary></indexterm>The
installation software database keeps track of the package status. A package can be
either fully installed (it has successfully completed the installation process), or
partially installed (it did not successfully complete the installation process). </para><para>When a package is partially installed, portions of a package may have been installed
before installation was terminated; thus, part of the package is installed, and recorded
in the database, and part is not. When you reinstall the package, you are prompted
to start at the point where installation stopped because the <command>pkgadd</command> command
can access the database and detect which portions have already been installed. You
can also remove the portions that have been installed, based on the information in
the installation software database using the <command>pkgrm</command> command. </para>
</sect2><sect2 id="ch4verifypkg-3"><title>Interacting With the <command>pkgadd</command> Command</title><para><indexterm><primary><command>pkgadd</command> command</primary><secondary>and installation problems</secondary></indexterm>If the <command>pkgadd</command> command
encounters a problem, it first checks the installation administration file for instructions.
(See <olink targetdoc="refman4" targetptr="admin-4" remap="external"><citerefentry><refentrytitle>admin</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> for more information.)
If no instructions exist, or if the relevant parameter in the administration file
is set to <literal>ask</literal>, the <command>pkgadd</command> displays a message
describing the problem and prompts for a reply. The prompt is usually <literal>Do
you want to continue with this installation?</literal>. You should respond with <literal>yes</literal>, <literal>no</literal>, or <literal>quit</literal>. </para><para>If you have specified more than one package, <command>no</command> stops installation
of the package being installed but <command>pkgadd</command> continues with installation
of the other packages. <command>quit</command> indicates that <command>pkgadd</command> should
stop installation of all packages. </para>
</sect2><sect2 id="ch4verifypkg-21"><title>Installing Packages on Standalone Systems or Servers
in a Homogeneous Environment</title><para>This section describes how to install packages on a standalone or a server system
in a homogeneous environment.</para>
</sect2><task id="ch4verifypkg-61"><title>How to Install a Package on a Standalone System
or Server</title><procedure><step id="ch4verifypkg-step-25"><para><indexterm><primary>package</primary><secondary>how to install</secondary></indexterm>Build your package.</para><para>See <olink targetptr="ch2buildpkg-17051" remap="internal">Building a Package</olink>, if needed.</para>
</step><step id="ch4verifypkg-step-45"><para>Log in to the system as superuser.</para>
</step><step id="ch4verifypkg-step-46"><para>Add the software package to the system.</para><screen># <userinput>pkgadd</userinput> <userinput>-d</userinput> <replaceable>device-name</replaceable> [<replaceable>pkg-abbrev</replaceable>...]</screen><informaltable frame="none"><tgroup cols="2" colsep="0" rowsep="0"><colspec colname="column1" colwidth="132*"/><colspec colname="column2" colwidth="264*"/><tbody><row><entry><para><option>d</option> <replaceable>device-name</replaceable></para>
</entry><entry><para>Specifies the location of the package. Note that <replaceable>device-name</replaceable> can
be a full directory path name or the identifiers for a tape, floppy disk, or removable
disk.</para>
</entry>
</row><row><entry><para><replaceable>pkg-abbrev</replaceable></para>
</entry><entry><para>Is the name of one or more packages (separated by spaces) to be added. If omitted, <command>pkgadd</command> installs all available packages.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</step>
</procedure><example id="ch4verifypkg-41"><title>Installing Packages on Standalones and Servers</title><para>To install a software package named <literal>pkgA</literal> from a tape
device named <filename>/dev/rmt/0</filename>, you would enter the following command:</para><screen># <userinput>pkgadd -d /dev/rmt/0 pkgA</userinput></screen><para>You can also install multiple packages at the same time, as long as you separate
package names with a space, as follows:</para><screen># <userinput>pkgadd -d /dev/rmt/0 pkgA pkgB pkgC</userinput></screen><para>If you do not name the device on which the package resides, the command checks
the default spool directory (<filename>/var/spool/pkg</filename>). If the package
is not there, the installation fails.</para>
</example><taskrelated role="see-also"><para>If you are ready to go to the next task, see <olink targetptr="ch4verifypkg-62" remap="internal">How to Verify the Integrity of a Package</olink>.</para>
</taskrelated>
</task>
</sect1><sect1 id="ch4verifypkg-39428"><title>Verifying the Integrity of a Package</title><para><indexterm><primary><command>pkgchk</command> command</primary></indexterm><indexterm id="ch4verifypkg-ix96"><primary>checking package installation</primary></indexterm><indexterm><primary>verifying package installation</primary></indexterm><indexterm id="ch4verifypkg-ix97"><primary>package</primary><secondary>checking installation</secondary></indexterm>The <filename>pkgchk</filename> command enables you to check the integrity of packages, whether
they are installed on a system or in package format (ready to be installed with the <command>pkgadd</command> command). It confirms package structure or the installed files and
directories, or displays information about package objects. The <command>pkgchk</command> command
can list or check the following:  </para><itemizedlist><listitem><para>The package installation scripts.</para>
</listitem><listitem><para>The contents or attributes, or both, of objects currently installed
on the system.</para>
</listitem><listitem><para>The contents of a spooled, uninstalled package.</para>
</listitem><listitem><para><indexterm><primary><filename>pkgmap</filename> file</primary><secondary>verifying the integrity of a package</secondary></indexterm>The contents or attributes,
or both, of objects described in the specified <filename>pkgmap</filename> file.</para>
</listitem>
</itemizedlist><para>For more information about this command, refer to <olink targetdoc="refman1m" targetptr="pkgchk-1m" remap="external"><citerefentry><refentrytitle>pkgchk</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink>.</para><para>The <command>pkgchk</command> command performs two kinds of checks. It checks
file attributes (the permissions and ownership of a file and major/minor numbers for
block or character special devices) and the file contents (the size, checksum, and
modification date). By default, the command checks both the file attributes and the
file contents. </para><para>The <command>pkgchk</command> command also compares the file attributes and
contents of the installed package against the installation software database. The
entries concerning a package may have been changed since the time of installation;
for example, another package may have changed a package component. The database reflects
that change. </para><task id="ch4verifypkg-62"><title>How to Verify the Integrity of a Package</title><procedure><step id="ch4verifypkg-step-29"><para>Install your package.</para><para>See <olink targetptr="ch4verifypkg-61" remap="internal">How to Install a Package on a Standalone System
or Server</olink>, if needed.</para>
</step><step id="ch4verifypkg-step-30"><para>Verify the integrity of your package.</para><screen># <userinput>pkgchk </userinput> [<userinput>-v</userinput>] [<userinput>-R</userinput> <replaceable>root-path</replaceable>] [<replaceable>pkg-abbrev</replaceable>...]</screen><informaltable frame="none"><tgroup cols="2" colsep="0" rowsep="0"><colspec colname="column1" colwidth="132*"/><colspec colname="column2" colwidth="264*"/><tbody><row><entry><para><option>v</option></para>
</entry><entry><para>Lists files as they are processed.</para>
</entry>
</row><row><entry><para><option>R</option> <replaceable>root-path</replaceable></para>
</entry><entry><para>Specifies the location of the client system's root file system.</para>
</entry>
</row><row><entry><para><replaceable>pkg-abbrev</replaceable></para>
</entry><entry><para>Is the name of one or more packages (separated by spaces) to be checked. If
omitted, <command>pkgchk</command> checks all available packages.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</step>
</procedure><example id="ch4verifypkg-42"><title>Verifying the Integrity of a Package</title><para>This example shows
the command you should use to verify the integrity of an installed package.</para><screen>$ <userinput>pkgchk</userinput> <replaceable>pkg-abbrev</replaceable>
$</screen><para>If there are errors, the <command>pkgchk</command> command prints them. Otherwise,
it does not print anything and returns an exit code of 0. If you do not supply a package
abbreviation, then it will check all of the packages on the system.</para><para>Alternately, you could use the <option>v</option> option, which will print a
list of files in the package if there are no errors. For example:</para><screen>$ <userinput>pkgchk -v SUNWcadap</userinput>
/opt/SUNWcadap
/opt/SUNWcadap/demo
/opt/SUNWcadap/demo/file1
/opt/SUNWcadap/lib
/opt/SUNWcadap/lib/file2
/opt/SUNWcadap/man
/opt/SUNWcadap/man/man1
/opt/SUNWcadap/man/man1/file3.1
/opt/SUNWcadap/man/man1/file4.1
/opt/SUNWcadap/man/windex
/opt/SUNWcadap/srcfiles
/opt/SUNWcadap/srcfiles/file5
/opt/SUNWcadap/srcfiles/file6
$</screen><para>If you need to verify a package that is installed on a client system's root
file system, use this command:</para><screen>$ <userinput>pkgchk -v -R</userinput> <replaceable>root-path</replaceable> <replaceable>pkg-abbrev</replaceable></screen>
</example><taskrelated role="see-also"><para>If you are ready to go to the next task, see <olink targetptr="ch4verifypkg-65" remap="internal">How to Obtain Information With the pkginfo Command</olink>.</para>
</taskrelated>
</task>
</sect1><sect1 id="ch4verifypkg-35"><title>Displaying Additional Information About Installed
Packages</title><para>You can use two other commands to display information about installed packages:</para><itemizedlist><listitem><para>The <command>pkgparam</command> command displays parameter values.</para>
</listitem><listitem><para>The <command>pkginfo</command> command displays information from the
installation software database.</para>
</listitem>
</itemizedlist><sect2 id="ch4verifypkg-51186"><title>The <command>pkgparam</command> Command</title><para><indexterm><primary><command>pkgparam</command> command</primary></indexterm>The <command>pkgparam</command> command enables you to display the values associated with the parameters
you specified on the command line. The values are retrieved from either the <filename>pkginfo</filename> file for a specific package, or from the file you name. One parameter
value is shown per line. You can display the values only or the parameters and their
values.</para>
</sect2><task id="ch4verifypkg-64"><title>How to Obtain Information With the <command>pkgparam</command> Command</title><procedure><step id="ch4verifypkg-step-52"><para>Install your package.</para><para>See <olink targetptr="ch4verifypkg-61" remap="internal">How to Install a Package on a Standalone System
or Server</olink>, if needed.</para>
</step><step id="ch4verifypkg-step-31"><para>Display additional information about your package.</para><screen># <userinput>pkgparam </userinput>[<userinput>-v</userinput>] <replaceable>pkg-abbrev</replaceable> [<replaceable>param</replaceable>...]</screen><informaltable frame="none"><tgroup cols="2" colsep="0" rowsep="0"><colspec colname="column1" colwidth="132*"/><colspec colname="column2" colwidth="264*"/><tbody><row><entry><para><option>v</option></para>
</entry><entry><para>Displays the name of the parameter and its value.</para>
</entry>
</row><row><entry><para><replaceable>pkg-abbrev</replaceable></para>
</entry><entry><para>Is the name of a specific package.</para>
</entry>
</row><row><entry><para><replaceable>param</replaceable></para>
</entry><entry><para>Specifies one or more parameters whose value is displayed.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</step>
</procedure><example id="ch4verifypkg-43"><title>Obtaining Information With the <command>pkgparam</command> Command</title><para>For example, to
display values only, use this command.</para><screen>$ <userinput>pkgparam SUNWcadap</userinput>
none
/opt
US/Mountain
/sbin:/usr/sbin:/usr/bin:/usr/sadm/install/bin
/usr/sadm/sysadm
SUNWcadap
Chip designers need CAD application software to design abc
chips.  Runs only on xyz hardware and is installed in the usr
partition.
system
release 1.0
SPARC
venus990706083849
SUNWcadap
/var/sadm/pkg/SUNWcadap/save
Jul 7 1999 09:58
$</screen><para>To display parameters and their values, use the following command.</para><screen>$ <userinput>pkgparam -v SUNWcadap</userinput>
pkgparam -v SUNWcadap
CLASSES='none'
BASEDIR='/opt'
TZ='US/Mountain'
PATH='/sbin:/usr/sbin:/usr/bin:/usr/sadm/install/bin'
OAMBASE='/usr/sadm/sysadm'
PKG='SUNWcadap'
NAME='Chip designers need CAD application software to design abc chips.  
Runs only on xyz hardware and is installed in the usr partition.'
CATEGORY='system'
VERSION='release 1.0'
ARCH='SPARC'
PSTAMP='venus990706083849'
PKGINST='SUNWcadap'
PKGSAV='/var/sadm/pkg/SUNWcadap/save'
INSTDATE='Jul 7 1999 09:58'
$</screen><para>Or, if you want to display the value of a specific parameter, use this format:</para><screen>$ <userinput>pkgparam SUNWcadap BASEDIR</userinput>
/opt
$</screen><para>For more information, refer to <olink targetdoc="refman1" targetptr="pkgparam-1" remap="external"><citerefentry><refentrytitle>pkgparam</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink>.</para>
</example><taskrelated role="see-also"><para>If you are ready to go to the next task, see <olink targetptr="ch4verifypkg-66" remap="internal">How to Remove a Package</olink>.</para>
</taskrelated>
</task><sect2 id="ch4verifypkg-36"><title>The <command>pkginfo</command> Command</title><para><indexterm id="ch4verifypkg-ix101"><primary><command>pkginfo</command> command</primary><secondary>displaying information about installed packages</secondary></indexterm>You
can display information about installed packages with the <command>pkginfo</command> command.
This command has several options that enable you to customize both the format and
the contents of the display. </para><para>You can request information about any number of package instances. </para><sect3 id="ch4verifypkg-39"><title>The Default <command>pkginfo</command> Display</title><para>When the <command>pkginfo</command> command is executed without options, it
displays the category, package instance, and package name of all packages that have
been completely installed on your system. The display is organized by categories as
shown in the following example. </para><screen>$ <userinput>pkginfo</userinput>
.
.
.
system      SUNWinst       Install Software
system      SUNWipc        Interprocess Communications
system      SUNWisolc      XSH4 conversion for ISO Latin character sets
application SUNWkcspf      KCMS Optional Profiles
application SUNWkcspg      KCMS Programmers Environment
application SUNWkcsrt      KCMS Runtime Environment
.
.
.
$</screen>
</sect3><sect3 id="ch4verifypkg-38"><title>Customizing the Format of the <command>pkginfo</command> Display</title><para><indexterm><primary><command>pkginfo</command> command</primary><secondary>customizing the output</secondary></indexterm>You can get a <command>pkginfo</command> display
in any of three formats: short, extracted, and long. </para><para>The short format is the default. It shows only the category, package abbreviation,
and full package name, as shown in <olink targetptr="ch4verifypkg-39" remap="internal">The Default
pkginfo Display</olink>. </para><para>The extracted format shows the package abbreviation, package name, package architecture
(if available), and package version (if available). Use the <option>x</option> option
to request the extracted format as shown in the next example. </para><screen>$ <userinput>pkginfo -x</userinput>
.
.
.
SUNWipc         Interprocess Communications
                (sparc) 11.8.0,REV=1999.08.20.12.37
SUNWisolc       XSH4 conversion for ISO Latin character sets
                (sparc) 1.0,REV=1999.07.10.10.10
SUNWkcspf       KCMS Optional Profiles
                (sparc) 1.1.2,REV=1.5
SUNWkcspg       KCMS Programmers Environment
                (sparc) 1.1.2,REV=1.5
.
.
.
$</screen><para>Using the <option>l</option> option produces a display in the long format showing
all of the available information about a package, as in the following example. </para><screen>$ <userinput>pkginfo -l SUNWcadap</userinput>
   PKGINST:  SUNWcadap
      NAME:  Chip designers need CAD application software to
design abc chips.  Runs only on xyz hardware and is installed
in the usr partition.
  CATEGORY:  system
      ARCH:  SPARC
   VERSION:  release 1.0
   BASEDIR:  /opt
    PSTAMP:  <replaceable>system</replaceable>980706083849
  INSTDATE:  Jul 7 1999 09:58
    STATUS:  completely installed
     FILES:     13 installed pathnames
                 6 directories
                 3 executables
              3121 blocks used (approx)
$</screen>
</sect3><sect3 id="ch4verifypkg-37"><title>Parameter Descriptions for the <command>pkginfo</command> Long Format</title><para><indexterm><primary><command>pkginfo</command> command</primary><secondary>and package parameters</secondary></indexterm><indexterm><primary><command>pkgmk</command> command</primary><secondary>and package parameters</secondary></indexterm>The table below
describes the package parameters that can be displayed for each package. A parameter
and its value are displayed only when the parameter has a value assigned to it.</para><table frame="topbot" id="ch4verifypkg-31899"><title>Package Parameters</title><tgroup cols="2" colsep="0" rowsep="0"><colspec colname="column1" colwidth="79*"/><colspec colname="column2" colwidth="317*"/><thead><row><entry rowsep="1" valign="top"><para>Parameter</para>
</entry><entry rowsep="1" valign="top"><para>Description</para>
</entry>
</row>
</thead><tbody><row><entry><para><envar>ARCH</envar></para>
</entry><entry><para>The architecture supported by this package.</para>
</entry>
</row><row><entry><para><envar>BASEDIR</envar></para>
</entry><entry><para>The base directory in which the software package resides (shown if the package
is relocatable).</para>
</entry>
</row><row><entry><para><envar>CATEGORY</envar></para>
</entry><entry><para>The software category, or categories, of which this package is a member (for
example, <command>system</command> or <command>application</command>).</para>
</entry>
</row><row><entry><para><envar>CLASSES</envar></para>
</entry><entry><para>A list of classes defined for a package. The order of the list determines the
order in which the classes are installed. Classes listed first will be installed first
(on a media by media basis). This parameter may be modified by the request script. </para>
</entry>
</row><row><entry><para><envar>DESC</envar></para>
</entry><entry><para>Text that describes the package.</para>
</entry>
</row><row><entry><para><envar>EMAIL</envar></para>
</entry><entry><para>The electronic mail address for user inquiries.</para>
</entry>
</row><row><entry><para><envar>HOTLINE</envar></para>
</entry><entry><para>Information on how to receive hotline help about this package.</para>
</entry>
</row><row><entry><para><envar>INTONLY</envar></para>
</entry><entry><para>Indicates that the package should only be installed interactively when set to
any non-NULL value.</para>
</entry>
</row><row><entry><para><envar>ISTATES</envar></para>
</entry><entry><para>A list of allowable run states for package installation (for example,   <command>S s 1</command>).</para>
</entry>
</row><row><entry><para><envar>MAXINST</envar></para>
</entry><entry><para>The maximum number of package instances that should be allowed on a machine
at the same time. By default, only one instance of a package is allowed.</para>
</entry>
</row><row><entry><para><envar>NAME</envar></para>
</entry><entry><para>The package name, generally text describing the package abbreviation.</para>
</entry>
</row><row><entry><para><envar>ORDER</envar></para>
</entry><entry><para>A list of classes defining the order in which they should be put on the medium.
Used by the <command>pkgmk</command> command in creating the package. Classes not
defined in this parameter are placed on the medium using the standard ordering procedures.</para>
</entry>
</row><row><entry><para><envar>PKGINST</envar></para>
</entry><entry><para>Abbreviation for the package being installed.</para>
</entry>
</row><row><entry><para><envar>PSTAMP</envar></para>
</entry><entry><para>The production stamp for this package.</para>
</entry>
</row><row><entry><para><envar>RSTATES</envar></para>
</entry><entry><para>A list of allowable run states for package removal (for example, <command>S
s 1</command>). </para>
</entry>
</row><row><entry><para><envar>ULIMIT</envar></para>
</entry><entry><para>If set, this parameter is passed as an argument to the <command>ulimit</command> command,
which establishes the maximum size of a file during installation. This applies only
to files created by procedure scripts.</para>
</entry>
</row><row><entry><para><envar>VENDOR</envar></para>
</entry><entry><para>The name of the vendor who supplied the software package.</para>
</entry>
</row><row><entry><para><envar>VERSION</envar></para>
</entry><entry><para>The version of this package. </para>
</entry>
</row><row><entry><para><envar>VSTOCK</envar></para>
</entry><entry><para>The vendor-supplied stock number.</para>
</entry>
</row>
</tbody>
</tgroup>
</table><para>For detailed information about the <command>pkginfo</command> command, refer
to the <olink targetdoc="refman1" targetptr="pkginfo-1" remap="external"><citerefentry><refentrytitle>pkginfo</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink> man page.</para>
</sect3>
</sect2><task id="ch4verifypkg-65"><title>How to Obtain Information With the <command>pkginfo</command> Command</title><procedure><step id="ch4verifypkg-step-56"><para>Install your package.</para><para>See <olink targetptr="ch4verifypkg-61" remap="internal">How to Install a Package on a Standalone System
or Server</olink>, if needed.</para>
</step><step id="ch4verifypkg-step-57"><para>Display additional information about your package.</para><screen># <userinput>pkginfo </userinput>[<userinput>-x</userinput> | <userinput>-l</userinput>] [<replaceable>pkg-abbrev</replaceable>]</screen><informaltable frame="none"><tgroup cols="2" colsep="0" rowsep="0"><colspec colname="column1" colwidth="132*"/><colspec colname="column2" colwidth="264*"/><tbody><row><entry><para><option>x</option></para>
</entry><entry><para>Displays package information in extracted format.</para>
</entry>
</row><row><entry><para><option>l</option></para>
</entry><entry><para>Displays package information in long format.</para>
</entry>
</row><row><entry><para><replaceable>pkg-abbrev</replaceable></para>
</entry><entry><para>Is the name of a specific package. If omitted, the <command>pkginfo</command> command
displays information about all installed packages, in the default format.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</step>
</procedure><taskrelated-custom><title>Where to Go Next</title><para>If you are ready to go to the next task, see <olink targetptr="ch4verifypkg-66" remap="internal">How to Remove a Package</olink>.</para>
</taskrelated-custom>
</task>
</sect1><sect1 id="ch4verifypkg-34"><title>Removing a Package</title><para>Because the <command>pkgrm</command> command updates information in the software
products database, it is important when you remove a package to use the <command>pkgrm</command> command&mdash;even though you might be tempted to use the <command>rm</command> command instead. For example, you could use the <command>rm</command> command
to remove a binary executable file, but that is not the same as using <command>pkgrm</command> to remove the software package that includes that binary executable. Using
the <command>rm</command> command to remove a package's files will corrupt the software
products database. (If you really only want to remove one file, you can use the <command>removef</command> command, which will update the software product database correctly. </para><task id="ch4verifypkg-66"><title>How to Remove a Package</title><procedure><step id="swmgrpkgs-step-53"><para><indexterm id="swmgrpkgs-ix2042"><primary><command>pkgrm</command> command</primary><secondary>basic procedure</secondary></indexterm><indexterm id="swmgrpkgs-ix2040"><primary><command>pkgadd</command> command</primary><secondary>standalone systems and</secondary></indexterm>Log in to the system as superuser. </para>
</step><step id="swmgrpkgs-step-54"><para>Remove an installed package.</para><screen># <userinput>pkgrm</userinput> <replaceable>pkg-abbrev</replaceable> ...</screen><informaltable frame="none"><tgroup cols="2" colsep="0" rowsep="1"><colspec colname="column1" colwidth="132*"/><colspec colname="column2" colwidth="264*"/><tbody><row><entry><para><replaceable>pkg-abbrev</replaceable></para>
</entry><entry><para>Is the name of one or more packages (separated by spaces). If omitted, <command>pkgrm</command> removes all available packages.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</step><step id="ch4verifypkg-step-60"><para>Verify that the package has successfully been
removed, use the <command>pkginfo</command> command.</para><screen>$ <userinput>pkginfo | egrep </userinput><replaceable>pkg-abbrev</replaceable></screen><para>If <replaceable>pkg-abbrev</replaceable> is installed, the <command>pkginfo</command> command returns a line of information about it. Otherwise, <command>pkginfo</command> returns the system prompt.</para>
</step>
</procedure>
</task>
</sect1><sect1 id="ch4verifypkg-32"><title>Transferring a Package to a Distribution Medium</title><para><indexterm><primary>transferring a package to a distribution medium</primary></indexterm><indexterm id="ch4verifypkg-ix102"><primary><command>pkgtrans</command> command</primary></indexterm><indexterm id="ch4verifypkg-ix103"><primary> package</primary><secondary>transferring to media</secondary></indexterm>The <command>pkgtrans</command> command
moves packages and performs package format translations. You can use the <command>pkgtrans</command> command to perform the following translations for an installable
package:  </para><itemizedlist><listitem><para>File system format to datastream format</para>
</listitem><listitem><para>Datastream format to file system format</para>
</listitem><listitem><para>One file system format to another file system format</para>
</listitem>
</itemizedlist><task id="ch4verifypkg-67"><title>How to Transfer a Package to a Distribution Medium</title><procedure><step id="ch4verifypkg-step-19"><para>Build your package, creating a directory format
package, if you have not already done so. </para><para>For more information, see <olink targetptr="ch2buildpkg-66" remap="internal">How to Build a Package</olink>.</para>
</step><step id="ch4verifypkg-step-16"><para>Install your package to verify that it installs
correctly.</para><para>See <olink targetptr="ch4verifypkg-61" remap="internal">How to Install a Package on a Standalone System
or Server</olink>, if needed.</para>
</step><step id="ch4verifypkg-step-17"><para>Verify your package's integrity.</para><para>See <olink targetptr="ch4verifypkg-62" remap="internal">How to Verify the Integrity of a Package</olink>, <olink targetptr="ch4verifypkg-65" remap="internal">How to Obtain Information With the pkginfo Command</olink>,
and <olink targetptr="ch4verifypkg-64" remap="internal">How to Obtain Information With the pkgparam
Command</olink>, if needed.</para>
</step><step id="ch4verifypkg-step-44"><para>Remove the installed package from the system.</para><para>See <olink targetptr="ch4verifypkg-66" remap="internal">How to Remove a Package</olink>,
if needed.</para>
</step><step id="ch4verifypkg-step-15"><para>Transfer the package (in package format) to
a distribution medium.</para><para>To perform a basic translation, execute the following
command: </para><screen>$ <userinput>pkgtrans</userinput> <replaceable>device1</replaceable> <replaceable>device2</replaceable> [<replaceable>pkg-abbrev...</replaceable>]</screen><informaltable frame="none" pgwide="1"><tgroup cols="2" colsep="0" rowsep="0"><colspec colname="column1" colwidth="136*"/><colspec colname="column2" colwidth="259*"/><tbody><row><entry><para><replaceable>device1</replaceable></para>
</entry><entry><para>Is the name of the device where the package currently resides.</para>
</entry>
</row><row><entry><para><replaceable>device2</replaceable></para>
</entry><entry><para>Is the name of the device onto which the translated package will be written.</para>
</entry>
</row><row><entry><para>[<replaceable>pkg-abbrev</replaceable>]</para>
</entry><entry><para>Is one or more package abbreviations.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable><para>If no package names are given, all packages residing in <replaceable>device1</replaceable> are translated and written to <replaceable>device2</replaceable>. </para><note><para>If more than one instance of a package resides on <replaceable>device1</replaceable>, you must use an instance identifier for the package. For a description
of a package identifier, see <olink targetptr="ch2buildpkg-1" remap="internal">Defining a Package Instance</olink>. When an instance of the package being translated already exists on <replaceable>device2</replaceable>, the <command>pkgtrans</command> command does not perform the
translation. You can use the <option>o</option> option to tell the <command>pkgtrans</command> command to overwrite any existing instances on the destination device and
the <option>n</option> option to tell it to create a new instance if one already exists.
Note that this check does not apply when <replaceable>device2</replaceable> supports
a datastream format.</para>
</note>
</step>
</procedure><taskrelated-custom><title>Where to Go Next</title><para>At this point you have completed the steps necessary to design, build, verify,
and transfer your package. If you are interested in looking at some case studies,
see <olink targetptr="ch5pkgcasestudies-80583" remap="internal">Chapter&nbsp;5, Case Studies of Package
Creation</olink>. If you are interested in advanced package design ideas, see <olink targetptr="ch6advtech-96543" remap="internal">Chapter&nbsp;6, Advanced Techniques for Creating Packages</olink>.</para>
</taskrelated-custom>
</task>
</sect1>
</chapter><?Pub *0000037721 0?>