UPS/UPD Doc Home page | Computing Division| Fermilab at Work | Fermilab Home
TOC PREV NEXT INDEX
View/print PDF file
Fermilab CD logo Complete Guide and Reference Manual for UPS, UPD and UPP v4

Chapter Contents

Chapter 5: Finding Information about Products on a Distribution Node
  5.1 Listing Products on a Distribution Node
    5.1.1 Using UPD
    5.1.2 Using UPP
  5.2 Listing Product Dependencies on a Distribution Node
  5.3 Information about Products in KITS
    5.3.1 Access Restrictions and Product Categories
    5.3.2 Product Pathnames for FTP Access
  5.4 Special Instructions for Proprietary Products


Chapter 5: Finding Information about Products on a Distribution Node


This chapter discusses finding information about products on a distribution node, in particular:

5.1 Listing Products on a Distribution Node

Both UPD and UPP can be used to list the product instances installed in a distribution database. We show you how to do this below.

For information on the KITS database (on fnkits) or the products in AFS space, you can also use the Web. Fill out and submit the form at http://www.fnal.gov/upc/. This page can be accessed from the Computing Division's documentation search page (http://cddocs.fnal.gov/cfdocs/productsDB/docs.html; scroll down and click on OSS Product Status Request Page under Additional Information). See the newsgroups fnal.announce.products and fnal.announce.unix for recent product release information.

5.1.1 Using UPD

The upd list command is available to list information about product instances on the server. It just performs ups list (described in section 3.2 Listing Product Information in a Database) on a distribution database, and uses the same set of options. Two output styles are provided: a formatted one that is easy for users to read, and a condensed one for parsing by a subsequent command or a script.

You can specify the information you want contained in the output by including various options (see the reference section 23.11 ups list for details). As is standard in UPS/UPD, if no chain, version or flavor is specified, and -a (for all instances) is not specified, it returns only the instance declared as current for the best-matched flavor of the requesting machine. All the UPD commands use the fnkits host as the default, which accesses the KITS database. Use the -h <host> option to specify a different host.

The upd list command has the following syntax:

% upd list [<options>] [<product>] [<version>] 

Most of the sample commands listed below use the -K+ option which condenses the standard output onto a single line. The -K+ option is described in section 3.2.2 Condensed Output Style.

List Current Instance of a Product

Most often, people want to know if there is a current version of a product that will run on their machine. Because of the defaults in place, you can issue the simple command:

% upd list [-K+] [<product>] 

For example, take the product tex. To request the condensed output, enter:

% upd list tex -K+ 
"tex" "v3_14159" "SunOS+5" "" "current" 
"tex" "v3_1415a" "SunOS" "" "current" 

List All Instances for One Flavor of a Product

Say, for example, you wanted to know what instances of ximagetools were available from fnkits for the flavor SunOS+5. You could issue the command:

% upd list -af SunOS+5 ximagetools -K+ 
"ximagetools" "v3_0b" "SunOS+5" "" "" 
"ximagetools" "v3_1" "SunOS+5" "" "old" 
"ximagetools" "v3_1_1" "SunOS+5" "" "" 

List All Current Products for Flavor of Machine

For this request, you may just want the product name and version. Use the -K option accordingly (output edited for brevity):

% upd list -Kproduct:version 
"acnet" "v1_0" 
"alerts" "v0_1" 
"apache" "v1_3_3" 
"bash" "v2_02" 
... 
"ximagetools" "v4_0" 
"xntp" "v3_5_93" 
"xntp" "v3_4" 
"xpdf" "v0_5" 

Obtain Detailed Listing for a Product Instance

To find all the information associated with a product instance on the server, use the -l option (output edited for brevity):

% upd list -l tex v3_14159 
 
DATABASE=/ftp/upsdb 
        Product=tex     Version=v3_14159        Flavor=SunOS+5 
                Qualifiers=""   Chain=current 
                Declared="1998-09-10 07.39.47 GMT:1998-09-10 07.39.47 GMT" 
                Declarer="updadmin:updadmin:updadmin:updadmin" 
                Modified="1998-09-10 07.39.47 GMT:1998-09-10 07.39.47 GMT" 
                Modifier="updadmin:updadmin:updadmin:updadmin" 
                Home=/ftp/products/tex/v3_14159/SunOS+5/tex_v3_14159_SunOS+5 
                ... 
                Action=setup 
                        setupRequired(tex_files) 
                        prodDir() 
                        setupEnv() 
                        pathPrepend(PATH,${UPS_PROD_DIR}/bin) 
                        envSet(TEXMFMAIN,${UPS_PROD_DIR}/share/texmf) 

