From: Tom Clarke Date: 2002-11-08T14:00:14+09:00 Subject: CPAN Style installer Hi all, I had a number of conversations at RubyConf (you know who you are :-)) on the subject of a CPAN style installer for ruby. Being someone who is happier with code than talk, I decided to code something up. Here it is: http://osdn.dl.sourceforge.net/sourceforge/narf-lib/raa-install-0.0.2.tgz The project page is shared with narf at: http://sourceforge.net/projects/narf-lib/ Its more a demo or a proof of concept (though the sort with lots of Unit tests) and as such has not been tested on anything other than my platform (which is RedHat) and has some dependencies that would be undesirable in a final version (wget and gnu tar spring to mind). It may well not work on your platform (yet). It has a few useful attributes though: * It uses the RAA as a database (via the raa-xml.xml file) * It will install packages that use some of the common ruby setup methods (setup.rb, install.rb, extconf.rb and configure) * It supports dependency tracking and versioning without needing a local database. (to work, this will require additional info in the RAA, and version info in the ruby libraries) * Little change is needed from developers As such, it successfully installs quite a large percentage of packages in the RAA (particularly those where the download isn't a 404). Some usage examples: bash$ raa-install --install strscan bash$ raa-install --install Test::Unit bash$ raa-install --showallpackages One important thing, to fully implement this solution would require additional data in the RAA as described below - the specifics of which I'm more than happy to change. I think that building on top of the RAA is definitely preferable to setting up something new though. If there is interest in me doing so I would be happy to get this into a more generally usable state (particularly with regard to platform support) and would be extremely happy with any contributions and even better, offers to take the project off of my hands :-). Competing projects are also welcome to make this project redundant as long as it happens before I grow old. Enjoy, -Tom Clarke Some additional notes: Support for parsing the xml from the RAA is crude. I first experimented with REXML for parsing the data, but I lost patience before it completed a single parse - having libxml as a dependency didn't seem like a good idea so I implemeted a crude RegEx based parser that would be sensitive to changes in format. RAA-Install supports dependencies, but to be useful would require additional metadata to be available in the RAA xml file. If there are lines such as... ... in raa-xml.xml it will install that package first. Versioning is done by getting the following possible new fields in the RAA strscan StrScan And doing the following: require 'strscan' StrScan::VERSION # <== "1.2.3" On all of these details I am flexible (I have to be, I don't run the RAA!), and if there any conventions - in particular for specifying a version - I would be glad to here about them.