So, as arachnist is working, slowly but somewhat steadily, on Gentoo/DragonFly, I thought I can at least try to do my part on that. My part in this case is to provide a virtual to satisfy the required dependencies of desktop environments and a few more cases: virtual/eject.
The ones who read this blog from its start should know that I started working on unieject because the default eject command in FreeBSD had a command line incompatible with the default eject command in Linux, that then was mostly unusable for KDE, Gnome and other software using eject. For this reason I started unieject that is both a library and an eject command using mostly libcdio for accessing the CD-Rom devices (although it has lots of workarounds on both FreeBSD and Linux because of the incompleteness of both cdio and kernel implementation: for example there’s no way to get the features of a CD-Rom device in FreeBSD (thus I have to consider the CD-Roms there as capable of anything and just hope it works) and on Linux I can’t use the MMC commands to lock the door (or the kernel filters the command).
I tried porting unieject on Mac OSX, but the problem there is that the device is occupied when I want to access it and I’m then unable to run the eject command on it. libcdio’s has to be expanded to support Mac OSX properly before I can port unieject there.
Now it’s the turn of DragonFly, that uses mostly FreeBSD 4 interface, so it shouldn’t be that difficult. Unfortunately libcdio itself does require to be patched to work on DragonFly, as the CHOST is not recognised; the patch is trivial and seems to work (although I can’t test it yet, as I’m just running it through vmware-server), probably it’s similarly trivial to change unieject to use the same access used on FreeBSD also on DragonFly.
A part this trivialities of porting it on a different flavor of FreeBSD, there is one thing my unieject misses from standard eject that is needed: the command to eject SCSI/USB devices, useful for pendrives. This feature has to be done in a completely different way, as it’s not CDIO-provided, and a part from that, it has to be done in different ways depending on the operating systems (although it shares the unmount support with the CD-Rom interface).
The problem why I can’t add such a support right now is actually simple: I don’t have a pendrive to test with. Yes, I’m one of the few people that still does not have any USB pendrive, flash card reader or anything like that, the only thing I have is the USB enclosure for HDDs (that I blogged about, especially about the problems I’m still having), and that does not have support for ejecting it.
So probably unless I can find someone to borrow the USB pendrive from, I’m probably going to ignore that support and let things like libgpod not using unieject but rather standard eject. Too bad because that would be an useful feature as, as far as I can tell, FreeBSD does not have an utility to do the same.
Anyway, if somebody is wanting to help with writing translations of unieject, feel free to contact me, so that I know where to take the bzr from 😉