1 ### Building Mac OS Installer using jhbuild
6 Install jhbuild, which Creates working folder ~/gtk
9 copy file moonshot/mac-client-installer/.jhbuildrc-custom to $HOME
11 $ jhbuild bootstrap --ignore-system
14 Need MIT Kerberos 1.9.2 installed
15 - in ~/gtk/inst - in the Krb5 src directory
16 $ export CFLAGS="-arch i386"
17 $ ./configure --prefix=/Users/pete/gtk/inst/
21 # Building the moonshot SW
22 $ jhbuild build meta-moonshot-mac-client
23 Will cause the following errors
25 *** Error during phase build of perl-xml-parser: ########## Error running make LD_RUN_PATH= *** [6/37]
26 choose [4] Start shell
27 $ git apply ~/moonshot/mac-client-installer/0001-Remove-arch-ppc-flags.patch
30 choose [2] Ignore error and continue
32 make: *** No targets specified and no makefile found. Stop.
33 *** Error during phase build of cyrus-sasl: ########## Error running make *** [39/41]
34 choose [4] Start shell
36 $ ./configure --prefix /Users/pete/gtk/inst --libdir '/Users/pete/gtk/inst/lib' --with-gss_impl=mit
38 choose [1] Rerun phase build
40 *** Error during phase configure of moonshot: ########## Error running ./autogen.sh --prefix /Users/pete/gtk/inst --libdir '/Users/pete/gtk/inst/lib' --enable-acceptor=no --with-krb5=$PREFIX/usr/local --enable-acceptor=no *** [40/41]
41 choose [4] Start shell
42 $ git apply ~/moonshot/mac-client-installer/0001-Move-moonshot-files-up.patch
43 $ cp -R moonshot/libeap .
44 $ ./autogen.sh --prefix /Users/pete/gtk/inst --libdir '/Users/pete/gtk/inst/lib' --enable-acceptor=no
48 choose [1] Rerun phase build
56 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.
58 It also contains instructions for creating an installer package allowing the Moonshot software to be installed on other machines running Mac OS X.
60 These notes are also in the file mac-client-installer/README.MacOsBuildInstructions
62 There are three components that need to be built and installed:
64 1: the Cyrus SASL2 library, along with the SASL GS2 Library which implements the GS2 GSS-API->SASL bridge mechanism.
66 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).
68 3: the Moonshot Identity Selector/Manager software which...
69 ToDo: Complete this section when the client software is ported to Mac OS
72 ###Getting the Moonshot source code
74 Follow the instructions at http://www.project-moonshot.org/developers/repository, cloning the repo in $HOME
76 Working in $HOME/moonshot/mac-client-installer
78 ###Building the Cyrus SASL2 library
80 $ cd $HOME/moonshot/cyrus_sasl
83 You will see the following message
85 configure.in:14 error: possibly undefined macro: AC_DEFINE
86 If this token and others are legitimate, please use m4_pattern_allow.
87 See the Autoconf documentation
89 $ ./configure --with-gss_impl=mit
92 To install to /usr/local in your build machine
96 Create the link from /usr/lib/sasl2 (where the library looks for the plugins)->/usr/local/lib/sasl2 (where the plugins will be installed)
99 $ ln -fs ../local/lib/sasl2
101 Or, if you are making the installer
103 $ make install DESTDIR=$HOME/moonshot/mac-client-installer/sasl
105 Create the link from /usr/lib/sasl2 (where the library looks for the plugins)->/usr/local/lib/sasl2 (where the plugins will be installed)
109 $ ln -fs ../local/lib/sasl2
111 $ cd ~/installerbuild
113 The files and directories that are installed are as listed in README.saslInstalledFiles
115 ###Building the downloaded Kerberos
117 Unpack the file to $HOME/krbbuild
119 $ cd $HOME/krbbuild/krb5-1.9.2-signed/krb5-1.9.2/src
123 To install to /usr/local in your build machine
127 Or, if you are making the installer
128 $ make install DESTDIR=$HOME/moonshot/mac-client-installer/krb
130 ###Building the Moonshot GSS EAP library
132 $ cd $HOME/moonshot/moonshot
134 $ ./configure --enable-acceptor=no
136 You will see the following warnings
139 ----------------------------------------------------------------------
140 Cannot find OpenSAML libraries, building without OpenSAML support.
141 Please install OpenSAML or specify installation directory with
142 --with-opensaml=(dir).
143 ----------------------------------------------------------------------
146 ----------------------------------------------------------------------
147 Cannot find Shibboleth resolver libraries, building without
149 Please install Shibboleth or specify installation directory with
150 --with-shibresolver=(dir).
151 ----------------------------------------------------------------------
156 $ libtool --finish /usr/local/lib/gss
158 Or, if you are making the installer
160 $ ./configure --enable-acceptor=no --with-krb5=$HOME/moonshot/mac-client-installer/krb/usr/local
163 We only need to install the mech_eap library
166 $ make install DESTDIR=$HOME/moonshot/mac-client-installer/krb
168 The files and directories that are installed are as listed in README.KrbInstalledFiles
170 ###Building the Moonshot Identity Selector/Manager software
171 ToDo: Complete this section when the client software is ported to Mac OS
173 ###Make the install package
174 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.
176 Ensure the permissions are correct for the files to be installed
178 $ sudo chown -R root:admin krb sasl
179 $ sudo chmod -R g+w krb sasl
183 $ /Developer/usr/bin/packagemaker --doc Moonshot\ Client\ Software.pmdoc \
184 --version 0.1 --filter "/.DS_Store" --resources ./resources/ --root-volume-only\
185 --domain system --verbose --no-relocate -l "/" --target 10.5 \
186 --id ja.net.moonshotClientSoftware --out Moonshot\ Client\ Software.pkg
188 Instructions in DevWiki at http://www.project-moonshot.org/devwiki//building_client_software_for_mac_os
190 ###Making the Disk Image
191 Create and mount the image - 2MB will be enough for now
193 $ hdiutil create -size 2m -fs HFS+ -volname "Moonshot Client Software" temp.dmg
194 $ hdiutil attach temp.dmg
196 Copy the package and the READMEs
197 $ cp Moonshot\ Client\ Software.pkg /Volumes/Moonshot\ Client\ Software/
198 $ cp resources/* /Volumes/Moonshot\ Client\ Software/
200 Get rid of hidden files and folders that we don't need
202 $ sudo rm -rf /Volumes/Moonshot\ Client\ Software/.fseventsd/
203 $ sudo rm -rf /Volumes/Moonshot\ Client\ Software/.Trashes/
204 $ sudo find /Volumes/Moonshot\ Client\ Software -name '.*' -type f -delete
208 $ hdiutil detach /Volumes/Moonshot\ Client\ Software
210 Convert the disk image to read-only
212 $ hdiutil convert temp.dmg -format UDZO -o moonshotclientsoftware.dmg
215 The compressed disk image containing the installer package and the READMEs is now in file *moonshotclientsoftware.dmg*