AROSAmiga Research OS

Previous Next Top of Manual blank.gif

AROS - The Amiga Research OS

    Old News
    Old News (2001)
    Old News (2000)
    Coding Style
    HIDD Intro
    HIDD Model
    Random Ideas
1. One for all and all for one - CVS
1.1 Introduction
1.2 CVS on Un*x
1.3 CVS on Amiga
1.4 How to get access to the AROS CVS server
1.5 Logging into the server
1.6 How to get a copy of all AROS sources
1.7 How to get a copy of extra stuff
1.8 How to update the sources
1.9 Committing changes
1.10 Creating new files and directories
1.11 Some tips and tricks
1.12 Importing sources into CVS
1.13 More infos about CVS

1. One for all and all for one - CVS

1.1 Introduction

CVS is a revision tool. It will maintain a database of the sources of a project and of the changes made to these sources. It will also merge any changes you make to the sources with the database.

CVS works with a server, called the repository (the main database), and clients, called the 'working directory', 'collection of sources' or 'private source directory'. Both the repository and the working directories can be on the same machine. AROS, however, uses a repository that is accessible over the internet, so that people all over the world can help make AROS.

CVS offers a list of commands to merge the most recent version of the project with the local sources and to publish changes one has made over the Internet.

1.2 CVS on Un*x

If you have Linux or any other Un*x, then all you need is CVS 1.9 or better. Note that versions of CVS between 1.9.16 and 1.10 don't work because the login protocol has changed. Versions after (and including) 1.10 work again.

If it's not already on your system (type cvs to find out), fetch CVS from one of the many GNU mirrors and install it in your $HOME.

At the request of Amiga Inc, anonymous access has been disabled. You must register to get a copy of the sources. To do that, download crypt.c and follow the instructions in the file. Think of a good password and use crypt to encode it, like this:

make crypt
crypt my_password
Encrypting my_password: cbEVHg0j9uNRs

Now skip the next section and read on in How to get access to the AROS CVS server.

1.3 CVS on Amiga

First, you have to get CVS from GeekGadgets and install it. Then create a password as follows:

Get the demo for AmiTCP 4.0 (AmiTCP-demo-40.lha in comm/tcp) from AmiNET (no need to install AmiTCP; just get the archive and extract the file AmiTCP from it). You also must have ixemul.library 48.0 (should come with GeekGadgets) and ixnet.library in LIBS:. Then you can create your password with crypt out of the AROS-crypt.lha archive from AmiNET (in emu/misc) like this:

run amitcp:amitcp
[CLI 8]
crypt my_password
Encrypting my_password: cbEVHg0j9uNRs

(you must have the directory where crypt is stored in, in your path or you must do this in the same directory where crypt is).

CVS doesn't work with Miami. Miami uses a different routine for encrypting data than Un*x and therefore passwords generated with Miami won't work. Sorry. But you can use Miami with CVS to work on AROS after you have created a password with AmiTCP.

Versions of AmiTCP greater than 4.3 don't work either; they have changed the algorithm for encoding the password.

1.4 How to get access to the AROS CVS server

Mail the password you have created to me: with the subject "Access to AROS CVS Server" and"Please add [my_login] [password]" in the body. Example:

Please add <my_login> <password>

like this:

Please add digulla xx1LtbDbOY4/E

To check: You should get xx1LtbDbOY4/E if you call crypt with crypt test xx. If that doesn't work, download my public PGP key (Shift-Click on the link to download) and send me a PGP encoded mail with your password and I'll encrypt and add it. Also note that I need your real name so I can tell the world what you did for AROS on our Web site.

Wait until I confirm this. While you wait, look for CVS 1.10 or better if you haven't already done so.

1.5 Logging into the server

Before you can use any CVS commands, you must log into the server. To do this, use the CVS command login:

cvs -d :pserver:<user> login

where user is your login, eg. digulla:

cvs -d login

On the Amiga, you must setenv HOME to a directory (eg. setenv HOME SYS:Home). Setting it to a device or assign doesn't work because CVS always adds a / after $HOME when it looks for it's files. And don't forget to copy it to ENVARC: (copy ENV:HOME ENVARC:) to make it permanent.

This should ask you for your password. Type it in and if there is no error displayed, you are connected. If there is an error, try to omit the pserver. If this still doesn't work, double check for typos and if you really, really, really can't find anything, then you can send me an e-mail.

