The last days I’ve been working on some ports for OpenBSD and FreeBSD.
I created an OpenBSD port for dnsmasq-2.22. dnsmasq is a caching DNS-forwarder and DHCP server designed for small networks. It is very easy to setup and configure. I use it for my home network as caching DNS server on FreeBSD and I wanted to be able to use it on OpenBSD too.
I already sent it to ports@openbsd.org and got some feedback. But actual testing feedback is welcome. You can get the port here. Just unpack it into /usr/ports/net, give it a try and let me know if you have any problems.
Then I spent some time working on the rails/ruby-gems stuff on FreeBSD. Again I wrote an email to ports@freebsd.org, asking if somebody will join my effort. But again no reaction. I guess I have to do it by myself. I also tried to join the rubygems-developers mailing list, but I got no response from the webinterface after registering. Maybe I have till Monday or Tuesday until an actual human will review the administration email.
Further I looked how PHP Pear compatibility is realized in the FreeBSD ports and thought about how do copy it for ruby-gems. I tried to figure out, how exactly a gem is installed. It seems like that the gem is a tar-archive with two GNUzip-files in it, data.gz and metadata.gz. data.gz (a tar archive) hold the actual files and libraries while metadata.gz is a compressed file, metadata, that hold the, suprise, metadata information like dependencies, author, and file list.
As far as I know, if a gem GEMNAME is installed, the content of data.gz is copied to
/usr/local/lib/ruby/gems/1.8/gems/GEMNAME
and a gem specification file (GEMNAME.gemspec) is installed in
/usr/local/lib/ruby/gems/1.8/specifications/
My problem is that the .gemspec file in /specifications/ is different from metadata (but the content seems nearly the same) and I have to know how the former is created from the latter.
If this hurdle is taken, I hope that gem support on FreeBSD is not far away. I then have to expand the ruby-gems port with a Makefile that holds all common information like the path to the gem directory and how to copy the files. Then each new gem-port would only have to name its URL and dependencies. Then common Makefile would download and extract the gem, get the names of the included files from the metadata file and copy the files to the above described directories.
I fear that it will be complicated than this. But it is a start.
Apart from this effort I finally filled out problem reports for my updates to ruby-mysql, ruby-sqlite, and ruby-fcgi as knu@freebsd.org (their maintainer and maintainer of Ruby on FreeBSD) did not react since 3 weeks. ruby-sqlite was committed this morning and I hope that the other updates will be committed soon.
I did not filled problem reports for my various rails ports as these are not gems but “normal” ruby libraries. They install into
/usr/local/lib/ruby/site_ruby/1.8/
and so they are not recognized by ruby-gems as needed for rails. But they could be of value for a non-rails developer who wants to use this libraries without ruby-gems so I’m not sure if they should be dumped in favour of the ruby-gems ports that are to come.