wiki:VincentFAQ

Configuration Management Tool(CMT) Frequently Asked Questions(FAQ)

Author : V.Garonne <garonne@…>
Date : 05.4.2005
Version : 0.1
Web site : http://www.cmtsite.net/

: This FAQ is not completed and still under construction. Some answers are missing.

Abstract

This FAQ document covers all areas of the CMT project, and mostly contains distilled information from the official documents, personal experiences, and more or less general issues. It contains an overview over the project itself and it's paradigms, as well as a user and dellopers section. If you have a question not answered by this page you can ask it on the mailing list.

General Information

What is CMT?

CMT(Configuration Management Tool) is a configuration management environment, based on some management conventions and comprises several shell-based utilities. It is an attempt to formalize software production and especially configuration management around a package-oriented principle.

The environment provides conventions (for naming packages, files, directories and for addressing them) and tools for automating as much as possible the implementation of these conventions. It permits to describe the configuration requirements and automatically deduce from the description the effective set of configuration parameters needed to operate the packages (typically for building them or using them).

What is a package?

The notion of packages represents hereafter a set of software components (that may be applications, libraries, tools etc...) that are to be used for producing a system or a framework. In such an environment, several persons are assumed to participate in the development and the components themselves are either independent or related to each other.

Cmt considers a package every directory which has a cmt directory with a requirements file inside.

What is a subpackage?

A subpackage is a cmt package physicaly under another cmt package, e.g:

packageA/                          
packageA/cmt                       
packageA/cmt/requirements        
packageA/directory                
packageA/directory/toto           
packageA/packageB                  
packageA/packageB/cmt              
packageA/packageB/cmt/requirements 

In this example, packageB is a subpackages of packageA

How to install CMT?

See: Install

Are there copyright restrictions on the use of CMT?

Not really. CMT is provided as an Open-Source product, with available sources, and is opened to any contribution from anybody.

See the license page agreement to find further explanations and a link to the full text of the license.

How do I get documentation on CMT?

All documentation is available on-line, starting at Documents.

Is there a mailing list devoted to CMT?

There is a mailing list, mailing list.

I've never used CMT before. Is there a CMT tutorial?

There are numerous tutorials avalaible here:

How do I submit bug reports for CMT?

To report a bug, please use the relevant service from the Trac project.

CMT in the real world

How stable is CMT?

Very stable (of course :) ).

How many people are using CMT?

CMT is an academic project aimed at providing support to the software developments in the context of large physics experiments (atlas,
lhcb, ...).

Although it is currently used by Physics experiments, it is strongly required to stay experiment neutral, and this requirements is fully endorsed in its internal design (eg by ensuring that all possible customizations can always be performed without modifications to the kernel).

This kind of requirements also implies that portability or modularity issues (including environment independance) are assigned a quite high priority.

What are the supported platforms?

CMT has been ported and tested on a wide range of machines/operating systems, including:

  • DEC-Unix V4.0
  • HP-UX-10 (several types of platforms)
  • AIX-4
  • Solaris
  • IRIX
  • Several variants of LynxOS
  • All variants of Linux ( RedHat , Debian , SuSe , ScientificLinux , ...)
  • Windows 95/98/NT/Windows2000 in various environments:
    • CYGWIN_NT-5.1 environment
    • nmake based environment
    • MSDev/VisualC 6 environment
    • MSDev/VisualC 7 environment
  • Darwin (Mac OS X)

CMT's design

What is the conventional directory tree for projets and packages?

This environment relies on a set of conventions, mainly for organizing the directories where projects and packages are maintained and developed :

  • Each package is installed in a standard directory structure defined at least as follows:
<some root>/<Package mnemonic>/<version mnemonic>/cmt 

or (obsolescent convention )

<some root>/<Package mnemonic>/<version mnemonic>/mgr

The <version mnemonic> directory level may also be omitted, in which case the version information will be stored inside the cmt directory in a conventional file named version.cmt leading to the following alternate organization: <some root>/<Package mnemonic>/cmt/version.cmt In both cases, the cmt directory holds the main source of information needed by CMT : the requirements file. All CMT -related operations are generally executed from this directory. This style of organization should be considered as the basic (and unique) criterion for a package to be recognized as a valid CMT package . Any other structuring convention will be supported by CMT and its operations can always be customized to follow them This structure is a central concept since all relationships between packages relies on the package identification which unambiguously and exclusively consists in the duet [ package-name , package-version ] (or package-name only when the version directory level is omitted).

  • Constructing the internal structure of a package.

Many other parallel directory branches (similar to cmt ) such as src , include or test may be freely added to this list according to the specific needs of each package. In particular, a set of such parallel branches are expected to contain binary outputs (those that compilers, linkers, archive managers or other kinds of code or pseudo-code generators can produce). Their name always corresponds to the particular configuration tag used to produce the output (such as the machine or operating system type). The CMT toolkit provides, through the cmt system utility, a default value for this token. An environment variable (CMTCONFIG ) is also assigned to this value. Each branch may in addition be freely structured, and there is no constraint to the complexity of this organization.

