<?xml version="1.0" encoding="UTF-8"?>
<essay xml:lang="en" version="5.0" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:gal="http://norman.walsh.name/rdf/gallery#" xmlns:foaf="http://xmlns.com/foaf/0.1/">
<info>
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
<title>Changing my spots</title><biblioid class="uri">http://norman.walsh.name/2008/01/20/leopard</biblioid>
<volumenum>11</volumenum>
<issuenum>9</issuenum>
<pubdate>2008-01-20T12:48:34-05:00</pubdate>
<date>$Date$</date>
<author>
      <personname>
<firstname>Norman</firstname>
	<surname>Walsh</surname>
</personname>
    </author>
<copyright>
      <year>2008</year>
      <holder>Norman Walsh</holder>
    </copyright>
<abstract>
<para>Well, changing my stripes into spots, I suppose. Notes on the
upgrade from Mac OS X “Tiger” to “Leopard”.</para>
</abstract>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#Laptop"/>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#OSX"/>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#SelfReference"/>
</info>

<para xml:id="p2">In much the same spirit as
<link xlink:href="/2007/12/21/backInMac">my last rebuild</link>, here
are some notes on the transition to “Leopard”.</para>

<para xml:id="p14">There are several ways to upgrade the OS, but the only one I
trust is the one where you reformat the drive and start over. It'll
have to be done eventually, that's just the nature of things, so I
think it's better just to start that way.</para>