It seems that the login command for CVS has changed. Version of CVS upto 1.8.1 and earlier need not have :pserver: before the login name, but later versions require it. If you have problems to login, try to omit pserver or prepend it. If CVS wants it, you will get an error reading cvs login: can only use pserver method with `login' command.

If the login has succeeded, then you can save you some typing by storing the argument to the -d option in the environment variable CVSROOT. Use

setenv CVSROOT

on Amiga or if you have a C shell (csh) and


for Bourne/Korn shells (bash, ksh). Don't forget to replace user by your login.

On Amiga, you can make this permanent by copy env:CVSROOT envarc:, on Unix, you must add this to the shell's startup file (.cshrc, .profile, .bashrc, .tcshrc, etc. Read the manual of your shell to find out). If you don't know what kind of shell you have, just try echo $SHELL or echo $shell. This should print the name of your shell.

If you haven't set this variable, you must add -d ... right after cvs in the following examples.

Now you can use any CVS command to get a copy of all AROS sources, update your sources or commit the changes you made.

1.6 How to get a copy of all AROS sources

Use the CVS checkout command for this:

cvs checkout AROS

This will create a directory called AROS and populate it with all sources.

1.7 How to get a copy of extra stuff

There is now a lot of stuff on the CVS server which is not directly related to the core source (for example contributed source code, screenshots, etc). You can get a list of all extra parts with

cvs checkout -c

To checkout one of the extra parts, just do a cvs checkout somewhere in the AROS tree (you could do it outside but then, MetaMake would not find it and you would have to cvs update it separately):

cvs checkout Quake

To get a copy of the game Quake into the directory ./contrib/Games/Quake. Unlike any other part of AROS, a cvs update -dP will only get you an update of Quake and not for the other games in contrib/Games (you could cvs checkout Games to get a copy of all games).

1.8 How to update the sources

If you have some sources and just want to update them, you can use the CVS update command. Change to the AROS directory and do this:

cvs update

This should merge any changes that other users have made into your sources and create all new directories and files. If you and someone else has changed the same file, then CVS will try to merge the changes. That is, if (s)he changed the first part and you the end of the file, CVS will do all the work for you. If there are changes which CVS can't resolve (eg. you said |x--;| and the other one |x=x-1;|), then CVS will put both versions in the file. Search for <<<< to find such problems.

You should do this before any commit in case this happens. So before you commit, do an update, call make if any changes were made, fix the problems and then commit.

1.9 Committing changes

If you have changed a file, then you of course want to share your work with the other guys. To do this, use the CVS commit command:

cvs commit

You can specify a list of files after the commit or just do that in the AROS directory to commit all changes. CVS will then ask you what you did and send the changes to the CVS server for inclusion. Before you do that, you should always make an update (see the previous section) to avoid problems.

1.10 Creating new files and directories

You can also add new files or directories with the CVS add command:

cvs add file.c


cvs add dir

Note that cvs add dir/file doesn't work. You can only add files in the current directory.

1.11 Some tips and tricks

You need to login only once. CVS will remember your password and use it when you access the same repository next time.

After the checkout, CVS will remember where the source came from. You don't have to set CVSROOT or specify -d ... when you use CVS inside any directory created by CVS.

To save some more typing, you can put all usual options into the file $HOME/.cvsrc. Here is mine:

cvs -z3
update -dP
diff -u

The first line says always to compress the communication between the client and the CVS server. The next line says to delete empty directories and create new ones when updating. The last line tells cvs diff to use my favourite format.

1.12 Importing sources into CVS

Sometimes, you want to add an existing software to the CVS repository. Use cvs import for this. Since the CVS import man page is quite poorly written, I'll give you an example how it works.

  1. You extract the files whereever you like (it's probably best not to use the CVS tree for this)
  2. Enter the new directory and run the import command:
    cd name-1.2.3
    cvs -d import -m "Explanation" contrib/name VENDOR NAME_1_2_3

    All files (except some file like *.bak which cvs import will automatically ignore) in the current directory and below will be copied into the repository contrib in the directory name. The -m option should give an explanation what this package is about.

    VENDOR is the vendor tag which should give a hint where this package comes from (for example, REDHAT_LINUX) and the last item is a symbolic name for the version which is imported. Usually, you will use the name of the package and the version to generate this tag (as in the example).

    You can use -I to ignore more files.

1.13 More infos about CVS

Well, CVS has man pages and info files and here is a nice link.

Previous Next Top of Manual blank.gif

Amiga® is a trademark of Amiga Inc. All other trademarks belong to their respective owners.

Copyright © 1995-2001, The AROS Development Team. All rights reserved
Comments to webmaster:
Generated: Mon Apr 1, 2002

SourceForge Logo