What are the architecture of the environment?

This environment is based on the fact that one of its packages (named CMT ) provides the basic management tools. CMT , as a package, has very little specificities and as such itself obeys the general conventions. Then the complete software base is organized in terms of projects (or sub-projects ), containing consistently managed package sets. Projects are localized either globally or individually: globally using the environment variable CMTPROJECTPATH that describes all locations where CMT projects can be found individually using the environment variable CMTPATH that describe all package areas where packages can be found Packages are localized respectively to the projects they belong to. It should be noted that the choice of a location for installing CMT itself is totally independent of the locations where projects are installed and managed.

CMT is operated through one main user interface : the cmt command, which operates the CMT conventions and which provides a set of services for :

  • creating a new package. This operation will create or check the local package directory tree and generate several minimal scripts (see the description of the create command),
  • describing or monitoring :
    • the relationships between the package and other packages
    • the configuration features either specified in the current package, or imported from related (used ) ones. (symbols, patterns, fragments)
    • the constituents of the package in terms of libraries, executables, or generated documents.
  • automatically generating the reconstruction scripts (makefiles ) from this description.
  • recursively acting upon the hierarchy of used packages.

Several other utilities are also provided for some specific activities (such as the automatic production of shared libraries, C prototypes, management of interactions between CVS and CMT itself, the management of a similar architecture for Windows or OS9 , setting up protections for packages (through locks) etc...).

User FAQ

Do I have to be root?

You don't have to be root to use CMT.

The CMT command is not found

Users have to connect to CMT by doing:

unix-csh> source <some root>/CMT/v1r<nn>p<xxx>/mgr/setup.csh

or

unix-sh> . <some root>/CMT/v1r<nn>p<xxx>/mgr/setup.sh 

or

dos> call <some root>\CMT\v1r<nn>p<xxx>\mgr\setup.bat 

How to create a package?

cmt create <package_name> <version>

Does the "requirements" file support comments?

Yes. A comment starts with a hash character (#) that is not part of a string literal, and ends at the end of the physical line.

How does CMT localize package?

What is the syntax for the version tags ?

CMT only understands version tags as follows:

<any-letters>MajorId<any-letters>MinorId<any-letters>PatchId<anything>

letters in between numbers are NOT interpreted by CMT, they can be anything (such as '.', 'v', 'r', 'p', 'banana', 'orange', etc)

In particular v, p, r have no special meaning for CMT only the position of numeric fields is considered.

How do I configure CMT to work with CVS?

You should first install the CVS plugin for cmt on the server side: http://www.cmtsite.org/cmtcvs/cmtcvs.html

For more informations for using cvs together with CMT, see http://www.cmtsite.org/CMTDoc.html#Using%20cvs%20together%20with%20CMT

How do I configure CMT to work with Pacman?

Where can i find informations about Pacman ?

pacman site

Is newest CMT version compatible with previous versions?

Absolutely. Backward compatibility is one of the main features for the CMT project.

How do I add a new version to a project?

What are the CMT commands ?

Just type "cmt help" in your shell to have an exhaustive list.

how can I regenerate "setup.sh" files while keeping *setup.make files intact ?

> cmt broadcast 'cmt_relocate.sh <package_cmtpath>'

where cmt_relocate.sh is the following shell script:

--------------------------------------------------------
newpath=$1

sed -e "s#[-]path=[^ ]*[ ]#-path=${newpath}#" setup.sh >t$$; mv t$$ setup.sh
sed -e "s#[-]path=[^ ]*[ ]#-path=${newpath}#" setup.csh >t$$; mv t$$ setup.csh
--------------------------------------------------------

Should I be able to create a conditional apply_pattern using a macro?

This is an exemple that could inspire you. This have to be added within your requirements file :

--------------------------------------------------------
pattern my_pattern my_arguments

macro do_my_pattern "my_pattern" \
    dont_do    ""

apply_pattern $(do_my_pattern)
--------------------------------------------------------

developers FAQ

How can I become a developer?

Apply to become a CMT Developer Partner by simply sending a e-mail to CMT mailing list.

I've made some changes to the source code. Where can I submit them?

Send all your changes to the developer mailing list.

Know Bugs

Infinite loops

Miscellaneous

Who maintains this FAQ?

The current maintainers are the CMT developers, assisted by the users.

Where can I find this FAQ?

For the moment there is not canonical location for the FAQ except here CMT FAQ.

I've got a question that is not answered here. Who can I ask?

If your question is a general question about CMT have a look at the main Documents. After that, your best audience is probably the CMT mailing list.

Where should I send comments on this FAQ?

You can write to mailing list or any of the developers.
Last modified 9 years ago Last modified on Jun 19, 2015, 8:26:22 AM