3 This page contains notes on how to build and install the software necessary to run Moonshot clients on a computer running Max OS X 10.6 Snow Leopard and 10.7 Lion.
5 It also contains instructions for creating an installer package allowing the Moonshot software to be installed on other machines running Mac OS X.
7 These notes are also in the file mac-client-installer/README.MacOsBuildInstructions
9 There are three components that need to be built and installed:
11 1: the Cyrus SASL2 library, along with the SASL GS2 Library which implements the GS2 GSS-API->SASL bridge mechanism.
13 2: the Moonshot GSS EAP library, implements the EAP mechanism for use by the GSS API. This library depends on having a recent version of Kerberos. Mac OS X ships with Kerberos 5 release 1.7-prerelease which is not recent enough. So. for the installer at least, we will get and build the latest stable release (1.9.2) from [MIT](from http://web.mit.edu/kerberos/dist/index.html).
15 3: the Moonshot Identity Selector/Manager software which...
16 ToDo: Complete this section when the client software is ported to Mac OS
19 ###Getting the Moonshot source code
21 Follow the instructions at http://www.project-moonshot.org/developers/repository, cloning the repo in $HOME
23 Working in $HOME/moonshot/mac-client-installer
25 ###Building the Cyrus SASL2 library
27 $ cd $HOME/moonshot/cyrus_sasl
30 You will see the following message
32 configure.in:14 error: possibly undefined macro: AC_DEFINE
33 If this token and others are legitimate, please use m4_pattern_allow.
34 See the Autoconf documentation
39 To install to /usr/local in your build machine
43 Create the link from /usr/lib/sasl2 (where the library looks for the plugins)->/usr/local/lib/sasl2 (where the plugins will be installed)
46 $ ln -fs ../local/lib/sasl2
48 Or, if you are making the installer
50 $ make install DESTDIR=$HOME/moonshot/mac-client-installer/sasl
52 Create the link from /usr/lib/sasl2 (where the library looks for the plugins)->/usr/local/lib/sasl2 (where the plugins will be installed)
56 $ ln -fs ../local/lib/sasl2
60 The files and directories that are installed are as listed in README.saslInstalledFiles
62 ###Building the downloaded Kerberos
64 Unpack the file to $HOME/krbbuild
66 $ cd $HOME/krbbuild/krb5-1.9.2-signed/krb5-1.9.2/src
70 To install to /usr/local in your build machine
74 Or, if you are making the installer
75 $ make install DESTDIR=$HOME/moonshot/mac-client-installer/krb
77 ###Building the Moonshot GSS EAP library
79 $ cd $HOME/moonshot/moonshot
81 $ ./configure --enable-acceptor=no
83 You will see the following warnings
86 ----------------------------------------------------------------------
87 Cannot find OpenSAML libraries, building without OpenSAML support.
88 Please install OpenSAML or specify installation directory with
89 --with-opensaml=(dir).
90 ----------------------------------------------------------------------
93 ----------------------------------------------------------------------
94 Cannot find Shibboleth resolver libraries, building without
96 Please install Shibboleth or specify installation directory with
97 --with-shibresolver=(dir).
98 ----------------------------------------------------------------------
103 $ libtool --finish /usr/local/lib/gss
105 Or, if you are making the installer
107 $ ./configure --enable-acceptor=no --with-krb5=$HOME/moonshot/mac-client-installer/krb/usr/local
110 We only need to install the mech_eap library
113 $ make install DESTDIR=$HOME/moonshot/mac-client-installer/krb
115 The files and directories that are installed are as listed in README.KrbInstalledFiles
117 ###Building the Moonshot Identity Selector/Manager software
118 ToDo: Complete this section when the client software is ported to Mac OS
120 ###Make the install package
121 Ideally we would divide the installer into sub-packages (sasl and krb) within a single meta package. However this seems to be possible only from the packagemaker GUI: there are a number of problems with doing this from the packagemaker command line. We are therefore building a single package, with sasl and krb as choice items within the package.
123 Ensure the permissions are correct for the files to be installed
125 $ sudo chown -R root:admin krb sasl
126 $ sudo chmod -R g+w krb sasl
130 $ /Developer/usr/bin/packagemaker --doc Moonshot\ Client\ Software.pmdoc \
131 --version 0.1 --filter "/.DS_Store" --resources ./resources/ --root-volume-only\
132 --domain system --verbose --no-relocate -l "/" --target 10.5 \
133 --id ja.net.moonshotClientSoftware --out Moonshot\ Client\ Software.pkg
135 Instructions in DevWiki at http://www.project-moonshot.org/devwiki//building_client_software_for_mac_os
137 ###Making the Disk Image
138 Create and mount the image - 2MB will be enough for now
140 $ hdiutil create -size 2m -fs HFS+ -volname "Moonshot Client Software" temp.dmg
141 $ hdiutil attach temp.dmg
143 Copy the package and the READMEs
144 $ cp Moonshot\ Client\ Software.pkg /Volumes/Moonshot\ Client\ Software/
145 $ cp resources/* /Volumes/Moonshot\ Client\ Software/
147 Get rid of hidden files and folders that we don't need
149 $ sudo rm -rf /Volumes/Moonshot\ Client\ Software/.fseventsd/
150 $ sudo rm -rf /Volumes/Moonshot\ Client\ Software/.Trashes/
151 $ sudo find /Volumes/Moonshot\ Client\ Software -name '.*' -type f -delete
155 $ hdiutil detach /Volumes/Moonshot\ Client\ Software
157 Convert the disk image to read-only
159 $ hdiutil convert temp.dmg -format UDZO -o moonshotclientsoftware.dmg
162 The compressed disk image containing the installer package and the READMEs is now in file *moonshotclientsoftware.dmg*