How to package a SD-UX depot

Jump to: navigation, search

Sometimes is necesary to create you own SD-UX depots files. This may be needed for example, to provied old versions of software that are not longer available for download, but that may be required on a customer installation. An SD-UX depot is basically a tar file that contains a SD-UX depot filesystem. In this example, a HP-UX 11.0 Fiber ethernet drivers bundle (A4926A). The driver is available on the internal depot server.

1. Check for the remote version of the software component.

# swlist -s A4926A
# Initializing...
# Contacting target ""...
# Target:

# A4926A                B.11.00.22     1000Base-SX PCI Gigabit Ethernet Driver
  A4926A.GE-DRV         B.11.00.22     HP PCI/GSC Gigabit Ethernet Driver

2. Copy the depot to a local directory. The -x enforce_dependecies=false is used to allow copy of software across different HP-UX releases. The -x autoselect_dependencies=false is used to limit copy to the specified components.

# mkdir /depots/A4926A

# swcopy -x enforce_dependencies=false -x autoselect_dependencies=false -s \ A4926A @ /depots/A4926A

=======  11/21/07 14:12:17 MST  BEGIN swcopy SESSION (non-interactive)

       * Session started for user "root@hostname".

       * Beginning Selection
       * "hostname:/depots/A4926A":  This target does not exist and will
         be created.
       * Source connection succeeded for
       * Source:
       * Targets:                hostname:/depots/A4926A
       * Software selections:
       * Selection succeeded.

       * Beginning Analysis and Execution
       * Session selections have been saved in the file
       * The analysis phase succeeded for "hostname:/depots/A4926A".
       * The execution phase succeeded for "hostname:/depots/A4926A".
       * Analysis and Execution succeeded.

NOTE:    More information may be found in the agent logfile using the
         command "swjob -a log hostname-0034 @ hostname:/depots/A4926A".

=======  11/21/07 14:12:44 MST  END swcopy SESSION (non-interactive)

3. Package the bundle into a depot file.

# swpackage -s /depots/A4926A -x target_type=tape @ /var/tmp/A492A.11.0.22.depot

=======  11/21/07 14:40:07 MST  BEGIN swpackage SESSION

       * Session started for user "root@hostname".

       * Source:        hostname:/depots/A4926A
       * Target:        hostname:/var/tmp/A492A.11.0.22.depot
       * Software selections:

       * Beginning Selection Phase.
       * Reading the source depot "/depots/A4926A".
       * Reading the contained files information for each selected

NOTE:    The temporary target depot "/var/tmp/pkgAAA003935" has been
       * Selection Phase succeeded.

       * Beginning Analysis Phase.
       * Analysis Phase succeeded.

       * Beginning Package Phase.

       * Packaging the bundle

       * Packaging the product "GE-DRV".
       * Packaging the fileset "GE-DRV.GE-KRN".
       * Packaging the fileset "GE-DRV.GE-KRN".
       * Packaging the fileset "GE-DRV.GE-RUN".
       * Packaging the fileset "GE-DRV.GE-RUN".
       * Package Phase succeeded.

       * Beginning Tapemaker Phase.
       * Copying the temporary depot to the tape
       * Calculating the tape blocks required to copy the temporary
         depot to the tape "/var/tmp/A492A.11.0.22.depot".
NOTE:    The temporary depot requires 950 Kbytes on the tape
       * Writing the tape "/var/tmp/A492A.11.0.22.depot" (tape 1 of 1).
       * Writing the fileset "GE-DRV.GE-KRN" (1 of 4)
       * Writing the fileset "GE-DRV.GE-KRN" (2 of 4)
       * Writing the fileset "GE-DRV.GE-RUN" (3 of 4)
       * Writing the fileset "GE-DRV.GE-RUN" (4 of 4)
       * Tape #1: CRC-32 checksum & size: 1913857166 972800

       * Removing the temporary depot.
       * Tapemaker Phase succeeded.

=======  11/21/07 14:40:08 MST  END swpackage SESSION

4. Verified the status of the depot file.

# # ll /var/tmp/A492A.11.0.22.depot
-rw-r--r--   1 root       sys         972800 Nov 21 14:40 /var/tmp/A492A.11.0.22.depot

5. Unregister the copied depot and remove the copied information.

# swreg -u -l depot /depots/A4926A

=======  11/21/07 14:44:15 MST  BEGIN swreg SESSION (non-interactive)

       * Session started for user "root@hostname".

       * Beginning Selection
       * Targets:                hostname
       * Objects:                /depots/A4926A
       * Selection succeeded.

=======  11/21/07 14:44:15 MST  END swreg SESSION (non-interactive)
# rm -rf /depots/A4926A