(no commit message)
[devwiki.git] / design / librarymacinstallerplan.mdwn
1 ##Plan Mac Installer for GSS EAP and SASL GS2 libraries
2 ###Introduction:
3 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”). 
4 It describes the goals, activities deliverables and milestones for the development.
5 It also gives some background on the intended locations of the files to be installed, system configuration modifications and any other pertinent information. It explains how the installer conforms to Apple’s relevant guidelines to developers.
6 ###Goals
7 The primary goal is to allow users to install these initiator libraries on a computer running Mac OS X without needing to build them from source. 
8
9 Secondary goals are
10
11 1. To allow users who are familiar with the autotools tool chain to build and install the libraries on a computer running Mac OS X using autotools. (This is currently possible for the Cyrus SASL library, but not for the Moonshot GSS EAP library).
12 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.
13
14 ###Deliverables:
15 1. Changed files allowing the Moonshot GSS EAP library to be built and installed for Mac OS using autotools
16 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).
17 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)
18 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). 
19
20 ###Activities and Milestones
21 1. Build and install the Cyrus SASL 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.
22 2. Create an installer package and compressed disk image for the Cyrus SASL Library, with notes on how to achieve the process. Due Friday 18th November.
23 3. Make the necessary changes to the Moonshot GSS EAP library source and configuration files to build and install it for Mac OS using autotools. Due Friday 25th November.
24 4. Create an installer package and compressed disk image for the Moonshot GSS EAP library. Due Tuesday 29th November.
25 5. Create the scripts and instructions. Due Wednesday 30th November.
26
27 ###Background information
28 ####Installer functionality:
29 Apple's Developer documentation (Ref. 1) states
30 > public frameworks should be installed at the local level in /Library/Frameworks.
31 Frameworks installed here are available to all users of the machine.
32
33 The installer will install the libraries listed below in a directory named Moonshot, a sub-directory of /Library/Frameworks on the main drive of the machine. The installer will create the Moonshot directory if it is not already present. (It may already be present because any shared libraries developed as part of the Moonshot UI / Identity Selector software will also be installed to this directory). The structure of the Moonshot directory is described below.
34  
35 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.
36
37 If an installation with a lower version number is present, the new installation will terminate with a message explaining why.
38
39 If an installation with the same version number as version being installed is present, a message is displayed to the User asking them to confirm whether the existing installation should be overwritten?
40
41 The User will not be able to configure the installation to install only some of the components.
42
43 The exact text to be used in messages displayed to the user will be specified as part of the implementation of the installer.
44
45 The appearance of the installer will not be customized to use special icons and window backgrounds.
46
47 ####Structure of the Moonshot directory tree.
48 The Moonshot directory will have the following sub-directory structure, allowing future versions to be installed without breaking applications that rely on an earlier version:
49
50     /Commands -> (alias to Versions/Current/bin)
51     /Headers -> (alias to Versions/Current/include)
52     /Home -> (alias to Versions/Current)
53     /Libraries -> (alias to Versions/Current/lib)
54     /Versions
55       /1.0.1
56       /1.0.2
57       ...
58       /3.1.2
59       /Current --> (alias to most recently installed version e.g /Versions/3.1.2)
60 Each numbered version sub-directory will have the necessary directories from the file system hierarchy e.g.
61
62     /bin
63     /etc
64     /include
65     /man
66     /etc
67     /lib
68     /sbin
69     /share
70       /doc
71       /xml
72     /var
73       /log
74
75
76 ###Package and Component Properties
77 The Package properties will be 
78
79     Provider Identifier (Organization): org.janet.moonshot
80     Target OS (Minimum Target): Mac OS 10.6 Snow Leopard
81
82 For each component in the package, properties will be
83
84     Destination (To): The appropriate subdirectory of the /Library/Frameworks/Moonshot directory tree
85     Custom destination consent (Allow custom location): False.
86     Package identifier: org.janet.moonshot.xxxx (where xxx identifies the individual library)
87     Package version number: 1 for first release, incremented in future releases
88     Finalization action (Post-install): None
89     Administrator-authentication requirement (Require admin authorization): True
90     Relocatable: False
91     Downgradeable: False
92     No pre- or post-installation scripts are planned (but this may change during implementation)
93     The owner will be root and the group admin. The owner, group, and access permissions of the component files will be determined during implementation.
94 (See Ref.2 for an explanation of these properties)
95 ####Delivered components and files
96 The installer will install the following libraries:
97 #####Moonshot GSS EAP Library
98 This library consists of the following files installed in the following locations:
99 To be completed (See Outstanding questions/issues 3)
100 <table border="1">
101 <tr>
102 <td>/bin</td> <td>list of files in /bin</td>
103 </tr>
104 <tr>
105 <td>/include</td> <td>list of files in /include</td>
106 </tr>
107 <tr>
108 <td>/lib</td><td>list of files in /lib</td>
109 </tr>
110 </table>
111 #####Cyrus SASL Library
112 This library consists of the following files installed in the following locations:
113 To be completed (See Outstanding questions/issues 3)
114
115 <table border="1">
116 <tr>
117 <td>/bin</td> <td>list of files in /bin</td>
118 </tr>
119 <tr>
120 <td>/include</td> <td>list of files in /include</td>
121 </tr>
122 <tr>
123 <td>/lib</td><td>list of files in /lib</td>
124 </tr>
125 </table>
126
127 #####Dependencies
128 The installer will not include any dependencies which are present by default in the installed version Mac OS X.
129
130 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.
131
132 ###Outstanding questions/issues:
133 1. One package each for "Snow Leopard" and "Lion", or a single package that works for both?
134 2. One disk image each for "Snow Leopard" and "Lion", or a single disk image containing both packages?
135 3. For each library, consisting of which files in which sub directories?
136
137 ###References:
138 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)
139 2. [Mac OS X Developer Library, PackageMaker User Guide](https://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/PackageMakerUserGuide/)