HP Package Builder User Manual

Software Package Builder 1.0
User’s Guide
for HP-UX 11i v1 and 11i v2
Edition 2
Manufacturing Part Number : 5187-4494
December 2003
United States
© Copyright 2002-2003 Hewlett-Packard Development Company, L.P. All rights reserved.
Legal Notices
The information in this document is subject to change without notice.
Hewlett-Packard makes no warranty of any kind with regard to this manual, including, but not limited to, the implied wa rranties of merchantability and fitness for a particular purpose.
Hewlett-Packard shall not be held liable for errors contained herein or direct, indirect, special, incidental or consequential damages in connection with the furnishing, performance, or use of this material.
Warranty
A copy of the specific warranty terms applicable to your Hewlet t-P ackard product and replacement parts can be obtai ned from your local Sales and Service Office.
U.S. Government License
Proprietary computer software. Valid license from HP required for possession, use or copying . Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license.
Copyright Notice
Copyright 2002 - 2003 Hewlett-Packard Development Company, L.P. All rights reserved. Reproduction, adaptation, or translation of this document without prior written permission is prohibited, except as allowed under the copyright laws.
Trademark Notices
Java is a US trademark of Sun Microsystems, Inc. OSF/Motif is a trademark of The Open Group in the US and other
countries. UNIX
is a registered trademark of The Open Group.
Publication History
The manual publication date and part number indicate its current edition. The publication date will change when a new edition is released. The manufacturing pa rt numbe r will change wh en extensi ve chan ges are made.
Software Package Builder 1.0 Users Guide for HP-UX 11i v1 and 11i
v2:
December 2003, 5187-4494
Software Package Builder 1.0 Users Guide for HP-UX 11i v1 and 11i
v2: September 2003, 5187-3646
To ensure that you receive the new editions, you should subscribe to the appropriate product support service. See your HP sales representative for details.
New editions of this manual will incorporate all material updated since the previous edition. For the latest version, see the Software Package Builder documentation on the Web:
http://docs.hp. com/
Please use the following Web form to send us feedback:
http://docs.hp. com/assis tance/fe edback .html
About this Guide
This guide describes installing and getting started with Software Package Builder. It also provides a basic overview of the software packaging process and terminology. It assumes that you are an HP-UX system administrator and familiar with installing and administering software in these environments.
This guide applies to the December 2003 version of Software Package Builder 1.0. If you need additional information for Software Package Builder, visit the product Web site:
3
http://software .hp.com/p roducts/ SPB/
Typographic Conventions
We use the following typographical conventions. mxtool (4) HP-UX manual page. mxtool is the name and (4) is the
section. From the command line, you can enter “man mxtool” or “man 4 mxtool” to view the manpage. See
man (1).
Book Title Title of a book. On the Web and on the Instant
Information CD, it may be a hot link to the book itself.
Command Command name or qualified command phrase. ComputerOut Text displayed by the computer.
KeyCap Name of a keyboard key.
Term Defined use of an important wo rd or phrase.
UserInput Commands and other text that you type.
Variable Name of a variable that you may replace in a command
or function or information in a display that represents several possible values.
[] Contents are optional in formats and command
descriptions. If the contents are a list separated by |, you must choose one of the items.
{} Contents are required in formats and command
descriptions. If the contents are a list separated by |, you must choose one of the items.
... Preceding element may be repeated an arbitrary
number of times.
| Separates items in a list of choices.
1. Introduction to Software Package Builder
Software Package Builder Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Software Package Builder and HP-UX Software Distributor. . . . . . . . . . . . . . . . . . . . 9
System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Installation Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Starting Software Package Builder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2. Software P ackaging
Software Packaging Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Software Packaging Lifecycle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Software Package Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Organizing Filesystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Software Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Software Package Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Product Specification File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Packaging Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3. Software P ackage Builder Features
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Screen Regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Package Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Attribute Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Messages Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Policy Help Tab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
PSF View. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Tool Bar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Additional Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Contents
4. Getting Started with Software Package Builder
Getting Started Using the SPB GUI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Creating a New PSF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Managing Fileset Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Validating a PSF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Setting Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Using the SPB Command Line Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Editing from the CLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Contents
Validating from the CLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Incorporating SPB into Automated Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5. Advanced Features
Managing Fileset Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Using Advanced Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Creating and Using a Subproduct. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Creating and Using a Bundle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Creating and Using a Vendor or Category . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Creating and Using Vendor Defined Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Overview of Software Specification Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Working with Dependency Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Using Control Scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
1 Introduction to Software
Package Builde r
The following topics are covered in this chapter:
“Software Package Builder Overview” on page 8
“System Requirements” on page 11
“Installation Overview” on page 12
“Starting Software Package Builder” on page 13
Chapter 1 7
Introduction to Software Package Builder
Software Package Builder Overview
Software Package Builder Overview
Software Package Builder (SPB) provides a visual method to create and edit software packages using the HP-UX Software Distributor (SD-UX) package format. Once software is packaged, it can easily be transferred to a distribution medium, mass produced, and installed by administrators. The SPB graphical user interface (GUI) provides a window into the software package structure, showing attributes that can be set for each pac kage element. SPB loads packaging policies and validates software package attributes against these policies. The SPB command line interface (CLI) can also perform validation of software package attributes against policies and can be added to an automated process for editing and validation of a PSF.
SPB can assist with the following tasks:
Creating a product specification file (PSF) to organize files into products, filesets, and optionally, into bundles and subproducts
Setting attribute values to define software package characteristics such as revision, architecture, file permissions, and dependencies
Features
Validating the PSF against packaging policies to ensure successful packaging into a software depot with the swpackag e command
Editing and validating the PSF automatically as part of a nightly build process using SPB’s CLI
Features Benefits
Graphical User Interface (GUI) for creating PSFs in SD-UX format
Command Line Interface (CLI) for automating nightly changes to packages
Policy validator for verifying a package’s use of legal SD-UX syntax
Provides an easy-to-use interface, making the complex task of creating a PSF easier.
Provides a mechanism for easy automation of PSF edits and validation.
Easy to create a va lid PS F without in-depth knowledge of all the packaging policies.
Chapter 18
Introduction to Software Package Builder
Software Package Builder Overview
Features Benefits
Open source software can be packaged in SD-UX format
User-specified rules files Allows you to specify the rules file
Easy to repackage software from various formats into SD-UX, allowing you to manage software with the SD-UX software management toolset.
you want to validat e your PSF against.
Software Package Builder and HP-UX Software Distributor
It is important to understand the relationship between SPB and SD-UX.
SD-UX SD-UX provides a powerful set of too ls for centralized HP-UX software
management. SD-UX commands are included with th e HP-UX operating system and allow you to package software into the SD-UX format, as well as create, distribute, and manage software from software depots.
SD-UX provides utilities to support numerous software package management tasks. Of these, the swpackage command creates a software package by combining the files the user wants to deliver (which may include control scripts) and a product specification file (PSF). The software package is then placed in a software depot where it can be distributed to customers and installed using the swinstall command.
The SD-UX packagin g operations are based on the at tribute v alues set in the PSF. The PSF is a master file that is created for a given software package to define the structure and describe all the characteristics and file mappings. The PSF contains attribute information for all the software elements contained in the package and must adhere to a strict, hierarchical structure and set of packaging policy rules.
SPB SPB fits into this process by assisting with the creation and validation of
a PSF that the swpackage command uses to create the softw are package. The structure of a software package and its softwa re elements are largely abstract and the packaging policy rules that the software package must adhere to can also be very complex. SPB helps simplify the process of creating a software package by providing a visual method for
Chapter 1 9
Introduction to Software Package Builder
Software Package Builder Overview
creating the PSF, its software elements, attributes, and structure, as well as automatically validating the PSF against packaging policy rules. SPB provides a default set of packaging policies that validate your PSF, however, you can also customize your own packaging policies.
Chapter 110

