Configuring 10.6.8 Server to Deliver Lion Software Updates

Odds are you are taking a incremental approach to rolling out Lion in your organization. The thing is that if you start adding the awesome new MacBook Air or Mac mini units they are only going to run Lion.

If you, like me, run the Software Update Service on 10.6.8 Server then you might like to know that you can configure that server to work with Lion and breathe a little more life into that Server yet.

Read on for moreā€¦

Why SUS?
First let’s have a very quick overview of the Software Update Service.

  • It’s a local mirror of Apple’s public SU servers.
  • It only provides Apple updates.
  • It enables you to pick when to release updates.
  • It can save you a whole bunch of bandwidth!
  • It’s all done with Apache, some custom catalogs, and some http rewrites.

Feel refreshed? Good.

SUS is more important than ever now because Lion continues in the trend of Snow Leopard when it comes to download on-demand software. The ServerEssentials package, printer drivers, and Java are all examples of download on demand software in Lion. The good news is that this stuff uses the Software Update mechanism to work its magic. The great news is that it’s trivial to add Lion support to Snow Leopard Server.

Step by Step
First things first. Fire up Server Admin and stop the Software Update service. Next fire up a Terminal window and head to /etc/swupd.

cd /etc/swupd

Now let’s make backups of the .plist and .conf files for swupd.

cp swupd.plist swupd.plist.bak; cp swupd.conf swupd.conf.bak

Great. Now we are going to add a catalog to the catalog array in the swupd.plist. When we are done it will look like this:

<key>otherCatalogs</key>
     <array>
       <string>index-leopard.merged-1.sucatalog</string>
       <string>index-leopard-snowleopard.merged-1.sucatalog</string>
       <string>index-lion-snowleopard-leopard.merged-1.sucatalog</string>
     </array>

You can do this with a text editor, but PlistBuddy makes it easier. 

sudo /usr/libexec/PlistBuddy -c 'add :otherCatalogs:2 string index-lion-snowleopard-leopard.merged-1.sucatalog' /etc/swupd/swupd.plist

Will do it in one shot. Adding this catalog is what will tell our SUS Server to go and get the Lion updates.

The next bit we need to do is to tell the server that it can provide this catalog to Lion clients. Open up swupd.conf with the editor of your choice.

vi swupd.conf

Go to the bottom of the file, or just search for Rewrite. Look for the Darwin/11 agent string and change the rewrite rule to look like this.

RewriteCond %{HTTP_USER_AGENT} Darwin/11
RewriteRule ^/index\.sucatalog$ /index-lion-snowleopard-leopard.merged-1.sucatalog

Basically we are adding the word “lion” into the sucatalog name.

Now close out of the terminal and start up the Software Update Service with Server Admin again. If you watch the logs, or the updates tab, you will see the Lion updates and on-demand software appear and begin downloading. After a while they will be local and you can start updating those Lion clients!