Sunday 14 January 2007
Babes In Toyland
I have a new Macbook Pro courtesy of the Mozilla Corporation. Somehow I've never grown out of the thrill of unpacking a shiny new machine, celebrating it as "the best yet!" (mostly thanks to Moore's Law), and then setting it up "just right".
Last time I bought a Mac, one of the first things I saw after turning it on was an Apple nag dialog asking me to pay $60 or so to upgrade to Quicktime Pro. Having just shelled out thousands of dollars for the "superior Apple experience", that dialog was most aggrieving. Fortunately that hasn't happened this time. Has Apple figured out what a turn-off that was?
I requested a Macbook mainly because via virtualization I will be able to run Mac, Windows and Linux all in the same machine. That will be very very useful. For too long I'm stumbled along doing all my work in Linux (and before that, all in Windows) and having to beg for help whenever I encounter bugs on other platforms. That was lame, and it's over.
In fact, I've already installed OpenSUSE 10.2 under Parallels. Parallels doesn't have good Linux guest integration so I'm stuck with crappy manual transfer of mouse control from Linux to MacOS. And there's something slightly weird going on with networking; almost everything works, except openssh can't resolve any DNS addresses properly. I wonder what openssh does differently from apps like Firefox. But otherwise it seems to work well, and fast, so I think this is going to be a winner.
One problem with virtualization is communication between the VMs. It's going to be annoying to copy patches or trees around between them. However I've managed to set up file sharing (CIFS shares actually) so that Linux can mount my Mac homedir directly. It would be interesting to try keeping all my trees in the Mac file system and building from them directly in Linux, putting the results in an objdir in the Linux file system. I suspect that the bazillion stat() calls performed by 'make' will be dog-slow over CIFS, making this untenable, but it'd be cool if it wasn't too bad. Then I could edit all my files in native Mac apps and just use Linux and Windows to build and test. And I also wouldn't have to juggle as many trees. I'll give it a go.
Update I "fixed" my openssh address resolution problem by setting "AddressFamily inet" in my ssh_config. I guess the problem was related to IPv6.
Last time I bought a Mac, one of the first things I saw after turning it on was an Apple nag dialog asking me to pay $60 or so to upgrade to Quicktime Pro. Having just shelled out thousands of dollars for the "superior Apple experience", that dialog was most aggrieving. Fortunately that hasn't happened this time. Has Apple figured out what a turn-off that was?
I requested a Macbook mainly because via virtualization I will be able to run Mac, Windows and Linux all in the same machine. That will be very very useful. For too long I'm stumbled along doing all my work in Linux (and before that, all in Windows) and having to beg for help whenever I encounter bugs on other platforms. That was lame, and it's over.
In fact, I've already installed OpenSUSE 10.2 under Parallels. Parallels doesn't have good Linux guest integration so I'm stuck with crappy manual transfer of mouse control from Linux to MacOS. And there's something slightly weird going on with networking; almost everything works, except openssh can't resolve any DNS addresses properly. I wonder what openssh does differently from apps like Firefox. But otherwise it seems to work well, and fast, so I think this is going to be a winner.
One problem with virtualization is communication between the VMs. It's going to be annoying to copy patches or trees around between them. However I've managed to set up file sharing (CIFS shares actually) so that Linux can mount my Mac homedir directly. It would be interesting to try keeping all my trees in the Mac file system and building from them directly in Linux, putting the results in an objdir in the Linux file system. I suspect that the bazillion stat() calls performed by 'make' will be dog-slow over CIFS, making this untenable, but it'd be cool if it wasn't too bad. Then I could edit all my files in native Mac apps and just use Linux and Windows to build and test. And I also wouldn't have to juggle as many trees. I'll give it a go.
Update I "fixed" my openssh address resolution problem by setting "AddressFamily inet" in my ssh_config. I guess the problem was related to IPv6.
Comments
One thing to keep in mind: if you're going to have a local mirror of the Mozilla cvs repository on your Mac (like bz does), the default filesystem is case-insensitive (but case preserving), and this was problematic when checking out from the local repo. "HFSX" (HFS Extended Case-Sensitive) is a supported filesystem, but you either have to reformat the disk or a partition, or use a disk image (which seemed to cause some sleep problems for bz).
http://groups.google.de/group/alt.os.linux.gentoo/browse_frm/thread/12593545963c6d8c/be0634275d8c5458?tvc=1#be0634275d8c5458
Robert: I haven't really used the XCode environment.
William: I'll probably be able to adjust :-)
Smokey: That's good to know. I could keep the mirror in Linux, or I might just put it on a Linux machine in the office.
The command I used to create the repository disk image is:
hdiutil create -size 4g -fs "Case-sensitive HFS+" -stretch 4g -volname "Mozilla CVS Repository" -type UDIF ~/cvs-mirror.dmg
and then dragged that disk image into my startup items list in system config and symlinked /cvsroot to /Volumes/Mozilla CVS Repository
Looking at the hdiutil manpage now, however, it looks like they changed the options around; you may want -fs HSFX.
I actually live in my 1GB RAM/40GB HD Linux VM, switching over to my Windows VM and Mac host only when I want to compile and test certain changes (or for the occasional platform-specific app).
I keep separate trees in each OS at the moment. I guess I could use a shared folder between Mac and Windows, but it seems like more trouble than it's worth. Hmm, but I just saw your followup post on the performance cost of building in Linux from files served over CIFS from the Mac. Maybe I'll try that.