technical white paper software package builder packaging applications in software distributor format using software package builder september 2003 table of contents introduction executive summary section I: overview of software packaging 2 2 2 section II: procedures for packaging software using SPB 5 packaging software in SD-UX format SPB and SD-UX product specification file benefits of using the SD-UX format prepare the software package (1) install the software package in a staging area (1a) deter
packaging applications in software distributor format using software package builder introduction Applications for HP-UX are often distributed in software package formats that are not visible to Software Distributor (SD-UX), the HP-UX native software management toolset. This makes software inventory, removal, and redistribution more difficult. By packaging your software in SD-UX format, you have access to a powerful set of management commands that improve your ability to manage software.
packaging applications in software distributor format using software package builder The PSF is a master file that is created for a given software package to define its structure, describe its characteristics, and map its files from the source filesystem to the destination filesystem. SD-UX packaging operations are based on the attribute values set in the PSF.
packaging applications in software distributor format using software package builder • Ignite-UX Integration - Integrate with Ignite-UX using the make_config program. for more information If you want more detailed information on software packaging concepts, refer to the Software Distributor Administration Guide that can be found on the product Web site at http://www.software.hp.
packaging applications in software distributor format using software package builder section II: procedures for packaging software using SPB This section provides detailed steps that are required to package software in Software Distributor (SD-UX) format using Software Package Builder (SPB). For this example you will download and repackage the JUnit java test framework, an open source software application. Figure 1 provides an overview of the procedures detailed in this section.
packaging applications in software distributor format using software package builder prepare the software package (1) install the software package in a staging area (1a) One of the first steps in packaging software is to prepare the original software package for repackaging. Install the software package in an appropriate staging area, if allowed. You can then determine what files and directories to include in the software package.
packaging applications in software distributor format using software package builder 2. Review the list to determine what filesets would be beneficial to create. For this example, the directories and files have been numbered one through seven.
packaging applications in software distributor format using software package builder Figure 2 To define additional fileset names not listed in Predefined Filesets: 5. Click in the Fileset Name field and enter the fileset name DOC. 6. Click Add Fileset. The fileset name is added to the Product Content as shown in Figure 3.
packaging applications in software distributor format using software package builder Figure 3 7. Repeat this procedure and add the fileset names DEMO and SRC. 8. Click OK once all filesets have been added to the product. set attributes (2c) Each software element has its own set of attributes, and each attribute has a value that defines it. Most attributes are optional; however, there are a few required attributes.
packaging applications in software distributor format using software package builder Figure 4 3. Select the Policy Help tab to review packaging policy information for the title attribute. 4. Enter Junit 3.8.1 test framework. 5. Verify you have entered a valid attribute value by selecting and viewing the Messages tab. SPB automatically sets several, default attribute values for you. You may change the attributes if needed; however, at this point in the procedure the PSF is valid.
packaging applications in software distributor format using software package builder DOC fileset: 1. For the title attribute, enter documentation files. 2. For the description attribute, enter javadocs, readme, and html docs. DEMO fileset: 1. For the title attribute, enter demonstration files. 2. For the description attribute, enter samples and test to verify junit is functioning. SRC fileset: 1. For the title attribute, enter junit source files. 2. For the description attribute, enter junit source files.
packaging applications in software distributor format using software package builder steps – explicit mapping for a single file (or directory) This form of explicit file mapping will allow you to map a single file or directory to the destination filesystem. Multiple files or directories can be selected for addition. Individual directories and files will be listed in the PSF. 1. From the Package Structure tree select the RUN fileset. 2. From the main menu, select Structure > Add Element(s) > Files.
packaging applications in software distributor format using software package builder Figure 6 11. Click OK to close the Manage Fileset Content dialog box. Important: A source path must be specified for all directories added to the destination filesystem. exercise Using the explicit file mapping option, perform the following: 1. For the SRC fileset, create a new directory path /opt/junit3.8.1. 2. Locate the src.jar file and add it from the source filesystem to the destination filesystem. 3.
packaging applications in software distributor format using software package builder Figure 7 steps – explicit mapping for a directory using the recursive option This form of explicit file mapping allows you to map a selected directory and all its contents recursively. Individual directories and files will be listed in the PSF. 1. From the Package Structure tree, select the DOC fileset. 2. From the main menu, select Structure > Add Element(s) > Files. The Manage Fileset Content dialog appears. 3.
packaging applications in software distributor format using software package builder 7. Activate the recursive option by clicking in the Recursive checkbox, located between the Source Filsysystem and Destination Filesystem as shown in Figure 8. Figure 8 8. Navigate the source filesystem to locate and select the doc directory. 9. Click Add. The doc directory and all its contents are added to the junit3.8.1 directory. 10. Click OK to close the Manage Fileset Content dialog box. 11.
packaging applications in software distributor format using software package builder - implicit mapping The following steps demonstrate implicit file mapping - mapping an entire directory to the destination filesystem using the File * option. This option is similar to the recursive option; however, all files and directories are implicitly added and represented only by an asterisk (*) in the PSF. When using this option, the individual filenames and directories will no be listed in the PSF using this option.
packaging applications in software distributor format using software package builder Figure 9 10. Click OK. The File * option displays in the main dialog box. 11. Activate the implicit file specification option by clicking in the File * checkbox, located between the Source and Destination Filesystems as shown in Figure 10.
packaging applications in software distributor format using software package builder Figure 10 12. Select the junit directory in the source filesystem. 13. Click Add. The junit directory and all its contents are added to the junit3.8.1 directory in the destination filesystem. 14. Click OK to close the Manage Fileset Content dialog box. 15. In the Package Structure tree, expand the DEMO fileset to view its contents.
packaging applications in software distributor format using software package builder Figure 11 validate the psf (2e) Validation occurs in SPB every time you enter data into your PSF or upon opening an existing PSF. The results of the validation process appear on the Messages tab. If the PSF is valid, the message Validation Status: PSF Passed Validation appears. If it is invalid, you should debug the PSF using information provided in the Policy Help tab. steps 1.
packaging applications in software distributor format using software package builder section III: introduction to software management commands manage the software package (3) create the software package (3a) To create a software package the swpackage command reads the PSF file, analyzes the software elements and their attributes, and packages the source files and attributes. Once created, it inserts the software package into a depot.
packaging applications in software distributor format using software package builder steps To register the depot to allow other the network users to access it, enter: swreg –l depot @/var/tmp/junit3.8.1 install the software package (3d) Software distribution and updates are performed using the swinstall command to install software from a software source (a depot or physical media) to your local host. You can change the behavior of this command by specifying additional command-line options.
packaging applications in software distributor format using software package builder The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. UNIX is a registered trademark of The Open Group.