Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Problem updating 10.6.8 SWUpdate server to host Lion updates

Anyone else having problems following the directions in KB article "Mac OS X Server v10.6: Hosting Software Updates for OS X Lion or Lion Server" <http://support.apple.com/kb/HT4771?viewlocale=en_US>?


It's basically modifying a plist and a conf file, but when I look at MY .conf file I don't find the specified text to change? I've even checked the previous version of the file, and don't find the text.


TFA says:

In step 5, you will need root access to update the file /etc/swupd/swupd.conf. To be safe, make a backup copy of the file before editing it. Locate the following line near the end of the file:



RewriteCond %{HTTP_USER_AGENT} Darwin/11



Edit the following line to read:



RewriteRule ^/index\.sucatalog$ /index-lion-snowleopard-leopard.merged-1.sucatalog



But I'm not finding either of these lines in my own file.


Anyone have luck with this? Anyone run into the same issue?


TIA for any help!


-Nick

Mac OS X (10.6.8)

Posted on Jul 21, 2011 8:41 AM

Reply
Question marked as Best reply

Posted on Jul 21, 2011 10:40 AM

I have a similar configuration to what you've found; those entries do not exist on the 10.6.8 Snow Leopard Server box I checked.


It looks that there's been an update to the file, but the running version did not get changed.


I did some digging and found a copy of the file here:


/System/Library/PrivateFrameworks/SUServer.framework/Versions/A/Resources/swupd. conf


And that version of the file does have the lines discussed in HT4771.


I have not tested this: make a backup of your disk before you try this, then see if following the same steps from TS3867 (for 10.7 there, but I'd try the same sequence on 10.6) fixes this; if this gets you the ("new") versions of the files extracted from the resources directory.

32 replies

Jul 30, 2011 12:35 PM in response to Laurent Cole

Laurent Cole wrote:


SUS is shut down.


I edited the swupd.conf and swupd.plist in /System/Library/PrivateFrameworks/SUServer.framework/Versions/A/Resources/

like in HT4771.


Restarted the computer.


Edited the swupd.conf and swupd.plist in /etc/swupd as recommanded by Apple in HT4771.


Restarted the SUS


Waited for new dowloads to be finished.


Checked in /var/db/swupd/html/content/catalogs/others


There should be 5 files regarding SL, 5 files regarding Leopard and 5 files regarding Lion.


I haven't stopped and restarted the SUS yet cause it's working for now.


Don't need to stop and start it again. Just have a look (cat works best) at the end of /etc/swupd/swupd.conf where the rewrite rules are located. Has the Darwin/11 line reverted to the original and lost the reference to lion? That's what is occurring for me. Every time SUS is started, it grabs a different copy of the file (without the lion reference) and overwrites the one in /etc/swupd that I just edited to include the new reference to Lion. It does NOT simply use the one in /System/Library/PrivateFrameworks/SUServer.framework/Versions/A/Resources/. I think that's just a red herring.


I do have the 5 of each file as you mention, but I would think that is handled by the edit to swupd.plist that DOES seem to stick.


The rewrite rules are Apple's new way of ensuring that clients will see the correct catalogue without having to use "defaults write blah blah blah" on each client. Basically, it no longer matters what the client has as its catalogue URL since it gets correctly re-written by the server using those rules. This is a far better way to handle it as only the server needs updating for new OS versions that require a different catalogue. But if it keeps reverting to the wrong file, my Lion client will never be able to see the correct new Lion catalog.


What does your /etc/swupd/swupd.conf file have as its Darwin/11 rewrite rule now?


BTW, what updates have been released for Lion. My SUS doesn't actually seem to list any. In fact nothing for almost a couple of weeks. Maybe I need to worry about why it just seems to have completely come to a halt:-(

Jul 30, 2011 10:40 PM in response to UKenGB

The swupd.conf file in /etc/swupd is still :


<IfModule mod_rewrite.c>

RewriteEngine On

RewriteCond %{HTTP_USER_AGENT} Darwin/9

RewriteRule ^/index\.sucatalog$ /index-leopard.merged-1.sucatalog

RewriteCond %{HTTP_USER_AGENT} Darwin/10

RewriteRule ^/index\.sucatalog$ /index-leopard-snowleopard.merged-1.sucatalog

RewriteCond %{HTTP_USER_AGENT} Darwin/11

RewriteRule ^/index\.sucatalog$ /index-lion-snowleopard-leopard.merged-1.sucatalog

</IfModule>


New dowloads are :

11A2061_ServerEssentials

11A2063_ServerEssentials

11A511a_ServerEssentials

041-0541 (Mac OSX Lion Developer Preview - Update 1)


I think that's all.

Jul 31, 2011 1:38 AM in response to Laurent Cole

Curiouser and curiouser.


I tried again this morning but as soon as I restart SUS, it reverts the file and loses the lion reference. I've had it searching for other instances of that data in an attempt to determine from it is getting it, but no luck. Since I have already edited

/System/Library/PrivateFrameworks/SUServer.framework/Versions/A/Resources/swupd. conf

which is still correct, I know it is not simply copying that.


In desperation, I switched SUS OFF and deleted my /etc/swupd/swupd.conf and restarted SUS in the hope that this would force it to copy

/System/Library/PrivateFrameworks/SUServer.framework/Versions/A/Resources/swupd. conf

Bingo! On restart, SUS has simply copied the above file into /etc/swupd. I know it has done this since the spacing between the original part of the file and the new Rewrite/Rules section is smaller now, i.e. exactly as per

/System/Library/PrivateFrameworks/SUServer.framework/Versions/A/Resources/swupd. conf


So, the original restart of SUS grabs that new section from somewhere, we know not where and then caches the new file so that editing /etc/swupd/swupd.conf has no effect because SUS just gets it from the cache again on every restart.


But, if you DELETE /etc/swupd/swupd.conf, it will copy the entire file from

/System/Library/PrivateFrameworks/SUServer.framework/Versions/A/Resources/swupd. conf

So best solution is:-


Stop SUS

Edit /System/Library/PrivateFrameworks/SUServer.framework/Versions/A/Resources/swupd .conf as per article HT4771

Delete /etc/swupd/swupd.conf

Start SUS


You should now have the correct swupd.conf in use by SUS. Phew :-)


