Software Package Builder 7.
© Copyright 2002-2010 Hewlett-Packard Development Company, L.P. All rights reserved Legal Notices Copyright 2010 Hewlett-Packard Development Company, L.P.Confidential 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.
... Preceding element may be repeated an arbitrary number of times. | Separates items in a list of choices.
Table of Contents 1 Introduction to Software Package Builder....................................................................9 Software Package Builder Overview....................................................................................................10 Software Package Builder and HP-UX Software Distributor...............................................................10 Software Distributor.........................................................................................................
Return Values.............................................................................................................................35 Additional Information.........................................................................................................................35 5 Advanced Features......................................................................................................37 Managing Fileset Content ...........................................................................
List of Figures 2-1 2-2 3-1 5-1 5-2 5-3 5-4 5-5 5-6 Software Packaging Lifecycle .......................................................................................................18 Software Package Hierarchy.........................................................................................................20 SPB GUI.........................................................................................................................................27 Manage Fileset Content Dialog Box..........
List of Tables 1-1 1-2 2-1 2-2 2-3 2-4 5-1 8 Features of Software Package Builder...........................................................................................10 SPB Requirements.........................................................................................................................12 Structural Elements: Functions and Relationships.......................................................................21 Required Attribute Values................................................
1 Introduction to Software Package Builder The following topics are covered in this chapter: • • • • • “Software Package Builder Overview” (page 10) “Software Package Builder and HP-UX Software Distributor” (page 10) “System Requirements” (page 12) “Getting and Installing SPB” (page 14) “Starting Software Package Builder” (page 15) 9
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 package element.
Software Distributor SD-UX provides a powerful set of tools for centralized HP-UX software management. SD-UX commands are included with the 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.
System Requirements The following table identifies the hardware and software requirements for Software Package Builder (SPB). Table 1-2 SPB Requirements Operating System • HP-UX 11i v1 (B.11.11) • HP-UX 11i v2 (B.11.23) • HP-UX 11i v3 (B.11.31) Software Java 1.5 runtime environment (JRE) or higher version. Free Disk Space • Minimum 6 MB in the /opt directory • Minimum 1 MB recommended for data RAM 256 MB For the latest system requirements, go to:http://software.hp.
Optimizing Java To achieve optimal Java performance, run the HPjconfig ™tool to tune the kernel and list any Java-specific patches that are needed. Procedure 1-1 To access Java configuration information 1. Visit the Web site http://www.hp.com/go/java/ 2. 3. Locate the section on HPjconfig ™for tuning HP-UX kernel parameters. Install Java-specific patches, as needed.
Getting and Installing SPB 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 an optional application with the release of 11i v3 (B.11.31). SPB can also be downloaded from the Web. Download SPB from the following URL: http://software.hp.com/products/SPB/download.html SPB is packaged in SD-UX format and can be installed with the swinstall command.
Starting Software Package Builder To launch SPB from the command line, enter: #/opt/spb/bin/spb The SPB GUI will launch, and by default the application will use the packaging policy rules file for the HP-UX version you are running on your system. About the Policy Rules Files The packaging policy rules file is an Extensible Markup Language (XML) formatted file that describes the legal PSF syntax and any field value constraints for your PSF.
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 experienced packager, you may want to use this chapter as a review, or move to Chapter 3: “Software Package Builder Features”.Chapter 3, “Software Package Builder Features.
Software Packaging Lifecycle The software packaging lifecycle is displayed in the figure below. Figure 2-1 Software Packaging Lifecycle 1. 2. 3. 4. 5. 6. 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” (page 19).
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.docs.hp.com/en/SD Software Package Structure A software package is created from a hierarchy of software elements. The hierarchy provides the structure needed by the filesystem to logically identify packaged files. A software package also contains metadata specific to each software element.
platforms. All these different 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 filesets 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.
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 elements it is comprised of are physically contained. If a software element acts as a reference, then the software elements it is comprised of are virtually contained.
Product Specification File A product specification file (PSF) defines the structure of a software package. The PSF provides a "road map" that identifies the software package according to its attributes, contents, compatibilities, and dependencies. SPB has a GUI that allows you to structure your PSF and define the attributes that apply to it. The PSF maps files in your source file system area to create the destination filesystem on a customer's system.
Table 2-3 Recommended Attribute Values Software Element Recommended Attribute Product title, revision Fileset title, revision Subproduct title Bundle title, revision Vendor title Category title Corequisites revision, architecture, vendor Prerequisites revision, architecture, vendor Product Specification File 23
Packaging Policies Packaging policies are a set of rules that must be consistently followed to create a valid software package. Packaging policies help ensure that the software package you create in SPB is consistently named and structured. Packaging Policy Rules related to requisites (corequisites and prerequisites) have been mandated and Software Package Builder has been enhanced to enforce these rules.
Packaging policies are implemented as Extensible Markup Language (XML) files. The default policies supplied with SPB are located in /opt/spb/data and are named as follows: • • • For HP-UX 11i v3 (B.11.31) - the default policy file is 113XPolicies_SD.xml 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.
3 Software Package Builder Features This chapter introduces you to the graphical user interface (GUI) and its features. The following topics are covered in this chapter: • • “Introduction” (page 27) “Screen Regions” (page 27) Introduction The SPB GUI is designed to simplify the process of creating a software package by providing a visual method for creating the PSF, its software elements, attributes, and structure, as well as automating validation of the PSF against packaging policy rules.
• • “Menus” (page 29) “Tool Bar” (page 29) Package Structure The Package Structure displays a navigable hierarchy of the software elements contained in the PSF. From the Package Structure region, you can manage and build your PSF, view attribute information, edit the software package structure, expand and collapse nodes, view detailed information on a software element, and view detailed information on software specification attributes and their status.
Message Counter A message counter is persistent in the lower, right-hand corner of the SPB main window. The counter displays the active PSF’s validation status. The number of errors, warnings, and notes are displayed. The counter refreshes automatically upon data entry, revalidation, etc. Policy Help Tab The Policy Help tab displays detailed information on packaging policy rules used to validate your PSF. You can use policy help information to assist in resolving validation errors in your PSF.
4 Getting Started with Software Package Builder This chapter provides tasks to introduce you with the features of SPB using the graphical user interface (GUI) and the command line interface (CLI).
2. 3. 4. 5. 6. Navigate the Source Filesystem and locate the appropriate directory path. Select the directory or files you want to add to the Destination Filesystem. Click Add. The directory or file(s) are added to the selected directory in the Destination Filesystem. Repeat this process until you have mapped all the appropriate source files to the Destination Filesystem. From the Destination Filesystem, select the directory you want to map files into.
NOTE: At any time, you may select the Policy Help tab to review packaging policy information for the attribute you have currently selected. 3. 4. Press Enter. Verify you have entered a valid attribute value by looking in the Messages tab. Continue this process until you have entered all desired attribute values. NOTE: Remember, you are able to validate your PSF in real-time. Every time you enter new data into the PSF, SPB revalidates the file.
spb -f /opt/SPB/demo/demoPSF -V -s nw To validate a specified depot from the command line, use the following two options in combination: • • The -doption specifies the depot to be edited or validated. The -V option validates the PSF indicated by the -ddepot. Example To validate a depot /myDepot located on machine spbhome.fc.hp.com, enter the following command: spb -d spbhome.fc.hp.com:/myDepot -V To validate a depot (/myDepot) located on machine spbhome.fc.hp.
IMPORTANT: SPB cannot read a PSF from stdin, therefore, it cannot be used in a pipe symbol ( | ). The following command will not work correctly: cat psf_file | spb -V Return Values Upon completion of the validation process using the CLI, SPB returns one of the following values to indicate the severity of the message: 0 Normal exit. Validation performed with no errors. 1 Validation found a warning. 2 Validation found an error.
5 Advanced Features If you are an experienced packager, you might want to use SPB to add advanced features to your PSF.
The Manage Fileset Content dialog allows you to map source files and directories to the destination filesystem and exercise control over directory and file attributes. The following is a description of the regions and features identified in Figure 5-1 (page 37): Regions and Features 1. 2. 3. 4. 5. Source Filesystem - Allows navigation of the Source Filesystem for selection of files and directories to be mapped to the Destination Filesystem.
IMPORTANT: If File * is used to add files, you will not be able to display the individual filenames from the Destination Filesystem. This makes it difficult to determine if you are delivering more files or directories than intended. A common problem encountered when using the File * option is the accidental inclusion of source control directories (e.g., RCS, CVS) and/or editor scratch files to the package.
Figure 5-3 File Mapping Options Enabled 3. 4. 5. From the main window, select the appropriate file mapping option. Once the source and destination directories have been selected, click Add. Continue adding directories using the selected file mapping method or clear the checkbox. NOTE: Only one file mapping option can be applied at a time. Once you have selected a file mapping option, you must clear the checkbox to disable the option.
1. Select the Advanced Options button. The Advanced Options dialog box displays, as shown below. Figure 5-4 Permissions Selections 2. 3. Select Symbolic to change the mode permissions display. Click OK. The Mode field now displays a symbolic representation, as shown below. Figure 5-5 Symbolic Permissions Representation Creating and Using a Subproduct Using subproducts provides a way for you to organize filesets into different groupings beyond that provided within a product.
3. 4. 5. 6. 7. Enter a subproduct name. Select the appropriate filesets to add to the subproduct. Click Add. Continue this process until all subproduct content has been added. To save and exit, click OK once all contents have been added. Creating and Using a Bundle A bundle is a reference to filesets, products, and/or subproducts. Bundles may reference collections of filesets that belong to several different products.
3. 4. 5. 6. Enter an Attribute Name. Enter the associated Attribute Value. Repeat Steps 3 and 4 until you have added all the VDAs you require. Click OK. The VDA displays at the bottom of the Attribute Table for the selected software element. Procedure 5-9 To edit a vendor defined attribute Once you have created a VDA, you can edit the attribute value as you would any other attribute within the Attribute Table: 1. 2. • • • From the main menu, navigate to Attributes->Vendor Defined Attributes.
Ancestor Attribute The ancestor attribute defines the name of a previous version of a fileset. This attribute designates the list of filesets that will match the current fileset when installed on a target system, if the match_target installation option is specified. Contents Attribute The contents attribute defines the list of the software elements contained within a subproduct or bundle. This attribute is automatically generated when you create and add content to a bundle or subproduct.
swverify commands, these commands may automatically select additional software to meet dependencies. Multiple dependency attributes may be specified for a corequisites attribute or a prerequisites attribute. There are two types of relationships that can be used when defining multiple dependency attributes: • • AND - Use the AND relationship to specify multiple dependency attributes, each of which must be satisfied. The AND relationship is the default.
3. 4. From the Fileset Content, select the corequisites attribute you want to use as a template. Edit the Software Spec field as appropriate to specify the remote content. IMPORTANT: 5. 6. The software specification cannot contain spaces. Click Add Content. The Fileset Content now contains the new, remote corequisites attribute. Continue adding corequisites attributes as needed or click OK to exit. Working with Depots Within SPB you can search for and open depots.
NOTE: The depot is opened as a READ-ONLY file. Validation errors can be viewed but cannot be resolved from within SPB. Validating a Depot for Installation Errors To validate a depot for installation errors before installing the depot perform the following:: 1. 2. From the main menu, select Tools->Check Target. Specify the host name in the New Hostname field and click Add New Host. The hosts will be added to both Predefined Targets list and Selected Targets list.
NOTE: The depot properties, which are set by SD when the depot is created are not valid PSF attributes. Therefore, the Depot Properties will appear in the PSF as comments.When a PSF is created from a depot, the source information for files is lost. Using Control Scripts You can use control scripts to customize the behavior of your software package. SD-UX supports execution of both product and fileset control scripts.
• Working with Software Specification Attributes — Corequisites Dialog Box — Prerequisites Dialog Box — Ancestors Dialog Box • Running the swpackage Command — Tools Menu — Configuration Dialog Box — Command Output Tab Additional Information 49
Glossary A-B ancestor An attribute that names a previous version of a fileset. This is used to match filesets on a target system. If the match_target option is set to true, SD-UX matches the ancestor fileset name to the new fileset name. and relationship The default relationship for specifying one or more dependency attributes (corequisites or prerequisites) where all dependencies must be satisfied. architecture An attribute that represents the operating system platform on which the product runs. (e.g.
on which the depot resides. Depots can reside on a local or remote system. You can package software directly into a depot or copy packaged software into the depot from elsewhere. description An attribute for products and filesets, usually a paragraph description of that product or fileset. destination The path at which a file will be installed. destination filesystem The filesystem structure that will be created on the target system when the software product is installed.
product specification file (PSF) A file that defines the structure of a software package and maps your source filesystem area to create the destination filesystem on a target system. A PSF identifies the software package according to its attributes, contents, compatibilities, and dependencies. Q-R readme This attribute provides either the location of the text file containing the README information or the text value itself.
unconfigure script An optional script associated with a fileset that is executed by swremove before the removal of filesets begins. vendor The vendor for the software being packaged. If a vendor specification is included in the PSF, the vendor and tag attributes are required for swpackage. vendor defined attribute An attribute you define to provide additional information about a software package. A vendor defined attribute (VDA) may be created for any software element in the product specification file.