Waterroof is incredulous
I've been using WaterRoof, a frontend for ipfw on OS X. It's only a bit clunky and works well. What is particularly endearing, however, is its response when you have configured your rules and you tell WaterRoof that you want your computer to load them at startup:

Moving Swap on OS X 10.5 Leopard
By default, OS X 10.5 stores its swapfiles in /private/var/vm:
$ ls -lh /private/var/vm
total 131072
-rw------T 1 root wheel 64M May 28 10:32 swapfile0Recently I've been having some fun with a Mac Pro that has 32GB (sic) of RAM. The machine is being used for some bioinformatics work which involves huge chunks of memory. Naturally we ran out of memory and started swapping, but we wanted to swap faster.
I created a RAID 0 (OS X calles it a striped set) using 32GB partitions across four disks for a 128GB RAID volume. Creatively, I called this volume swapraid0. I chose that size because Leopard can have a maximum of 64 2GB swap files (at least that's what Yves wrote). The first few swap files are smaller (Leopard creates 64MB, 128MB, ... 1GB files) so 128GB should be plenty.
I made this RAID 0 volume the first volume (and put the OS on the second volume) because some people reported trouble if swap was not on the first volume.
Then I copied the existing paging directory to the new volume:
$ sudo cp -Rp /private/var/vm /Volumes/swapraid0/.vmI used a dot in the name so it wouldn't show up in the Finder. -R is recursive and -p means "preserve permissions".
If you simply edit /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist to point to your swap on the new volume, you run the risk of the volume not being mounted in time during startup. So I put the following at /sbin/dynamic_pager_init:
#!/bin/bash
#launch Apple's dynamic_pager only when the swap volume is mounted
#see http://forums.macosxhints.com/showpost.php?p=452409&postcount=14
if [ "x`df -H | grep /Volumes/swapraid0`" = "x" ]; then
echo "Waiting for swap volume to mount";
else
echo "Launching dynamic pager on volume swapraid0";
/sbin/dynamic_pager -F /Volumes/swapraid0/.vm/swapfile;
fiChanged permissions on /sbin/dynamic_pager_init to make it executable:
sudo chmod ugo+x-w /sbin/dynamic_pager_init
sudo chown root:wheel /sbin/dynamic_pager_initDouble-checked:
$ ls -l /sbin/dynamic_pager_init
-r-xr-xr-x 1 root wheel 388 Jun 1 20:41 /sbin/dynamic_pager_initNext, I made a backup of the plist that launches the dynamic pager:
$ sudo cp -p /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist /Users/jvandyk/com.apple.dynamic_pager.plistThen I edited the plist so that it would run the script at /sbin/dynamic_pager_init:
$ sudo nano -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plistThe result:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.apple.dynamic_pager</string>
<key>ProgramArguments</key>
<array>
<string>/sbin/dynamic_pager_init</string>
</array>
<key>OnDemand</key>
<false/>
</dict>
</plist>After rebooting, I ensured that the pager had actually launched:
$ ps aux | grep swap
root 161 0.0 0.0 610348 3504 ?? S 10:00AM 0:00.01 /sbin/dynamic_pager -F /Volumes/swapraid0/.vm/swapfileWarnings/Caveats
1. You'd have to be nuts to do this. The existing pager settings work fine.
2. I am not responsible if you blow up your machine.
3. When I made a typo while I was experimenting, I found out what happens when the pager isn't actually running and you use all the memory. Ugly.
4. Certainly there are ways to improve this.
Sources
Pretty much all of this approach was taken from the posts by E James, whom I thank.
Also, read the dynamic pager man page:
$ man dynamic_pagerA Drupal Shop to Avoid
This blog receives many comments, only a few of which I publish. The vast majority of them are spam attempts. However, this one caught my eye. It's a comment promoting an Indian Drupal development firm. Here's a short review of Drupal shops that have spammed me:
----
IP Address: 119.82.108.2 [New Delhi]
Name: rogerkk
Email address: ziya.adodis.seo@gmail.com
URL: http://www.drupal-web-developers.com/drupal-theme-development
Comment:
Drupal Theme Developer, is a best Drupal Theme web developing firm in India. We build <br><br>affordable web for best price. We develop Drupal projects for any web and web pages. We do, Drupal <br><br>Outsourcing project, PHP & Mysql outsource web development.
----
If you're thinking about outsourcing, my review of this company is: run away. Any company that attempts to promote itself by leaving links to its website in blog comments, especially on an unrelated post, has got to be bad news.
Update
I've now received similar spam from a second company called Druteam:
IP Address: 213.233.88.242 [Romania]
Name: Druteam
Email address: sales@druteam.com
URL: http://www.druteam.com
Comment:
If any of you need help on boosting speed on your Drupal website, please contact us for professional services.
Update 6/5/2010
And from a third company called Experts from India:
IP Address: 122.168.226.35 [Raipur, Chhattisgarh, India]
Name: Drupal development
Email address: cis.abhinav@gmail.com
URL: http://www.expertsfromindia.com/hire-drupal-developers-programmers.htm
OS X: To Protect and Serve
Over the weekend an importer force attacked my Mac. Fortunately, even though the box was unattended at the time, Mac OS X retaliated, eliminating all traces of this hostile force.

I couldn't find much on the web about the "Importer force killed!" message other than Simone Manganelli's helpful tweet.
yum update missing dependencies on RHEL5
I was getting the following dependency errors on a Red Hat Enterprise Linux 5 box. This was a stock box that has a RHEL subscription and had not used any yum repositories other than Red Hat's own official repositories.
# yum update
Loaded plugins: rhnplugin, security
Skipping security plugin, no data
Setting up Update Process
Resolving Dependencies
Skipping security plugin, no data
--> Running transaction check
---> Package libsoup.i386 0:2.2.98-2.el5_3.1 set to be updated
---> Package ghostscript.i386 0:8.15.2-9.4.el5_3.4 set to be updated
---> Package evolution-data-server.i386 0:1.12.3-10.el5_3.3 set to be updated
---> Package libpng.i386 2:1.2.10-7.1.el5_3.2 set to be updated
--> Processing Dependency: libebook-1.2.so.9 for package: gnome-panel
--> Processing Dependency: libebook-1.2.so.9 for package: control-center
--> Processing Dependency: libecal-1.2.so.7 for package: gnome-panel
--> Processing Dependency: libedataserver-1.2.so.7 for package: gnome-panel
--> Processing Dependency: libedataserver-1.2.so.7 for package: control-center
--> Processing Dependency: libedataserverui-1.2.so.8 for package: gnome-panel
--> Processing Dependency: evolution-data-server >= 1.1.4 for package: gnome-panel
---> Package device-mapper-multipath.i386 0:0.4.7-23.el5_3.1 set to be updated
---> Package lcms.i386 0:1.18-0.1.beta1.el5_3.2 set to be updated
---> Package kpartx.i386 0:0.4.7-23.el5_3.1 set to be updated
--> Processing Dependency: libgs.so.8 for package: ImageMagick
--> Processing Dependency: ghostscript for package: libgnomeprint22
--> Processing Dependency: ghostscript for package: ghostscript-fonts
---> Package firefox.i386 0:3.0.7-1.el5 set to be updated
---> Package xulrunner.i386 0:1.9.0.7-1.el5 set to be updated
---> Package curl.i386 0:7.15.5-2.1.el5_3.4 set to be updated
--> Finished Dependency Resolution
libgnomeprint22-2.12.1-10.el5.i386 from installed has depsolving problems
--> Missing Dependency: ghostscript is needed by package libgnomeprint22-2.12.1-10.el5.i386 (installed)
gnome-panel-2.16.1-7.el5.i386 from installed has depsolving problems
--> Missing Dependency: libecal-1.2.so.7 is needed by package gnome-panel-2.16.1-7.el5.i386 (installed)
1:control-center-2.16.0-16.el5.i386 from installed has depsolving problems
--> Missing Dependency: libedataserver-1.2.so.7 is needed by package 1:control-center-2.16.0-16.el5.i386 (installed)
gnome-panel-2.16.1-7.el5.i386 from installed has depsolving problems
--> Missing Dependency: libedataserver-1.2.so.7 is needed by package gnome-panel-2.16.1-7.el5.i386 (installed)
gnome-panel-2.16.1-7.el5.i386 from installed has depsolving problems
--> Missing Dependency: libebook-1.2.so.9 is needed by package gnome-panel-2.16.1-7.el5.i386 (installed)
gnome-panel-2.16.1-7.el5.i386 from installed has depsolving problems
--> Missing Dependency: libedataserverui-1.2.so.8 is needed by package gnome-panel-2.16.1-7.el5.i386 (installed)
ghostscript-fonts-5.50-13.1.1.noarch from installed has depsolving problems
--> Missing Dependency: ghostscript is needed by package ghostscript-fonts-5.50-13.1.1.noarch (installed)
gnome-panel-2.16.1-7.el5.i386 from installed has depsolving problems
--> Missing Dependency: evolution-data-server >= 1.1.4 is needed by package gnome-panel-2.16.1-7.el5.i386 (installed)
ImageMagick-6.2.8.0-4.el5_1.1.i386 from installed has depsolving problems
--> Missing Dependency: libgs.so.8 is needed by package ImageMagick-6.2.8.0-4.el5_1.1.i386 (installed)
1:control-center-2.16.0-16.el5.i386 from installed has depsolving problems
--> Missing Dependency: libebook-1.2.so.9 is needed by package 1:control-center-2.16.0-16.el5.i386 (installed)
Error: Missing Dependency: libecal-1.2.so.7 is needed by package gnome-panel-2.16.1-7.el5.i386 (installed)
Error: Missing Dependency: ghostscript is needed by package ghostscript-fonts-5.50-13.1.1.noarch (installed)
Error: Missing Dependency: ghostscript is needed by package libgnomeprint22-2.12.1-10.el5.i386 (installed)
Error: Missing Dependency: libebook-1.2.so.9 is needed by package 1:control-center-2.16.0-16.el5.i386 (installed)
Error: Missing Dependency: libgs.so.8 is needed by package ImageMagick-6.2.8.0-4.el5_1.1.i386 (installed)
Error: Missing Dependency: libebook-1.2.so.9 is needed by package gnome-panel-2.16.1-7.el5.i386 (installed)
Error: Missing Dependency: libedataserver-1.2.so.7 is needed by package 1:control-center-2.16.0-16.el5.i386 (installed)
Error: Missing Dependency: libedataserverui-1.2.so.8 is needed by package gnome-panel-2.16.1-7.el5.i386 (installed)
Error: Missing Dependency: evolution-data-server >= 1.1.4 is needed by package gnome-panel-2.16.1-7.el5.i386 (installed)
Error: Missing Dependency: libedataserver-1.2.so.7 is needed by package gnome-panel-2.16.1-7.el5.i386 (installed)
The solution was to clean out yum's local caches with:
yum clean all
and then
yum update
I suspect that yum clean headers alone might have done the trick, but I was too quick on the trigger with yum clean all.
Update: Anonymous says that yum clean dbcache works.
Drupal on Cover of Information Week
Look what's on the cover of the November 17, 2008 issue of Information Week! Drupal is mentioned several times throughout their series on open source.
Interviewed
Hey, I got interviewed by OStatic about Pro Drupal Development, Second Edition. I mention giant bunnies in the interview.
ImageMagick, MacPorts and MAMP
After installing ImageMagick from MacPorts, I ran into the following error in my MAMP Apache error log when trying to run PHP code that resized images:
Symbol not found: __cg_jpeg_resync_to_restart
To solve this, edit /Applications/MAMP/Library/bin/envvars to read:
DYLD_LIBRARY_PATH="/Applications/MAMP/Library/lib:$DYLD_LIBRARY_PATH"
export DYLD_FALLBACK_LIBRARY_PATH=/Applications/MAMP/Library/lib
What Pro Drupal Development is, and What it Is Not
As copies of Pro Drupal Development, Second Edition hit the streets, I'd like to take a moment to clarify what the book is and what it is not.
What it is not
- A complete and comprehensive guide to using MySQL with Drupal
- A detailed howto on integrating Drupal with Sphinx
- The ultimate reference on using jQuery/AJAX/JavaScript with Drupal
- A step-by-step tutorial on building an ecommerce site with Drupal
- ...
What it is
The target audience of Pro Drupal Development is smart people who know PHP (or other languages; PHP can be picked up pretty easily) and are looking for an overview of how Drupal core works. It achieves this by walking through Drupal's major systems: users, nodes, filters, triggers, themes, etc. One of the challenges in writing the book was knowing when to stop. Take theming, for example. To do justice to Drupal's theming system would take a 400-page book in itself. The same goes for working with multimedia files, or optimization, or jQuery. The idea of Pro Drupal Development is to lay down the basics in each of these areas so that the reader is oriented and can then go on to use other resources, or to just better understand the code itself. Other books are being written that will provide great detail in specific areas, and I'm glad to see that -- it's a sign that Drupal is maturing and becoming well-known enough that there is a demand.
Pro Drupal Development was written to provide an on-ramp for intelligent people starting with Drupal so they can avoid months of feeling dumb in irc or having to piece together the big picture from a blog post here, a doc page there, a README here (that's the way I learned Drupal, and it's a frustrating way to learn). If the book fulfills this goal (and from my conversations with new developers it has) then I am satisfied.
When you find errors in the book, please post them as errata so that others can benefit. I'd recommend that when you get the book, go through the errata and make notes in the margins so that when you use the book for reference, you'll see the corrections. With the first edition, we were able to correct a lot of the errors in the second and third printings.
Call to undefined function cache_get()
When debugging with Zend Studio, you may get the fatal error "Call to undefined function cache_get()" when debugging, even though your site appears just fine in the browser.
Zend Studio seems to search open files first without regard to their actual paths. In my case, I had the cache.inc file from the views module open in Zend, and Zend was loading that instead of includes/cache.inc during debugging. Simply closing the file solved the problem.



