Software Configuration Management HOWTO

xiaoxiao2021-03-06  99

Overview

CVS is a miracle of open source, and the open source can be continued and developed, which is the classic of version control. CVS is a common version control tool.

StarTeam is a software that collects version control and defect control, and has a powerful graphical interface with CVS, easy to use. At the end of 2002, it was acquired by Borland, and the development prospect was unknown. It was the first large commercial version control software I used (really paid Money).

Evaluation of CVS, StarTeam is excellent, is a problem that is benevolent, and wise see a wisdom. StarTeam's graphical interface enables beginners to receive, and their defect control functions (based on database-based Change Request), is CVS, which is unique in the corresponding tool. CVS excellent cross-platform capabilities, powerful command lines, clear server-side data structures more convenient for data backup, disaster recovery, and reliability. SIMPLE is Butiful is given to CVS.

Different CVs focus on the version management system in the configuration management software. In addition to the version management, the configuration management system also includes building management (build management) and defect tracking systems. StarTeam includes these three. This document also is only compared to the different version of the management system. Permissions Control In general, CVS's permission settings are single, usually only by cvsroot / passwd, cvsroot / readers, cvsroot / write files, but also set the physical directory permissions of CVS REPOS to complete the permission settings, unable to complete complicated permission control And StarTeam does not need to set up the permissions of the physical path, but through its own database management, the domain user management and directory file ACL control similar to Windows NT is implemented. However, CVS provides the corresponding functional expansion interface through the script in the cvsroot directory, which can not only complete fine permission control, but also complete more personalized features. Easy StarTeam's graphical interface is powerful, but its command line is weak than CVS, and you need to write shell scripts to strengthen. As WinCVS is enhanced as the availability of graphical clients, STARTEAM's strength is being weakened. Label's management CVS Label is built on a file, it is difficult to determine how many Label exists, while StarTeam (Graphical Interface) can be very easy to know what view label and revision label. CVS version branch, Label is built on a file, working on other branches, also seeing other branches of Label; and StarTeam's Label is only valid within the same view, with separate namespaces. StarTeam has Promotion States, which can be seen as labels for Label. In Label, the promotion state is packaged in the Label to record the upgrade of the version, and the establishment of automatic compilation; and CVS does not float Label concept, can only be implemented by file recording (as we use .promotion file record currently stable label). The file cache StarTeam exists, caches all the version of the Checkout version, so Checkout is fast. The CVS has no cache, the check out process is slow, especially the branch of Checkout.

But I doubt it. Especially the StarTeam UNIX client is based on Java technology, which is obviously slower than CVS.

Operating file names and directory name CVS's physical storage structure of the project is the organizational structure of the project, making the file name modification and directory reorganization, often requires administrator privileges to manually operate repository; and Starteam's Repository file structure and view The file structure can be completely different, the directory, file name modification and movement is very convenient, and the database-based file name management can easily share files and work together between different projects. CVS is a programmer's tool, StarTeam or the tool of the tool personal file management or small project, requires lightweight management, and flexible file import, export, and free code interaction, CVS, Perforce, PVCS , SourceSafe, etc., for a file-oriented version control, dominant. For companies, big projects, need independent testing, QA, etc., more considering diverse user rights control, ease of use (graphical interface), defect control, need to be project-oriented STARTEAM for version control and development . Advantages of CVS Advantages CVS: Project files can be conveniently combined and transplanted because CVS is based on files, namely, for file-oriented management. And there are many open source on the network to use CVS and can communicate well. The CVS configuration is simple, strong, can be easily transplanted; STARTEAM integration is high, the transplantation process is complex, and the management burden is large, and a comprehensive backup plan is required. CVS is a development source code, and the server-side storage is easy to understand, easy to control; STARTEAM is closed for commercial software, and the server-side storage is closed, difficult to manage. However, CVS does not provide a graphical interface with a longer learning curve. StarTeam's disadvantage does not support the merger of branches, which requires too much manual intervention. CVs can be done automatically. Slow speed, affect development efficiency to some extent. Parallel development is not supported, and it is impossible to solve the problem of MERGE. And CVS can intelligently merge. Troubleshooting is difficult, and a full-time administrator is required. CVS is easy to maintain. Evaluation is good, it is better to use first, you don't have to deliberately go to see which one, just use it, you can. Moreover, the perfect CVS, STARTEAM mutual conversion is already converted. .

2. CVS vs. starteam - server settings

2.1. CVS server settings

2.1.1. Run CVS

/ etc / service

...

CVSPSERVER 2401 / TCP

CVSPSERVER 2401 / UDP

... Use xinetd: /etc/xinetd.d/cvs

Service CVSPServer

{

Socket_type = stream

Protocol = TCP

Wait = NO

User = root

Server = / usr / bin / cvs

Server_args = -f --allow-root = / repos / root1 - alallow-root = / repos / root2 PServer

Disable = no

} Run with inetd: /etc/inetd.conf

...

CVSPSERVER STREAM TCP NOWAIT ROOT / USR / BIN / CVS CVS -F - Allow-Root = / repos / project --allow-root = / repos / user PServer ...

2.1.2. Add account and set permissions

Creating a system account assumes that the directory / repos / project is the version control root directory of multi-person sharing projects, which requires group permissions control; / repos / user as the control root directory that stores personal exclusive land versions. Administrator account is CVSROOT, project version controlled public account for cvsproject, user version controlled public account for cvsuser, CVSROOT, CVSPROJECT, CVSUSER.

$ groupAdd CvsProject

$ GrouPadd Cvsuser

$ GrouPadd CvsRoot

$ useradd -g cvsproject -s / sbin / nologin cvsproject

$ uSERADD -G CVSUSER -S / SBIN / NOLOGIN CVSUSER

$ uSERADD -G CVSROOT -G CVSPROJECT, CVSUSER CVSROOT

$ uSERADD -G CVSUSER -S / SBIN / NOLOGIN CVS_JIANGXIN

$ uSERADD -G CVSUSER -S / SBIN / NOLOGIN CVS_JOHNSON

Setting CVSROOT belongs to multiple groups so that CVSRoot users can have permission to manage code as other group users in addition to system maintenance (such as adding new projects).

System account used to be used in one or one with a CVS user account. The system account is forbidden to log in and the password is set in the corresponding CVS corresponding account file.

Create a CVS root directory

$ mkdir -p / repos / project

$ MKDIR -P / REPOS / User

$ Chown CvsRoot: CVSROOT / REPOS / PROJECT

$ Chown CvsRoot: CVSROOT / REPOS / User

$ chmod 775 / repos

$ chmod 2775 / repos / project

$ chmod 2775 / repos / user

$ su - cvsroot

$ CVS -D / REPOS / Project Init

The $ cvs -d / repos / user init is running CVS init, and the configuration directory CVSROOT is created in the CVS root directory, the permissions are as follows:

$ ls -l / repos / project / cvsroot /

-r - r - r - 1 cvsroot cvsroot 493 Jan 21 10:37 CheckoutList

-r - r - r - 1 cvsroot cvsroot 696 Jan 21 10:37 CheckoutList, V

-r - r - r - 1 cvsroot cvsroot 760 Jan 21 10:37 CommitInfo

-r - r - r - 1 cvsroot cvsroot 963 Jan 21 10:37 CommitInfo, V

-r - r - r - 1 cvsroot cvsroot 527 Jan 21 10:37 Config

-r - r - r - 1 cvsroot cvsroot 730 Jan 21 10:37 Config, V

-r - r - r - 1 cvsroot cvsroot 753 Jan 21 10:37 CvswrapPers-r - r - r - 1 cvsroot cvsroot 956 Jan 21 10:37 CvswrapPers, V

-r - r - r - 1 cvsroot cvsroot 1025 Jan 21 10:37 Editinfo

-r - r - r - 1 cvsroot cvsroot 1228 Jan 21 10:37 Editinfo, V

Drwxrwxr-x 2 cvsroot cvsroot 4096 jan 21 10:37 Emptydir

-rw-rw-rw- 1 cvsroot cvsroot 0 Jan 21 10:37 HISTORY

-r - r - r - 1 cvsroot cvsroot 1141 Jan 21 10:37 loginfo

-r - r - r - 1 cvsroot cvsroot 1344 Jan 21 10:37 loginfo, V

-r - r - r - 1 cvsroot cvsroot 1151 Jan 21 10:37 Modules

-r - r - r - 1 cvsroot cvsroot 1354 Jan 21 10:37 Modules, V

-r - r - r - 1 cvsroot cvsroot 564 Jan 21 10:37 Notify

-r - r - r - 1 cvsroot cvsroot 767 Jan 21 10:37 Notify, V

-r - r - r - 1 cvsroot cvsroot 649 Jan 21 10:37 RCSINFO

-r - r - r - 1 cvsroot cvsroot 852 Jan 21 10:37 RCSINFO, V

-r - r - r - 1 cvsroot cvsroot 879 Jan 21 10:37 Taginfo

-r - r - r - 1 cvsroot cvsroot 1082 Jan 21 10:37 Taginfo, V

-rw-rw-rw- 1 cvsroot cvsroot 0 Jan 21 10:37 Val-tags

-r - r - r - 1 cvsroot cvsroot 1026 Jan 21 10:37 VerifyMSG

