MacOS – Force a specific version of a framework for a process

calendaricalmacospythonserver.app

So I think it's known that OS X 10.10.5 breaks calendar server because of incompatibilities between the version of Python on 10.10.5 and a specific part of the Calendar Server. It does work in 10.10.3 and 10.10.4. I have determined that by replacing the version of Python.framework in /System/Library/Frameworks that comes with 10.10.5 with a version from another machine (my laptop) that is running 10.10.3, the Calendar Server magically works again! However I am somewhat hesitant about allowing the entire 10.10.5 system to use the Python.framework from 10.10.3.

Is there a way to force only the Calendar Server process to use the 10.10.3 Python.framework, while the rest of the system can use the new one that came with 10.10.5?

I updated the server a few days ago and none of the people who depend on those calendars can access them right now. The fix offered by several other places was to update to 10.11, but I have some other applications that must run on this server that only work on 10.10, and are broken on 10.11. I'm sure there's no way to make them work on 10.11, so the only option for me right now is to stick with 10.10.

Best Answer

A dangerous way to move forward is to use the DYLD_INSERT_LIBRARIES environment variable to change which python framework the calendar server uses. You will need to edit the launchd plist for the calendar server inside of the Server.app bundle to add your the environment variable. Look in Server.app/Contents/ServerRoot/System/Library/LaunchDaemons/ for the file.

The man pages for launchd.plist(5) and dyld(1) will be useful. Also the otool -L command may help you track down dependancies.

I'm not sure how well the calendar server will run with these changes.