If you want to get started using Aegis, this provides a simple and rapid way of setting-up a project.
The project template is in a file called aepro-rcs.ae and usually obtained from http://aegis.sourceforge.net/ using your favorite web browser.
It is a really really good idea to print a copy of the Aegis User Guide (which describes how Aegis works and how it is used) and the Aegis Reference Manual (which contains all of the man pages). Keep them handy as you work through these instructions, especially if this is your first time.
It is assumed that you have downloaded and installed RCS according to the instructions.
. /usr/local/lib/aegis/profileto the .profile file in your home directory, and login again. (The actual path may vary, depending on where you installed Aegis.) Many Linux systems do this automagically, by adding a suitable symbolic link at /etc/profile.d/aegis.sh
As the 'aegis' user, you need to execute the following commands. The typical response is shown here also. The first command creates the project.
% aenpr aepro.0.1 aegis: project "aepro": created aegis: project "aepro.0": created aegis: project "aepro.0.1": created %
The next command adds your normal login as a project administrator, and other development roles. (Your normal login as assumed to be ``you'' for this example.)
% aena -p aepro.0.1 you aegis: project "aepro.0.1": user "you" is now an administrator % aend -p aepro.0.1 you aegis: project "aepro.0.1": user "you" is now a developer % aenrv -p aepro.0.1 you aegis: project "aepro.0.1": user "you" is now a reviewer % aeni -p aepro.0.1 you aegis: project "aepro.0.1": user "you" is now an integrator %
The .forward file of the ``aepro'' user needs to be set to someone appropriate to read mail directed at the project.
You can now ask your system administrator to set the ``aepro'' user's password field to ``*''. This effectively prevents the ``aepro'' user from logging in. Aegis is designed to make this unnecessary from now on.
The rest of the commands may be executed under your usual account. By adding your normal account as an administrator, you are now authorized to perform the necessary actions.
You can set a short-cut to the project you are interested in by using the ae_p command to set the AEGIS_PROJECT environment variable:
% ae_p aepro.0.1 %
You need to edit the project attributes to reflect your needs. The project attributes are edited using the following command
% aepa -e ...you are placed into the editor... %
You will be placed into an editor (controlled by the VISUAL environment variable, or ``vi'' if it isn't set). You need to edit the attributes file to look like this:
description = "an example project"; developer_may_review = true; developer_may_integrate = true; reviewer_may_integrate = true; developers_may_create_changes = true; umask = 022; integrate_pass_notify_command = "${shell} ${source scripts/fold_change.sh}";
You should set the description to something appropriate for you project (be very careful about the end quote and semicolon). You will also notice that the staff roles are set for a single-person project. When you decide to tighten things up, you should start by setting developer_may_review = false.
The project is now ready for adding the template project change set you downloaded.
If you need to add more staff to the project, because your normal account is an authorized project administrator, use the aend (et al) commands to do this from your normal account.
% aedist --receive -f aepro-rcs.ae -p aepro.0.1 ...lots of output... %
You must give the project name on the command line, or aedist will try to use the project name it finds in the change set - and it wont find it.
The aedist command will, in turn, issue a number of other commands. These are all normal Aegis commands you could issue yourself, if you were familiar with Aegis. It will, however, stop with a moderately alarming message:
Warning: This change contains files which could host a Trojan horse attack. You should review it before building it or testing it or completing development. This change remains in the being_developed state.This message comes because in order to build the project, you are going to have to execute a number of commands contained in the project "config" file. For your own protection, aedist stops at this point. You may want to inspect this file before continuing.
In order to complete development of the change set, you must first build it...
% aecd % aeb ...you will see commands which build the project... %
Things that can go wrong...
Once the change builds, you need to difference it (this is a little redundant for this first command, but you'll see how useful it is later).
% aed ...you will see commands which "diff" the project... %
Things that can go wrong...
Now you will need to test the change. This is because this change set includes a number of tests for the aepro programs. They give you an idea of what is meant to happen when developing software using Aegis - none of the tests should fail.
% aet ...lots of output... % aet -bl ...lots of output... %
The change is now ready to end development.
% aede aegis: project "aepro.0.1": change 10: development complete %
The change set is now ready to be reviewed. In a single-person project like this one, you can review your own work. Obviously this is a conflict of interest, and larger projects are usually configured to have Aegis prevent this.
% aerpass -p aepro.0.1 -c 10 aegis: project "aepro.0.1": change 10: review pass %
The change is now ready to be integrated. Only when integration is complete are the files actually committed to the repository.
% aeib -p aepro.0.1 -c 10 % aeb ...you will see commands which build the project... % aed ...you will see commands which "diff" the project... % aet ...lots of output... % aet -bl ...lots of output... % cd % aeipass ...you will see commands committing the files to RCS... aegis: project "aepro.0.1": change 10: integrate pass %
The ``cd'' command you see is actually important: you need to be out of the development directory and integration directory so that they can be cleaned up (deleted) when the change completes.
It is strongly suggested that you complete the first change ``as is'' and perform your own customizations in later changes, rather than trying to get the project started and customize it at the same time.
The rest of this file describes how to perform various common changes to the example project.
The directory structure as it presently stands looks something like this (only primary source files are shown):
LICENSE config ./database: Database definitions and structure files go here. A next release will build the databases defined here automatically so aech compilation can have its own database for speed. ./design: A general directory to store any functional designs etc. ./etc: This directory holds configuration info for AePro, and the templates directory. ./etc/template: This directory holds templates for sourcefiles. When a new file is created in aegis with aenf, aegis looks in the config file for any matching patterns in the template section, and copies the matching template to the new file.the ./scripts: This directory holds all shell scripts. Most act as a wrappper between Aegis and AePro / progress. ./src: this directory contains all progres sources to AePro. Their objects are places in r-code after compilation ./test: contains all the tests for aepro in the form of shell scripts, progress sources and datafiles. ./www: html files for the website.
When a development directory is created for an Aegis change, it is initially populated with symbolic links into the baseline. Thus, it looks like your development directory contains all of the baseline files, with exactly the same directory structure. However, if you try to edit any of them, you will be told "Permission denied".
In order to modify a file, you need to work on a copy, obtained via Aegis using the ``aecp'' command (named after the "cp" command). This way Aegis knows which files you are modifying.
Similarly, you create new files using the ``aenf'' command (it's mnemonic). Again, this way Aegis knows which files you are creating.
In order to add a new program, you must do two things.
or similar. There could be many .p .w and .i files, and you should create them all. Using your favorite editor, set their contents appropriately. (I'm guessing you have a particular already-working program you are experimenting on.)% aenf src/fred/fred.p %
Aegis wants to know if your program builds, and so it watches the exit status of the build.sh command. To build your new program, it is only necessary to use the
command. This will compile all of the modules and place the r-code in the desired directory% aeb aegis: make -f makefile project=aepro.0.1 change=11 ...lots of output... aegis: project "aepro.0.1": change 11: development build complete %
You may also want to add a test of your new program. This is optional, but it is one of the strengths of the Aegis process.
All that is left is to complete development of the change and to integrate it, using the normal Aegis process.