System Requirements

Table 1-1 identifies the hardware and software requirements for Software Package Builder (SPB).
Table 1-1 SPB Requirements
Operating System HP-UX 11i v1 (B.11.11)
Software Java 1.4 runtime environment (JRE) or
Free Disk Space 6 MB minimum in the /opt directory
RAM 256 MB
For the latest system requirements, go to:
Introduction to Software Package Builder
System Requirements
HP-UX 11i v2 (B.11.23)
later
1 MB minimum recommended for data
http://software .hp.com/p roducts/ SPB/
Optimizing Java To achieve optimal Java performance, run the HPjconfig tool to tune the
kernel and list any Java-specific patches that are needed.
To access Java configuration information
Step 1. Visit the Web site:
http://www.hp.c om/go/jav a/
Step 2. Locate the section on HPjconfig for tuning HP-UX kernel parameters. Step 3. Install Java-specific patches, as needed.
Chapter 1 11
Introduction to Software Package Builder
Installation Overview
Installation Overview
Accessing the software
Step 1. Go to the following URL:
Step 2. Download the SPB product software.
Installation SPB is packaged in SD-UX format and can be installed with the
SPB is available as a selectable application with the release of HP-UX 11i v2 (B.11.23) and 11i v1 (B.11.11) and can also be downloaded from the Web.
To download SPB from the Web
http://software .hp.com/p roducts/ SPB/do wnload.h tml
swinstall command. For n etwork installation, enter:
swinstall -s <host>:</path> SwPkgBuild er
For media installation, enter: swinstall -s <media p ath> SwPkg Build er For depot installation, enter:
swinstall -d SwPkgBui lder @<host>:</depot path>
Chapter 112
Introduction to Software Package Builder
Starting Software Package Builder
Starting Software Package Builder
To launch SPB from the command line, enter:
/opt/spb/bin/sp b
The SPB GUI will launch and by default, the application will use the packaging policy rules file appropriate for the HP-UX release version you are running on your system. The packagi ng policy rules file is an Extensible Markup Language (XML) formatted file which describes the legal PSF syntax and any field value constraints for your PSF. The default policies supplied with SPB are l ocated in /opt/s pb/data and are named as follows:
For HP-UX 11i v2 (B.11.23) - the default policy file is
112XPolicies_SD .xml
For HP-UX 11i v1 (B.11.11) - the default policy file is
11XPolicies_SD. xml
Specifying the Packaging Policy Rules File
NOTE If only a file name is given as the argument, SPB will look in the default
Chapter 1 13
You have the option of specifying a packaging policy rules file other than the default by using the -r option from the command line.
To launch SPB and specify the policy rules file, enter:
spb -r /opt/spb/data/ <Myrules.xm l>
policy rules file directory for the specified file. You can also specify an absolute path to the file.
For additional information on this and other SPB command line options, refer to the spb (1M) manpage.
14

