Updated after phone meeting 21-Nov-2011
[devwiki.git] / design / librarymacinstallerplan.mdwn
index 81dcc77..ed4c7fd 100644 (file)
@@ -2,25 +2,34 @@
 ###Introduction:
 This document describes Codethink's plan for producing an installer for the Moonshot GSS EAP and SASL GS2 libraries for Mac OS X 10.6 (“Snow Leopard”) and 10.7 (“Lion”). The installer will include the libraries and all dependencies, and will perform any configuration necessary to allow the libraries to be used.
 
-The Moonshot GSS EAP library implements the EAP mechanism for use by the GSS API. The GSS API is implemented by the Kerberos whoich ships with the OS (but see Issues below)
+The Moonshot GSS EAP library implements the EAP mechanism for use by the GSS API. The GSS API is implemented by the Kerberos implementation which ships with Mac OS (but see Issues below).
 
-The SASL GS2 Library implements the GS2 SASL mechanism for use by the SASL2 library.
+The SASL GS2 Library implements the GS2 GSS-API->SASL bridge mechanism for use by the SASL2 library.
 
 The document describes the goals, activities, deliverables and milestones for the development. It also gives some background on the intended locations of the files to be installed, system configuration modifications and any other pertinent information.
 ###Goals
-The primary goal is to allow users to install the libraries on a computer running Mac OS X without needing to build them from source. Once installed, the libraries can be used to provide authentication services to programs which use them. 
+The primary goal is to allow users to install, in a single operation, everything they need to start using Moonshot. This includes:
 
-Secondary goals are
+* the Moonshot GSS EAP library;
+* the SASL GS2 Library;
+* the (re-architected) Identity Selector software (currently referred to a moonshout-ui).
+
+The installer for the Identity Selector software will be delivered as part of the implementation of the architectural changes to the software (due 31st December), so the current task will deliver only the first two.
 
-1. To allow users who are familiar with the autotools tool chain to install, as well as build, the libraries using autotools on a computer running Mac OS X. (This is currently possible for the Cyrus SASL library and plugins, but not for the Moonshot GSS EAP library).
+We will deliver this goal incrementally, by developing sub-packages for cyrus_SASL, Moonshot EAP library and Identity selector, and combining them into a meta-package.
 
-2. To automate (as far as possible) and document the process, allowing Moonshot project developers to easily produce installer packages for future versions of these libraries.
+allow users to install the libraries on a computer running Mac OS X without needing to build them from source. Once installed, the libraries can be used to provide authentication services to programs which use them. 
+
+Secondary goals are
+
+1. To allow developers and users who are familiar with the Mac OS build tools chain to install, as well as build, the libraries using these tools on a computer running Mac OS X. (This is currently possible for the Cyrus SASL library and plugins, but not for the Moonshot GSS EAP library).
+2. To automate (as far as possible) and document the process of making the installer, allowing Moonshot project developers to easily produce installer packages for future versions of these libraries.
 
 ###Deliverables:
 1. Changes to files if required to allow the Moonshot GSS EAP library to be installed, as well as built, under Mac OS using autotools.
 2. An installer package (or packages) that, when run, will install the necessary files to the required places in the files system. (See Outstanding questions/issues 1).
 3. A compressed disk image file containing the installer package(s), which can be mounted to run the installer package. (See Outstanding questions/issues 2)
