UPS/UPD Doc Home page | Computing Division| Fermilab at
Work | Fermilab
Home
|
||||||||||||
![]() |
Complete Guide and Reference Manual for UPS, UPD and UPP v4 | |||||||||||
Chapter 33: The UPP Subscription File
33.1 UPP Subscription File Header
33.2 Stanzas
33.2.1 Product Instance Identification
33.2.2 Conditions and Instructions
33.3 Examples
33.3.1 Sample UPP Subscription File
33.3.2 A Longer Annotated Example
Chapter 33: The UPP Subscription File
UPP stands for UNIX Product Poll. It is a layer on top of UPD that can be used to facilitate the update of products on a local UPS node as new versions become available on a product distribution node. UPP is configured on the local node by subscription files, which we describe in this chapter. The functions UPP can be configured to perform on a local node include:
- notify the client of new and updated products on a specified distribution node
- perform product installations and updates
- install/update product dependencies and resolve chains to maintain integrity of main product
- delete old product versions
33.1 UPP Subscription File Header
The header of the UPP subscription file consists of lines of the form:
in which the following variables may be defined:
Table 33.1.0-a: file mail_address dist_nodeThe node name of the product distribution node to query for new/updated products
newprod_notifySet to T (True) if you want to be notified of brand new products; otherwise, leave it out or set it to any other value (e.g., F)
data_dirThe full path to the directory where you want UPP to maintain bookkeeping files. Each subscription file must have its own data_dir. data_dir must be writable when called from cron.
host_typesA list of flavors (i.e., -H options, see Chapter 25: Generic Command Option Descriptions) for which to do product surveys. It defaults to the value given by ups flavor.
Values here can have ${VARIABLE} strings, which are expanded from the environment. In particular:
Subscribe to changes in your local databases (e.g., if you want mail when someone updates products on your local system):
dist_node = file://localhost${PRODUCTS}
Send mail to whoever runs the upp command:
mail_address = ${USER}@fnal.gov
33.2 Stanzas
After the header, the UPP subscription file consists of one or more stanzas, each bracketed by the lines begin and end. The number of stanzas per file is not limited. A stanza cannot refer to multiple products, however there can be multiple stanzas for the same product (e.g., for treating different instances of the same product differently). Each stanza has three elements:
- identification of a product or particular instances of a product
- identification of the condition(s) for which you want UPP to perform the instructions you give it (done via an action statement)
- a list of instructions, or functions to perform, for each condition
33.2.1 Product Instance Identification
The following terms can be used for matching a new or updated product instance on the distribution node:
Table 33.2.1-a: product flavor version qualifiers prod_dir chainWithin a stanza, all instances that match a given set of values will be operated on (in contrast to the standard UPS and UPD matching algorithms; see Chapter 27: Product Instance Matching in UPS/UPD Commands). You must at least specify the product name (the product name alone matches all instances), all further specification is optional and used to restrict the set of instances matched. Typically, only product and sometimes flavor are specified.
33.2.2 Conditions and Instructions
After identifying a product instance(s) within the stanza, you need to tell UPP what condition(s) to look for regarding the product, and what to do when the conditions are met. One or more action = <value> lines can be included to set conditions, each followed by a list of functions to perform.
Actions
In a subscription file, the action keyword can take the following values (indicating the condition):
Table 33.2.2-a:A new version of the product is installed on the distribution node.
The product is chained to chain, where chain can be current, test, or any other predefined or user-defined chain (see section 2.3.5 Chains).
List of Functions
The functions that can be used under an action = <value> line currently take no arguments. All of the behavior is assumed to be defined by the local UPD configuration (described in Chapter 32: The UPD Configuration File) when UPP is invoked.
33.3 Examples
33.3.1 Sample UPP Subscription File
FILE = upp MAIL_ADDRESS = somebody@fnal.gov DIST_NODE = fnkits.fnal.gov DATA_DIR = /var/adm/upp NEWPROD_NOTIFY = T # # example of watching for new releases of a particular product: # begin product = xntp flavor = SunOS+5 action = newversion notify end # # example of a product you want installed, but not chained, when it goes current: # begin product = ximagetools flavor = SunOS+5 action = current notify install end # # example of tracking kits closely: # * when a new version comes out we notify # * when it is declared or modified as test we reget it, assuming the product # is allowed to have internal changes while in "test". We "resolve" to have it # declared test here. # * when it is declared current, we install it (which only does something if we # don't have it) and update it to catch re-issues of table files,etc. We # "resolve" to have it declared current here. # begin product = exmh flavor = SunOS+5 action = newversion notify action = test notify reget resolve action = current notify install update resolve endA Second Example
This mails the user whenever my_product versions are made current on the local system.
file=upp mail_address=${USER}@fnal.gov dist_node=file://localhost${PRODUCTS} data_dir=${HOME}/.upp/myproduct begin product=my_product action=current notify end33.3.2 A Longer Annotated Example
Here is a sample UPP subscription file with one stanza. It is more comprehensive than a typical subscription file, illustrating the use of all the supported actions and functions. Explanations are provided line by line.
UPS/UPD Doc Home page | Computing Division| Fermilab at
Work | Fermilab
Home
|
|||||||||||
This page generated on: 10/15/02 14:09:38