2 Software Packaging

If you are new to software packaging, this chapter provides an overview of the software packaging process and basic concepts. If you are already an experiences packager, you may want to use this chapter as a review or move to Chapter 3, “Software Package Builder Features”.
This chapter covers the following topics:
“Software Package Overview” on page 16
“Software Package Structure” on page 19
“Product Specification File” on page 25
“Packaging Policies” on page 27
Chapter 2 15
Software Packaging

Software Packaging Overview

Software Packaging Overview
Application software is delivered in units called software packages. A software package is a collection of files and directories required to install a software product. Generally, a software package i s designed and built by the application developer after completing the development of the application code. Building a software product into one or more software packages gives you the ability to do the following:
Transfer the software product to a distribution media
Produce the software product in mass quantities
Install the software product on numerous systems
Chapter 216

Software Packaging Lifecycle

The software packaging lifecycle is displayed in Figure 2-1.
Figure 2-1 Software Packaging Lifecycle
Software Packaging
Software Packaging Overview
1. Identify the software package contents - Determine what files and directories you want to include in your software package. Your software package can consist of products, filesets, files, and other, optional software elements as discussed in “Software Elements” on page 20.
2. Identify the software package structure - Determine the software package structure. Plan the organization of the source and destination filesystems.
Chapter 2 17
Software Packaging
Software Packaging Overview
3. Create a Product Specification File (PSF) - Use SPB to create a PSF to define the software package. SPB provides a GUI for creating the PSF.
4. Validate the PSF - Determine that the PSF is valid prior to creating the software package. SPB uses a packaging policy rules file to validate the PSF.
5. Create the software package - Use the SD-UX swp ackage command to create your software package.
6. Install the software package - Use the SD-UX swinstall command to install the contents of your software package.
7. Produce distribution media - Determine the appropriate method of distribution.You can use the SD-UX swcopy command to create copies of the package.
8. Test the installation - Test the installation of the software package using the SD-UX sw verify command.
TIP For detailed information on SD-UX commands, refer to the manpage for
individual commands or the Software Distributor Administration Guide which can be found at:
http://www.soft ware.hp.c om/produ cts/SD _AT_HP/
Chapter 218
Software Packaging

Software Package Structure

Software Package Structure
A software package is created from a hierarchy of sof tware elements . The hierarchy provides the structure needed by the filesystem to logically identify packaged files. A software package also contains metadata specific to each soft ware element. The metadata is generated by setting attribute values. This is all accomplished through the creation of a product specification file (PSF) which defines the software package.
Once the software package is created, you can create a softwa re depot which acts as a repository for your software products. Software depots can be managed using SD-UX commands.
The packaging process lets yo u create depots . The PSF is flexi ble enough to fit many software build requirements and manufacturing process needs.
Before you begin packaging software, ensure the following:
SPB is installed and configured on the system where you intend to create your software package.
The software to be packaged is installed on the packaging system, or the necessary files are available remotely.

