This chapter explains how to set certain installation options, called attributes, for the files in your product. It contains these sections:
“Adding Attributes: Before You Begin” provides some background information and lists the prerequisites for adding installation attributes.
“Adding Installation Attributes: The Basic Steps” lists the basic steps for adding attributes.
“Using the Add Attributes Worksheet” describes the features of the worksheet and explains how to use it to add installation attributes to your product's files.
This section lists the prerequisites for adding installation attributes, and explains what installation attributes are.
Before you begin specifying attributes for your products files, you must first have created a product hierarchy using the Create Product Hierarchy worksheet (see Chapter 3), tagged the files using the Tag Files worksheet (see Chapter 4), and edited permissions and destinations for the files using the Edit Permissions & Destinations worksheet (see Chapter 5).
In particular, make sure that all your product's files are listed in the IDB Viewer. If some are missing, go back to the Tag Files worksheet to tag them and include them in the IDB file (see “Tagging the Files: The Basic Steps” for instructions). You can't add attributes to your product's files unless they are listed in the IDB file, because that is where swpkg stores them. (Every file that is currently listed in your IDB file is listed in the IDB File Viewer.)
For each file in your product, you can specify certain attributes—installation options that govern the installation of that file. For example, you can specify
that the installation occur during the next boot
shell commands for Software Manager to run automatically at different points in the installation
that a separate copy of your application be installed for diskless client
that a binary not be stripped
on which hardware configurations your application can be installed
swpkg stores attributes information in your product's IDB file.
To specify attributes for your product's files, follow these steps:
Select a file or files from the IDB file list.
Select the desired attributes from the Attributes Specification sheet.
Click the Assign arrow button.
Repeat Steps 1-3 for each file or group of files for which you wish to specify attributes.
Save the IDB file by selecting Save IDB from swpkg's File menu. (This step is optional; you can wait and save the IDB file when you build the product.)
This section describes the features of the Add Attributes worksheet, shown in Figure 6-1, and explains how to use the worksheet to add installation attributes to your product's files.
The Attributes Specification sheet, shown in Figure 6-2, lists the installation attributes. To the left of each attribute is a check button. You select (or deselect) the attribute by clicking the check button. When the attribute is selected, a red check mark appears over the button. When the attribute is not selected, no check mark appears.
![]() | Note: The Attributes Specification sheet is too long to fit in the Add Attributes worksheet, so a vertical scrollbar is provided. Figure 6-2 shows the top part of the Attributes Specification sheet and Figure 6-3 shows the bottom part. |
Users sometimes modify the configuration files for your product. Typically, these modifications are made to reflect site- and machine-specific information. It's important that you identify all the configuration files in your product so that modifications users made to older versions of these files are not lost during installation on the new versions.
By checking the config attribute check button, you identify the selected file as a configuration file. You must then specify a configuration type to specify how to deal with each configuration file. There are three configuration types. The first configuration type, update, is listed on the large button located to the right of the config attribute. Click this button to see all three choices, then select the appropriate configuration type from the list.
After you've selected a configuration type, click the Assign arrow button to assign the attribute to the selected file.
Here are the three configuration types:
| update | Software Manager automatically installs the new configuration file, but saves the old file as filename.O, where filename is the name of the configuration file. | |
| noupdate | Software Manager retains the existing (old) file, if it exists. | |
| suggest | Software Manager retains the existing file, if it exists, and install the new configuration file as filename.N, where filename is the name of the configuration file. |
The configuration types are listed below in a table that describes what Software Manager does with each type of configuration file.
Table 6-1. Configuration Types
Configuration File Type | Before installation | After installation |
|---|---|---|
update | No previous version was installed. | The new version is installed. |
| A previous version was installed, but not modified. | The new version is installed. |
| A previous version was installed and modified. | The older version is filename.O and the new version is installed. |
noupdate | No previous version was installed. | The new version is installed. |
| A previous version was installed, but not modified. | The previous version is still installed. |
| A previous version was installed and modified. | The previous version is still installed. |
suggest | No previous version was installed. | The new version is installed. |
| A previous version was installed, but not modified. | The new version is installed. |
| A previous version was installed and modified. | The new version is installed as filename.N. |
Very few applications need this attribute—in general, don't select it. Selecting the shadow attribute delays the installation of the specified file until the next time the workstation is booted. So, Software Manager does not immediately install the file on the users' workstations.
This attribute is useful for products that might be used by a variety of applications at any given time—such as shared libraries—where a replacement of the existing product files might affect those applications that are using the product at the time a new version of the product is installed.
After selecting this attribute, click the Assign arrow button to assign the attribute to the selected file.
You can specify lists of commands that are to be executed during the installation of the selected file. The three types of lists and when they are executed are:
| preop | This list of commands is executed before installing the selected file. | |
| postop | This list of commands is executed after installing the selected file. Configuration files cannot have postops. | |
| exitop | This list is executed when the user quits Software Manager (assuming the user is installing the selected file). |
Although preops, postops, and exitops provide the flexibility to perform many types of processing at installation time, you should limit their use for these reasons:
If the commands in a command list do any type of processing that increases the use of disk space, such as uncompressing files, the user could run out of disk space during installation because Software Manager has no way of knowing how much disk space is required.
If files in the software product are modified during installation, the versions -m command reports them as being modified. This can be confusing for users because they have no way of finding out what the changes were and in many cases won't know that they were done during installation.
Extensive processing in preops, postops, and exitops makes installations take longer.
Errors that occur while running preops, postops, and exitops are very hard for users to diagnose and correct.
To specify a list of commands for execution during installation, follow these steps:
Select a file from the IDB file list.
Select either the preop, postop, or exitop attribute.
Type the desired commands into the text field associated with that attribute, making sure to
enclose the list of commands in a pair of double quotes
precede semicolons with a backslash, if you want them taken literally
press <Enter> after each separate command
Here's an example of a one-line exitop command that sends mail to the developer when users install the application:
"echo $USER@`hostname`.`domainname` got product | Mail me" |
Click the Assign arrow button when you're finished.
![]() | Note: When saving your preop, postop, and exitop commands into the IDB file, swpkg converts any new lines into semicolons. When you start a new session with this IDB file, swpkg converts the semicolons back to new lines. So, when you type in your commands, you need to put a backslash in front of all “real” semicolons, to tell swpkg that you really do want a semicolon and not a new line. |
It's a good idea to include an exitop to install your application's icon into the Icon Catalog. To do this, you would select your executable file and type into the exitop text field:
"tag tagnumber filename iconbookedit -add 'Category:File Name:filename' -syspage whichPage cd /usr/lib/filetype make -u" |
tagnumber is the number you're assigning to the application, filename is the name of the application, and whichPage is a particular page in the Icon Catalog. The last two lines update the Desktop database to include your changes. For an example of how to use the exitop attribute to add your application's Desktop icon to the Icon Catalog, see “Step Six: Adding Attributes”. For a more detailed discussion of the iconbookedit command, see the iconbookedit(1M) reference page or Chapter 15, “Adding Your Application's Icon to the Icon Catalog,” in the Indigo Magic Desktop Integration Guide. For instructions on tagging your files, see “Step One: Tagging Your Application” in Chapter 11 of the Indigo Magic Desktop Integration Guide.
When your software product is “installed” on a diskless workstation, each file is installed on a server in the share tree by default. This means that just one copy of each file is installed on the server and that copy is used by all diskless clients of that server. Your product may contain files that need to be duplicated for each client, typically because they are configuration files that must be modified for each client workstation.
To indicate that a file is to be replicated for each diskless client, select the noshare attribute from the Attribute Viewer. After selecting this attribute, click the Assign arrow button to assign the attribute to the selected file.
By default, swpkg automatically strips all binaries. You can override this behavior by selecting the nostrip attribute from the Attribute Viewer. After selecting this attribute, click the Assign arrow button to assign the attribute to the selected file. (See the strip(1) reference page for more information.)
In most cases, the files you include in your software product are applicable to all models of Silicon Graphics workstations. However, swpkg does provide a mechanism for restricting the installation of files to particular models on a per-file basis. You can use this mechanism to prevent users from installing files on a workstation that can't run them (which is better than allowing users to install files that won't work properly).
You'll need to set up installation restrictions if:
your application doesn't run on all Silicon Graphics workstations
different versions of a file are required for different models
a file in your product doesn't apply to particular models
To restrict installation to specific models, you use the Machine Dependent (mach) attribute. By selecting the mach installation attribute for a file, you tell swpkg that the file is machine dependent. You then select the models that the file should be installed on from the mach attribute option list—the full mach attribute option list is shown in Figure 6-3.
The mach attribute option list is divided into three sublists:
| CPUBOARD | The CPUBOARD sublist allows you to specify the types of CPU board with which the selected file is compatible. This sublist provides two buttons that allow you to automatically select either all the R3k boards or all the R4k boards. When you click one of these buttons, all the CPU boards of that type are automatically selected. You can still make further CPU board selections and deselections by clicking the check button corresponding to a particular CPU board.
| |||
| GFXBOARD | The GFXBOARD sublist allows you to specify the graphics boards with which the selected file is compatible. If you've already made selections from the CPUBOARD sublist, some of the boards in the GFXBOARD list may be disabled (grayed out). The disabled items correspond to graphics boards that are available only with the CPU boards you did not select. | |||
| SUBGR | The SUBGR sublist allows you to specify the types of subgraphics board with which the selected file is compatible. If you've already made selections from the CPUBOARD sublist, some of the boards in the SUBGR list may be disabled (grayed out). The disabled items correspond to subgraphics boards that are available only with the CPU boards you did not select. |
Table 6-2 lists by machine type the CPU board, the graphics board, and the subgraphics board for many Silicon Graphics systems.
Table 6-2. CPU Board, Graphics Board, and Subgraphics Board by Machine Type
Machine Type | CPUBOARD | GFXBOARD | SUBGR |
|---|---|---|---|
4D/20{G,TG}[a] | IP6 | ECLIPSE | ECLIPSE |
4D/25{G,TG}a | IP6 | ECLIPSE | ECLIPSE |
4D/30{G,TG}a | IP12 | ECLIPSE | ECLIPSE |
4D/30EG (Elan) | IP12 | EXPRESS | EXPRESS |
4D/30XS{24} | IP12 | EXPRESS | EXPRESS |
4D/35XS{24} | IP12 | EXPRESS | EXPRESS |
4D/35{G,TG}a | IP12 | ECLIPSE | ECLIPSE |
4D/35EG (Elan) | IP12 | EXPRESS | EXPRESS |
Indigo | IP12 | LIGHT | LIGHT |
Indigo Dual Head | IP12 | LIGHT | LIGHT |
Indigo XS{24} | IP12 | EXPRESS | EXPRESS |
Indigo Elan | IP12 | EXPRESS | EXPRESS |
Indigo R4K | IP20 | LIGHT | LG1MC |
Indigo R4K DH | IP20 | LIGHT | LG1MC |
Indigo R4K XS | IP20 | EXPRESS | EXPRESS |
Indigo R4K XZ | IP20 | EXPRESS | EXPRESS |
Indigo R4K Elan | IP20 | EXPRESS | EXPRESS |
Indigo2 Extreme | IP22 | EXPRESS | EXPRESS |
Indigo2 XZ | IP22 | EXPRESS | EXPRESS |
Indigo2 Extreme+XL (dual heads: one Extreme, one XL) | IP22 | NEWPRESS | NEWPRESS |
Indigo2 XL | IP22 | NEWPORT | NG1 |
Indy | IP22 | NEWPORT | NG1 |
4D/50G | IP4 | CLOVER1 |
|
4D/50GT | IP4 | CLOVER2 | IP4GT |
4D/70G | IP4 | CLOVER1 |
|
4D/70GT | IP4 | CLOVER2 | IP4GT |
4D/120GTX | IP5 | CLOVER2 | IP5GT |
4D/xy0GTX[b] | IP5 | CLOVER2 | IP7GT |
4D/xy0REb | IP5 | VENICE | IP7 |
4D/xy0SKYb | IP5 | STAPUFT | SKYWR |
4D/xy0VGXb | IP5 | STAPUFT | IP7GT |
Crimson BLG | IP17 | LIGHT | IP17 |
Crimson XS{24} | IP17 | EXPRESS | IP17 |
Crimson Elan | IP17 | EXPRESS | IP17 |
Crimson GTX | IP17 | CLOVER2 | IP17 |
Crimson VGX | IP17 | STAPUFT | IP17 |
Crimson VGXT | IP17 | STAPUFT | IP17SKY |
Crimson RE | IP17 | VENICE | IP17 |
Onyx | IP19 | VENICE | IP19 |
[a] Key: 4D/20{G,TG} is an abbreviation for 4D/20, 4D/20G, and 4D/20TG. [b] Where x=2, 3 or 4, and y=1, 2, 4, or 8. | |||
To restrict the models of workstations on which Software Manager can install a file in your product (by specifying those models on which the file can be installed), follow these steps:
Select the file (or files) from the IDB File Viewer. (If different files have different dependencies, you must follow these steps for each group of files with different dependencies.)
Click the mach attribute check button.
Select the types of workstations on which your files can be installed. (You don't need to make selections in each of the categories. For example, you could specify all workstations with VGX graphics.)
To select a CPU architecture, use theR3k Boards Only and R4k Boards Only buttons. When you make your selection, the CPUBOARD check buttons that correspond to the selected architecture appear selected (red check marks appear on the buttons).
To make further selections (or deselections) of CPU boards, use the CPUBOARDS check buttons.
To select graphics boards, use the GFXBOARD check buttons.
To select subgraphics boards, use the SUBGR check buttons.
Once you've made all your selections, click the Assign arrow button.
To get the values for CPUBOARD, GFXBOARD, and SUBGR for a particular workstation, use the hinv(1M) command. This command gives you an output that looks something like this:
1 33 MHZ IP12 Processor FPU: MIPS R2010A/R3010 VLSI Floating Point Chip Revision: 4.0 CPU: MIPS R2000A/R3000 Processor Chip Revision: 3.0 On-board serial ports: 2 On-board bi-directional parallel port Data cache size: 32 Kbytes instruction cache size: 32 Kbytes Main memory size: 32 Mbytes Integral Ethernet: ec0, version 0 CDROM: unit 4 on SCSI controller 0 Tape drive: unit 3 on SCSI controller 0: DAT Disk drive: unit 2 on SCSI controller 0 Disk drive: unit 1 on SCSI controller 0 Integral SCSI controller 0: Version WD33C93A, revision 9 Iris Audio Processor: revision 3 Graphics board: GR2-Elan |
To find out whether the workstation has an R3k or an R4k processor, look at the line that starts with “CPU.” In this example, hinv lists an R3000 (R3k) processor.
For more information on the type of CPU board, look at the first line of the hinv output. In this example, hinv lists an IP12 processor.
The hinv output provides graphics board and subgraphics board information using a different terminology than is used in the GFXBOARD and SUBGR sublists. To determine the values for GFXBOARD and SUBGR from hinv output, first look at the line labeled “Graphics board.” The IRIS Software installation Guide provides a table that maps the hinv output for each type of graphics board to the corresponding GFXBOARD and SUBGR values.
Since new values of CPUBOARD, GFXBOARD, and SUBGR may have been added for new models of workstations released after the IRIS Software Installation Guide was published, always check the most recent Release Notes for System Software to see if there is a more recent list of the possible values of CPUBOARD, GFXBOARD, and SUBGR.
![]() | Note: When you make selections of mach attributes, some of the buttons in the lists may appear disabled (“grayed out”). This prevents you from selecting a combination of options that do not correspond to an available Silicon Graphics architecture configuration. |
Use the Assign arrow button to assign selected attributes to a file or files in the IDB file list. To do this, select the file(s) from the IDB file list, make your selections from the Attributes Specification sheet, then click the left mouse button on the Assign arrow button.