FC3 LCFG Header File Structure

For FC3 we have rearranged the LCFG header file structure. There are many reasons for wanting to do this, not least:

  • To separate the headers into layers much like the package structure was separated for RH9.
  • To make refactoring and overall organisation simpler.
  • To improve the cohesion and containment of groups of resources, i.e. things that are related should be kept togther and things that are not should be kept apart.

Table of Contents:

How Profiles Have Changed, In Practice..

Old Machine ProfileNew Machine Profile
/* gala */

#include <lcfg/os/redhat9.h>
#include <lcfg/hwbase/hp_d530.h>
#include <inf/sitedefs.h>
#include <inf/office-jcmb.h>
#include <inf/wire_c.h>

dhclient.mac   00:11:85:F3:1D:3D

inv.sno        FRB4480GDR
inv.location   JCMB-2422
inv.allocated  ascobie
/* gala */

#include <dice/os/fc3.h>
#include <dice/hw/hp_d530.h>
#include <dice/options/office-kb.h>
#include <live/wire_c.h>


dhclient.mac   00:11:85:F3:1D:3D

inv.sno        FRB4480GDR
inv.location   JCMB-2422
inv.allocated  ascobie

Important Notes About New Machine Profiles

  • Note that no lcfg level headers are referenced, only dice level (and live). The layers upon which dice sits (ed and lcfg) are now hidden from view.
  • The live level headers should always come last. They should never come before a dice level header.
  • There is no longer any segregation of hardware and software options; they both now live together in options.
  • The vast majority of desktop machines should include one of:
    • #include <dice/options/studentlabs-at.h>
    • #include <dice/options/studentlabs-bp.h>
    • #include <dice/options/studentlabs-fh.h>
    • #include <dice/options/studentlabs-kb.h>
    • #include <dice/options/office-at.h>
    • #include <dice/options/office-bp.h>
    • #include <dice/options/office-fh.h>
    • #include <dice/options/office-kb.h>
  • inv.manager is set to support-team in the above headers - it should only be overriden where the machine's manager is not the support-team
  • inv.allocated is set to teachinglab in the studentlabs headers - it should not need to be overriden.
  • inv.owner is set to informatics by default to indicate that the machine was purchased off core school funds. It should be set to the relevant institute (eg LFCS, CISA etc) if the machine was bought off research funds.

Organisation of LCFG Header Source Files

To best understand what is commented upon in the following sections you should probably checkout a working copy of the current header files first by following the instructions on the SubversionRepository page.

It may also be useful to open a copy of this high level LCFG Header Structure Diagram in a separate web browser window (right clicking on the link in most browsers will give you the option to open in a new tab or window). The diagram shows the relationships between the various levels and files described in the sections that follow.

The LCFG header files and package lists are split into the following levels for FC3:

Note that the README file in the LCFG Subverison module root gives a quick overview of the directory strucures within the module. It is best used in conjunction with this guide.

LCFG Level (lcfg)

This is the global LCFG level. Any resources in these files must be applicable to any LCFG installation.

core/include/lcfg/defaults.h
This is the core LCFG defaults header, for all platforms. It includes the individual compenent default resources from the following directory, but only for those components which are considered part of the base platform.
core/include/lcfg/defaults/<component>.h
This directory contains a file per LCFG level component, containing the default resources for that component.
core/include/lcfg/hw/<model>.h
This directory contains a file per LCFG level machine model.
core/include/lcfg/options/<option>.h
This directory contains a file per LCFG level software or hardware option.

Operating system dependent resources are selected using the following CPP definitions:

  • #define OS_LINUX
  • #define LINUX_FC3
  • #define LINUX_RH9

  • #define OS_SOLARIS
  • #define SOLARIS_8
  • #define SOLARIS_9

-- CarwynEdwards: Maybe the OS selection stuff should live in its own section?

core/packages/lcfg
This directory contains package lists for the LCFG level.

ED Level (ed)

This is the Edinburgh University wide level. Any resources in these files must be appropriate to any school in the University. Note that this level should not be considered as a fully fleshed ED LCFG deployment - it is a class of LCFG which can be inherited by individual school LCFG deployments.

core/include/ed/defaults.h
This file includes the LCFG level defaults.h, additionally sets any ED level specific resources and includes any additional components that are required for the ED level base platform.
core/include/ed/defaults/<component>.h
This directory contains a file per ED level component, containing the default resources for that component.
core/include/ed/hw/<model>.h
This directory contains a file per ED level machine model. These files may include the matching LCFG level machine model header, if it exists, and perhaps set some ED level specific resources for that model.
core/include/ed/options/<option>.h
This directory contains a file per ED level software or hardware option. As with the above directory, these files may include the matching LCFG level option header, if it exists.

core/packages/ed
This directory contains package lists for the ED level.

DICE Level (dice)

This is the DICE level.

core/include/dice/defaults.h
This file includes the ED level defaults.h, additionally sets any DICE level resources and includes any additional components that are required for the DICE level base platform.
core/include/dice/defaults/<component>.h
This directory contains a file per DICE level component, containing the default resources for that component.
core/include/dice/hw/<model>.h
This directory contains a file per DICE level machine model. These files may include the matching ED or LCFG level machine model header, if one exists, and perhaps set some DICE level specific resources for that model.
core/include/dice/options/<option>.h
This directory contains a file per DICE level software or hardware option. As with the above directory, these files may include the matching ED or LCFG level option header, if one exists.
core/include/dice/os/<os>.h
This directory contains a header per operating system; each header merely setting the appropriate OS CPP variable and including the DICE level defaults.h header.

core/packages/dice
This directory contains package lists for the DICE level.

Header and Package Search Paths On The LCFG Servers

The following paths from the structures described above are included in the search paths used by the LCFG Server:

server.hdrpath
This is the search path for LCFG header (*.h) files:
  • core/include
server.pkgpath
This is the search path for LCFG package lists (*.rpms, *.pkgs):
  • core/packages/dice
  • core/packages/ed
  • core/packages/lcfg

Footnotes and Authors

It may be a good idea to mention coding standards in the context of this document. The areas relevent to LCFG souces would seem to be:

  • Comments (how and when).
  • File naming conventions (underscores vs dashes in particular - there is already inconsistency).
  • Conventions to use when using CPP conditionals.
  • Header file organisation.

References:

-- CarwynEdwards - 21 Jun 2005

-- AlastairScobie - 21 Jun 2005

Topic attachments
I Attachment Action Size Date Who Comment
pngpng lcfg_structure.png manage 64.7 K 22 Jun 2005 - 02:04 CarwynEdwards LCFG Header Structure Diagram
Topic revision: r20 - 22 Aug 2005 - 23:39:05 - AlastairScobie
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
This Wiki uses Cookies