<orderedlist>
<listitem>
<para xml:id="p15">Make backups. I didn't really need to say that, did I?</para>
</listitem>
<listitem>
<para xml:id="p3">Boot the DVD and install the OS.</para>
</listitem>
<listitem>
<para xml:id="p4">Install extra packages off the DVD: <citetitle>X
Code</citetitle>, <citetitle>X11</citetitle>, etc. It seemed
straightforward this time.
</para>
</listitem>
<listitem>
<para xml:id="p16">
Run <guimenuitem>Software Update</guimenuitem>. Repeat until 
it says it's done.</para>
</listitem>
<listitem>
<para xml:id="p17">Restore the backup data.</para>
<para xml:id="p18">If, like me, you use <filename class="directory">/home</filename>,
you will be <emphasis>very</emphasis> confused until you
<link xlink:href="http://www.tipstrs.com/tip/1821/Fix--home-directory-after-installing-Leopard">figure out</link>
that Leopard has some funky auto mount setup that makes
<filename class="directory">/home</filename> unusable.</para>
<para xml:id="p19">You can fix this by commenting out the appropriate line in
<filename>/etc/auto_master</filename>.</para>
</listitem>
<listitem>
<para xml:id="p20">Merge your old home directory
into the new one that the installer created. (In
<filename class="directory">/Users</filename>, not
<filename class="directory">/home</filename>, previous discussion not
withstanding. I use 
<filename class="directory">/home</filename> for staging web content
because that <emphasis>is</emphasis> where my home directory is located
on the web hosting server.)</para>
</listitem>
<listitem>
<para xml:id="p21">Leopard comes with Python 2.5.1, I'm happy with that. Except that
Berkeley DB doesn't seem to work. Luckily,
<link xlink:href="http://marc-abramowitz.com/archives/2007/11/28/hacking-os-xs-python-dbhash-and-bsddb-modules-to-work/">it can be fixed</link>.
</para>
</listitem>
<listitem>
<para xml:id="p5">Install <citetitle>MacPorts</citetitle>. Use
MacPorts to install <command>wget</command>, <command>msmtp</command>
(for sending mail, at least from my custom Emacs rig),
<command>subversion</command>, and <command>gnupg</command>.
</para>
<para xml:id="p22">For some reason, the MacPorts version of <command>mercurial</command>
<link xlink:href="http://trac.macosforge.org/projects/macports/ticket/13991">won't
build</link>. I <link xlink:href="http://mercurial.berkwood.com/">got a
binary</link> instead.</para>
</listitem>
<listitem>
<para xml:id="p7">Install PyXML (yes, I know there are
<link xlink:href="http://uche.ogbuji.net/tech/4suite/amara/">better
things</link>, but <emphasis>I haz lagazee</emphasis>…)</para>
<para xml:id="p23">Inexplicably, it didn't work. Or, rather, it worked after I
set the <envar>PY_USE_XMLPLUS</envar> environment variable. Maybe
the inexplicable part is why I didn't need to do that on Tiger.
Whatever.</para>
</listitem>
<listitem>
<para xml:id="p24">Use MacPorts to install
<command>links</command>,
<command>p5-libxml-perl</command>,
<command>p5-image-info</command>, and
<command>p5-digest-md5</command>.
[Update 21 Jan 2008: And <command>p5-image-exiftool</command>.]
[Update 24 Jan 2008: Doing this apparently installed <filename>/opt/local/bin/perl</filename>. Having two perls lead to weirdness. Rename 
<filename>/opt/local/bin/perl</filename> and make it symlink to
<filename>/usr/bin/perl</filename>
</para>
</listitem>
<listitem>
<para xml:id="p9">Do the <command>perl -MCPAN -e shell</command> shuffle to install
<citetitle>XML::Parser</citetitle>, <citetitle>XML::XPath</citetitle>, and
<citetitle>RPC::XML</citetitle>. CPAN will look for <command>lynx</command>
and <command>ncftp</command>, so you might want to install them with MacPorts
first, but you don't have to.
</para>
<para xml:id="p34">[Update 24 Jan 2008: And <citetitle>Text::DelimMatch</citetitle>.]
</para>
</listitem>
<listitem>
<para xml:id="p10">In <guimenuitem>System Preferences</guimenuitem>→<guimenuitem>Sharing</guimenuitem>
enable
<citetitle>Remote Login</citetitle>. There are probably a bunch of other
things you want to do while you're in the System Preferences: too many to
enumerate.
</para>
</listitem>
<listitem>
<para xml:id="p25">Bleh. Leopard ships with Apache 2. I guess that's fair, but I still
need to run Apache 1.3.x  Luckily, you can install that with MacPorts.</para>
</listitem>
<listitem>
<para xml:id="p11">Grab the sources for the version of
<application>Apache</application> that you just installed.
Build that version with
the right <command>suexec</command> parameters:</para>
<programlisting>./configure \
"--with-layout=Darwin" \
"--sbindir=/opt/local/sbin" \
"--prefix=/opt/local" \
"--enable-suexec" \
"--suexec-caller=_www" \
"--suexec-docroot=/home" \
"--suexec-logfile=/opt/local/var/log/httpd/suexec.log" \
"$@"</programlisting>
<para xml:id="p26">Note the odd UID “_www”. I have no idea why Leopard sticks underscores
in front of a bunch of users.</para>
<para xml:id="p12">Move <filename>src/support/suexec</filename> into
<filename>/opt/local/sbin</filename> and <command>chmod</command>
it <literal>4555</literal>.
</para>
<para xml:id="p27">Tiger created an “ndw” user and an “ndw” group. Leopard doesn't do that,
it puts you in the “staff” group. That's fine, except you can't run
<command>suexec</command> with the staff group. So go ahead and create yourself
a group:</para>
<screen>$ <userinput>dseditgroup -o create -i 501 ndw</userinput></screen>
<para xml:id="p28">Now, how do
we get into that group? On
<guimenuitem>System Preferences</guimenuitem>→<guimenuitem>Accounts</guimenuitem>,
click the lock so you can make changes, then Ctrl+click on the user (yeah,
cause that was <emphasis>intuitive</emphasis>), and change the group.
</para>
<para xml:id="p29">Restart <application>Apache</application>.
Check the error log to make sure it worked.</para>
</listitem>
<listitem>
<para xml:id="p13">Install
<application>Adium</application>,
<application revisionflag="deleted">Adobe Reader</application>,
<application>Caffeine</application>,
<application>Carbon Emacs</application>,
<application>Chicken of the VNC</application>,
<application>Disk Inventory</application>,
<application>Firefox</application>,
<application revisionflag="deleted">GIMP</application>,
<application>GoogleEarth</application>,
<application>Growl</application>,
<application>gSync</application>,
<application>HuginOSX</application>,
<application>iMovieHD6</application>,
<application>Inkscape</application>,
<application>iRedLite</application>,
<application>Last.fm</application>,
<application>Lightroom</application>,
<application>MarcoPolo</application>,
<application>MenuCalendarClock</application>,
<application>MenuMeters</application>,
<application>Netbeans</application>,
<application>NeoOffice</application>,
<application>Oxygen</application>,
<application>Quicksilver</application>,
<application revisionflag="deleted">SSHKeychain</application>,
<application>Skim</application>,
<application revisionflag="deleted">SuperDuper!</application>,
<application>VMware Fusion</application>,
<application>X-Chat Aqua</application>, and
<application>Zoom</application>.
</para>
<para xml:id="p30">I'm skipping <application>Adobe Reader</application> because I've never had
a compelling
need for it. I'm skipping <application>SSHKeychain</application> because
Leopard includes the functionality that I care about (remember to remove
the environment variables, though!). I'm skipping
<application>SuperDuper!</application> because I expect
<application>Time Machine</application> to do the job.</para>
<para xml:id="p31">I gather that <application>GIMP</application> requires a little
fiddling that I haven't persued yet.</para>
</listitem>
<listitem>
<para xml:id="p32">Install Firefox extensions: Adblock Plus, cmSiteNavigation Toolbar,
del.icio.us Bookmarks, Download Statusbar, Firebug, Firemacs, Flashblock,
Greasemonkey, Live HTTP Headers, No Squint, Resizeable Form Fields,
ScrapBook, Tab Mix Plus, Web Developer.
</para>
</listitem>
<listitem>
<para xml:id="p35">[Update 29 Jan 2008: <application>Finder</application>, show me
all my damn files: <command>defaults write com.apple.finder AppleShowAllFiles ON</command>]</para>
</listitem>
<listitem>
<para xml:id="p36">[Update 4 Feb 2008: Use 
MacPorts to install <command>gpsbabel</command>, get the USB/Serial port
drivers from <link xlink:href="http://www.keyspan.com/"/>.]</para>
</listitem>
<listitem>
<para xml:id="p37">[Update 19 Feb 2008: Remove <literal>/home</literal> from the
exclusions in
<filename>/System/Library/CoreServices/backupd.bundle/Contents/Resources/StdExclusions.plist</filename> because I want <filename>/home</filename> backed up by
<application>Time Machine</application>.]</para>
</listitem>
</orderedlist>

<para xml:id="p33">So far, so good.</para>

<para xml:id="p38">[Update 31 July 2008: Another rebuild because of
<link xlink:href="2008/07/12/hardware">shoddy software</link>.
This time I found a workaround for the inability of 
<citetitle>MacPorts</citetitle> to build some stuff
(<command>port clean --work <replaceable>package</replaceable></command>
and try again; apparently it's a known bug that will be fixed…eventually).
I fixed the Berkeley DB problem by installing python from
<link xlink:href="http://www.python.org/"/> and symlinking to that.]
</para>

</essay>

