Using OpenDarwin CVS

Shawn Erickson

Revision History
Revision 709 Jan 2005snu
Changed root certificate section to reference CACert, not the OpenDarwin CA.
Revision 619 Sep 2004snu
Added root certificate section.
Revision 523 Jan 2004kevin
Added committer e-mail section.
Revision 405 May 2003bbraun
Added Project Owner section.
Revision 306 Mar 2003fkr
Updated to note Bugzilla Accounts.
Revision 217 Feb 2003kevin
Updated to reflect current practices.
Revision 113 May 2002shawnce
initial revision.

Table of Contents

OpenDarwin CVS Committer's Guide
Generate SSH Keys
Create Bugzilla Account
Request CVS New Account
Setup CVS to use Your Account
Done... Now Hack Away
Other Benefits
Checking Email
Installing the CACert Certificate
OpenDarwin Project Owner's Guide
Project CVS Area
Project Mailing Lists
Project Web Area
Other Needs
Available Hosts

OpenDarwin CVS Committer's Guide

To commit changes into the OpenDarwin source tree you need to have a CVS account configured for you. The following lists the steps that are needed to prepare for, request and use a cvs account.

Generate SSH Keys

CVS accounts use Secure Shell (ssh) and a ssh key is needed to login. To generate the needed key follow the steps listed below. The document assumes you are using SSH2 (the default on OpenDarwin) however the use of SSH1 is supported. If you are using SSH1 the following can be used as outline of what to do, basically the look of the public key and key store name (~/.ssh/identity) are different.

  1. Check to see if you have a key already generated. If id_rsa does not exist under ~/.ssh or the ~/.ssh directory doesn't exist then you must generate a key. If id_rsa exists you don't need to generate a key, skip to step 3.
    [localhost:~] joe_user% ls ~/.ssh
    ls: /Users/joe_user/.ssh: No such file or directory
    
  2. Generate an RSA key with the default key size (1024 bits) and save it in the standard location (~/.ssh/id_rsa). It is recommended that you use a passphrase to secure access to the private key that was generated (the passphrase must be greater then 4 characters in length). If you secure your private key with a passphrase you will be requested for this passphrase every time your private key is accessed, for example when doing cvs checkout. You can always remove the passphrase from you private key using ssh-keygen -p, entering a blank passphrase.
    [localhost:~] joe_user% ssh-keygen -t rsa
    Generating public/private rsa key pair.
    Enter file in which to save the key (/Users/joe_user/.ssh/id_rsa): 
    Created directory '/Users/joe_user/.ssh'.
    Enter passphrase (empty for no passphrase): 
    Enter same passphrase again: 
    Your identification has been saved in /Users/joe_user/.ssh/id_rsa.
    Your public key has been saved in /Users/joe_user/.ssh/id_rsa.pub.
    The key fingerprint is:
    c9:f5:c5:f6:1f:2f:ae:b4:d1:70:b5:08:97:53:e4:90 [email protected]
    
  3. List the public key that matches your private rsa key. If you secured your private key with a passphrase you will be asked to enter it. The returned value is your public key.
    [localhost:~] joe_user% ssh-keygen -y
    Enter file in which the key is (/Users/joe_user/.ssh/id_rsa): 
    Enter passphrase: 
    ssh-rsa AAAAB3NzaC1yc2EAAAABIw ...[SNIP]... AAAIEAsTeidwK5QO7Wwa=
    

Create Bugzilla Account

Go to Bugzilla Account Form and create yourself an Bugzilla Account. Every OpenDarwin Committer should have a Bugzilla Account.

Request CVS New Account

Visit the New CVS Account Application page and enter the information requested. In the SSH Public Key field paste your public key (the text starting with "ssh-" and ending with "="). You will be notified by email if your account application has been accepted or not.

Setup CVS to use Your Account

To get the sources, you'll need to configure CVS to use ssh by setting your CVSROOT environment variable to :ext:[your login name]@cvs.opendarwin.org:/Volumes/src/cvs/od and CVS_RSH to /usr/bin/ssh.

For example, if you're using (t)csh, you can set the environment variables with the following commands: setenv CVSROOT :ext:[your login name]@cvs.opendarwin.org:/Volumes/src/cvs/od setenv CVS_RSH /usr/bin/ssh

If you're using zsh, bash, or another Bourne-like shell, you can use the following: export CVSROOT=:ext:[your login name]@cvs.opendarwin.org:/Volumes/src/cvs/od export CVS_RSH=/usr/bin/ssh

Done... Now Hack Away

At this point you should be able to checkout/in source from the OpenDarwin source tree. Please read the OpenDarwin CVS Guidelines page before checking in source.

The following is a listing of helpful CVS command modifiers that you can add to ~/.cvsrc. It is recommended that you use -z3 option to enable light data compression, this will reduce network load and generally speed up transfer times.

checkout -P

Causes checkout (co) to prune empty directories.

update -P -d

Causes update (up) to prune empty directories and build added directories.

diff -u -d -b -w

Causes diff (di) to output differences using Unidiff minimal format, ignoring whitespaces.

rdiff -u

Causes rdiff to output differences using Unidiff format.

cvs -z3

Causes all cvs operations, that transfer data, to use level 3 gzip compression.

Other Benefits

Other things that an OpenDarwin account does for you are: gives you personal web space, and access to OpenDarwin shell accounts. To get your personal web space, you can sftp to www.opendarwin.org, on port 22 (the default). If you're using openssh, you can sftp with the following command: sftp [email protected] Once you're logged in, you can create a public_html directory in your homedirectory (you're there when you login). Create the directory with mkdir public_html. Once created, any file you place in that directory will be accessible through http://www.opendarwin.org/~user/.

Checking Email

Email may be delivered to your account @opendarwin.org. Incoming mail can be retrieved with the IMAPS (IMAP over SSL) protocol from mail.opendarwin.org. Be sure your mail client is attempting to use IMAP over SSL and connects to port 993 of the mail server. Authenticate with the basic Password scheme using the same user name and password that you use for the web forms. If authentication fails, visit the Update Profile page and reset your password, this will force the internal databases to be updated.

Outgoing mail can be sent via SMTP to mail.opendarwin.org. Be sure to use SSL and authenticate with the basic Password scheme using the same user name and password as you use to retrieve mail.

There is also the possiblity of having emails sent to your @opendarwin.org-address being forwarded. Forwarding can be enabled through the Update Profile page.

Installing the CACert Certificate

The SSL certificates used by the OpenDarwin web and mail servers are signed by the CACert certificate authority. This causes some applications to warn that the authority can not be verified.

In order to resolve this, you must add the CACert Root Certificate to your system keychain. You may obtain the root certificate here. Then, execute the following command: sudo certtool i root.crt k=/System/Library/Keychains/X509Anchors

Note that some applications (for example, FireFox) maintain their own certificate database. You should consult the application's own documentation if you still receive warnings.