DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Packaging SCO OpenServer 5 drivers for installation

Setting up a cutting tree

In the description that follows, it is assumed that a driver product is to be cut from a cutting tree with the form shown in ``layout of a cutting tree used to package a non-BTLD driver'' for non-BTLD drivers and ``layout of a cutting tree used to package a BTLD driver'' for BTLD drivers.

These are not the only ways that such trees may be laid out but all the example CDMT configuration files given here assume cutting trees of this form.

layout of a cutting tree used to package a non-BTLD driver

layout of a cutting tree used to package a BTLD driver

Pathname elements shown in italics indicate that other names may be substituted:


cutting_tree_root
The pathname to the root of the cutting tree (for example, /tmp/cut_tree).

product
A unique identifier for the product.

component
A unique identifier for a component of a product. There may be several component directories defined under cutting_tree_root/dist.

package
A unique identifier for a package within a component. There may be several package directories defined under the .../cntl/packages and .../drivers hierarchies for both non-BTLD and BTLD cutting trees.

xnamex
The unique internal name of a driver that is used to identify individual drivers within a package. The BTLD cutting tree structure takes account of the fact that each package can contain several drivers. The non-BTLD cutting tree assumes that each package contains a single driver, in which case the name of each package can be the same as that of the driver's xnamex.
Most of the tree elements shown in bold type must exist before cutting a distribution disk. If a driver is not BTLD, it does not contain any btld files under the .../drivers hierarchy. If a driver is intended to replace or update an existing driver, a replace.in must be provided for the driver under the .../cntl/packages hierarchy. The format of this file is described in ``replace.in''.

These are the configuration files necessary to cut a custom-installable volume:

cdmt.config

   MACROS:
   	Drivers_VER=version
   	component_DIR=cutting_tree_root/dist/component
   	...
   

CONFIG: archiveMedia=FLOPPY

TAPE_MEDIA: distCode=distribution_code distVersion=distribution_version

FLOPPY_MEDIA: archiveFormat=FILESYS freeSpace=number distCode=distribution_code distVersion=distribution_version paperLabel="product_name Volume %s"

The number of spare filesystem blocks that should be assigned depends on the number of BTLD drivers that are being packaged. One block is required for every extra directory and file required. If each BTLD package contains one driver, then number is four times the number of packages plus 2 for /install and /install/INSTALL (if this file is supplied).

It is also important to define a ``paperLabel'' if a distribution spans more than one floppy.

product.prd

   PROD:vendor:product:
   	description= "vendor driver supplement"
   	version= version
   	packages=vendor:component,...
   

cmpntFiles= cutting_tree_root/dist/component/input/component.cmpnt ...

This file contains the following pieces of information which will be used to create the pathnames within an SSO:

vendor
a unique identifier for your company or organization

component
unique identifiers for each component within a product

version
a unique identier for the version of a product

component.cmpnt

   COMP:vendor:component:
   	description	= "Vendor supplied-drivers"
   	version		= $Drivers_VER
   	subpackages	= package,...
   	required	=
   	dependencies	=
   	distTreeRoot	= $component_DIR
   	distTreeRootSERVER	= $component_DIR
   	distTreeRootCLIENT	= $component_DIR
   	pkgFiles	= $component_DIR/input/component.pkg
   	upgradeMappings	=
   

FILE_DEFAULT: perms = 0644 owner = bin group = bin flags =

DIR_DEFAULT: perms = 0755 owner = bin group = bin flags =

FIFO_DEFAULT: owner = bin group = bin

This file defines the list of packages that compose a component. Note that component_DIR is defined in cdmt.config.

