Presentation is loading. Please wait.

Presentation is loading. Please wait.

Working in Project Teams Using CVS and Solaris ACLs ● Concurrent Version System:  Allows multiple programmers to work on one project at the same time.

Similar presentations


Presentation on theme: "Working in Project Teams Using CVS and Solaris ACLs ● Concurrent Version System:  Allows multiple programmers to work on one project at the same time."— Presentation transcript:

1 Working in Project Teams Using CVS and Solaris ACLs ● Concurrent Version System:  Allows multiple programmers to work on one project at the same time ● Also allows programmers from different file systems (requires server mode)  Keeps track of multiple versions of the same project ● Solaris Access Control Lists:  Allows individual users to grant read, write, or execute access to their files by other individual users without requiring sysadmin (root) permission

2 Example ● Suppose the following users on the ub file system wish to form a project team:  savvypac  tcolburn  gshute ● One user, the designated project leader, must:  create a CVS repository,  grant access to the repository by the other users  import a project directory into the repository or create one from scratch

3 Creating A CVS Repository Suppose savvypac is the project leader: ub 5% pwd /home/vole/19/savvypac Create a directory for the repository: ub 6% mkdir cvsroot Make this directory's path the value of your CVSROOT environment variable: ub 7% setenv CVSROOT /home/vole/19/savvypac/cvsroot

4 Setting Regular and Default ACLs for Repositories First, give default read, write, and execute access to (as yet unspecified) users for every file and directory that will be created in the repository in the future: % setfacl -s m:rwx,u::rwx,g::---,o:---,d:m:rwx,d:u::rwx,d:g::---,d:o:\ --- cvsroot % getfacl cvsroot # file: cvsroot # owner: savvypac # group: external user::rwx group::--- #effective:--- mask:rwx other:--- default:user::rwx default:group::--- default:mask:rwx default:other:---

5 Notes On Default ACL Example ● This gives rwx access to user but not to group or other. ● The -s option (set) requires that all 8 ACLs be set. ● There can be no spaces in the comma-delimited list of permissions. ● user and group require the double colon ● The mask permission bits are anded to each permission to produce an effective permission

6 Specifying Privileged Users First, give tcolburn and gshute access to the repository: % setfacl -m u:tcolburn:rwx,u:gshute:rwx cvsroot Next, give tcolburn and gshute access to future files and directories in the repository: % setfacl -m d:u:tcolburn:rwx,d:u:gshute:rwx cvsroot Note the use of the -m (modify) option instead of -s.

7 Reality Check % getfacl cvsroot # file: cvsroot # owner: savvypac # group: external user::rwx user:tcolburn:rwx #effective:rwx user:gshute:rwx #effective:rwx group::--- #effective:--- mask:rwx other:--- default:user::rwx default:user:tcolburn:rwx default:user:gshute:rwx default:group::--- default:mask:rwx default:other:--- % ls -ld cvsroot drwx------+ 2 savvypac... Apr 16 20:30 cvsroot/

8 Using the cvs Command ub 8% cvs Usage: cvs [cvs-options] command [command-options-and-arguments] where cvs-options are -q, -n, etc. (specify --help-options for a list of options) where command is add, admin, etc. (specify --help-commands for a list of commands or --help-synonyms for a list of command synonyms) where command-options-and-arguments depend on the specific command (specify -H followed by a command name for command-specific help) Specify --help to receive this message