-r - r - r - 1 CVSROOT CVSROOT 1229 JAN 21 10:37 VerifyMSG, v You can see that the permissions of the file history, val-tags are anyone who reads and writes, the permissions of other files are read-only. File CVSROOT / VAL-Tags is used to determine if a TAG is available; file cvsroot / history is used to record CVS access records. Creating a CVS user account Using the system account is unsafe, CVS provides a user account management independent of the system. Use profile cvsroot / passwd, cvsroot / passwd, cvsroot / passwd to manage your account.

$ cat / repos / project / cvsroot / passwd

JiangxinRoot: _passwd_here_: cvsroot

JIANGXIN: _PASSWD_HERE_: CVSPROJECT

Johnson: _passwd_here_: cvsproject

Anonymous :: CVSProject

$ CAT / REPOS / Project / CvsRoot / Readers

Anonymous

User account jiangxinroot, with system account CVSROOT equivalent permissions. User account jiangxin, johnson, all have system account CVSProject, the same authority,

The password of anonymous account Anonymous is empty.

The user account that appears in the readers file has only read only permissions.

2.1.3. Creating a project

Can only create projects with cvsroot users. Because the permissions of the CVS root directory are set to be written for the CVSROOT account.

Create project in the client

Client $ cvs -d: pserver: jiangxinroot@10.0.0.7: / repos / project login

Client $ cvs -d: pserver: jiangxinroot@10.0.0.7: / repos / project import -m "add module test, vendor jiangxin, init_tag start." TEST JIANGXIN START

$ ls -l / repos / project

Drwxrwxr-x 3 cvsroot cvsroot 4096 jan 21 10:54 cvsroot

Drwxrwsr-x 2 cvsroot cvsroot 4096 Jan 21 11:00 Test

$ chown -r cvsproject: CVSProject Test

$ chmod -r 770 test

$ chmod -r g s TEST

Client $ cvs -d: pserver: jiangxin@10.0.0.7: / repos / Project Co Test

Client $ cvs -d: pserver: johnson@10.0.0.7: / repos / project co -d test2 test2 TEST

Set the directory permissions for the project / module TEST, so that only the CVSProject group users have read and write permissions, other accounts refuse access.

User account jiangxin, Johnson mapping is a system account CVSProject, so you can access the project TEST.

The reason for setting G S for the module TEST is to operate different projects when setting one user belongs to multiple projects, and the group ID of the file will remain unchanged. Doing so may affect the permissions of other users. Can be executed with a simpler command

CHMOD -R 2770 TEST is set.

So I created multi-user shared project TEST. Another way to create an engineering: Create projects in server-side creation projects can be created directly on the server side, set permissions, and complete the creation of the project. Of course, the project created is just an empty project, which needs to add files and directories on the engineering of the client.

$ cat / repos / project / cvsroot / passwd

JIANGXROOT: _PASSWD_HERE_: CVSROOT

Anonymous: _passwd_here_: cvsuser

JIANGXIN: _PASSWD_HERE_: CVS_JIANGXIN

Johnson: _passwd_here_: cvs_johnson

$ CD / Repos / Project

$ mkdir jiangxin; chown -r cvs_jiangxin: cvsuser jiangxin; chmod -r 2700 jiangxin

$ mkdir johnson; chown -r cvs_johnson: cvsuser johnson; chmod -r 2700 Johnson created two users exclusive projects.

2.1.4. Function expansion with CVS management files

It is true that the authority of the provincial installed CVS is only on the directory, and cannot be fine to the file level. And even if the user only needs to have read-only privileges, it is necessary to write permissions on the corresponding directory, as you need to create a lock file in the directory. There is a way to avoid this problem, namely, by configuring the LockDir of the configuration file CVSROOT / Config, set a wider-wide permission control for the separate lock directory. CVS provides a functional expansion interface: the management file in the cvsroot directory. These files provide the interface that the corresponding functional expansion can not only complete fine permission control, but also complete more personalized features. About the script under CVSROOT, FreeBSD's source code has a very good cvsroot script for us to refer to:

Setting up a cvs repository - the freebsd. We can refer to this guide to customize our own cvsroot scripts.

Download FreeBSD's CVSRoot script, you can connect to FreeBSD's CVS server with anonymous users:

$ cvs -d: pserver: anoncvs@anoncvs.freebsd.org: 2401 / home / ncvs login # Enter password AnonCVS

$ cvs -d: pserver: anoncvs@anoncvs.freebsd.org: 2401 / home / ncvs co cvsroot-src

After downloading the cvsroot code for FreeBSD, you need to customize it accordingly, and then you can check in your own cvsroot directory. This patch is my modification and customization: patch.txt.

Customization process:

Upgrading CVS confirms the installed CVS server version, which is higher than 1.11.2. Because we have to use the functionality that appears in version 1.11.2: You can re-read the commit log after checking the commit log to implement the format of the commit log. Custom Perl module cfg.pm file cvsroot / cfg.pm, is the core package of Perl scripts, which has made some changes, mainly to add some users from sending email function; also adds part of the sub-process, part is from the original Log_ACUM.PL moves over, the purpose is set to the function of these functions to the module to facilitate other script calls that need to send mail, such as script log_accum.pl and tagCheck need to use these new rays. Process. The changes in script cvsroot / cfg.pm are as follows:

DIFF -U -R1.1 -R1.2

--- cfg.pm 14 aug 2003 10:00:53 -0000 1.1

cfg.pm 15 aug 2003 01:44:20 -0000 1.2

@@ -17, 9 17, 10 @@

$ Add_to_line $ avail_file $ check_headers $ commitcheck_extra

@Commit_hosts $ committer $ debug $ diff_block_total_lines $ exclude_file

$ FILE_PREFIX $ IDHEADER $ last_file @log_file_map $ MAILADDRS $ MAILBANNER

$ Mailcmd $ MAIL_BRANCH_HDR $ MAIL_ON_DIR_CREATION $ MAIL_TRANSFORM

$ Mailcmd $ mail_branch_hdr @MAIL_MAP $ mail_on_dir_creation $ mail_transform

$ MINCVSVSON $ MAX_DIFF_SIZE $ NO_DOS_LINEBREAKS $ PID $ PROG_CVS $ PROG_MV% Template_Headers $ TMPDIR $ UNEXPAND_RCSID $ WARN_HEADERS

$ Badsender_File

);

MY $ cvsroot = $ env {'cvsroot'} || Die "can't determine / $ cvsroot!";

@@ -52, 7 53 ,7 @@

$ PROG_MV = '/ bin / mv'; # mv (1)

# The username of the committer.

$ Committer = $ env {"logname"} || $ env {'user'} || getLogin

$ Committer = $ env {"cvs_user"} || $ env {"logname"} || $ env {'user'} || getLogin

|| (GetPWUID ($ <)) [0] || Sprintf ("UID #% D", $ <);

@@ -83, 6 84 ,7 @@

# Commit to what.

$ Avail_file = "$ cvsroot / cvsroot / avail";

$ Badsender_file = "$ cvsroot / cvsroot / blocksender";

################

### logcheck ###

@@ -208, 6 210, 10 @@

'other' => '. *'

);

@ Mail_Map = (

'Nobody' => '. *'

);

# Include diffs of not get Than this size in kbytes in the

# Commit Mail for Each File Modified. (0 = OFF).

$ MAX_DIFF_SIZE = 0;

@@ -270, 6 276, 64 @@

Return @output;

}

################################################################################ ###########

#

# Subroutines

#

################################################################################ ###########

# !!! Mailing-List and commitlog history file mapings here !!!

# This needs punling out as a configuration block Somewhere So

# That Others Can Easily Change IT.