5.1.2 Using UPP

UPP requires what we call a subscription file which tells it what products to look for on a designated distribution node, and what functions to perform when it detects that new versions of these products have been released there. One of the functions UPP can perform is notification. It is therefore a useful tool for keeping abreast of changes/enhancements to your favorite products and to get information on new ones.

Your job is to create a UPP subscription file and run the upp command. The subscription file has a structure that includes a header and at least one "stanza". A stanza is bracketed by begin and end. Each product you want to monitor requires its own stanza (or a separate subscription file, but that is more cumbersome). The upp command can be automated and run periodically (for example from cron). The information below illustrates how to write a subscription file for the current purpose. For more information, refer to Chapter 7: Installing Products Using UPP and Chapter 33: The UPP Subscription File.

Sample Subscription File

This example includes a header (the first five lines in the sample file) as required, and one stanza. This file configures UPP to send email to a specified address when it detects either of two conditions on the designated distribution server:

The file listing is on the left and comments are provided on the right:
file = upp
This identifies the file as a UPP subscription file.
mail_address = joe@fnal.gov
Send mail notifications to joe@fnal.gov.
dist_node = fnkits.fnal.gov
Use fnkits.fnal.gov as the UPD server node to query.
data_dir = /var/adm/upp
Use /var/adm/upp as the local bookkeeping directory
newprod_notify = T
T is for True; this means yes, notify me of new products appearing on the UPD server node (in this case, on the fnkits node). Set it to any other value (e.g., F) to disable this notification.
begin
Begin stanza for a product.
product = exmh
Identify subscribed product as exmh (the exmh versions remain unspecified in this example, therefore act on all versions for the flavor specified below). You must include this product identifier in the stanza. Optional product instance identifiers not used in this example include qualifiers, prod_dir (product root directory) and chain.
flavor = SunOS+5.5
Identify flavor of product (this is optional)
action = current
List in the following lines of this file one or more functions to perform when any version of exmh of flavor SunOS+5.5 is chained to "current" on fnkits. Action can be set to any chain name, or to the value newversion. Newversion means: perform the following functions when a new version of the product appears on the server.
notify
Send a notification message to joe@fnal.gov
end
End stanza. If you want to add instructions for another product in this same file, start a new stanza with begin.

The UPP Command

You can run UPP interactively by issuing the upp command. The upp command line is very simple:

% upp [-v[v...]] <subscript-file-1> [<subscript-file-2>...] 

The -v option requests verbose output; more v's (up to four) provide progressively more verbosity. The upp command has no direct output (unless verbosity is turned on), rather it mails a report of any actions taken to the email address specified in the subscription file.

There are no other command options for upp; its behavior is controlled entirely by the subscription file(s).

Automate UPP Using cron

You can add a cron job that first sets up UPD then runs UPP with a subscription file (shown here as upp.subscription). Here is a sample sh script to which we give the filename upp.launch:

#! /bin/sh 
. /usr/local/etc/setups.sh 
setup upd 
upp /path/to/upp.subscription 

A sample crontab entry to run the upp.launch script every night at midnight might look like:

0 0 * * * /path/to/upp.launch 

5.2 Listing Product Dependencies on a Distribution Node

