Calls: Send in your ideas. Deadline April 1, 2024
logo

Last update: 2003-07-07

Grant
End: 2003-01

Progress report April 2003

tools for developing, distributing, and installing software

By Bram Moolenaar, May 1 2003

Automatic package install

When Aap is about to use the "scp" program to copy a file, it will now check that this command is available. If it isn't, a recipe is downloaded from the A-A-P website and executed. This should then install a "scp" command that is usable on the current system. The same is done for "cvs".

This work is part of the "Recipe Finder" work package in the plan. The goal is to provide a very easy to use mechanism to install a package that is required in a recipe. The mechanism is working now, but only a couple of packages are available. More can be added easily.

I have written a chapter about this in the documentation. You can read it on-line.

Installing a package may require root privileges. The ":asroot" command has been added for this. It runs a separate shell as root, so that the root password only needs to be typed once. Every executed command has to be confirmed by the user for safety.

A few more commands have been added to make it easy to write a package recipe. The "ask_prefix()" function asks the user where he wants to install the package and whether this is to be done as root.

For BSD sytems the port mechanism is used, if possible. Other generic mechanisms (e.g., using RPM on RedHat) are to be added later. This must be done by someone who can test if it works.

On the A-A-P website a simple PHP script is used to retrieve the requested recipe. This hides the fact that the recipes are stored as plain files on the web server. This can be changed later to provide something more advanced (e.g., to allow each maintainer to update his recipes or to retrieve a specific version of a package).

Unfortunately, I have not yet been able to make a recipe to install "scp" on an arbitrary Unix system. This is not a matter of downloading an archive, unpacking and building it. Hopefully someone will make this work!

AAP features

A number of features have been added that can best be described as "automake" mechanisms. Most notably the idea of using $SOURCE and $TARGET has been dropped in favor of the ":program" command. This is a much simpler mechanism and more flexible as well. The user no longer has to add $EXESUF and is able to specify two or more programs to be build in exactly the same way.

Support for building static and shared libraries has been added in the form of the ":lib" and ":dll" commands. They are very similar to ":program". Also, support for yacc and lex has been added. This allows mixing various kinds of files for the ":program", ":lib" and ":dll" commands to have them build and linked together automatically. For flexibility the ":route" command is used to specify how one filetype can be made into another filetype.

More targets are now generated automatically: "clean", "install", "uninstall" and "cleanALL". This means that a recipe with just one line can be used to specify building, installing, uninstalling and cleaning up. Example:

    :program foobar : foo.c bar.y

The recipe examples have been updated to use the new mechanism. The result is that they have become quite a bit simpler.

One important thing from "automake" that is still missing is "autoconf" functionality. Joerg Beyer has promised to look into this.

Various

  • Design decision 9 "Format to use for configuration scripts" has been updated. The choice is not to use a separate file format but to use the recipe for configuration.
  • Several user scopes can now be used for a dependency. Previously the last one defined overruled the others.
  • Added ":cd", ":chdir", ":pushdir" and ":popdir" commands (mostly by Steve Howe).
  • Added the ":tree" command: Select files and directories in a tree and execute commands for them. A bit like the Unix "find" command.
  • Support $DEBUG, $OPTIMIZE, $INCLUDE and $LIBS for a portable way to specify arguments to the C compiler.
  • Added $TOPDIR, $CHILDDIR, topdir() and childdir(). Makes it easy to pass file names from a child to a parent or toplevel recipe.
  • Added the aap_has() function: check if a command is supported. This is useful to be able to write a recipe that works with different Aap versions.
  • The Python "netrc" module was finally fixed and will be included in Python 2.2.3 and 2.3.0. Aap will still include the "aapnetrc" module for when an older Python version is being used.
  • And last but not least: Added the ":pass" command: do nothing.

Progress

The work progressed as planned in April. This means we still lag behind the original schedule about two weeks. This will probably be compensated by dropping the cross referencer work package.

Almost two weeks were spent on the recipe finder. A few more days will be used to support more packages. That adds up to the planned two weeks.

Two weeks were spent on the recipe syntax and the Recipe Executive. About one week remains for further work. This is to be used for bug fixing and making small improvements.

Coming weeks

All the important functionality for Aap version 1.0 is now included. The coming month work will be focused on writing examples, updating the documentation and testing. Not only will this provide (potential) Aap users wil useful information, it is also a good way to check if the recipe syntax is easy to use and explain. This may lead to some work on the Recipe Executive.

If there is time available before the 1.0 release some work will be done on supporting more version control systems. Probably for checkout only. There probably will not be enough time left to work on the cross referencer. Version 1.0 should then be ready by the end of June, just before the O'Reilly conference.

Project A-A-P

Navigate projects

Search