

  CVS Repository --    FreeBSD


Stijn Hoop

<stijn@win.tue.nl>
$FreeBSD: doc/el_GR.ISO8859-7/articles/cvs-freebsd/article.sgml,v 1.13 2008/12/
08 03:10:51 keramida Exp $
   2001, 2002, 2003 Stijn Hoop
 FreeBSD       FreeBSD Foundation.
          
           
 .           
      FreeBSD     
 ,      : [TM]  .
            CVS
repository        (scripts)   
   FreeBSD project    .  
       CVS
,          
    email      
  (commit).
-------------------------------------------------------------------------------

1 

  projects   (free software)  
 (open source)   CVS      .
   CVS            
    .         
          ,
           
   .
    FreeBSD    CVS.   
       . 
           repository
 .         
Josef Karthauser <joe@FreeBSD.org>       
   .          
  .
           
           CVS.
-------------------------------------------------------------------------------

2  


     :         
          repository,  
            .  
         backups,   
     !

-------------------------------------------------------------------------------

2.1   repository

            repository 
   CVS   :

  % cvs -d path-to-repository init

   CVS      CVSROOT, 
   .
-------------------------------------------------------------------------------

2.2    repository

          repository.  
committers        ,     
 repository.          
 '      FreeBSD,   ncvs.

  # pw groupadd ncvs

,       chown(8)     
   ,        
:

  # chown -R :ncvs path-to-your-repository

          repository  
   .
-------------------------------------------------------------------------------

2.3    

       CVSROOT   repository 
FreeBSD.   ,  check out    
FreeBSD CVS mirror.  ____  
.          
CVSROOT-freebsd      .
-------------------------------------------------------------------------------

2.4   scripts  FreeBSD

,       CVSROOT   FreeBSD 
  repository.      CVS,     
      import  scripts,    
        . ,
   CVS      : 
     CVSROOT ,    
  .         ,
    checkin        
,      cvs import. ,  
      scripts.
             
--     .    CVSROOT 
   FreeBSD        ()
