|Amiga Research OS|
|1. One for all and all for one - CVS
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
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.
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:
Now skip the next section and read on in How to get access to the AROS CVS server.
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:
(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.
Mail the password you have created to me: email@example.com with the subject "Access to AROS CVS Server" and"Please add [my_login] [password]" in the body. Example:
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.
Before you can use any CVS commands, you must log into the server. To do this, use the CVS command login:
where user is your login, eg. digulla:
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
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.
Use the CVS checkout command for this:
This will create a directory called AROS and populate it with all sources.
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
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):
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).
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:
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.
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:
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.
You can also add new files or directories with the CVS add command:
Note that cvs add dir/file doesn't work. You can only add files in the current directory.
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:
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.
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.
Well, CVS has man pages and info files and here is a nice link.
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: firstname.lastname@example.org
Generated: Mon Apr 1, 2002
Copyright © 1995-2001, The AROS Development Team. All rights reserved