component.pkg

   PKG:Control:
   	description	= "Installation Control Package"
   #
   DIR:Control:SHARED:./cntl:
   FILE:Control:SHARED:./cntl/ccs:
   	perms		= 755
   	flags		= optionalDist
   FILE:Control:SHARED:./cntl/driver.ccs:
   	perms		= 755
   	flags		= optionalDist
   FILE:Control:SHARED:./cntl/pkg.ccs:
   	perms		= 755
   	flags		= optionalDist
   DIR:Control:SHARED:./cntl/packages:
   DIR:Control:SHARED:./cntl/packages/package:
   DIR:Control:SHARED:./cntl/packages/package/driver:
   DIR:Control:SHARED:./cntl/packages/package/driver/xnamex:
   #
   # Define control files for each package
   #
   FILE:Control:SHARED:./cntl/packages/package/driver/xnamex/ccs.post:
   	perms		= 755
   	flags		= optionalDist
   FILE:Control:SHARED:./cntl/packages/package/driver/xnamex/ccs.pre:
   	perms		= 755
   	flags		= optionalDist
   FILE:Control:SHARED:./cntl/packages/package/driver/xnamex/replace.in:
   	perms		= 755
   	flags		= optionalDist
   #
   # Define directories and files in the package SSO
   #
   PKG:package:
   	description	= "package driver"
   #
   DIR:package:CLIENT:./drivers/package:
           owner           = root
           group           = sys
   DIR:package:SHARED:./drivers/package:
           owner           = root
           group           = sys
   DIR:package:CLIENT:./drivers/package/driver:
           owner           = root
           group           = sys
   DIR:package:SHARED:./drivers/package/driver:
           owner           = root
           group           = sys
   DIR:package:CLIENT:./drivers/package/driver/xnamex:
           owner           = root
           group           = sys
   DIR:package:SHARED:./drivers/package/driver/:
           owner           = root
           group           = sys
   FILE:package:SHARED:./drivers/package/driver/xnamex/Driver.o:
           owner           = root
           group           = sys
   	flags		= noCompress
   SYML:package:CLIENT:./drivers/package/driver/xnamex/Driver.o:
   	target =	SHARED:./drivers/package/driver/xnamex/Driver.o
   FILE:package:SHARED:./drivers/package/driver/xnamex/Master:
           owner           = root
           group           = sys
   	flags		= noCompress
   SYML:package:CLIENT:./drivers/package/driver/xnamex/Master:
   	target =	SHARED:./drivers/package/driver/xnamex/Master
   FILE:package:SHARED:./drivers/package/driver/xnamex/Space.o:
           owner           = root
           group           = sys
   	flags		= noCompress
   SYML:package:CLIENT:./drivers/package/driver/xnamex/Space.o:
   	target =	SHARED:./drivers/package/driver/xnamex/Space.o
   FILE:package:SHARED:./drivers/package/driver/xnamex/System:
           owner           = root
           group           = sys
   	flags		= noCompress
   SYML:package:CLIENT:./drivers/package/driver/xnamex/System:
   	target =	SHARED:./drivers/package/driver/xnamex/System
   #
   # Define directories and files in the package SSO needed for BTLD
   #
   DIR:package:CLIENT:./drivers/package/install:
           owner           = root
           group           = sys
   DIR:package:SHARED:./drivers/package/install:
           owner           = root
           group           = sys
   FILE:package:SHARED:./drivers/package/install/btld:
           owner           = root
           group           = sys
   	flags		= noCompress
   FILE:package:SHARED:./drivers/package/install/drivers:
           owner           = root
           group           = sys
   	flags		= noCompress
   FILE:package:SHARED:./drivers/package/install/package.name:
           owner           = root
           group           = sys
   	flags		= noCompress
   FILE:package:SHARED:./drivers/package/install/postinstall:
           owner           = root
           group           = sys
   	flags		= noCompress
   FILE:package:SHARED:./drivers/package/install/preinstall:
           owner           = root
           group           = sys
   	flags		= noCompress

replace.in

   driver_set: driver1 driver2 ...
   scsi_ha: "host adapter description to be inserted in /etc/default/scsihas"
The list of drivers specified as arguments to the keyword driver_set: are previous versions of this driver that will be replaced if they are present.