SUB GET_LOG_NAME {

MY $ DIR = Shift; # Directory Name

for my $ i (0 .. ($ # cfg :: LOG_FILE_MAP - 1) / 2) {

MY $ log = $ cfg :: log_file_map [$ I * 2]; my $ pattern = $ cfg :: log_file_map [$ I * 2 1];

RETURN $ log if $ dir = ~ / $ pattern /;

}

Return 'other';

}

SUB GET_MAIL_NAME {

MY $ DIR = Shift; # Directory Name

MY $ cvsroot = $ env {'cvsroot';

$ dir = ~ s, ^ $ cvsroot [/]?, g;

$ DIR. = "/" Unless $ DIR = ~ /// $ /;

for my $ i (0 .. ($ # cfg :: mail_map - 1) / 2) {

MY $ EMAIL = $ cfg :: mail_map [$ I * 2];

MY $ pattern = $ cfg :: mail_map [$ I * 2 1];

RETURN $ EMAIL IF $ DIR = ~ / $ pattern /;

}

RETURN $ CFG :: MailAddrs;

}

# do not send email, if committer is in badsender file ...

Sub sendmail_acl_check {

MY $ sendmail = 1;

IF (-e $ cfg :: Badsender_file)

{

Open (Badsender, $ cfg :: Badsender_file) || DIE "Open $ CFG :: Badsender_file: $! / n";

while

) {

IF ($ _ = ~ // b $ cg :: Committer / B / i)

{

$ sendmail = 0;

Last;

}

}

}

RETURN $ Sendmail;

}

######################################################################################################################################################################################################################################################################################################## ####################

# Loading the local configuration file, That Allows the Entries in this

Increase the inspection environment variable CVS_USER. To correctly reflect user names that authenticate using the CVSROOT / Password file.

To set up file $ badsender_file which users do not have to send emails for CVS operations, this feature can be used to automatically compile specific users of the CVS without having to send mail.

Several processes are also added to the Perl module for other programs.

File cvsroot / cfg_local.pm is used to customize module CFG.pm:

Hash $ DIFF -U -R1.1 CFG_LOCAL.PM

--- cfg_local.pm 14 aug 2003 10:00:53 -0000 1.1

cfg_local.pm 15 aug 2003 03:09:39 -0000 1.3

@@ -13, 7 13 ,7 @@

######################################################################################################################################################################################################################################################################################################## ######################################################################################################################################################################################################################################################################################################## #################################################

$ Check_Headers = 1;

$ Check_Headers = 0;

$ IDHEADER = 'FreeBSD';

$ Unnexpand_rcsid = 1;

@@ -29, 25 29, 30 @@

$ Mailcmd = "/ usr / local / bin / mailsend -h";

$ Mail_Branch_HDR = "X-FreeBSD-CVS-BRANCH";

$ Add_to_line = 0;

$ Mailbanner = "FreeBSD SRC Repository";

$ Mailbanner = "my repository";

IF (Defined $ ENV {'CVS_COMMIT_ATTRIB') {

MY $ attrib = $ env {'cvs_commit_attrib'};

$ Mailbanner. = "($ Attrib";

}

# The minimum version of cvs That We will work with.

$ Mincvsversion = "1110200"; # 1.11.2

$ MAIL_ON_DIR_CREATION = 0;

# Sanity Check To make Sure We've Been Run Through The Wrapper and Are

# Now primary group 'ncvs'.

#

$ Commitcheck_extra = SUB {

- MY $ GRP = `/ usr / bin / id --gn`;

- CHOMP $ GRP;

- Unless ($ GRP = ~ / ^ ncvs $ /) {

- Print "You Do Not Have Group NCVS (CommitCheck)! / n";

- EXIT 1; # we could return false here. But there

- # Nothing to stop us taking action here instead.

-}

- Return 1;

-}

# $ Commitcheck_extra = sub {

# my $ grp = `/ usr / bin / id -gn`;

# kHomp $ GRP;

# unless ($ GRP = ~ / ^ ncvs $ /) {

# Print "You Do Not Have Group NCVS! / N";

# EXIT 1; # we could return false here. But there

# # Nothing to stop US taking action here instead.

#}

# Return 1;

#};

# Wrap this in a hostname Check to prevent mail to the freebsd

# List if someone borrows this file and forgets to change it. @@ -91, 6 96, 22 @@

@Log_file_map =

'Cvsroot' => '^ cvsroot /',

'distrib' => '^ distrib /',

'DOC' => '^ DOC /',

'Ports' => '^ ports /',

'WWW' => '^ www /',

'other' => '. *'

);

# Cvsroot is Still Shared Between Src, Ports, Doc at The Moment. Projects HAS

# its own cvsroot.

@ Mail_Map = (

'Mailist1' => '^ cvsroot /',

'Mailist2' => '^ SRC /',

'cvsnone' => '. *',

);

@ Tag_map =

'jiangxin' => '^ (Release | mailstome). *',

);

# Email Addresses of Recipients of Commit Mail.

$ Mailaddrs = 'cvsnone';

1; # Perl Requires All Modules to return true. Don't delete !!!!

#end

Set to 0, not forced the file header contains a specific CVS ​​keyword.

Set the minimum version of the installed CVS server is 1.11.2;

Events created the directory also send mail. See the script:

CVSROOT / LOG_ACCUM.PL.

Note This function does not check the user group.

Customize this array, store the COMMIT LOG of the CVS module in the corresponding file.

Add a hash table @mail_map, setting the correspondence between the module and the user mail address, the corresponding module's CommMIT, the corresponding user is notified.

Add a hash table @tag_map, set the TAG in some formats that can only be managed by certain users.

Indeed to the provincial email address. This address is used for the mail address that does not find the match in the MAIL_MAP array. It is also quiz as 'Nobody'.

CVS server configuration file: cvsroot / config

# Systemauth = no

# LOCKDIR = / VAR / LOCK / CVS

# TopLeveLadmin = NO

LOGHISTORY = TofewGCMAR

RereadLogAfterverify = always

If you set systemAuth = NO, only authentication provided by CVS.

Can be used to specify a separate lock directory to set the directory permissions of the data warehouse.

For all event logs, it can also be written as loghistory = all.

Enabling only a commit log overwriting feature in version 1.11.2. Document CVSROOT / CVSIGNORE Settings the version of the file that needs to be ignored. These files will not be displayed as unknown status ("?"). Such as:

* .db

* .info

[Sp] o

* .core

* .aps

* .clw

* .exe

* .ncb

* .obj

* .opt

* .plg

Debug

RELEASE

It can also be controlled by files .cvsignore in each directory; for WinCVS, the file c: /. Cvsignore is controlled if the Home path is set to C: /.

File CVSROOT / CVSWRAPPERS matches the file name and processed accordingly. Such as: -kb is handled in binary.

* .gif -k 'b'

* .Gif -k 'b'

* .jpg -k 'b'

... File CVSRoot / Modules Set the module name in the data warehouse, you can view the module / project name included in the current data warehouse (repository) through the command: "CVS CO -C". You can also set the modules to keep and previously set compatibility when adjusting the server-side directory structure.

CvsRoot CvsRoot

Module1 Module2 & Module3 File CVSRoot / CheckoutList Columns in CheckoutList, after checkin, automatically reconstructs in the server cvsroot directory.

#access

Avail

Cfg.pm

Cfg_local.pm

COMMIT_PREP.PL

Commitcheck

CVS_ACLS.PL

Exclude

LOG_ACCUM.PL

Logcheck

Options

RCSTemplate

Tagcheck

unwrap

WRAP

Access files for FreeBSD CVS Wrapper program call, permission control, if this feature is not required, ignore the file.

File CVSROOT / NOTIFY When the user sets a Watch file, you can customize the file to control. This file is not used here. File cvsroot / commitinfo commit event To trigger three script files, it is commitinfo, verifymsg, loginfo. First traversing the entire directory tree to perform a commitinfo file for all files that need commit. The VerifyMSG, Loginfo script is performed for each directory, respectively. Commitinfo calls the commitcheck script, the function is completed: through the user host name, user name to check permissions; confirm that the version number of the CVS server is not lower than a version; will record the result of the directory tree (last directory name), so that Next, running VerifyMSG, Loginfo's script can confirm the end of the run, etc. Related documents: cvsroot / commitcheck, cvsroot / cvs_acls.pl, cvsroot / avail, cvsroot / commit_prep.pl, cvsroot / exclude, cvsroot / cfg.pm, cvsroot / cfg_local.pm. File CVSROOT / AVAIL, is read by script cvs_acls.pl, and then is called with script COMMITCHECK to refine the permissions. E.g:

Group | Meisters | Peter, JDP, Markm, Joe # Pick Up The list of Bad Users from NCVS / CVSROOT / BADCOMMITTERS See That

# file for details

Group | PenalTybox |! Badcommitters

Unavail

Avail || CvsRoot

Avail || Distrib

Avail || DOC

Avail || ports

Avail || SRC

Unavail || SRC / Contrib / Binutils, SRC / Contrib / File

Avail | Obrien | SRC / Contrib / Binutils, SRC / Contrib / File

UNAVAIL || src / control / tcpdump

Avail | Fenner, Nectar | SRC / Contrib / Tcpdump

Avail || WWW

Avail |: Meisters

Unavail |: PenaltyBox file CvsRoot / VerifyMSG is used to check and format your commit log. It is forbidden to use empty commit logs when submitted in version control. For WinCVS, "No Message" is automatically used when the user does not submit the commit log. To prohibit this, you need to customize this script: related files: cvsroot / logcheck.

Bash $ DIFF -U -R1.1 Logcheck

--- Logcheck 14 Aug 2003 10:00:53 -0000 1.1

logcheck 15 aug 2003 02:01:37 -0000 1.2

@@ -47, 8 47, 10 @@

# REMOVE LEADING AND TRAILING Blank Lines. (There Will Be at Most

# One Because of The Duplicate Removal Above.

Local $ ^ w = 0;

Shift @log_in if $ log_in [0] eq ";

POP @log_in if $ log_in [-1] eq "

Local $ ^ w = 1;

# Scan through the commit message looking for templated headers

# as defined in The Configuration File, and rcstemplate.

@@ -104, 6 106 ,9 @@

# Completely Empty. This is a bug in CVS.

MY $ log = "@log_in";

Die "log message contains no content! / n" if $ log = ~ / ^ / s * $ /;

# Commit without commit log usning WinCVS, Will Automatic Or Provide CommT log as "no message".

DIE "log message contains no content us" wincvs! / n "if $ log = ~ / ^ No Message $ / or $ log = ~ /5/.

Hide syntax warning;

It is forbidden for other meaningless commit logs, one of which is the default Commitlog of WinCVS, one is a COMMITLOG style that I have before. File CVSROOT / LOGINFO stores the commit log split class under the directory cvsroot / commitlogs and passes through the email. In order to prevent one event from triggering multiple emails, this script uses the CommitInfo's run results, only the finals of the Contents tree are confirmed, only emails. Modules and storage log files and user mailing lists are defined in file cvsroot / cfg_local.pm. Related documents: cvsroot / log_accum.pl, cvsroot / cfg.pm, cvsroot / cfg_local.pm. File CVSROOT / LOGINFO, call script log_accum.pl, and pass parameters such as file names, used to organize logs and send mail. The original FreeBSD script exists, if there is a space in the file name or directory name, the script runs abnormal, error, causing unable to organize and send mail, this bug correction method is as follows: Use log_accum.pl in file cvsroot / loginfo The parameters are modified from the original% s to% {,, s}, i.e., add three consecutive commas as a separator, otherwise use spaces as a separator, it is difficult to distinguish whether the separator of the file is the space in the path or file name.

Bash $ TAIL -1 Loginfo

DEFAULT $ CVSROOT / CVSROOT / LOG_ACCUM.PL% {,,, S} Correction of file cvsroot / log_accum.pl is as follows:

Bash $ DIFF -U -R1.1 LOG_ACCUM.PL

--- log_accum.pl 14 aug 2003 10:00:53 -0000 1.1

log_accum.pl 15 aug 2003 02:00:35 -0000 1.2

@@ -47, 6 47 ,7 @@

MY $ log_file = "$ base_fn.log";

MY $ Summary_File = "$ base_fn.summary";

MY $ lognames_file = "$ base_fn.lognames";

MY $ MailNames_File = "$ base_fn.mailnames";

MY $ subj_file = "$ base_fn.subj";

MY $ tags_file = "$ base_fn.tags";

MY $ DIFF_FILE = "$ base_fn.diff";

@@ -233, 7 234 ,8 @@

WHILE

) {

IF (/ ^ [/ t] * repository revision /) {

Chomp;

- my @revline = split;

my @revline = split (/ [/ t] /, $ _, 5);

Shift @revline while ($ revline [0] EQ ");

$ revision = $ revline [2];

$ revline [3] = ~ m | ^ $ cvsroot / (.*), V $ |

$ RCSFILE = $ 1;

@@ -383, 20 385, 6 @@ # !!! Mailing-list and commitlog history file mappings here !!!

# This needs punling out as a configuration block Somewhere So

# That Others Can Easily Change IT.

-SUB get_log_name {

- MY $ DIR = Shift; # Directory Name

-

-

- for my $ i (0 .. ($ # cfg :: log_file_map - 1) / 2) {

- my $ log = $ cfg :: log_file_map [$ I * 2];

- My $ pattern = $ cfg :: log_file_map [$ I * 2 1];

-

RETURN $ log if $ dir = ~ / $ pattern /;

-}

-

- Return 'Other';

-}

-

SUB DO_CHANGES_FILE {

My @Text = @_;

@@ -408, 11 396, 17 @@

$ UNIQUE {$ category} = 1;

MY $ CHANGES = "$ cvsroot / cvsroot / commitLogs / $ category";

- Open Changes, ">> $ Changes"

- or die "Cannot Open $ CHANGES. / N";

- Print Changes Map {"$ _ / n"} @Text;

- Print Changes "/ N / N / N";

- Close Changes;

IF (Open Changes, ">> $ change")

{

Print Changes Map {"$ _ / n"} @Text;

Print Changes "/ N / N / N";

Close Changes;

}

Else

{

Print "Cannot Open $ CHANGES. / N";

}

}

}

@@ -420, 22 414, 29 @@

SUB mail_notification {

My @Text = @_;

- # this is turned off since The to: line Go overboard.

- # Also it has bit-rotted since, and can't just be switched on again.

- # - But Keep it for the time being in case we do something like cvs-stable

- # my @mailaddrs = & read_logfile ($ lognames_file);

- # Print (Mail 'to: CVS-Committers'. $ DOM. ", cvs-all". $ dom);

- # Foreach $ line (@mailaddrs) {

- # Next IF ($ unique {$ line});

- # $ UNIQUE {$ line} = 1;

- # next if / ^ CVS - /; - # Print (Mail ",". $ line. $ dom);

- #}

- # Print (Mail "/ n");

IF (! & cfg :: sendmail_acl_check ())

{

Print "Mail Sent from $ cfg :: Committer is blocked./N";

Return 0;

}

my% unique = ();

my @mailaddrs = & read_logfile ($ mailnames_file);

# ok, this is Kinda Hokey, But I Need to Break Up Lines with Multiple Addresses

MY $ Fu = Join ("", @mailaddrs);

@mailaddrs = split "", $ Fu;

MY $ TO = "";

foreach my $ category (@mailaddrs) {

Next IF ($ unique {$ category});

$ UNIQUE {$ Category} = 1;

$ TO. = "" Unless $ TO EQ ""

$ TO. = $ category;

}

My @Email = ();

- My $ to = $ cfg :: mailaddrs;

Print "Mailing the commit message to '$ to' ./ n";

Push @Email, "To: $ to" if $ cfg :: add_to_LINE;

@@ -497, 10 498, 14 @@

}

# Send the email.

- Open Mail, "| $ cfg :: mailcmd $ to"

- Or Die "Please check $ cfg :: mailcmd.";

- Print Mail Map {"$ _ / n"} @email;

- Close Mail;

IF (fork () == 0)

{

Open Mail, "| $ cfg :: mailcmd -f $ cfg :: Committer $ to"

or Die "please check $ cfg :: mailcmd.";

Print Mail Map {"$ _ / n"} @email;

Close Mail;

}

exit (0);

}

@@ -634, 8 639, 9 @@

#

# Ositialize Basic Variables

#

MY $ SEPARATOR = ",,";

MY $ INPUT_PARAMS = $ Argv [0];

-my ($ DIRECTORY, @filenames) = split "", $ INPUT_PARAMS;

My ($ Directory, @filenames) = split / $ {separator} /, $ infut_params; # @ files = split (', $ input_params);

my @Path = Split ('/', $ DIRECTORY);

@@ -660, 8 666, 9 @@

}

# WAS Used for To: Lines, Still Used for Commitlogs Naming.

- & append_line ($ lognames_file, & get_log_name ("$ DIRECTORY /"));

- & append_line ($ SUBJ_FILE, "$ DIRECTORY". Join ("", sort @filenames));

& append_line ($ lognames_file, & cfg :: get_log_name ("$ DIRECTORY /"));

& append_line, & cfg :: get_mail_name ("$ DIRECTORY /"));

& append_line ($ subj_file, "$ DIRECTORY / (". Join (",", sort @filenames). ")");

#

# Check for a New Directory First. This will always Appear as a

@@ -697, 7 704 ,7 @@

& do_changes_file (@Text);

& mail_notification (@Text);

- System ("/ usr / local / bin / awake", $ DIRECTORY);

# system ("/ usr / local / bin / awake", $ DIRECTORY);

& clenup_tmpfiles ();

Exit 0;

}