Unfortunately, my server still seems to be not getting any updates (above changes to swupd.conf are not related to this).

Aug 5, 2011 5:49 AM in response to UKenGB

Just yesterday i went through the same ordeal you and others have mentioned on this thread. Everytime I changed the swupd.conf file it would change back to the original version, dropping the lion addition. The way I finally rsolved it was to Stop SUS, make the change to swupd.conf, then Shut Down the server. Upon restarting the unit and SUS I found that the change had taken effect and appeared to be working.


WRONG!


I can see the files now in the Upodates listed under Software Update service of Server Admin, but they will not download and they will not Enable. My setting state to Copy All and to Automatically Enbale, but that doesn't happen and I can't figure out what I'm missing.


Any help with this would be greatly appreciated.

Aug 5, 2011 1:39 PM in response to Operations Manager

Hello.


People I just figured out how to make my Lion clients connect to my XServe running 10.6.8. The issue is Lion has a bug in how it looks for the new update path. Currently Lion looks to the default web server port (80) and not port (8088) folders for Lion updates.


Here is my workaround if you need this done, like now. And you running the default Apache2 web server.


Make a sym link to the contents directory (/var/db/swupd/html/contents) in the /Library/WebServer/Documents directory. I noticed my Lion clients were throwing an error when hitting the server. I did a tail on the apache2 error_log, the error was:


[client.x.x.x.x] File does not exist: /Library/WebServer/Documents


This only happened on Lion clients.


What was happening was the Lion clients do not see the changes Apple recommends you make to the swupd.conf and swupd.plist files. The changes made to those files do have a positive effect on snowleopard clients.. but not lion.


I also noticed I was getting a "404" error in the apache2 access_log


Meaning it could not locate the sucatalog file even though I knew all was set and available.


My snowleopard clients are not effected by theses chnages and all is up and runing great now. Hope this helps some of you.


I also had the same issue with the swupd.conf file resetting. I ended up changing ownership on the of file back to _softwareupdate This is after I stopped Server Admin and the update service. I think this is hard coded into the software update service.... needless eventually I got my file to accept the changes.. but as I figured out the above I relaized the files were being completely ignored for Lion updates.


Dominic

Aug 8, 2011 2:47 AM in response to Operations Manager

Operations Manager wrote:


I can see the files now in the Upodates listed under Software Update service of Server Admin, but they will not download and they will not Enable. My setting state to Copy All and to Automatically Enbale, but that doesn't happen and I can't figure out what I'm missing.


Any help with this would be greatly appreciated.


I have seen this. I have no idea why it occurs, but the only fix seems to be to just leave it and eventually they get enabled and can be used. Doesn't sound like a good solution, but does seem to work. Try leaving it for a while. It took days to sort itself out when I had this problem, but it did get there in the end without doing anything else.

Aug 8, 2011 2:57 AM in response to Nick Lewis

Just to confirm as concisely as possible, this is how to make those changes and make them stick.


Stop the SUS.


Edit (as per Apple's instructions) swupd.conf and swupd.plist in:

/System/Library/PrivateFrameworks/SUServer.framework/Versions/A/Resources/


In /etc/swupd/, edit swupd.plist in the same way and DELETE swupd.conf


Restart SUS


Check the 2 files now in /etc/swupd/ - they should be correct.

Aug 18, 2011 9:05 AM in response to Nick Lewis

Hello All...I originally was having the same issue with the files reverting back to the original but I was able to get the lion updates working by doing the following:


1. Login to your server as root, turn off SUS and Quit Server Admin.

2. Goto /System/Library/PrivateFrameworks/SUServer.framework/Versions/A/Resources/

3. Edit the swupd.conf to contain the new lion entry as per apple.

4. Delete the swupd.conf that is located in /etc/swupd

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

6. Resart the server

7. Start the Server Admin and Start the SUS.

8. Now the server should be reflecting the new Lion Updates.


Tested this with a managed computer and after I enabled the Lion updates I was able to instalt the 10.7.1 update.


Hope this helps.

Aug 20, 2011 4:47 AM in response to leifsehn

Can i just say thank you for this, i started to look at this yesterday and after following the documentation i was racking my brains as to why Apple is telling you to do something that kida doens't quite work as mine kept overwriting the file every time i started to service which gave me the older version.


The above did definitely work for me though so thank you 🙂


Joe

Sep 16, 2011 12:55 PM in response to Laurent Cole

I'm not getting the /var/db/swupd/html/content/catalogs/others/index-lion-snowleopard-leopard.merge d-1.sucatalog


I have the other 4 (.productscache .apple .apple.previous .composite) but not the plain old sucatalog.


Wha'd I do wrong? Does it have to complete downloading the lion updates before it creates the lion-...sucatalog?

If so, I'll just be patient and see how it shakes out. My swupd.conf and plist files appear to be correct at this point...

Sep 18, 2011 11:05 AM in response to UKenGB

That worked perfectly for me. I edited the swupd.plist, restarted the Software Update service, stopped the Software Update service and then when I went back into swupd.conf the missing Rewrite rules were at the bottom of the file. I edited them per the kbase article and my server seems to be happily downloading Lion updates right now. 🙂

Problem updating 10.6.8 SWUpdate server to host Lion updates

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.