Preparing for Mavericks

Apple has released OSX 10.9, also known as Mavericks. Which means it's time to prepare for an operating system upgrade again. In the interest of soliciting feedback, I'm sharing the rough process I'm using for this upgrade.

  • Update all software. In addition to installing all pending App Store updates, I make sure all any applications that have auto-updaters are started and they check for new updates. In particular this means running Mail to ensure GPGTools updates GPGMail.
  • Backup all important data. Most of my important but not confidential data is already stored remotely on GitHub and Dropbox. I'm in the process of setting up Arq to backup the remainder.
  • Update and upgrade Homebrew. Rather than just upgrade Homebrew, for this upgrade I've decided to completely uninstall and reinstall by following the uninstall instructions on the Homebrew FAQ and the commands in this Gist.
  • Compile a list of post upgrade procedures. Currently, the only process I've recorded is to use xcode-select to install the latest command line tools.

It's hardly a detailed or rigorous plan. If you do have feedback, or think any thing is missing, please leave a comment below. Alternatively, there is also Twitter or email.

Homebrewing with Homebrew

I'm a bit of an Apple fan, most of my private development is done using Mac OSX. Apple doesn't distribute OSX with most of the software packages I use. Instead, I use Homebrew to install new packages, their dependencies, check for updates, and remove everything again when I am finished.

However, even the extensive collection of software that Homebrew supports isn't always going to be able to provide an obscure or unusual piece of software that I might want to install. So I created a Homebrew Tap, which I called Arcane, to manage such packages.

Homebrew introduced Taps in 0.9. Taps Taps are a way of creating repositories of Homebrew formula that are independent of the main Homebrew repository. Homebrew maintains a list of interesting taps, but anyone can create their own.

Creating a new Tap is straight forward. First, create a new repository on Github. There is a naming convention for creating a Tap repository, it must begin with homebrew-. The remainder is the name of the Tap. My Tap is called Arcane, so the repository is homebrew-arcane.

Once the new repository is created, it can be tapped using brew tap user/repo. Where user is your GitHub user account and repo is the name of your Tap repository. (The bit after homebrew-) The repository will be cloned into /usr/local/Library/Taps. To tap Arcane I used brew tap aliles/arcane.

Now you can begin creating formula for your new Tap. Homebrew has a guide on how to create a new formula that covers the basics. Unfortunately you will likely need to read existing formula to learn the more advanced features of Homebrew.

After running brew create, a new formula will be created in /usr/local/Library/Formula. As formula are Ruby scripts, you can move the formula from its initial location to your Tap repository in /usr/local/Library/Taps/user-repo. After moving the formula it is necessary to run brew tap --repair to ensure a symbolic link to the formula is created in /usr/local/Library/Formula. Without this link Homebrew is unable to find the formula to install it.

Once you have finished developing your formula, commit it to the repository. Congratulations, you are now the maintainer of a Homebrew Tap of interesting formula. As a bonus you can now also repeatedly and reliably install (and remove) this software again at any time in the future, should you be desire to do so.