Changes between Version 12 and Version 13 of VincentFAQ


Ignore:
Timestamp:
May 6, 2005, 6:03:52 PM (21 years ago)
Author:
garonne
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • VincentFAQ

    v12 v13  
    1 = General CMT FAQ =
    2 
    3 by V.Garonne                                                   [[BR]]
    4 Date: 05.4.2005                                                [[BR]]
    5 Version : 0.1                                                  [[BR]]
    6 Web site: [http://www.cmtsite.org/ http://www.cmtsite.org/]    [[BR]]
    7 
    8 = General Information =
    9 
    10 == What is CMT ? ==
    11 
    12 [http://www.cmtsite.org/ CMT](__C__onfiguration __M__anagement __T__ool) 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.
    13 
    14 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).
    15 
    16 == What is a package ? ==
    17 
    18 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.
    19 
    20 == How to install CMT ? ==
    21 
    22 See: [http://www.cmtsite.org/install.html Install]
    23 
    24 == Are there copyright restrictions on the use of CMT ? ==
    25 
    26 Not really. CMT is provided as an Open-Source product, with available sources, and is opened to any contribution from anybody.
    27 
    28 See the license page [http://www.cecill.info/licences.en.html agreement] to find further explanations and a link to the full text of the license.
    29 
    30 == How do I get documentation on CMT ? ==
    31 
    32 All documentation is available on-line, starting at [http://www.cmtsite.org/documents.html Documents].
    33 
    34 == Is there a mailing list devoted to CMT ? ==
    35 
    36 There is a mailing list, [http://www.cmtsite.org/discussion.html mailing list].
    37 
    38 == I've never used CMT before. Is there a CMT tutorial? ==
    39 
    40 There are numerous tutorials avalaible here:
    41 
    42  *  [http://www.cmtsite.org/documents.html Documents]
    43 
    44  * [http://atlas.web.cern.ch/Atlas/GROUPS/SOFTWARE/OO/sit/Policy/ Atlas and CMT]
    45 
    46  * [wiki:VincentTrial How do i begin playing with CMT ?]
    47 
    48 == How do I submit bug reports for CMT ? ==
    49 
    50 To report a bug, please use the relevant service from the Trac project.
    51 
    52  * Bugs: [http://trac.lal.in2p3.fr/CMT/newticket New Ticket]
    53 
    54 
    55 = CMT in the real world =
    56  
    57 ==  How stable is CMT ? ==
    58 
    59 Very stable (of course :) ).
    60 
    61 == How many people are using Python ? ==
    62 
    63 CMT is an academic project aimed at providing support to the software developments in the context of large physics experiments ([http://atlas.web.cern.ch atlas],[[BR]][http://lhcb.web.cern.ch/lhcb/ lhcb], ...).
    64 
    65 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).
    66 
    67 This kind of requirements also implies that portability or modularity issues (including environment independance) are assigned a quite high priority.
    68 
    69 == What are the supported platforms ? ==
    70 
    71 CMT has been ported and tested on a wide range of machines/operating systems, including:
    72 
    73  * DEC-Unix V4.0
    74  * HP-UX-10 (several types of platforms)
    75  * AIX-4
    76  * Solaris
    77  * IRIX
    78  * Several variants of LynxOS
    79  * All variants of Linux (RedHat, Debian, SuSe, ScientificLinux, ...)
    80  * Windows 95/98/NT/Windows2000 in various environments:
    81     * CYGWIN_NT-5.1 environment
    82     * nmake based environment
    83     * MSDev/VisualC 6 environment
    84     * MSDev/VisualC 7 environment
    85  * Darwin (Mac OS X)
    86 
    87 == CMT's design ==
    88 
    89 = What are the architecture of the environment ? =
    90 This environment is based on the fact that one of its packages (named CMT ) provides the basic
    91 management tools. CMT , as a package, has very little specificities and as such itself obeys the
    92 general conventions.
    93 Then the complete software base is organized in terms of projects (or sub-projects ), containing
    94 consistently managed package sets. Projects are localized either globally or individually:
    95 globally using the environment variable CMTPROJECTPATH that describes all locations
    96 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.
    97 It should be noted that the choice of a location for installing CMT itself is totally independent of
    98 the locations where projects are installed and managed.
    99 
    100 CMT is operated through one main user interface : the cmt command, which operates the CMT
    101 conventions and which provides a set of services for :
    102  * 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),
    103  * describing or monitoring :
    104     * the relationships between the package and other packages
    105     * the configuration features either specified in the current package, or imported from related (used ) ones. (symbols, patterns, fragments)
    106     * the constituents of the package in terms of libraries, executables, or generated documents.
    107  * automatically generating the reconstruction scripts (makefiles ) from this description.
    108  * recursively acting upon the hierarchy of used packages.
    109 
    110 Several other utilities are also provided for some specific activities (such as the automatic
    111 production of shared libraries, C prototypes, management of interactions between CVS and CMT
    112 itself, the management of a similar architecture for Windows or OS9 , setting up protections for
    113 packages (through locks) etc...).
    114 
    115 = User FAQ =
    116 
    117 == How to create a package ? ==
    118 
    119  cmt create <package_name> <version>
    120 
    121 == Does the "requirements" file support comments ? ==
    122 
    123 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.
     1{{{
     2#!rst
     3
     4.. contents::
     5.. sectnum::
     6
     7-----
     8
     9.. ** DOC SVN **
     10
     11Doc SVN
     12=======
     13
     14Récupération du bouquin de référence
     15------------------------------------
     16
     17(`le site`_ et `la doc locale`_  (Version 1.1 - Revision 12923))
     18
     19.. _`le site`: http://svnbook.red-bean.com/
     20.. _`la doc locale`:
     21file:///Users/Shared/Docs/Programmation/Outils/Subversion/svnbook.red-bean.c
     22om/en/1.1/index.html
     23
     24::
     25
     26   $> cd /Users/Shared/Docs/Programmation/Outils/Subversion
     27   $> swget http://svnbook.red-bean.com/en/1.1/index.html
     28
     29
     30.. ** MANIPULATION DE REPOSITORY **
     31
     32Manipulation de repository
     33==========================
     34
     35Création d'un repository de test
     36----------------------------------
     37
     38(je ne sais pas forcer le groupe via ''sudo'', donc 2 commandes)
     39
     40::
     41
     42  $> svnadmin create --fs-type fsfs SVNNEW
     43
     44ou
     45
     46::
     47
     48  $> svnadmin create --fs-type bdb SVNNEW
     49
     50::
     51
     52  $> sudo chown -R www:svn SVNNEW
     53  $> sudo chmod -R g+w SVNNEW
     54
     55Passage d'un repository à l'autre
     56---------------------------------
     57
     58::
     59
     60  $> sudo svnadmin dump /Users/Shared/Roscoff > SVN-Roscoff.dump
     61  $> sudo svnadmin load /Users/Shared/SVNTEST < SVN-Roscoff.dump
     62
     63Par contre,
     64
     65::
     66
     67  $> sudo -u www svnadmin load --parent-dir Roscoff ./SVNNEW <
     68SVN-Roscoff.dump
     69
     70ne marche pas si le répertoire Roscoff n'existe pas dans le repository; je
     71crée ce dernier via le serveur HTTP pour des raisons de droits d'accès
     72('''rw''' pour ''www'', '''r''' seulement pour le groupe ''svn''):
     73
     74::
     75
     76  $> svn mkdir -m "Creation directory Roscoff"
     77http://127.0.0.1:8800/Svn/test/Roscoff
     78  $> sudo -u www svnadmin load --parent-dir Roscoff ./SVNTEST <
     79SVN-Roscoff.dump
     80
     81
     82Exemple de réorganisation d'un repository
     83-----------------------------------------
     84::
     85
     86  $> svn list http://localhost:8800/Svn/SVN
     87  $> svn mkdir -m "Creation du repertoire Roscoff"
     88http://localhost:8800/Svn/SVN/Roscoff
     89  $> svn move -m "Deplacement du repertoire FW dans Roscoff"
     90http://localhost:8800/Svn/SVN/FW http://localhost:8800/Svn/SVN/Roscoff/FW
     91
     92
     93Migration de DB Berkeley à FSFS
     94-----------------------------------------
     95::
     96
     97  $> sudo /sw/sbin/apachectl stop
     98  $> sudo svnadmin dump SVN > ~/SVN.dump
     99  $> sudo mv SVN SVN-BREAK
     100  $> sudo svnadmin create --fs-type fsfs SVN
     101  $> sudo chown -R www:svn SVN
     102  $> sudo chmod -R g+w SVN
     103  $> sudo svnadmin load SVN < ~/SVN.dump
     104  $> sudo /sw/sbin/apachectl start
     105
     106
     107Suppression d'un répertoire importé par erreur
     108----------------------------------------------
     109::
     110
     111  $> sudo /sw/sbin/apachectl stop
     112  $> sudo svnadmin dump /Users/Shared/Svn/COOL > ~/Temp/COOL-dump
     113  $> cat ~/Temp/COOL-dump | svndumpfilter exclude Sites/Perf/Database >
     114~/Temp/COOL-new-dump
     115  $> sudo mv COOL COOL-bak
     116  $> sudo svnadmin create --fs-type fsfs COOL
     117  $> sudo chown -R www:svn COOL
     118  $> sudo chmod -R g+w COOL
     119  $> sudo svnadmin load COOL < ~/Temp/COOL-new-dump
     120  $> sudo /sw/sbin/apachectl start
     121
     122Il semble qu'on ne puisse supprimer que des répertoires et non des fichiers
     123individuellement.
     124
     125.. ** GESTION D'UN PACKAGE **
     126
     127Gestion d'un package
     128====================
     129
     130Import
     131--------
     132::
     133
     134  $> cd ~/Projets/Atlas
     135  $> svn import -m "Import de IOVDbSvc" IOVDbSvc
     136http://localhost:8800/Svn/SVN/Atlas/IOVDbSvc
     137  $> svn list http://localhost:8800/Svn/SVN/Atlas
     138
     139On importe la *copie* de travail locale **vers** le *dépot*.
     140
     141Examen
     142----------
     143::
     144
     145  $> svn list --verbose http://localhost:8800/Svn/COOL/
     146
     147L'option ''--verbose'' rajoute le numéro de révision, l'auteur et la date de
     148révision pour chaque répertoire.
     149
     150*Check out*
     151--------------
     152::
     153
     154  $> svn co http://127.0.0.1:8800/Svn/SVN/Atlas/IOVDbSvc IOVDbSvc
     155
     156On récupère le répertoire du *dépot* **vers** la *copie* de travail locale.
     157
     158Update
     159--------
     160::
     161
     162  $>
     163
     164Tagging
     165---------
     166::
     167
     168  $> svn copy http://localhost:8800/Svn/SVN/Atlas/IOVDbSvc \
     169              http://localhost:8800/Svn/SVN/Atlas/IOVDbSvc-00-01-47 \
     170              -m "Tagging IOVDbSvc-00-01-47"
     171
     172*Correction* d'un tag
     173-------------------------
     174Deux stratégies possibles :
     175
     176- corriger dans la *branche principale*, supprimer le tag obsolète et
     177re-tagger (méthode utilisée par Michel)
     178
     179::
     180
     181  $> svn rm http://localhost:8800/Svn/COOL/Sites/Perf-00-00-03 \
     182              -m "Suppression tag Perf-00-00-03 pour application patch - Cf
     183source:Sites/Perf_ChangeLog"
     184  $> ci -m "Corrections et patch -  Cf source:Sites/Perf_ChangeLog"
     185  $> svn copy http://localhost:8800/Svn/COOL/Sites/Perf \
     186              http://localhost:8800/Svn/COOL/Sites/Perf-00-00-03 \
     187              -m "Nouveau tag Perf-00-00-03"
     188
     189- introduire le patch (corriger) dans la *branche taggée* puis mettre à jour
     190la branche principale (merge) (méthode *Christian*)
     191
     192.. ** GESTION DES 'PROPERTIES' **
     193
     194Gestion des 'properties'
     195========================
     196
     197svn:ignore
     198----------
     199
     200On donne à **Subversion** la liste des fichiers à ignorer en définissant la
     201*property* **svn::ignore** sur les répertoires.
     202
     203À partir d'une liste de fichiers (par exemple *.cvsignore*) :
     204
     205::
     206
     207  $> svn propset -R svn:ignore . -F .cvsignore
     208
     209ou bien en éditant directement la *property* :
     210
     211::
     212
     213  $> setenv SVN_EDITOR vi
     214  $> svn propedit svn:ignore .
     215
     216Les *properties* sont versionnées :
     217
     218::
     219
     220  $> svn commit -m "Ignoring ignorable files"
     221
     222
     223.. ** ADMINISTRATION DU DÉPOT **
     224
     225Administration du dépot
     226========================
     227
     228recover
     229----------
     230
     231Il faut absolument penser à **arêter le serveur apache** avant de toucher au
     232dépot.
     233
     234::
     235
     236  $> sudo /sw/sbin/apachectl stop
     237  $> sudo svnadmin recover SVN
     238  $> sudo svnadmin verify SVN
     239  $> sudo /sw/sbin/apachectl start
     240
     241dump/load
     242------------
     243
     244Quand on ne se sort pas d'une erreur *FATAL*, on peut tenter ça :
     245
     246::
     247
     248  $> sudo svnadmin SVN > ~/SVN.dump
     249  $> sudo mv SVN SVN-BAK
     250  $> sudo svnadmin create SVN
     251  $> sudo chown -R www:svn SVN
     252  $> sudo chmod -R g+w SVN
     253  $> sudo svnadmin SVN < ~/SVN.dump
     254
     255Ce type de manip a disparu en passant en *fsfs* Š
     256
     257}}}