March 2006 Archives
2006-03-31
Patch to the Erlang Driver Toolkit
I am creating an Erlang-binding for the GSS API version 2.1 (IETF's RFC 2743 and RFC 2744). I am wrapping the GSS API C-binding functions in an Erlang port driver. The purpose is to be able to use GSS API implementations such as MIT Kerberos, Heimdal, GNU Shishi and Globus' GSI in Erlang programs. And maybe, to implement a GSS API-based Erlang distribution layer similar to the existing TCP and SSL distribution layers.
Following Chris Newcombe's advice, I am developing this port driver using the Erlang Driver Toolkit (EDTK), version 1.1, developed by Scott Lystig Fritchie. EDTK functionally covers well all my needs for Erlang / C communication. It generates stub implementations in Erlang and C for marshalling / unmarshalling Erlang terms and call directly the C functions to wrap. The specification of the interfaces are written in XML.
However, EDTK seems to be little maintained, in its XML format element and attribute names are not homogeneous, and it relies on an odd tool for XML processing (iMatix's GSLgen) instead of using the XSLT standard which is just as powerful and is much more widespread. Until Chris Newcombe releases a new version (as he promised ^_-), I have developed a patch for EDTK 1.1 to correct a few bugs that have blocked me so far:
- in
<xtra_val/>elements (in<xtra_return/>elements), added support forargtype="out"orargtype="inout"arguments which are valmap values; - corrected a bug that appeared when specifying an argument (
<arg/>element) that is a valmap value, and is of typeargtype="inout"; - arguments of type
argtype="inout"are now dereferenced with&just likeargtype="out"arguments, when calling a wrapped functions.
2006-03-15
Documentation of GNU Autoconf's Erlang macros
The documentation of my Erlang-related macros in GNU Autoconf has been committed into the repository. The macros and the documentation will be included in the forthcoming Autoconf 2.59c release.
I have put online the current documentation in HTML, although it is very likely to change until Autoconf 2.59c is actually released.
The names of Erlang-related output variables have ERL as a prefix, and the names of Erlang-related macros have AC_ERLANG_ as a prefix.
Update (2006-03-16): I have set the right Content-type header for downloading the Autoconf documentation HTML files.
I did set it as for XHTML while the files are actually HTML 4.01. Duh.
Now the files are displayed correctly in Firefox and IE.
2006-03-01
New “smart” Debian packages for the Adeos ipipe kernel patches
I have made Debian packages for the Adeos ipipe patches found the Adeos website.
These package are meant to replace (but do not conflict with) the kernel-patch-adeos official package available in Debian, which has not been updated since August 2005 and does not allow to install multiple versions simultaneously and to select them in a flexible way.
To install my packages, add those two lines for my repository in your /etc/apt/sources.list file:
deb http://www.berabera.info/oldblog/lenglet/debian/ unstable main contrib non-free deb-src http://www.berabera.info/oldblog/lenglet/debian/ unstable main contrib non-free
Then, upgrade your package list, look for the package(s) you want to install, and install them:
> apt-get update > apt-cache search kernel-patch-adeos-ipipe > apt-get install kernel-patch-adeos-ipipe-1.2
I have made one package for each Adeos version (0.9 to 1.2), and multiple packages for different versions can be installed simultaneously (e.g. package kernel-patch-adeos-ipipe-1.2 can be installed along with kernel-patch-adeos-ipipe-1.1).
I have made this choice because every Adeos version supports a set of {Linux version, architecture} pairs that may not be supported by other versions (including more recent ones).
For instance, the latest version of Adeos (1.2) does not support the Linux 2.4 series at this time.
I have used the standard dh-kpatches Debian helper to build those packages.
Therefore, to build a Debian kernel package with the Adeos patch applied, using make-kpkg(1) (package kernel-package), one has only to pass adeosipipe patch name to the --added-patches option, e.g.:
> cd /usr/src/linux > make-kpkg --added-patches adeosipipe kernel_image
If multiple patch version packages are installed simultaneously, the patch version to be applied is selected using Debian's alternatives mechanism.
There is one alternative defined for every architecture, so that patch versions can be selected independently for every architecture.
For instance Adeos version 1.2 can be applied for architecture i386 and Adeos version 1.1 for architecture ppc.
By default, the highest version of the patch is automatically selected, unless one version is manually explicitly chosen using the update-alternatives(8) command, e.g. for the i386 architecture:
> /usr/sbin/update-alternatives --config kernel-patch-adeos-ipipe-i386
Read the /usr/share/doc/*/README.Debian file for explanations.
On a side note, I have in fact completely automated the generation of the source package, by writing a shell script. That script requires only to download recursively the Adeos patch files directory, and the ChangeLog file from the CVS repository (to get the names of authors). Everything else is done by my script. This will allow me to package new versions of the Adeos patches very quickly.