Organizing Filesystems

One of the first steps in packaging software is determining what files and directories you want included in the softw are package. The files should follow certain guidelines to support the configuration you want.
As much as is feasible, you should group your source directories and files so they correspond with the filesets and products you are using in the software package. To make the maintenance of your software package easier, when organizing your source and destinat ion filesystems use the following guidelines:
Create filesets with consistent file access modes (i.e., file permissions).
Create directories with contents that are directed to the same filesets.
Chapter 2 19
Software Packaging
Software Package Structure
Group related files in the source filesystem that will directly

Software Elements

A software package is created from a hierarchy of software elements, which are structured and defined in a PSF. The SPB-specific software elements are as follows:
File A file is the lowest level of software element that can be
Fileset A fileset serves as a container for files, associated file
translate to the destination filesystem.
contained in a software package. Files are grouped together to create filesets.
attributes, and separate control scripts. A fileset is comprised of a group of files. Filesets are grouped and contained in products. A fileset can only belong to one product; however, a fileset may be referenced in multiple subproducts within one product. A fileset can also be included in multiple bundles through t he product it is contained within. A minimum of one fileset is required for a PSF.
Product A product is a container for filesets, subproducts,
and/or control scripts specific to a software package. Products are collections that form a set of related software. A product can contain one fileset or multiple filesets. Products can contain filesets specific to different versions of the product and different hardware platforms. All these diffe r ent filesets can be packaged together for distribution. A minimum of one product is required for a PSF.
Subproduct A subproduct is a reference to groups of related filese ts
within a product. For example, you might create a subproduct that references a fileset grouping for the entire runtime configuration, manuals, or demonstration versions of the product. It is important to remember that subproducts only reference filesets and do not physically contain the fileset. The use of subproducts is optional and considered an advanced feature.
Chapter 220
Software Packaging
Software Package Structure
Bundle A bundle is a reference to filesets, subproducts and/or
products. Bundles may reference collections of filesets that belong to several different products. Creating bundles consisting of multiple filesets allows you to treat several filesets as a single entity. By specifying a bundle, all filesets under the bundle are included in the operation. It is important to remember that bundles only reference filesets, products, and/or subproducts and do not physically contain these software elements. The use of bundles is optional and considered an advanced feature.
Vendor A vendor i s a software element that lets you add
additional, detailed information about a PSF.
Category A category is a software element that can be used as a
selection mechanism for a software package. This software element contains additional information about the category. The category information is referred to by the category_tag attribute within a product, bundle, subproduct, or fileset.
Chapter 2 21
Software Packaging
Software Package Structure

Software Package Hierarchy

The software package hierarchy provides the structure needed by the filesystem to identify packaged files. Figure 2-2 provides a graphical representation of the hierarchical structure to which a valid PSF must adhere.
Figure 2-2 Software Package Hierarchy
Containment vs. Reference
There are two types of relationships that exist within the hierarchical structure of a software package: containment and reference. If a software element acts as a container, then the software element(s) it is comprised of are physically contained. If a software element acts as a reference, then the software element(s) it is comprised of are virtually contained.
Chapter 222
Software Package Structure
The difference between a containment relationship and a reference relationship can be illustrated by the notion that a bundle can be removed without actually removing the software elements that it references. However, removing a product always removes the filesets it contains, and the files contained in the filesets.
Table 2-1 provides a summary of a software package's structural elements, their functions, and their relationship to other elements. The structural elements are numbered to correspond with Figure 2-2 on page 22:
Table 2-1 Structural Elements: Functions and Relationships
Software Packaging
Structural
Element
Installed Software (1)
Product (2) A collection of related
Bundle (3) A collection of related
Fileset (4) A grouping of related
Subproduct (5) A grouping of related
Function Relationship
A delivered and installed software package.
filesets and optionally, subproducts and control scripts.
filesets, subproducts, and/or products.
files and control scripts.
filesets.
The installed software is a valid and complete software package.
A product is a container for filesets, subproducts, and optionally, control scripts.
A bundle is a reference for groups of filesets, subproducts, or products.
A fileset is a container for files and control scripts.
Filesets are contained in products.
A subproduct is a reference for groups of related filesets within a single product.
Control File (6) A control file performs
checks and other t a sks in the software package.
Chapter 2 23
Control files (scripts) are contained in one or more filesets and/or products.
Loading...
+ 53 hidden pages