Automating release

One of the packages I somehow “maintain” is app-emacs/nxml-gentoo-schemas (here the original presentation). I actually created it in the first place, originally in my overlay, then escalating through emacs overlay and now in main tree. It’s a nice package for me, as it makes GuideXML editing simpler, and now it also makes metadata.xml editing (to put the documentation that I proposed and Doug implemented) quite easier.

Today I updated the ebuild so that the new metadata schema is present, as I actually wanted to start writing the USE flags documentation for PulseAudio and a few other things (but PulseAudio stopped me as I have a locally modified ebuild depending on gnome-extra/gnome-audio that is still waiting for Mike to keyword it on ~arm and ~sh).

When I updated it, I found that I didn’t really document what I used to actually generate the rnc files. So I decided to properly solve this by writing a script that takes care of regenerating them. After a couple of tries in sh, I found it’s easier to handle this through Makefile.

Actually, I thought it was easier at the start, but recent changes to the DTDs moved some of the definitions on a “common” file, so I ended up trying to get a way to track down dependencies. The result was pleasant after a few tries.

At the end, with a short, and quite compact, makefile, I was able to get all the steps to update the schemas: download the DTDs, regenerate the dep files, transform the DTDs into Relax-NG compact form through trang, and then tar them up in the tarball already named to be used by the ebuild.

The only manual steps, beside the ebuild update, are just committing the modified RNC files to the git repository (so that I can track down the changes) and copying the tarball on my website.

For anybody who’d like to look at the code, you can clone the repository at https://gitweb.gentoo.org/proj/nxml-gentoo-schemas.git/. A new copy of the package will be in portage tomorrow, as I didn’t update the rest of the schemas earlier, and Ulrich was thinking about moving the RNC files in a different directory rather than site-lisp.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s