= Generating Templates for OS and gLite = [[TracNav]] [[TOC(inline)]] == OS Templates == OS Templates describing RPM list for each OS feature goup are entirely generated from standard Red Hat (or SL) provided `comps.xml` file. This is a 3 steps process : * [source:SCDB/trunk/src/utils/misc/rpmProvides.pl src/utils/misc/rpmProvides.pl]: generate a file describing features provided by each RPM in OS distribution * [source:SCDB/trunk/src/utils/misc/rpmRequires.pl src/utils/misc/rpmRequires.pl] : generate a file describing for each RPM in the distribution the required dependencies. Uses file produced by previous step as input. * [source:SCDB/trunk/src/utils/misc/comps2pan.xsl src/utils/misc/comps2pan.xsl] : generate the templates from standard `comps.xml` file provided in OS distribution. Uses file produced by previous step as input. All these tools are part of [source:SCDB SCDB base]. It is important to use the `namespace` parameter in `comps2pan.xsl` and indicates `rpmlist` as value. The reference source for these tools is in `util/misc` in [http://quattor.web.cern.ch/quattor/software.htm Quattor CVS]. == gLite Templates == Templates for pure gLite services are generated from file `.conf.xml` provided in the config RPM associated with each service. This is done by [source:SCDB/trunk/src/utils/misc/create_template.pl create_template.pl] tool, `utils/misc` in Quattor CVS. This tool generates 3 templates per service : * `config.tpl` : the entry point * `schema.tpl` : defines all the supported PAN resources/properties for this component * `defaults.tpl` : defines a sensible default value for each property, according to the content of XML file for the service. Before using this tool, all the glite*-config*rpm must be installed on the machine where the tool will be run. All these templates used namespaces and their layout is service oriented. There is one directory per service, containing all the templates for the service. All these directories must be placed in `common/glite` directory of gLite templates. == List of update RPMs == LCG, gLite and OS templates allow to define in a specific template a list of RPMs that must be used in replacement of standard RPMs. That means that RPMs listed in this template are installed only if the standard RPM was part of the configuration. Generally all update RPMs for one product version are kept in one directory. There is a tool to help producing the associated template with the last version of each RPM in this directory, [source:SCDB/trunk/src/utils/misc/rpmUpdates.pl src/utils/misc/rpmUpdates.pl/rpmUpdates.pl], which is part of the [source:SCDB SCDB base]. This script accept one argument, the RPM repository directory, and write the template on `stdout` which must be redirected to a file. == Trusted CAs Template == Trusted CAs are described in a set of RPMs, update regularly. There is one template describing all the trusted CAs RPMs that must be loaded. This is : * For gLite : [source:templates/trunk/grid/glite-3.0.0/common/security/cas.tpl common/security/cas.tpl] * For LCG 2.7 : [source:templates/trunk/grid/lcg-2.7.0/rpmlist/pro_software_lcg2_service_security_accepted_cas.tpl rpmlist/pro_software_lcg2_service_security_accepted_cas.tpl] This template is generated from the contents of the RPM repository containing CAs RPMS with the tools [source:SCDB/trunk/src/utils/CAs/create_template.tpl src/utils/CAs/create_template.tpl] which is part of [source:SCDB SCDB base]. Before running this tools, it is necessary to download the new CA RPMs from the location indicated in the announcement. In QWG templates, these RPMs are stored in a specific RPM repository. It is a good practice to rename the corresponding directory, create a new one with the same name and download the new RPMs in this empty directory. For example, for CA 1.9 (replace the directory in the example by the directory corresponding to CA RPMs repository) : {{{ mv /www/htdocs/packages/ca /www/htdocs/packages/ca.old mkdir /www/htdocs/packages/ca cd /www/htdocs/packages/ca wget http://grid-deployment.web.cern.ch/grid-deployment/download/RpmDir/security/index.html wget --force-html --no-directories --base http://grid-deployment.web.cern.ch/griddeployment/download/RpmDir/security/index.html -A.rpm -i index.html }}}