-4. Instructions and scripts for creating the installers and disk images from source. PackageMaker, (the tool provided by Apple to build installer packages - see Ref. 2) does not have a command line interface, and there do not appear to be any freely available alternatives which do, so it will probably not be possibly to automate the production of the installer package(s). 
+4. Instructions and scripts for creating the installers and disk images from source. The scripts will use the [*packagemaker* tool](https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/packagemaker.1.html) to build the installer packages and the [*hdiutil* tool](https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/hdiutil.1.html#//apple_ref/doc/man/1/hdiutil) to create and to manipulate disk images.
 
 ###Activities and Milestones
 1. Build and install the Cyrus SASL GS2 Library for Mac OS using autotools to prove this currently works and that it is a valid goal for the Moonshot GSS EAP library. Due Wednesday 16th November.
@@ -85,9 +94,9 @@ There are two parts to the installation:
 
 1: The installer will install library and header files in /usr/local/lib and /usr/local/include, as for the Linux 'make install'. 
 
-2: SASL2 Framework: in addition, the installer will install Cyrus SASL framework will be installed in /Library/Frameworks/SASL2.framework (as in the existing Cyrus SASL 'make install' and as recommended by Apple's guidelines to developers). The Moonshot GSS EAP framework will be installed in /Library/Frameworks/MoonshotGSS_EAP.framework. The installer will create the .framework directories if they are not already present. The frameworks are wrappers for symlinks to the respective dynamic libraries in /usr/local/lib (libsasl2.dylib and mech_eap.dylib).
+2: SASL2 Framework: in addition, the installer will install Cyrus SASL framework will be installed in /Library/Frameworks/SASL2.framework (as in the existing Cyrus SASL 'make install' and as recommended by Apple's guidelines to developers). The framework is a wrapper for a symlink to the dynamic library in /usr/local/lib/libsasl2.dylib and mech_eap.dylib.
 
-If an installation with a lower version number is present, the new installation will be installed, and the /Versions/Current alias changed to refer to the new installation.
+If an installation of the SASL library with a lower version number is present, the new installation will be installed.
 
 If an installation with a higher version number is present, the new installation will terminate with a message explaining why.
 
@@ -107,7 +116,7 @@ The Package properties will be
 
 For each component in the package, properties will be
 
-    Destination (To): The appropriate subdirectory of the /Library/Frameworks/Moonshot directory tree
+    Destination (To): The appropriate directory 
     Custom destination consent (Allow custom location): False.
     Package identifier: net.ja.moonshot.xxxx (where xxx identifies the individual library)
     Package version number: 1 for first release, incremented in future releases
@@ -125,36 +134,61 @@ This library consists of the following files installed in the following location
 To be completed (See Outstanding questions/issues 3)
 <table border="1">
 <tr>
-<td>/bin</td> <td>list of files in /bin</td>
+<td>File</td> <td>location</td> <td>notes</td>
 </tr>
 <tr>
-<td>/include</td> <td>list of files in /include</td>
+<td>mech_eap.dylib</td> <td>/usr/local/lib/gss</td> <td>The dynamic library</td>
 </tr>
 <tr>
-<td>/lib</td><td>list of files in /lib</td>
+<td>gssapi_eap.h</td><td>/usr/local/include/gssapi</td> <td>header file for the EAP GSS mechanism</td>
 </tr>
 </table>
-#####Cyrus SASL Library
-This library consists of the following files installed in the following locations:
+The following configuration files will be modified:
+<table border="1">
+<tr>
+<td>File</td> <td>change</td> <td>notes</td>
+</tr>
+<tr>
+<td></td> <td></td> <td> </td>
+</tr>
+</table>
+
+
+#####Cyrus SASL Library and GS2 plugin
+The following files will be installed in the following locations:
 To be completed (See Outstanding questions/issues 3)
 
+Plugins go in /usr/lib/sasl (which should be a symlink to /usr/local/lib/sasl).
+
 <table border="1">
 <tr>
-<td>/bin</td> <td>list of files in /bin</td>
+<td>File</td> <td>location</td> <td>notes</td>
+</tr>
+<tr>
+<td>sasl2.dylib</td> <td>/usr/local/lib/</td> <td> </td>
+</tr>
+<tr>
+<td>Sasl2</td> <td>/Library/Frameworks/SASL2.framework</td> <td>The framework binary - symlink to /usr/local/lib/libsasl2.dylib</td>
 </tr>
 <tr>
-<td>/include</td> <td>list of files in /include</td>
+<td>??</td> <td></td> <td> </td>
 </tr>
+</table>
+
+The following configuration files will be modified:
+<table border="1">
 <tr>
-<td>/lib</td><td>list of files in /lib</td>
+<td>File</td> <td>change</td> <td>notes</td>
+</tr>
+<tr>
+<td></td> <td></td> <td> </td>
 </tr>
 </table>
 
 #####Dependencies
 The installer will not include any dependencies which are present by default in the installed version Mac OS X.
 
-For any dependencies which are not present by default in the installed version Mac OS X, the installer will install the needed versions in the /Library/Frameworks/Moonshot directory tree. It will not attempt to locate or use existing installations of these dependencies. This means that if such existing implementations are uninstalled in the future, the Moonshot libraries will not be broken. This decision has a cost in terms of disk space, but is justified because it a: decreases the complexity of the installation and b: protects the installation from potential failure.
-
+For any dependencies which are not present by default in the installed version Mac OS X, the installer will install the needed versions. 
 ###References:
 1. [Mac OS X Developer Library, Framework Programming Guide, Installing Your Framework](https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Tasks/InstallingFrameworks.html#//apple_ref/doc/uid/20002261-BBCCFBJA)
 2. [Mac OS X Developer Library, PackageMaker User Guide](https://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/PackageMakerUserGuide/)