Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Software Distributor Administration Guide: HP-UX 11i v1, 11i v2, and 11i v3 > Chapter 4 Managing Software Depots

Additional Depot Management Tasks and Examples

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

This section illustrates some typical depot management tasks and provides extended examples of how you can use SD-UX to manage your environment.

Combining Patch Depots

This example shows how to combine into a single depot five downloaded patches (which are tape depots) from HP. The example also shows how to register the depot, list the depot contents, and install the patches from the new depot using the patch_match_target option. The example assumes that you have already downloaded patches PHKL_20349, PHKL_22161, PHSS_21906, PHSS_21950, and PHCO_22923 from the HP ITRC (http://itrc.hp.com/):

swcopy -s /tmp/PHKL_20349.depot \* @ /depots/mypatches

swcopy -s /tmp/PHKL_22161.depot \* @ /depots/mypatches

swcopy -s /tmp/PHSS_21906.depot \* @ /depots/mypatches

swcopy -s /tmp/PHSS_21950.depot \* @ /depots/mypatches

swcopy -s /tmp/PHCO_22923.depot \* @ /depots/mypatches

swreg -l depot @ /depots/mypatches

swlist -d -s /depots/mypatches

swinstall -x patch_match_target=true -s /depots/mypatches

Creating a Tape Depot for Distribution

This example shows you how to create a tape depot as a single file that can be distributed via ftp or the web. This example uses the five patches from the previous example (which are formatted as tape depots) and uses an existing depot at /depots/mypatches. The swlist command shows the depot contents (see “Listing the Contents of a Depot (swlist -d) ”).

# swpackage -x media_type=tape -s /depots/mypatches \            @ /tmp/mypatches.depot # swlist -d -s /tmp/mypatches.depot

To create a tape depot from myproduct.psf, a valid product specification file:

# swpackage -x media_type=tape -s myproduct.psf \           @ /tmp/myproduct.depot # swlist -d -s /tmp/myproduct.depot

See Chapter 10: “Creating Software Packages ” for more information about swpackage.

Setting Depot Attributes

When you create a depot, you may want to set the title and description attributes to help identify the depot and what it contains.

At the top of the product specification file (psf) for the depot, place the lines similar to the following:

distribution
title Optional Development Tools
description "Text processing and programming tools       \generally useful for source code development"

Then package and register the depot:

swpackage -s mydepot.psf @ /depots/mydepot

swreg -l depot @ /depots/mydepot

To see the title and description of all depots on a system:

swlist -v -a title -a description -l depot

Creating a Network Depot

Creating a network depot from which to install software can improve performance and ease of use when you have to install software to large numbers of systems. For example, HP-UX 11i is delivered on two CDs, requiring you to swap CDs during the update process. To perform an update without having to swap CDs, you can create a remote depot on an existing 11i system that contains all the necessary software, then update from that single source. (For more information on the update process, see the HP-UX 11i Installation and Update Guide.)

As root, follow this procedure to create a network depot from the HP-UX 11i CDs onto a depot server or other system running HP-UX 11i in your network:

  1. Verify that you have at least 1,230 MB of free space to create the network depot on another system in your network. If this space is not available, use SAM to either create a new volume group or extend an existing volume group. For help, see either SAM help or the Managing Systems and Workgroups manual.

  2. Login as root and mount the logical volume on a new directory named /update. This directory will hold your network depot.

  3. Insert the HP-UX 11i CD1 and wait for the CD drive’s busy light to stop blinking.

  4. Find the CD-ROM device file name:

    ioscan -fn | more

    A typical CD-ROM device name is: /dev/dsk/c1t2d0

  5. Create the directory /cdrom under root(/):

    mkdir /cdrom

  6. Mount the CD onto the /cdrom directory as a file system. For example:

    mount /dev/dsk/c1t2d0 /cdrom

  7. Merge all products on the mounted CD to the target depot, for example /update/update-depot:

    swcopy -s /cdrom \* @ /update/update-depot

  8. Unmount the CD from directory /cdrom:

    umount /cdrom

  9. Insert the HP-UX 11i CD2. Wait for the drive’s busy light to stop blinking.

  10. Repeat Steps 6 through 8 using CD2 and the Support Plus CD.

The network depot is now ready for you to use to update your HP-UX 10.20 or 11.0 system to HP-UX 11i.

Managing Multiple Versions of HP-UX

You can use your HP-UX 11i system to manage depots for HP-UX 11.00 and 10.20, with the following guidelines:

  • HP recommends that you do not mix 10.20, 11.00, and 11i software within the same depot. That is, locate 10.20 software in 10.20 depots, 11.00 software in 11.00 depots, and 11i software in 11i depots.

  • You can manage 11.00 depots from 11i without any special considerations—although you should maintain the segregation of 11.00 and 11i software in separate depots. Although the formats are similar, 11i software may contain vendor-defined attributes not recognized by 11.00 systems. This results in warnings when 11.00 systems access 11i software.

  • For 10.20 depots:

    • To create 10.20 depots from an 11i system, you must use the correct layout_version. For example:

      swcopy -x layout_version=0.8 ...

      swpackage -x layout_version=0.8 ...

      From then on, your 11i system can maintain the 10.20 depot.

    • SD-UX will generate warnings if you attempt to put layout_version=1.0 software (11.00 or 11i format) into a layout_version=0.8 (10.20) depot.

Listing Registered Depots

swlist can display lists of registered depots residing on a host. To do this, use combinations of the -l depot option.

To list all depots on the local host, type:

swlist -l depot

To list all depots on a remote machine (hostA), type:

swlist -l depot @ hostA

To list all the depots on a system from newest to oldest (by time last modified):

swlist -l depot -a mod_date -a mod_time | sort -rn -k 7,7

TIP: Use the mod_time as a convenient sort field (a single integer), and use mod_date to include human-readable output. (Place mod_time at the end of the display where it’s less visible.)

Listing the Contents of a Depot (swlist -d)

With swlist you can list all software that is packaged, stored, and ready to be installed.

The swlist -d option lets you list software residing on the default depot on your local host. For browsing any depot in the GUI, you can use swlist -i -d. You can also view the associated session and audit log files.

NOTE: By default the output of swlist will reflect the POSIX format for attributes. This may affect users who parse this output.

In the following examples, swlist output requests are sent to standard output. All examples assume the one_liner option is revision size title and the level option is product or undefined.

List the contents of the local tape depot, /dev/rmt/0:

swlist -d @ /dev/rmt/0

AUDIT     3.5   9834    Trusted Systems Auditing Utils COMMAND   1.7   4509    Core Command Set C-LANG    2.5   5678    C Programming Language DISKLES   1.8   6745    HP Cluster Commands KERNEL    1.4   56908   Kernel Libraries and Headers VUE       1.3   5489    Vue (Instant Ignition Release) WINDOWS   2.06  10423   Windowing Products

List the media attributes of the local tape depot, /dev/rmt/0:

swlist -d -v -l depot @ /dev/rmt/0

type        distribution tag         CORE OS description HP-UX Core Operating System Software Disc number      B2358-13601 date        June 1991

List the products stored in the software depot on host1 located at /swmedia. For this example assume one_liner is title size architecture:

swlist -d @ host1:/swmedia

FRAME Frame Document Pkg 2319 HP-UX_9000_Series700/800_AorB FRAME Frame Document Pkg 2458 OSF1_9000_Series700_1.0 ME30  3-D Mechanical Eng 5698 HP-UX_9000_Series300/800_AorB SOFTBENCH Softbench Development Env 4578 HP-UX_9000_Series300 TEAMWORK Tmwk. Design/Analysis 3478 HP-UX_9000_Series300/400

Note that the media contains two versions of the FRAME product.

Source Depot Auditing

If both the source and target systems are 10.30 or later versions of HP-UX, you can use swlist to audit the depot. The system administrator at the source depot machine can turn the audit functionality on or off. This feature tracks users and their software selections. In addition, you can determine when depots are being used.

As the administrator, you must set to true the value of swagent.source_depot_audit in the /var/adm/sw/defaults file for swagent. This creates a swaudit.log file on the source depot (for writable directory depots) or in /var/tmp(for tar image, CD-ROM, or other non-writable depots). This works like swagent.logfor source depot.

You can view the audit files by typing swlist -i -d. As long as the system has the corresponding SD message catalog files on it, you can view the audit information on a remote/local depot (with your language preference set).

Verifying a Depot (swverify -d)

To can use the swverify command to verify the software within a depot. swverify performs these tasks:

  • Verifies that all dependencies (prerequisites or corequisites) can be met.

  • Reports missing files.

  • Checks file attributes, including permissions, file types, size, checksum, mtime, and major/minor attributes.

For example, to verify the entire contents of a local depot:

swverify -d \* @ /var/spool/sw

NOTE: The swverify command does not execute vendor-supplied verification scripts within a depot.

Removing Software from Depots

Invoking swremove with the -d option removes software from depots instead of root file systems. This also means that you must specify a path to identify the depot from which you want to remove the software. For example:

swremove -d Old-Software @ /var/spool/sw

For the swremove -d GUI, you are prompted to specify the depot by a dialog that appears after you invoke the GUI. This is the same dialog used to specify a depot target for swcopy operations. See “Step II: Specify Target” for information about how to use this dialog.

Removing a Depot

To remove and automatically unregister a depot:

swremove -d \* @ /tmp/MyDepot

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1997, 2000-2003, 2006, 2007, 2008 Hewlett-Packard Development Company, L.P.