9 Using the cvs Command (cont'd) ub 9% cvs --help-options CVS global options (specified before the command name) are: -H Displays usage information for command. -Q Cause CVS to be really quiet. -q Cause CVS to be somewhat quiet. -r Make checked-out files read-only. -w Make checked-out files read-write (default). -l Turn history logging off. -n Do not execute anything that will change the disk. -t Show trace of program execution -- try with -n. -v CVS version and copyright. -T tmpdir Use 'tmpdir' for temporary files. -e editor Use 'editor' for editing log information. -d CVS_root Overrides $CVSROOT as the root of the CVS tree. -f Do not use the ~/.cvsrc file. -z # Use compression level '#' for net traffic. -a Authenticate all net traffic. -s VAR=VAL Set CVS user variable. (Specify the --help option for a list of other help options)

10 Using the cvs Command (cont'd) ub 10% cvs --help-commands add Add a new file/directory to the repository admin Administration front end for rcs annotate Show last revision where each line was modified checkout Checkout sources for editing commit Check files into the repository diff Show differences between revisions edit Get ready to edit a watched file editors See who is editing a watched file export Export sources from CVS, similar to checkout history Show repository access history import Import sources into CVS, using vendor branches init Create a CVS repository if it doesn't exist log Print out history information for files login Prompt for password for authenticating server logout Removes entry in.cvspass for remote repository pserver Password server mode rdiff Create 'patch' format diffs between releases release Indicate that a Module is no longer in use remove Remove an entry from the repository rtag Add a symbolic tag to a module server Server mode status Display status information on checked out files tag Add a symbolic tag to checked out version of files unedit Undo an edit command update Bring work tree in sync with repository watch Set watches watchers See who is watching a file

11 Initializing a New CVS Repository ub 12% cvs init ub 13% cd cvsroot ub 14% ls CVSROOT/ ub 15% cd CVSROOT ub 16% ls Emptydir/ cvswrappers modules taginfo,v checkoutlist cvswrappers,v modules,v val-tags checkoutlist,v editinfo notify verifymsg commitinfo editinfo,v notify,v verifymsg,v commitinfo,v history rcsinfo config loginfo rcsinfo,v config,v loginfo,v taginfo

12 Importing a Project Directory Into a Repository Suppose savvypac has the following directory structure: savvypac cvsrootproject CVSROOTsubdir projectfile1 projectfile2projectfile3

13 Importing a Project Directory Into a Repository (cont'd) % cd project % cvs import -m "Imported directory" teamproject\ ignore1 ignore2 N teamproject/projectfile1 N teamproject/projectfile2 cvs import: Importing.../cvsroot/teamproject/subdir N teamproject/subdir/projectfile3 No conflicts created by this import This imports the project directory into the repository as teamproject. Note the -m option and the last two (ignored in this case) arguments. % cd../cvsroot % ls CVSROOT/ teamproject/

14 New Directory Structure savvypac cvsrootproject CVSROOT teamproject subdir projectfile1,v projectfile2,vprojectfile3,v

15 Checking Out A Directory From A Repository Suppose tcolburn has the following directory structure: tcolburn work Now tcolburn wants to check out the teamproject directory from the repository into his (currently empty) work directory.

16 Checking Out A Directory From A Repository (cont'd) % whoami tcolburn % setenv CVSROOT ~savvypac/cvsroot % cd work % ls // empty directory % cvs checkout teamproject cvs checkout: Updating teamproject U teamproject/projectfile1 U teamproject/projectfile2 cvs checkout: Updating teamproject/subdir U teamproject/subdir/projectfile3 % ls teamproject

17 tcolburn 's Directory Structure After Checkout tcolburn work teamproject subdir projectfile1 projectfile2 projectfile3 CVS

18 The CVS Directory ● After checkout, tcolburn can work on any of the teamproject files except those in the CVS subdirectory ● Note that every directory in the structure has a CVS subdirectory ● CVS subdirectories hold information about directory entries and repository location

19 Checking In Changes Suppose tcolburn makes changes to projectfile3. He checks the file back in to the repository using the commit command: % cvs commit -m "Log message" projectfile3 Checking in projectfile3; /home/vole/19/savvypac/.../projectfile3,v <-- projectfile3 new revision: 1.2; previous revision: 1.1 done /home/vole/19/savvypac/cvsroot/teamproject/subdir: total 6 drwx------+ 2 savvypac external 512 Apr 16 23:34. drwx------+ 3 savvypac external 512 Apr 16 22:55.. -r--r--r--+ 1 tcolburn cs 506 Apr 16 23:34 projectfile3,v Note that tcolburn is the new owner of projectfile3,v

20 Working Concurrently Users savvypac or gshute could check out the teamproject directory at the same time: % whoami gshute % cvs checkout teamproject cvs checkout: Updating teamproject U teamproject/projectfile1 U teamproject/projectfile2 cvs checkout: Updating teamproject/subdir U teamproject/subdir/projectfile3 % cd teamproject % ls CVS/ projectfile1 projectfile2 subdir/ % cd subdir % ls CVS/ projectfile3 % cat projectfile3 This is project file 3. Here is a new line. // change made by tcolburn

21 Updating When working concurrently, you need to be sure you have any changes that have been committed by another team member. Suppose gshute commits another change to projectfile3. To see the change, tcolburn must do an update : 3% cvs update cvs update: Updating. U projectfile3 14% cat projectfile3 This is project file 3. Here is a new line. Here is another new line. // change made by gshute

22 Adding Files Suppose tcolburn creates a new file in the teamproject/subdir directory. Before it can be committed, it must be added: % ls CVS projectfile3 projectfile4 % cvs add projectfile4 cvs add: scheduling file `projectfile4' for addition cvs add: use 'cvs commit' to add this file permanently % cvs commit -m "A new file" projectfile4 RCS file: /home/vole/19/savvypac.../subdir/projectfile4,v done Checking in projectfile4; /home/vole/19/savvypac.../subdir/projectfile4,v <-- projectfile4 initial revision: 1.1 done

23 Adding Files (cont'd) For gshute to see the new file, an update must be done: % whoami gshute % ls CVS/ projectfile3 % cvs update cvs update: Updating. U projectfile4 % ls CVS/ projectfile3 projectfile4

24 Adding Directories ● The add command is also used for directories ● However, add is not recursive; a separate add must be done for each file and each directory ● If you want to add a whole directory hierarchy, use import


Download ppt "Working in Project Teams Using CVS and Solaris ACLs ● Concurrent Version System:  Allows multiple programmers to work on one project at the same time."

Similar presentations


Ads by Google