@@ -742, 7 749, 28 @@

}

# OtherWise Collect Information About Which Files Changed.

- my @files = split;

my @tmpfiles = split;

MY $ STRNAME = ""

my @files;

While (My $ item = shift (@tmpfiles))

{

IF ($ STRNAME EQ "")

{

$ STRNAME = $ Item;

}

Else

{

$ STRNAME. = "$ itm";

}

for (MY $ I = 0; $ I <= $ # filenames; $ i )

{

IF ($ STRNAME EQ $ Filenames [$ I])

{

Push (@files, $ strname);

$ STRNAME = "";

} }

}

Push @ {$ CHANGED_FILES {$ Tag}}, @files if $ state == $ state_changed;

Push @ {$ added_files {$ tag}}, @files if $ state == $ state_added;

Push @ {$ removed_files {$ tag}}, @files if $ state == $ state_removed;

@@ -896, 7 924 ,7 @@

& mail_notification (@log_msg);

}

-system ("/ usr / local / bin / awake", $ DIRECTORY);

# system ("/ usr / local / bin / awake", $ DIRECTORY);

& clenup_tmpfiles ();

Exit 0;

# Eof

Store the temporary file of the email address;

Avoiding $ RCSFile gets failed when including spaces in the file name;

This function is moved to the cfg.pm module, which is a sub-process of the module;

Did not find the logging file, issue a warning, not interrupted;

Read the hash table @mail_map, get the email address to which the change code needs to be sent;

Send an email, set the sender $ cfg :: committer;

Field separator, should match the commands specified in the loginfo file!

Use custom field separators to avoid failure of file names due to file names in the file name;

This function has been moved to the module cfg.pm;

Set the list of recipients;

Set the email header;

File CVSROOT / TAGINFO executes this script before executing the tag / RTAG command, if the script returns a non-zero value, the Tag / RTAG action is canceled. Related scripts: cvsroot / tagcheck. Responsible for controlling the Add / Remove TAG Event - Allow / Disable / Send Mail. Due to the TAG / RTAG event is not like a commit event, it is not completed by a plurality of scripts, but only through a script taginfo. This will have a problem: if you tag TAG for a directory tree, you may have a script multiple times, you might want to trigger email multiple times. My solution is that according to the PID of the TAG process determines the unique file name throughout the process, record the log to the file, the taginfo script itself cannot know if it ends, but the system regularly performs script cvsroot / checkmailspool.sh from crontab. Check if there is a completed TAG message needs to be out.