The command upd depend is used to return the list of dependencies for the specified product instance(s), as declared in the database in the distribution database. It just performs ups depend (described in section 3.3 Finding a Product's Dependencies) on the server, and uses the same set of options. As usual, the fnkits node is the default, and -h <host> allows you to specify a different server. This example shows several layers of dependencies:

% upd depend exmh 
exmh v2_0_2 -f NULL -z /ftp/upsdb -g current 
|__expect v5_25 -f SunOS+5 -z /ftp/upsdb -g current 
|  |__tk v8_0_2 -f SunOS+5 -z /ftp/upsdb 
|     |__tcl v8_0_2 -f SunOS+5 -z /ftp/upsdb 
|__mh v6_8_3c -f SunOS+5 -z /ftp/upsdb -g current 
|  |__mailtools v2_3 -f NULL -z /ftp/upsdb -g current 
|__mimetools v2_7a -f SunOS+5 -z /ftp/upsdb -g current 
|__glimpse v3_0a -f SunOS+5 -z /ftp/upsdb -g current 
|__www v3_0 -f NULL -z /ftp/upsdb -g current 
|  |__lynx v2_8_1 -f SunOS+5 -z /ftp/upsdb -g current 
|__ispell v3_1b -f SunOS+5 -z /ftp/upsdb -g current 

Inclusion of the -R option returns only the required dependencies; any optional ones are ignored:

% upd depend -R exmh 
exmh v2_0_2 -f NULL -z /ftp/upsdb -g current 
|__expect v5_25 -f SunOS+5 -z /ftp/upsdb -g current 
|  |__tk v8_0_2 -f SunOS+5 -z /ftp/upsdb 
|     |__tcl v8_0_2 -f SunOS+5 -z /ftp/upsdb 
|__mh v6_8_3c -f SunOS+5 -z /ftp/upsdb -g current 
|  |__mailtools v2_3 -f NULL -z /ftp/upsdb -g current 
|__mimetools v2_7a -f SunOS+5 -z /ftp/upsdb -g current 

Another useful option to point out is -H <flavor> which allows you to retrieve a dependency list for a flavor other than that of the machine you're using. For example, if you want the dependency list for an IRIX+6 version, but you issue the command from a SunOS+5 machine, you would run the command:

% upd depend -H IRIX+6 exmh 
exmh v2_0_2 -f IRIX+6 -z /ftp/upsdb -g current 
|__expect v5_25 -f IRIX+5 -z /ftp/upsdb -j  -g current 
|  |__tk v8_0_2 -f IRIX+5 -z /ftp/upsdb -j  -g current 
|__tk v8_0_2 -f IRIX+5 -z /ftp/upsdb -j  -g current 
|  |__tcl v8_0_2 -f IRIX+5 -z /ftp/upsdb -j  -g current 
|__tcl v8_0_2 -f IRIX+5 -z /ftp/upsdb -j  -g current 
|__mh v6_8_3c -f IRIX+6 -z /ftp/upsdb -g current 
|  |__mailtools v2_3 -f NULL -z /ftp/upsdb -g current 
|__mimetools v2_7a -f IRIX+6 -z /ftp/upsdb -g current 
|__glimpse v3_0a -f IRIX+6 -z /ftp/upsdb -g current 
|__www v3_0 -f NULL -z /ftp/upsdb -g current 
|  |__lynx v2_8_1 -f IRIX+6 -z /ftp/upsdb -g current 
|__ispell v3_1b -f IRIX+6 -z /ftp/upsdb -g current 

5.3 Information about Products in KITS

KITS is the commonly used name for the distribution database on the Computing Division's central product distribution server, fnkits.fnal.gov. In this section we describe:

5.3.1 Access Restrictions and Product Categories

The permissions/access restrictions of products in KITS depend on the category of product. As a product installer, you don't generally know (or need to know) a priori what category the product belongs to, but if you can't download a particular product due to access restrictions, the product category is probably the reason.2 The categories as defined in the UPD configuration for KITS are:

default

The default category is the most commonly used, and is for regular products that are intended for distribution to FTP clients on registered hosts3. The products are set to group upd, and group-read-only.

local

The local category is for products installed (using upd install) into the local database, ftp/upsdb, for use on the fnkits node itself (as opposed to those added to KITS for distribution). For these products, the -O local option must be included in the upd install command. (Used only by the fnkits system managers.)

fermitools

fermitools products are locally-developed and supported software packages (which are not available elsewhere, generally) that are made available to the public via the Fermitools program4. These products are world-readable, and thus accessible by any FTP client.

proprietary

The proprietary category includes products for which Fermilab has a limited number of licenses. Each proprietary product has its own group, and is made group-readable only to that group.5 To gain access, appropriate "site group" and "site gpass" commands must be issued (done automatically by UPD, must be done manually by an FTP client).

fnalonly

The fnalonly category is for products intended only for on-site ftp clients in the fnal.gov domain coming in through ftp://ftp.fnal.gov:9021/ (on the ftp command line, type ftp://ftp.fnal.gov 9021). If you use UPD, just use it normally. These products are set to group fnalonly, and are group-read-only.

usonly

US-only (United States only) products are accessible only to U.S. government (.gov) and military (.mil) domains coming in through ftp://ftp.fnal.gov:8021/ (on the ftp command line, type ftp://ftp.fnal.gov 8021). If you use UPD, just use it normally. In general, these are products for which distribution to other countries is illegal. They are set to group usonly, and are group-read-only.

5.3.2 Product Pathnames for FTP Access

Products are arranged (via symlinks) in several different file hierarchies to make browsing easier:

/ftp/products Area

Within FTP, cd to ftp/products (or to just products) in order to access this hierarchy. Under the /ftp/products area the product tar files are organized in the structure:

<product>/<version>/<flavor>/

Product tar files are named according to this convention (intentionally missing the underscore between flavor and qualifiers):

<product>_<version>_<flavor><qualifiers>.tar

Shown on two lines for better readability, the whole path is:

/ftp/products/<product>/<version>/<flavor>/

<product>_<version>_<flavor><qualifiers>.tar

For example, the tar file for the product xemacs version v20_4 for SunOS+5 is maintained under /ftp/products at:

/ftp/products/xemacs/v20_4/SunOS+5/xemacs_v20_4_SunOS+5.tar 

The product vxworks provides an example with a qualifier (68k) tacked onto the end:

/ftp/products/vxworks/v5_3c/SunOS+5/vxworks_v5_3c_SunOS+568k.tar 

/ftp/KITS Area

Within FTP, cd to ftp/KITS (or to just KITS) in order to access this hierarchy. Under the /ftp/KTIS area the product directories are organized in the structure:

<base_flavor>/<product>/<version>/<flavor>/

Here you will find links to the product tar files under the /ftp/products structure.

/ftp/KITS/pub Area

Within FTP, cd to ftp/KITS/pub (or to KITS/pub or just pub) in order to access this hierarchy. Under the /ftp/KTIS area the product directories are organized in the structure:

<product>/<version>/

There is no directory level for flavor. Here you will find links to product tar files under the /ftp/products structure.

5.4 Special Instructions for Proprietary Products

Some products in KITS are flagged as "proprietary" and require a group id and password for installation. This allows us to distribute products in a more controlled fashion. You don't need to know ahead of time if a given product falls into this category; when you attempt to install a proprietary product, the system will return a message of the form (shown for the product edt):

Product edt v6_3b SunOS+5 is a proprietary product. 
Before it can be installed, you need to obtain a group name and password for 
it by sending a proprietary products request form to compdiv@fnal.gov 
 
Have you obtained a group name and password? n  
Do you need a proprietary product request form? y 
informational: transferred proprietary.form 
        from fnkits.fnal.gov:/ftp/products/proprietarylist to 
        /your/home/directory/proprietary.form 

If you request the form, as shown, you will find it downloaded to your home directory in ASCII format for easy editing. Fill out the form and email it to the address listed in the form. Another option is to fill out and submit the Web-based form at:

http://computing.fnal.gov/xms/?pid=1000374

If your request is approved, you will receive email with a valid group id and password for the product. You can then install the product, entering these two items when prompted (it's best to cut and paste the group id and password from the email onto your terminal window to prevent typos6), e.g.,:

Product edt v6_3b SunOS+5 is a proprietary product. 
... 
Have you obtained a group name and password? y 
 
Enter Group Name: edt 
Enter Group Pass word: somepassword 
informational: beginning install of edt. 

The installation proceeds as normal from this point on. If you enter the group id and password incorrectly, or if they have expired (which happens within a few days after they are sent), you will get an error message like the following:

... 
Enter Group Name: wrong 
Enter Group Pass word: wrong 
informational: beginning install of edt. 
ftp SITE GPASS failed: Group access request incorrect. 
  
error: can't transfer /ftp/products/edt/v6_3b/SunOS+5/edt_v6_3b_SunOS+5 
         from fnkits.fnal.gov to  
        /fnal/ups/prd/edt/v6_3b/SunOS+5 

If this message appears, try again to be sure the values get entered correctly. If it really doesn't work, reply to the email you received containing the group id and password, and ask to have the product re-opened for you.

1
fnkits.fnal.gov is the Computing Division's central product server. Its distribution database is generally referred to as KITS.

2
You can download the optionlist table file to find a product's category. See section 21.6.5 Flagging Special Category Products Using Optionlist.

3
See the Product Distribution Platform Registration Request form at http://computing.fnal.gov/xms/?pid=1000373.

4
For more information on Fermitools, see http://www.fnal.gov/fermitools/.

5
In general, the group name for the proprietary product is the same as the product name, except that all vxworks-related products share a group.

6
One case in which it is particularly useful to cut and paste these items is the package vxworks, which has multiple proprietary parts. Fortunately the same group id and password is used for each part, but you do need to enter it several times.


UPS/UPD Doc Home page | Computing Division| Fermilab at Work | Fermilab Home
TOC PREV NEXT INDEX
View/print PDF file

This page generated on: 10/15/02 14:04:54