A line containing the keyword scsi_ha: may be present if the driver being installed is a SCSI host adapter. The presence of this line instructs the installation script to update the mscsi(F) file if this driver replaces one with a different name. The optional argument to this keyword is used to update the list of supported host adapter drivers in /etc/default/scsihas.


NOTE: This file and its contents are optional.

run -- package cutting script

   #!/bin/sh
   

CDMT_DIR=`pwd` CONFIG_FILE=$CDMT_DIR/cdmt.config export CDMT_DIR CONFIG_FILE

# Tidy up as required and exit. cleanup() { exit $1 }

# Create the SSO cdmtParse -config $CONFIG_FILE if test $? != 0 then cleanup 1 fi

# Populate the SSO cdmtCompress -config $CONFIG_FILE if test $? != 0 then cleanup 1 fi

# Generate the archive volume cdmtArchive -config $CONFIG_FILE if test $? != 0 then cleanup 1 fi

# Make BTLD directories on the archive volume ./makeBTLD if test $? != 0 then cleanup 1 fi

# Cut the archive to floppy disk cdmtArchive -copy -config $CONFIG_FILE if test $? != 0 then cleanup 1 fi

cleanup 0

makeBTLD -- create a BTLD from an SSO

   #!/bin/sh
   

# Tidy up as required and exit cleanup() { # Change back to original directory if [ $saved_pwd ] then cd $saved_pwd || { echo cleanup: cd $saved_pwd failed, error = $? } fi

# Unmount the volume archive if [ $mounted ] then umount $CDMT_DIR/mnt || { echo cleanup: umount $CDMT_DIR/mnt failed, error = $? } fi

# Clean up the local mount point if we made it if [ $mnt_made ] then rm -rf $CDMT_DIR/mnt fi

# Delete the device node we created in /dev/marry if [ $married ] then /etc/marry -d $VOL_dev || { echo cleanup: marry -d $VOL_dev failed, error = $? } fi

exit $1 }

# main - Create BTLD structure of hard links to the /opt storage section

# Initialize flags married= mnt_made= mounted= saved_pwd=

# Set CDMT_DIR. Use default of pwd unless environment variable is defined [ $CDMT_DIR ] || CDMT_DIR=`pwd`

# Determine which version of the OS_drivers component we are manipulating [ $Drivers_VER ] || Drivers_VER=version

# Pathname of SSO volume created by CDMT VOL_path=$CDMT_DIR/archives/FLOPPY/VOL.000.000

# Pathname of block device used by marry driver - used to mount SSO archive VOL_dev=/dev/marry$VOL_path

# Pathname of drivers in mounted SSO archive opt_drivers=$CDMT_DIR/mnt/opt/K/vendor/component/$Drivers_VER/drivers

# Use marry to create a block device to mount the archive volume /etc/marry -a $VOL_path || { echo makeBTLD: marry -a $VOL_path failed, error = $? cleanup 1 } married=TRUE

# Create a local mount point if necessary [ -d $CDMT_DIR/mnt ] || { mkdir $CDMT_DIR/mnt || { echo makeBTLD: mkdir $CDMT_DIR/mnt failed, error = $? cleanup 1 } mnt_made=TRUE }

# Mount the archive volume mount -f EAFS $VOL_dev $CDMT_DIR/mnt || { echo makeBTLD: mount $VOL_dev $CDMT_DIR failed, error = $? cleanup 1 } mounted=TRUE

# Save current directory saved_pwd=`pwd` [ $? -ne 0 ] && { echo makeBTLD: pwd failed, error = $? }

# Change to the drivers directory in the /opt SSO in the archive volume cd $opt_drivers || { echo makeBTLD: cd $opt_drivers failed, error = $? cleanup 1 }

# Make a top level BTLD structure for each driver # Make hard links to the driver files in the storage section for driver in `ls` do copy -r -l $driver $CDMT_DIR/mnt/$driver || { echo makeBTLD: copy $driver $CDMT_DIR/mnt/$driver failed, error = $? } done

cleanup 0


© 2005 The SCO Group, Inc. All rights reserved.