abstractwankery.com
taking it to the next level
I hate you, Apple.
Posted by Nick at 7:54 PM
So, I installed Apple's Security Update 2009-001 yesterday, and tried to work on one of my Catalyst sites tonight. I got this fantastic error:

IO object version 1.22 does not match bootstrap parameter 1.23 at /System/Library/Perl/5.8.8/darwin-thread-multi-2level/XSLoader.pm line 94.


I head over to CPAN to update a few modules, and same error message with a stacktrace of doom. So, turns out, Apple distributed IO.bundle from way the hell back in 2005, which is what broke all of your other modules that you already updated if you use CPAN for anything at all. But hey, now CPAN is broken, so what now? You get to do a manual install, luckily, CPAN is an archive. Head over to the IO distribution over at CPAN, download the archive, and head into ye olde Terminal. Extract the archive if it hasn't already, enter the directory, and execute:
perl Makefile.PL && make && sudo make install


Ding, everything works again. Write an angry letter to Apple.

Edit: You may find more crap that doesn't work. For instance:

Weak references are not implemented in the version of perl at /Library/Perl/5.8.8/Catalyst.pm line 24


Well, just head into your now-functional CPAN and execute:

force install Scalar::Util


Bam, you made it spicy.
3 comments
Stupid Tricks: sleep_monitor
Posted by Nick at 2:38 PM
Some of you know that I'm a hackintosh user. I've been an Apple fan for a long time, but nothing in their lineup currently works for what I want out of a machine. My last Apple machine was a black MacBook with the original Intel Core Duo. It went in for service three times, and finally, Apple just denied anything was wrong with it. I ended up selling that machine, and the hard drive that was originally in it died a week later.

Huh.

Right now, I use a Lenovo/IBM ThinkPad T61 14" Widescreen edition, with a Core 2 Duo at 2.2GHz, 2gb RAM, a 100gb drive, and DVD-RW DL drive. The screen resolution is a comfortable 1440x900, I have some wireless, and life is good. I'm also running OS X 10.5, licensed but violating EULA, because it's one of the greatest operating systems we currently have available. There are a few little issues with running Leopard on this machine. Most things work, but I don't currently have a driver for the built in ethernet, the machine won't sleep if I have bluetooth enabled, the machine won't wake up if I enable the PC card slots, I can't control the brightness of the LCD, and when the laptop runs out of battery, it shuts off instead of going to sleep.

There are a few people working on two of the issues, namely the brightness issue with the Intel X3100 graphics controller, and a driver for the Intel 82566M Gigabit Ethernet controller. No sense in duplicating their efforts. The only kext I've ever written was a small driver to enable the tablet serial port on the X61 tablet that I had before this, so people could use TabletMagic and get full tablet functionality in OS X. Ethernet driver creator, I am not.

But, hey, I give you one little turd to make your life easier, and you may even find it useful if you're on a real Mac. This little package, 'sleep_monitor', installs a LaunchDaemon and a binary on your machine to keep track of how much battery you have left and put your machine to sleep at a certain threshold. It's a simple idea, but most Mac authors would charge $20 for the privilege. I give you it for free, but you don't get a GUI. Sorry.

When you install the package, it immediately starts. It will wait until you have 4% of your battery remaining, and puts your machine to sleep. On my T61 with the 4 cell battery, that usually kicks me into sleep when I have about 5 minutes of use left in the menu bar, and that will give me many hours of sleep to find an outlet to charge things up. Want to change the threshold? Edit /Library/LaunchDaemons/com.abstractwankery.sleep_monitor.plist and change the second ProgramArgument to the percentage you'd like to kill out at. Have an 8 cell battery? 2-3% is fine. Have a nearly dead battery? Maybe 15% is more your thing. Leave the % sign out of it, it will only cause problems.

SleepMonitor 0.1
Mac OS X 10.4, 10.5
316 comments
Do as I say, not as I do
Posted by Nick at 8:23 AM
Anyone who has been involved with the "forbidden" osx86 scene, or the ability to run Mac OS X on generic PC hardware, likely knows the name netkas. Netkas created the EFI firmware emulator that brings the osx86 distribution of OS X closer to the real thing by emulating the EFI Apple uses in their modern hardware. EFI is Intel's replacement for BIOS, closely resembling OpenFirmware, that allows both the interface to hardware from the software layer as well as providing direction and configuration for said hardware. The EFI emulation layer has opened the doors for more graphics hardware support, booting from GUID Partition Table hard disks, and more. It also allows osx86 users with compatible hardware (Intel chipsets and Core Solos or higher) to use Apple's OS X kernel, rather than waiting for a hacked and patched version from the community.

A company called Psystar recently exploded into the news by openly announcing a commercially sold "hackintosh". They're offering what is essentially a white box PC, with off the shelf parts that match or closely match what Apple is offering in their hardware, pre-installed with Mac OS X 10.5. Their sales pitch is that they're effectively selling an expandable Mac, with more power than an iMac, for less than half the cost. They're bundling a legal copy of Leopard, the Netkas EFI v8 emulator, and Apple's bundled software, as a complete package. It's a license violation to do this, as Apple's EULA specifically forbids using Leopard on hardware that is not Apple-branded.

The funny part to this story is that Netkas is all pissed off that Psystar is using his EFI emulator in a commercial product. He has since re-released EFI v8 with a new license forbidding the use of the software for commercial purposes. Now, if anyone just noticed that, Netkas is pissed off that Psystar is violating his license agreement by bundling software that allows people to violate Apple's license agreement.

Right, then.
1 comment
A loss to the Mac OS X community...
Posted by Nick at 9:32 AM
This weekend, perusing the newsgroups and web sites I frequent, I found out that Michael Bartosh, OS X Server extraordinaire, passed away at 28 very young years of age.

Most people have no idea who Mr. Bartosh is, and I personally never met him or had the opportunity to talk to him except via few messages during my search for answers to questions on the woefully undocumented OS X Server. He was a genius when it came to esoteric NeXT and Apple server technologies, and was one of the few people on these lists that I trusted enough to be the Word. Not only did he know Open Directory, authentication, and server integration like he was born with them, he was constantly at Apple's neck in the nicest way possible, trying to get them to document, fix issues, and turn Mac OS X Server into a real enterprise-class product, instead of the near afterthought it started out as.

I could write more, but it could easily turn into another blogger plaigery wankfest, and I don't have the words to do him justice. Instead, in true form, I will link to a couple of sources. Thank you for all your help all these years, Michael. You will be missed by many people you never met, and my heart goes out to your family.

the AFP announcement: http://www.afp548.com/article.php?story=20060611204217263
John C. Welsh: http://www.bynkii.com/archives/2006/06/ah_crap.html
A picture: http://www.flickr.com/photos/x180/18889652/in/set-444799/
1 comment
Random Mac Freeze Tip
Posted by Nick at 1:03 PM
My coworker had a strange issue where his MacBook Pro would boot up, run just fine for about 30 seconds, and freeze up. The cursor would still move just fine, but you couldn't access anything. SSH sessions into the machine would stop as well. I was baffled, trying to remove Parallels Workstation, thinking that kernel extension had issues, but to no avail.

Turns out that Security Update 2006-003 on Intel managed to mess around with a few services, causing them not to work properly, or abort. In this case, RemoteDesktopAgent would hard freeze a system as soon as launchctl would start it. Remove it from /System/Library/StartupItems, and all is well again.

I wonder how long til Apple releases a Remote Desktop update, or if this is something that is "fixed" in the 3.0 paid upgrade of Apple Remote Desktop.

sigh.
1 comment