#! / usr / bin / perl -w

#

# Author: jiang xin

# Reason: http://www.worldhello.net/

#

Use strict;

Use lib $ env {cvsroot};

Use cvsroot :: cfg;

######################################################################################################################################################################################################################################################################################################## ###########

#

# Main body

#

# Tag Add / MOV / DEL REPO FILES ...

# $ 1 $ 2 $ 3 $ 4 ...

#

######################################################################################################################################################################################################################################################################################################## ##########

MY $ TAG = Shift;

MY $ Action = Shift;

MY $ repos = shift;

MY $ fileItem = ""

MY $ fileEREV = "";

MY $ fileList = "";

MY $ uid = $ cfg :: committer;

MY $ UserList = ""

MY $ PATTERN = ""

MY $ permission = 1;

MY $ TO = ""

MY $ TMPSTR = & CFG :: get_mail_name ($ REPOS);

$ tmpstr = ~ s @@/./g;

$ tmpstr = "Nobody" unless $ TMPSTR;

MY $ mailfile = "/var/spool/cvsmail/cvs.tag.tmpstr. /cfg::ps";

Die "Usage: tagcheck tag action repos files ... / n" unless $ repos;

For my $ i (0 .. ($ # cfg :: tag_map - 1) / 2) {

$ UserList = $ cfg :: tag_map [$ I * 2];

$ pattern = $ cfg :: tag_map [$ I * 2 1];

IF ($ TAG = ~ / $ PATTERN / I)

{

IF ($ UserList = ~ // B $ uid / b / i)

{

$ permission = 1;

Last;

}

Else

{

$ permission = 0;

Last;

}

}

}

IF ($ permission == 0)

{

# Normal Uses Can not do do this.

Print stderr "user /" $ cfg :: Committer / "canot perform this operation! / n";

Print stderr "Only Users": $ userlist, can handle tag patterm: / "$ pattern /"! / n ";

}

While ($ fileItem = shift)

{

$ FileRev = Shift;

$ fileList = Sprintf ("% s / t% -24s: / t% s / n", $ fileEList, $ fileItem, $ filerev);

}

Print "Save Message in Spool` Dirname $ MAILFILE` ... / N ";

My @Email = ();

IF (! -e $ mailfile)

{

$ to = & cfg :: get_mail_name ($ REPOS);

Push @Email, "from: $ uid <$ uid>";

Push @Email, "To: $ TO";

$ Tmpstr = Sprintf ("Date:% S", `Date -R`);

CHOMP $ TMPSTR;

Push @Email, $ TMPSTR;

IF ($ permission == 0)

{

Push @Email, "Subject: CVS Tag Failed! ($ ACTION $ TAG ON $ REPOS)";

}

Else

{

Push @Email, "Subject: CVS Tag Success: $ ACTION $ TAG ON $ Repos";

Push @Email, "";

Delete $ env {'TZ'};

$ tmpstr = Sprintf ("% - 11s:% -8s", "author", $ cfg :: committer;

Push @Email, $ TMPSTR;

$ tmpstr = Sprintf ("% - 11s:% -8s", "date", `/ bin / date "% y /% m /% D% h:% m:% s% z "`);

CHOMP $ TMPSTR;

Push @Email, $ TMPSTR;

$ tmpstr = Sprintf ("% - 11s:% -8s", "tag", $ tag);

Push @Email, $ TMPSTR;

$ Tmpstr = Sprintf ("% - 11s:% -8s", "operation", $ action);

Push @Email, $ TMPSTR;

Push @Email, "";

Push @Email, "$ cfg :: mailbanner", "" IF $ cfg :: mailbanner;

}

IF ($ permission == 0)

{

Push @Email, "Permission Denied: $ ACTION $ TAG ON $ Repos!";

Push @Email, "------------------------------------------- ----- ";

}

Else

{

$ Tmpstr = Sprintf ("% - 11s:% -8s", "repository", $ repos;

Push @Email, $ TMPSTR;

Push @Email, $ filelist if $ filelist;

}

#save mail to spool

Open Mail, ">> $ mailfile"

Or Die "Cannot Open File $ MAILFILE for APPEND."

Print mail map {"$ _ / n"} @email;

Close Mail;

IF ($ permission == 0)

{

EXIT 1

}

Else

{

EXIT 0

}

Determine the unique file name of the process;

@CFG :: Tag_map array defines the Tag name that requires permission control, as well as a list of authorizeders. The limited TAG name corresponds to a milestone in software development, and strict permission control. The TAG that matches the pattern can only be operated, and all users can operate.

The email address is also obtained from the mail_map array;

File cvsroot / checkmailspool.sh, add to crontab scheduled, check the messages generated by TagCheck.

#! / bin / sh

# Checkmailspool.sh

# Auther: jiang xin

#

# $ Cvsmailpath (cvs mailpath "is a spool directory created by user,

# and cvs tag message will store in it. # Run this Script Timely to Check Cvsmail Spool and send Messages ...

# please put this script in crontab.

Cvsmailpath = / var / spool / cvsmail

IF [! -D $ cvsmailpath]; then

MKDIR -P $ CVSMAILPATH

CHMOD 777 $ CVSMAILPATH

Fi

CD $ CVSMAILPATH

For i in `ls`; do

PID = `Echo $ I | Sed -e" S /. * ([0-9] * /) $ // 1 / "`

XXX = 0

While PS -P $ PID> / dev / null; do

XXX = `EXPR $ xxx 1`

IF [$ xxx -gt 10];.

Break

Fi

Sleep 3

Echo Waiting $ PID, $ XXX Times ...

DONE

Echo -e "/ n / n =================================================="> > $ I

Echo -e "end / n" >> $ I

Cat $ i | sendmail -oi -oem -odb -t

RM -F $ I

DONE Clear CVSROOT's temporary file or more CVSROOT will generate a lot of temporary files in the interim directory during execution. If not cleaned, not only the disk space is wasting, but it is more likely to send Zhang Guan Li Dai's error message. Configure the following scripts per hour in crontab:

# / bin / sh

CD / TMP

Ls /#cvs.files.* | sed -e 's // # cvs.files./([0-9]*/ )/..*! /1/g' | sort -u | /

While Read XXX; Do IF PS --PID $ XXX> / DEV / NULL 2> & 1; THEN Continue; Fi; /

RM -F /TMP//#cvs.files. - DONE

2.2. StarTeam server permission settings

Each server configures a separate user database setting. The user's permissions are flexible, and the native account setting is independent (without setting up a local account), and the local path is independent.

2.2.1. User Management

If the Lockout function is enabled, two system administrator accounts are required to prevent one locked (such as multiple error logins, indefinitely deadlock), can use another unlock. Group Principles (assuming group named Team1)

Establishing a user group and subgroup assumes a group name called Team1, first establish a large group of GA_TEAM1 groups; then build three Child Group: g_team1_admin group under Team1 group, g_team1_users group, and g_team1_rdonly group (ie read-only group). Construction of the group considering the assignment of permissions to the group, which is the basic principle of administrative privileges. Because STARTEAM is given to permission, it is mixed with the username and group name, so prefix "G_" or "Ga_" is added to the group name. Distinguish G_ and Ga_ because it is necessary to prevent the permissions to be set to a larger GA_ group (as will be described later). Group administrators belong to the g_team1_admin group, with management Label permissions, create new views, and management code permission allocation permissions; STARTEAM administrators are authorized to reduce STARTEAM administrators' management burden. Improve efficiency. Other users of the group belong to the g_team1_users group, in addition to the administrative permissions of the g_team1_admin group, other privileges are g_team1_admin. For other users with progressive code or mastery, such as QA, department leadership, etc. belong to the g_team1_rdonly group, in addition to reading code permissions, other than ALL users. Building a project group GA_PROJECT_MANAGER is independent of the project group (or considering each project group separately) to perform project management. To change the demand, G_PM_REQ is established under it; to manage TODO LIST, establish a g_pm_todo group. When allocating permissions, be careful not to give the permissions to large groups (such as GA_TEAM1 groups). Because the Team1 group includes a g_team1_rdonly group (read-only user group)!

About the permissions of the group itself In addition to the Administrators group, any group does not set the privilege of the group, so as to avoid group permission settings beyond the security settings of the project, so that the security settings of the project are shaped. Regarding the release of the release of the CHECK IN / Check OUT that uses a separate user on the UNIX command line, you need to create an independent user, such as: Team1_Release. So from the case of using the same username at different workstations CHECK code, the file status unknows is caused. See the FAQ on the file status unknown in StarTeam HowTo.

2.2.2. Server configuration security settings

StarTeam VTS start-up mode Set to the NT service to ensure that the Starteam starts automatically after the server is restarted. StarTeam server side configuration

General Setting up for 60 seconds, no action is 300 minutes. AUDITS settings only retain 10 days of security logs. Vault settings do not clear the file status table; set the maximum Cache to 400MB. Set Cache's folder outside of the Valut folder to distinguish (not backup cache) for Cache when backup. Notifications Enable Email Notifications. Protocal only retains a protocol support: TCP / IP (Sockets), because other protocols support problems; TCP / IP encryption level: not set, but administrators want to inform users, if the client supports transfer encryption, please select RSA R4 stream encryption. All Windows clients are supported, but the UNIX command line does not support. Access Rights Administrator's full permissions and does not give any other privileges. System Policy Access Rights Enables Ignore Object Ownership, ie ignores Ownership, and everything is set according to permission. Do not choose Ignore Group Privileges, that is, if only the Administrators group has set uplihood, the Administrators group users are allowed to perform permission restrictions to transcend items. Security Events Settings only for 30 days of security daily values. Passwords sets the key minimum length of 6 characters. In the user management (User Manager), set all users to log in to the password and do not set the empty password. Logon Failures set 5 failed login lock account, the account is locked for 5 minutes.

2.2.3. Project permission settings

First open the project you want to configure, Project-> Access Rights to set the project permissions.

PROJECT

All users set all users (all users) have the following permissions: See Project and property G_xxx_admin Settings group administrators (such as: g_team1_admin group) have the following permissions: assignment all permissions except DELETE PROJECT. To make the administrator to modify its own permissions, add the deletion of Label permissions, but pay attention to the default, the administrator does not give administrators, and when the administrator completes the corresponding management function, restore the original.

Can't give anyone to delete engineering permissions! Because the engineering deletion is irreversible.

Views

All users set all users (all users) have the following permissions: See View and ITS Properties g_xxx_admin setting group administrator (such as a g_team1_admin group) has the following permissions: assuming all permissions except DELETE VIEW, Delete Labels.

Delete View, delete labels is irreversible, so do not give anyone this permission. However, in order to alleviate the administrator burden, G_TEAM1_ADMIN Group Change View Security Set, g_team1_admin can modify its own permissions, enabling the delete label, even delete View permissions, but pay attention to the two permissions immediately after completing the maintenance feature!

Child Folders

G_team1_rdonly group Sets the read-only group (such as a g_team1_rdonly group) has the following permissions: SEE Folder and ITS Properties, See Folder History, See Folder Links Permissions. G_TEAM1_USERS Group Sets the normal user group (g_team1_users group) has the following permissions: except the Modify Folder Properties, DELETE FROLDER FROM PARENT Folder, all permissions outside the Change Folder Security Set. G_team1_admin Group Setting group administrators (such as: g_team1_admin group) has the following permissions: All permissions except DELETE FROLDER FROM PARENT Folder. Filesg_team1_rdonly group Sets the read-only group (such as: g_team1_rdonly group) has the following permissions: SEE File and ITS Properties, See File History, See File Links, Check Out Files Permissions. G_TEAM1_USERS Group Sets the normal user group (g_team1_users group) has the following permissions: except all permissions outside the Change File Security Set. G_team1_admin group Setup group administrator (such as: g_team1_admin group) has the following permissions: all permissions.

Move Folder Out of a View or Project Permissions are also dangerous operations, and files are removed from the historical view, and the integrity may be destroyed. However, moving files or directories to another view is the only way to delete files from the server. So use it with caution.

Change request

All users add all users (all users), setting permissions to empty. That is, all strategies are prohibited by default.

The permissions of the project permission settings are used to determine the default settings of the project. That is, the default security settings when the individual permission settings are not set. Define Change Request as the default prohibition, the purpose is to add Change Request only on the specified directory.

Topics

All users Set All User (All users) has the following permissions: Settings All permissions except "Change Topic SECURITY SET", "Delete Topic from Folder". Provides users discuss with Topic and save a memo. Setting group administrators (such as: g_team1_admin group) has all permissions.

2.2.4. View permission settings

First open the view you want to configure, View-> Access Rights to set the view permissions.

The root view can not set permissions, inheriting the permissions settings of the project Accessright in the entire project. Branch view is set on demand. Old versions can be done by others, or to develop greater permissions for developers (non-administrators).

2.2.5. Permission settings for folders

Select the appropriate folder under the view, right-click, select Advanced-> Access Rights, set permissions.

You need to set the "root directory" permission first. The permissions of each primary subdirectory (DEFECT, SRC, DOC, etc.) are set separately. If you need to set permissions for the secondary directory, etc., but it is not recommended to set the permission of the secondary directory. The root directory root directory and subdirectories are equivalent to permission settings

The permission of the root directory is not passed, ie the permissions set on the root directory have no effect on the sub-views; not the root directory deliver permissions, so try not to set permissions on the subdirectory (non-root ", so as not to affect others The permissions of the directory in the view cause confusion. The root directory inherits the view or the product of the CHILD FOLDER permission; the subdirector is first inherited by the root directory permissions, then inherits the view, project privileges. Therefore, do not set the Child Folder page of the right page of the root directory, so that the subdirectory that does not set permissions can inherit the permission of the view's Child Folder page. However, you may need to set the Folder page for the root directory page, because this Folder's permissions are defaulted from the Child Folder settings of the project. If the permissions of the subdirectories are larger than the settings of the view or the work of Engine, you need to set this folder settings. However, side effects is that the permissions of subdirectory do not completely inherit the more stringent settings of the project, but a combination of Subfolder settings for the root directory (because Subfolder permissions are available). This is likely to access the entire directory tree that can access the root directory! ! ! It seems that there is no better solution. Permissions settings on the root directory:

This Folder All Users: All users (All users) have See Folder and ITS Properties, See Folder History, See Folder Links Permissions. g_team1_admin: Group administrator (g_team1_admin) has: All permissions except DELETE Folder from Parent Folder. Child Folders, Files, Change Requests, Tasks, Topics are not set to inherit views or project permission settings. Defect directory

This Folder All Users: All users (All users) have - See Folder and ITS Properties, See Folder History, See Folder Links Permissions. G_QA_ADMIN: QA group administrator (g_qa_admin) has all permissions except the Delete Folder from Parent Folder. g_team1_admin: Team1 Group Administrator (g_team1_admin) has all permissions except DELETE Folder from Parent Folder.

Set the service QA administrator and Team1 directory management permissions, allow the QA administrator to build a subdirectory for CR categorization.

Child Folders All Users: All users (All users) have -See Folder and ITS Properties, See Folder History, See Folder Links permission. G_QA_ADMIN: QA group administrator (g_qa_admin) has all permissions except the Delete Folder from Parent Folder. g_team1_admin: Team1 Group Administrator (g_team1_admin) has all permissions except DELETE Folder from Parent Folder. Change Requests All Users: All users (All users) - All permissions except Change Cr Security Set, Delete Cr from Folder. G_QA_ADMIN: QA group administrator (G_QA_ADMIN) has - all permissions except DELETE CR ALDER. To mitigate the administrator burden, G_QA_ADMIN Group Change CR Security Setting Permissions, g_qa_admin can modify the permissions of Change Request to be deleted, then delete the Cr.

Files, Tasks, Topics don't set permissions, inherit the view, or the project's permissions. The src directory src directory is used to store directory of source code, and pay attention to this directory authority setting. You can do any separate settings because the views or project permission settings are inherited. If an engineering or view is secure enough about the permissions of the file, you may not have to set this directory permission. ProjectManagement Directory ProjectManagement Directory for storage TODO_LIST, programming specification, demand changes in file and TOPIC form.

ProjectManagement catalog

This Folder All Users: All users have - See Folder and ITS Properties, See Folder History, See Folder Links Permissions. GA_PROJECT_MANAGER group: Has a DELETE Folder Properties, DELETE FROM PARENT Folder, all permissions outside the Change Folder Security SET. G_Team1_admin Group: Have all permissions except the Delete Folder from Parent Folder. Child Folders All Users: All users have - See Folder and ITS Properties, See Folder History, See Folder Links Permissions. GA_PROJECT_MANAGER group: Has a DELETE Folder Properties, DELETE FROM PARENT Folder, all permissions outside the Change Folder Security SET. G_Team1_admin Group: Have all permissions except the Delete Folder from Parent Folder. Files All Users: Have - SEE File and ITS Properties, See File History, See File Links, Check Out Files Permissions. GA_PROJECT_MANAGER: The normal user group has all permissions except Change File Security Set, Delete Fer from Folder. g_team1_admin: Group administrator has - all permissions outside DELETE FILE from Folder. Topic All Users: All permissions except Change Top Security Set, Delete Topic from Forder. g_team1_admin: Has - All permissions except DELETE TOPIC FROM FORDER. Change is not set, and the configuration is disabled using the engineering default. TODO LIST subdirectory All users have read-only files, read and write Topic permissions; g_pm_todo groups and g_team1_admin groups have read and write files, read and write Topic, and finishing directory permissions. Programming Specification All users have a directory, read and write Topic permissions; g_team1_admin has more permissions of a management file. Demand Change All users have read-only files, read-only TOC permissions; g_pm_req groups and g_team1_admin groups have read and write files, read and write Topic, and organize directory permissions. 2.2.6. STARTEAM server optimization

2.2.6.1. Improve database performance

The database can have a variety of options, but Access can basically meet the requirements, although there is a 1.2G file size limit, but general application will not exceed. The selection of the database is not a performance bottleneck. Install and use Copy Indexes Tools in "StarTeam Virtualteam Server 4.0 / Tuning Scripts / MS Access / Package". Compressed databases; (ODBCàSystem DSN) Adds the Max Buffer Size of the Database from 2048 to 8192, Threads from 3 to 24. For other databases, see http://devforum.starbase.com/starbase/main.asp2.2.6.2. Improve StartEAM Server Performance

Increase the Cache directory file size to 400m; save the file status table Decrease from 180 days to 30 days; change the audit export time from no derive change to 30 days; on the client Setting Allow Check Out of Deltas "Tools | Workstation | Files "Optimize for Slow Connection." See http://devforum.starbase.com/starbase/Articles/default.asp?id=206

2.2.6.3. Backup

Backup involves:

The Configuration and cipher files Configuration / server.scg Configuration / server.cph Database files Database / StarTeamDB.mdb (Assuming Access database) Vault: Archive dir: * * Attachments dir:.. * * Optional Cache dir: * *.

See http://devforum.starbase.com/starbase/articles/default.asp?id=133

3. CVS vs. StarTeam - server side storage

3.1. CVS server side store

$ PWD

/ Repos / Local

$ ls -l

Total 0

DRWXR-XR-X 3 Administ None 0 DEC 14 20:59 cvsroot

DRWXR-XR-X 12 Administ None 0 Dec 29 21:47 Worldhello

$ ls cvsroot

EmptyDir Commitinfo, V Cvswrappers, V loginfo Notify RCSINFO, V VAL-Tags

CheckoutList Config Editinfo Loginfo, V Notify, v readers VerifyMSG

CheckoutList, V CONFIG, V Editinfo, V Modules Passwd Taginfo VerifyMSG, V

Commitinfo Cvswrappers History Modules, V Rcsinfo Taginfo, V

$ cd worldhello

$ ls -f

BIO / DOCBOOK / HTML / INC / LIFE / RESOURCE / UTILITY /

Daily, V Favorite / Images / Index.html, V Make, V Sports / $ Head Index.html, V

HEAD 1.1;

BRANCH 1.1.1;

ACCESS;

Symbols Start: 1.1.1.1 Jiangxin: 1.1.1;

STRICT;

Comment @ # @;

1.1

Date 2002.12.29.13.47.00; author jiangxin; state exp;

It can be seen that the server-side storage and client of CVS is one or one, the tree file system.

3.2. StarTeam server side store

The following extension is in the Win2K platform, output on the Cygwin command line.

StarTeam's database

$ PWD

/d/.repos/starteam/johnson/database

$ ls -l

-rw-r - r - 1 administ none 2101248 Sep 5 20:22 StarTeamdb.mdb

Version control file

$ PWD

/D/.repos/starteam/johnson/vault/rchive

$ ls -f

000000 聽 000 000 000c 00000012 000018 0000001E 00000024 0000002A

00000001 000,0007 000000d 0000001F 00000025 0000002B

00000002 00000008 0000000E 00000014 0000001a 00000020 00000026

00000003 00000009 0000F 00000015 0000001B 00000021 00000027

00000004 0000000A 00000010 00000016 0000001C 00000022 00000028

00000005 0000000B 00000011 00000017 0000001D 00000023 00000029

Cache

$ PWD

/D/.repos/starteam/cache/johnson

$ ls -f

00000000.1 00000001.3 00000007.1 000011.1 0000001B.1 00000025.1

00000000.2 00000001.4 00000008.1 00000012.1 000001C.1 00000026.1

00000000.3 00000001.5 00000009.1 00000013.1 0000001D.1 00000027.1

00000000.4 00000001.6 0000000A.1 00000014.1 N00001E.1 00000028.1

00000000.5 00000002.1 N00000B.1 00000015.1 0000001F.1 00000029.1

00000000.6 00000002.2 000000c.1 00000016.1 00000020.1 0000002A.1

00000000.7 00000003.1 q.1 00000017.1 00000021.1 0000002B.1

00000000.8 00000004.1 N00000E.1 00000018.1 00000022.1

00000001.1 00000005.1 N00000F.1 00000019.1 00000023.1

00000001.2 00000006.1 00000010.1 0000001A.1 00000024.1 It can be seen that STARTEAM server-side storage and client are completely different, and server-side file storage structures are planar structures. The file name and the actual physical storage correspond to the database.

4. CVS vs. StarTeam - Client Settings

4.1. CVS client settings

Set the cvsroot environment variable or the command line specified

# Such as:

Export cvsroot =: pserver: jiangxin@10.0.0.152: / home / repos-user

# Or:

CVS -D: PServer: jiangxin@10.0.0.152: / home / repos-user login

The following CVS command line is intended to assume that the environment variable CVSROOT has been set.

Log in, record your password locally

CVS login

#, Password automatically saved in $ HOME / .CVSPASS

# Cat $ homen / .cvspass

: pserver: releng@10.0.0.61: / lt / repos xxxx

: pserver: yzw@10.0.0.0.61: / lt / repos xxxxx

: pserver: yzw@10.0.0.152: / home / repos-user xxx

: pserver: jiangxin@10.0.0.0.61: / repos / home xxxxxx

: pserver: jiangxin@10.0.0.152: / home / repos-user xxxxx

: pserver: anonymous@10.0.0.152: / home / repos-user xxxxx

: pserver: anoncvs@anoncvs1.ca.openbsd.org: / cvs xxxxxx

: pserver: anoncvs@anoncvs.freebsd.org: / home / ncvs xxxxxxxx View existing modules in CVS CVS Co -c

# CVS -D: PServer: jiangxin@10.0.0.152: / home / repos-user co -c

CvsRoot CvsRoot

All-in-One Pub / Docbook

Johnson -a Jiangxin

Wuzj wuzj & docbook / ltfw_changes will block the module Checkout to local

# CVS -D: PServer: jiangxin@10.0.0.152: / home / repos-user co -d johnson_homepage jiangxin will: pserver: jiangxin@10.0.0.152: / home / repos-User Module Jiangxin Checkout to local Johnson_HomePage directory. Local configuration file CVS records the version of the source file by saving configuration information (CVS directories) at the same time

# pwd

/ home / jiangxin / work / johnson_homepage

# ls -l cvs

Total 14

-rw-r - r - 1 root jiangxin 4786 Sep 5 10:32 Entries

-rw-r - r - 1 root jiangxin 9 jul 23 10:01 repository

-rw-r - r - 1 root jiangxin 43 Jul 23 10:01 root

# Cat CVS / Repository

Jiangxin

# cat cvs / root

: pserver: jiangxin@10.0.0.152: / home / repos-user

4.2. StarTeam client settings under our own, (earlier by Yang Zhiwei package, after johnson rewriting), packaged StarTeam command line Wrapper as an example to introduce:

Configure with ST Config

# cd / home / jiangxin / work / src / project

# MKDIR BRANCH1

# cd branch1

# pwd

/ home / jiangxin / Work / SRC / Project / Branch1

# st config

StarTeam Configuration

Original StarTeam Server IS 10.0.0.60

New Server: [10.0.0.60]

Original StarTeam Server Port IS 49201

New Server Port: [49201]

Original UserName IS

New username: [] jiangxin

PASSWORD: [********]

CONFIRM: [********]

Original Checkout Project Is Project

Project you want to checkout: [Project]

Original Checkout View IS ("/" Means Root View)

View you want to checkout: [] BRANCH_2_4

Original Checkout Folder IS ("/" Means Root Folder)

Folder you want to checkout: [] developments

Working Dir IS / USR / Home / Jiangxin / Work / SRC / Project / Branch1

Your Working Directory: [/ usr / home / jiangxin / work / src / project / branch1]

Sticky Tag Base on Date: ("/" Means NOT)

Date: []

Sticky Tag Base On Label: ("/" Means NOT EXIST)

Label: []

Sticky Tag Base On Promotion-State: ("/" Means NOT)

Promotion-state: []

# Cat .starteam.ini

# StARTEAM Configuration: /usr/Home/jiangxin/Work/src/project/branch1/.starteam.ini

# /usr/Home/jiangxin/Work/src/project/branch1/.starteam.ini

Stuser = "jiangxin"

STSERVER = "10.0.0.60"

STPORT = "49201"

StProject = "Project"

STVIEW = "branch_2_4"

STFOLDER = "development"

STCFGD = ""

STCFGL = ""

STCFGP = "" "

STWORKROOT = "/ usr / home / jiangxin / work / src / project / branch1"

The user login password is saved in the user's home directory to complete it with the ST CONFIG configuration, or after logging in with the command ST login, the user password is automatically saved in $ home / .stpass

# Cat $ homen / .stpassreleng: 10.1.1.60: 49201: XXXXXXXXXXXXXXXXX

JIANGXIN: 10.1.1.60: 49201: XXXXXXXXXXXX

JIANGXIN: 10.0.0.6: 49201: XXXXXXXX will code Checkout to local

# pwd

/ home / jiangxin / Work / SRC / Project / Branch1

# st co

Folder: Development (Working Dir: / usr / Home / Jiangxin / Work / src / Project / Branch1)

Makefile: Checked Out

....... The files under the view specified by the configuration file. StarTeam.ini file, Checkout to local

If you don't want to check all modules Checkout to local, you can run the command ST CD first, you will use the entire directory structure Checkout to the local, then run St Co Directory, only checkout.

Local Profile StarTeam is not like CVS, saving configuration information (CVS directories) at the same time, and saves the version of the source file, but directly in the database of the server. The database is distinguished by the host ID to distinguish between different / identical users in the same / different host path. Command Route $ HOME / .STARTEAM Save Configuration Information and other configuration information. A graphical interface is similar. StarTeam CLI Wrapper requires additional configuration files: .starteam.ini, because the command line does not provide a simple way to read the server-side database.

5. CVS vs. StarTeam - Common version control operation

Table 1. CVS, StarTeam common command comparison

CVS Command StarTeam Command Description CVS Co -d "2002-09-2 20:05" LTFILTER ST CO --CFGD "12/29/97 10:52 am" * Checkout Code CVS Up -L St Up -l only more in this directory, not updating subdirectory cvs up -a st up -a update to the latest code, for CVS, if it is a branch view, you want to use "-r " CVS Up -R

ST UP -R

Checkout a Tag / Label code CVS Ci -m "commit log ..."

ST CI -M "commit log ..."

Checkin file st ci -m "commit log ..." - Filter M checkin status for modified file cvs add -kb

CVS commit -m "file add log ..." St ADD

Add new file CVS Remove

CVS commit -m "file remove log ..." st delete-local

(Delete local files)

St Remove-Repos

(Delete server file)

Delete file CVS Diff -c -R 1.5 -R 1.7

ST DIFF -R 1.5 -R 1.7

Compare file

1.5 and 1.7 version difference

CVS STATUS -V

View current label cvs log

| more

ST log

| more

View commit logs. Cvs -n up -l st list -l Display current directory file status CVS Co -c display module / engineering name CVS RTAG [-r

]

St New-ViewLabel - Label

St label --Label

Tag / Label CVS RTAG -B [-R

]

Graphical interface creation branch cvs -d: pserver: jiangxin@10.0.0.217: / repos init s new-viewlabel --Label

St label --Label

Tag / Label CD WDIR CVS IMPORT -M "Imported Sources" YOYODYNE / RDIR YOYO START Establish a new project

6. CVS vs. StarTeam - Module Sharing

6.1. Sharing of files and directory in CVS

The client records the storage information through a local configuration file (files in the cvs directory), so you can maintain multiple projects, different branch code, or even code of different CVS servers can be maintained under a directory tree of the client.

You can also configure files with server-side configuration files: cvsroot / modules, combine different directories into separate modules, eliminating the cumbersome of the client multiple Check under a directory tree.

The following two ways CHECK code is equivalent, but it is obviously the first way.

Method 1: Control through the server-side MODULES configuration file

# CVS -D: PServer: jiangxin@10.0.0.152: / home / repos-user co cvsroot

# cd cvsroot

# vi modules

######## Modify Modules File As The Follows:

Johnson_HomePage Jiangxin / Web & Docbook / Project & Docbook / NightlyBuild /

& DocBook / PM_fw_PLAN_2_4 & DocBook / Steam_Trans /

& docbook / docbook_howto & docbook / pgp & docbook / program_rules /

& docbook / tip_sysconfig & docbook / images & docbook / pm_fw_diaary_2_4 /

& docbook / rd_hwenv & docbook / steam_admin & docbook / tip_sysinstall /

& docbook / length_scm & docbook / pm_fw_module_debug /

& docbook / steam_howto

# CVS -D: PServer: jiangxin@10.0.0.152: / home / repos-user co -c

# Display the contents of the server-side configuration file modules

# CVS -D: PServer: jiangxin@10.0.0.152: / home / repos-user co -d web johnson_homepage

# Checkout code

Method 2: Different Checkout action implementations are performed by different catalogs under the directory tree under the client.

# CVS -D: PServer: jiangxin@10.0.0.152: / home / repos-user co -d web jiangxin / Web

# cd web

# ls

# MKDIR Docbook

# cd docbook

# cvs -d: pserver: jiangxin@10.0.0.152: / home / repos-user co -d project DocBook / Project

# CVS -D: PServer: jiangxin@10.0.0.152: / home / repos-user co -d nightlybuild docbook / nightlybuild # cvs -d: pserver: jiangxin@10.0.0.152: / home / repos-user co -d pm_fw_PLAN_2_4 Docbook / PM_FW_PLAN_2_4

# CVS -D: PServer: jiangxin@10.0.0.152: / home / repos-user co -d steam_trans docbook / steam_trans

# CVS -D: PServer: jiangxin@10.0.0.152: / home / repos-user co -d docbook_howto docbook / docbook_howto

# CVS -D: PServer: jiangxin@10.0.0.152: / home / repos-user co -d pgp docbook / pgp

# cvs -d: pserver: jiangxin@10.0.0.152: / home / repos-user co -d program_rules docbook / program_rules

# CVS -D: PServer: jiangxin@10.0.0.152: / home / repos-user co -d tip_sysconfig docbook / tip_sysconfig

# CVS -D: PServer: jiangxin@10.0.0.152: / home / repos-user co -d images DocBook / images

# CVS -D: PServer: jiangxin@10.0.0.152: / home / repos-user co -d pm_fw_diary_2_4 docBook / PM_fw_diaary_2_4

# CVS -D: PServer: jiangxin@10.0.0.152: / home / repos-user co -d rd_hwenv docbook / rd_hwenv

# CVS -D: PServer: jiangxin@10.0.0.152: / home / repos-user co -d steam_admin docbook / steam_admin

# CVS -D: PServer: jiangxin@10.0.0.152: / home / repos-user co -d tip_sysinstall docbook / tip_sysinstall

# CVS -D: PServer: jiangxin@10.0.0.152: / home / repos-user co -d length_scm docbook / length_scm

# CVS -D: PServer: jiangxin@10.0.0.152: / home / repos-user co -d pm_fw_module_debug docBook / PM_FW_Module_debug

# CVS -D: PServer: jiangxin@10.0.0.152: / home / repos-user co -d steam_howto docbook / steam_howto

Server-side directory structure

# pwd

/ home / repos-user

#mtree-cin -k type

# User: jiangxin

# Machine: OpenBSD

# tree: / usr / home / repos-user

# Date: Tue Sep 10 21:34:26 2002 / SET TYPE = DIR

.

CvsRoot

EMPTYDIR

.

.

Docbook

PROJECT

.

Docbook_howto

.

Images

Callouts

.

.

Lession_scm

.

NightlyBuild

.

PGP

Images

.

.

PM_fw_diaary_2_4

.

PM_FW_MODULE_DEBUG

.

PM_FW_PLAN_2_4

ATTIC

.

.

Program_rules

.

RD_HWENV

.

Samples

.

Steam_admin

.

Steam_howto

Images

.

.

Steam_Trans

.

TIP_SYSCONFIG

.

Tip_sysInstall

Images

.

.

.

Jiangxin

TEXT

Apache

.

Config.neetwork.linux

.

Db.mysql

.

db.racle

ATTIC

.

.

DNS.Bind

.

Email.qmail

.

Kernel.linux

.

Security.linux

.

SECURITY.SSH

.

Utility.cvs

.

Utility.samba

.

Utility.xwindow

.

.

Web

ATTIC

.

DOC

.

HTML

Resources

.

.

Images

GIF

.

PNG

.

XPi

.

xpm

.

.

Resource

HTML

.

iPaddr

.

Mailaddr

.

PGPKey

.

.

Utility

LTUTIL

.

.

.

.

.

Client directory structure

#mtree-cin -k type

# User: jiangxin

# Machine: OpenBSD

# tree: / usr / home / jiangxin / work / test

# Date: Tue Sep 10 21:24:33 2002

/ set type = DIR

.

Web

Cvs

.

DOC

Cvs

.

.

Docbook

Cvs

.

PROJECT

Cvs

.

.

Docbook_howto

Cvs

.

.

Images

Cvs

.

Callouts

Cvs

.

.

.

Lession_scm

Cvs

.

.

NightlyBuild

Cvs

.

.

PGP

Cvs

.

Images

Cvs

.

.

.

PM_fw_diaary_2_4

Cvs

.

.

PM_FW_MODULE_DEBUG

Cvs

.

.

PM_FW_PLAN_2_4

Cvs

.

.

Program_rules

Cvs

.

.

RD_HWENV

Cvs

.

.

Steam_admin

Cvs

.

.

Steam_howto

Cvs

.

Images

Cvs

.

.

.

Steam_Trans

Cvs

.

.

TIP_SYSCONFIG

Cvs

.

.

Tip_sysInstall

Cvs

.

Images

Cvs

.

.

.

.

HTML

Cvs

.

Resources

Cvs

.

.

.

Images

Cvs

.

GIF

Cvs

.

.

PNG

Cvs

.

.

XPi

Cvs

.

.

xpm

Cvs

.

.

.

Resource

Cvs

.

HTML

Cvs

.

.

iPaddr

Cvs

.

.

Mailaddr

Cvs

.

.

PGPKey

Cvs

.

.

.

Utility

Cvs

.

LTUTIL

Cvs

.

.

.

.

.

6.2. Sharing of files and directories in StarTeam

StarTeam can share data in the same ServerConfiguration, which can be shared in different views in different projects. The operation is concise under the graphical interface.

But the command line does not have the corresponding function.

转载请注明原文地址:https://www.9cbs.com/read-124522.html

New Post(0)