:

  % cvs -d path-to-your-repository checkout CVSROOT
  % cd CVSROOT
  % cp ../CVSROOT-freebsd/* .
  % cvs add *

          
    .  .    
 .
-------------------------------------------------------------------------------

2.5 T scripts

          scripts  
  FreeBSD project     repository.   
       .

* access -        
   CVS.    ___FreeBSD_project,
        repository.     
             
  .
* avail -        repository   
  .   ,       
       repository,     
  commits     .       
              
  repository.
* cfg.pm -           '
   .       . ,  
            cfg_local.pm.
* cfg_local.pm -         
  .        ,   
      email   commit,   hosts 
     commit, .     
    .
* checkoutlist -          
      CVS   --    
       cvs init.       
   ,     FreeBSD, .
* commit_prep.pl -  script       
  commit,          cfg_local.pm. 
        .
* commitcheck -  script      CVS.  ,
     cvs_acls.pl,   committer   
       ,     commit_prep.pl
      pre-commit .    
     ,   CVS    commit 
  .        .
* commitinfo -       CVS    
  script      commit--      
    commitcheck.        .
* config -    '   repository.    
   '        ,   
       '  . 
            
        CVS.
* cvs_acls.pl -  script      committer,  
          .   
     avail.        .
* cvsignore -         CVS   
     checkin   repository.    
         .   
          CVS.
* cvswrappers -       CVS   
     keyword expansion,        
     binary.      
      .      
         CVS.     -
  t  -f     client/server   CVS.
* edithook -      ,   
     .      .
* editinfo -  CVS        editors. 
  FreeBSD          log
      verifymsg  logcheck .   
        editinfo      commits
       commits     -F  -F.  
       .
* exclude -       (regular expressions)
       commit_prep.pl    
          
  (revision header).    FreeBSD,     
    (revision control)     
    ( $FreeBSD$).     
            
     .       
        checkin     
     .      
   scripts ,        
  CVSROOT/     headers.
* log_accum.pl -    script    log   
     logcheck script,        log
   repository,         commit logs.
  ,     mail  email   
   ( cfg_local.pm).    CVS    loginfo.
         .
* logcheck -      commit log    
  committers,        .
     CVS    verifymsg.    
     .

       : script       FreeBSD 
       CVS:      log    
          script.     CVS  
         ,   logcheck    
         log ,      
           .    1.11.2   
         CVS         
             FreeBSD   
       RereadLogAfterVerify=always   config.

* loginfo -       CVS      
      logs.    
  log_accum.pl.        .
* modules -          CVS. 
      FreeBSD modules    .  
          . 
            CVS.
* notify -       CVS    
       .   
  repository  FreeBSD.        
    .       
      CVS.
* options -        FreeBSD   CVS 
          Debian.   keyword
     expand  revision headers.     
               
  cfg_local.pm (      ,  
           CVS    FreeBSD).
* rcsinfo -       repository  
  template,  ..  rcstemplate. ' ,  FreeBSD  
  template    repository.      
      .
* rcstemplate -      template     
  committers    checkin.       
            
  cfg_local.pm.
* tagcheck -          tags 
  repository.     FreeBSD   tags   
  RELENG*,       .   
            .
* taginfo -       tags   
  repository   ,   tagcheck.    
     .
* unwrap -          unwrap 
  binary  ( cvswrappers)  checkout.   
     CVS   FreeBSD      
   commits.        .
* verifymsg -       repository 
       log,  ..  logcheck.  
       .
* wrap -  script      wrap  binary 
  ( cvswrappers)   checkin.    
    FreeBSD       
  commits.        .

-------------------------------------------------------------------------------

2.6   scripts

       scripts     
   .          
     .  ,    
     :

  1.         scripts  
      ___FreeBSD,    
        access:

       % cvs rm -f access

  2.    avail       
     repository       . 
          avail||CVSROOT ,  
              .
               
     committers. ' ,  FreeBSD    access  
        committers,     
      .         
     (       cvs_acls.pl).
  3.    cfg_local.pm      
     .  ,      
      :

     o %TEMPLATE_HEADERS -       log
       scripts,      mail   commit  
              commit. ,  
          PR  MFC after--   
        bug tracking   FreeBSD      
       FreeBSD  branches  repository .    
          .
     o $MAIL_BRANCH_HDR -        
        commit  mail,      branch   
         commit,         
        .        
          .
     o @COMMIT_HOSTS -          (hosts),
             commits.
     o $MAILADDRS -      email     
               mail  commit
       .
     o @LOG_FILE_MAP -    array  .  regexp
               commit,  
       log   commit      CVSROOT, 
        commitlogs,      
          @LOG_FILE_MAP.
     o $COMMITCHECK_EXTRA -      _
       ____FreeBSD,       
        $COMMITCHECK_EXTRA    .


          :    $IDHEADER   
               FreeBSD.   
            FreeBSD  CVS.

          cfg.pm      
       ,        .
  4.    exclude     
       FreeBSD (       ^ports/
     .).  ,         ^CVSROOT/,
              ^CVSROOT/. 
       wrapper,       header 
           CVSROOT    
      ,         
          commit .
  5.    modules,        FreeBSD
     .     modules   .
  6.
          :        
              $IDHEADER   cfg_local.pm (
                
            CVS    FreeBSD).

        options      tag   
      cfg_local.pm.      FreeBSD   
       .
  7.    rcstemplate      keywords 
          cfg_local.pm.
  8. ,     FreeBSD    tagcheck.
         exit 0      
          tagging.
  9.       ,     
     commitlogs   .  CVS scripts  FreeBSD 
       logs   commitlogs   CVSROOT.  
        ,    :

       % mkdir commitlogs
       % cvs add commitlogs


,     ,     commit  
.            
 CVSROOT     avail   ,  
       . ,   
   ,      :

  % cvs commit -m '- Initial FreeBSD scripts commit'

-------------------------------------------------------------------------------

2.7   

      :  forced commit   avail, 
       .

  % cvs commit -f -m 'Forced commit to test the new CVSROOT scripts' avail

   , !      
   FreeBSD scripts   repository . 
   CVS     ,  
          
 .
-------------------------------------------------------------------------------

3    FreeBSD Project

   FreeBSD project     , 
       freebsd  CVSROOT 
  FreeBSD.  project      
  committers,         
group. ,    wrapper     
    committers,    group id  
 repository.
     repository   ,     
   .      
   .
-------------------------------------------------------------------------------

3.1        FreeBSD


* access -          .
              
   project .
* freebsd/commitmail.pl -      , 
     .       
  .
* freebsd/cvswrap.c -       CVS wrapper  
             
  .        
  .      paths  ACCESS  REALCVS
          .
* freebsd/mailsend.c -          
     FreeBSD.       
  .

-------------------------------------------------------------------------------

3.2  


  1.    access        username.
  2.    cvswrap.c      path   
      .        ACCESS.
                cvs
     binary             . 
      cvswrap.c       cvs  
        cvwrap,     cvs     /
     usr/bin/ncvs.
           cvswrap.c   :

       #define ACCESS "/local/cvsroot/CVSROOT/access"
       #define REALCVS "/usr/bin/ncvs"

  3.        wrapper   
             group   commit. 
       '     cvswrap.c  
     CVSROOT.
                
     paths:

       % cc -o cvs cvswrap.c

          cvs    
      (    root    ):

       # mv /usr/bin/cvs /usr/bin/ncvs
       # mv cvs /usr/bin/cvs
       # chown root:ncvs /usr/bin/cvs /usr/bin/ncvs
       # chmod o-rx /usr/bin/ncvs
       # chmod u-w,g+s /usr/bin/cvs

        wrapper   '  cvs ,  
            repository, 
           .
  4.          repository group
     .         wrapper,    
     wrapper     group        
     .

-------------------------------------------------------------------------------

3.3   

 wrapper     .     
  forced commit   access:

  % cvs commit -f -m 'Forced commit to test the new CVSROOT scripts' access

,   ,        
.
-------------------------------------------------------------------------------
  ,   ,     ftp://ftp.FreeBSD.org/
                               pub/FreeBSD/doc/.
          FreeBSD,     
                   <questions@FreeBSD.org>.
             ,  e-mail 
                              <doc@FreeBSD.org>.
