1 ### Building Mac OS Installer using jhbuild
6 Install jhbuild, which Creates working folder ~/gtk
8 # install gtk-mac-bundler
10 $ wget http://ftp.gnome.org/pub/gnome/sources/gtk-mac-bundler/0.6/gtk-mac-bundler-0.6.1.tar.bz2
11 $ tar jxvf gtk-mac-bundler-0.6.1.tar.gz
12 $ cd gtk-mac-bundler-0.6.1
15 or, to use the most recent code:
16 $ git clone git://git.gnome.org/gtk-mac-bundler
21 copy file moonshot/mac-client-installer/.jhbuildrc-custom to $HOME
23 $ jhbuild bootstrap --ignore-system
26 Need MIT Kerberos 1.9.2 installed in ~/gtk/inst
27 - in the Krb5 src directory
28 $ export CFLAGS="-arch i386"
29 $ ./configure --prefix=/Users/pete/gtk/inst/
33 ## Building the moonshot SW
34 $ jhbuild build meta-moonshot-mac-client
35 Will cause the following errors
37 *** Error during phase build of perl-xml-parser: ########## Error running make LD_RUN_PATH= *** [6/37]
38 choose [4] Start shell
39 $ git apply ~/moonshot/mac-client-installer/0001-Remove-arch-ppc-flags.patch
42 choose [2] Ignore error and continue
44 make: *** No targets specified and no makefile found. Stop.
45 *** Error during phase build of cyrus-sasl: ########## Error running make *** [39/41]
46 choose [4] Start shell
48 $ ./configure --prefix $HOME/moonshot/mac-client-installer/sasl --with-gss_impl=mit
51 choose [1] Rerun phase build
53 *** 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]
54 choose [4] Start shell
55 $ git apply ~/moonshot/mac-client-installer/0001-Move-moonshot-files-up.patch
56 $ cp -R moonshot/libeap .
57 $ ./autogen.sh --prefix /Users/pete/gtk/inst --libdir '/Users/pete/gtk/inst/lib' --enable-acceptor=no
61 choose [1] Rerun phase build
64 *** Error during phase checkout of krb5: could not unpack tarball (expected krb5-1.9.2-signed.tar dir) *** [1/1]
65 choose [4] Start shell
66 unpack file ~/gtk/source/krb5-1.9.2.tar.gz to create directory krb5-1.9.2
68 choose [2] Ignore error and continue to configure
75 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.
77 It also contains instructions for creating an installer package allowing the Moonshot software to be installed on other machines running Mac OS X.
79 These notes are also in the file mac-client-installer/README.MacOsBuildInstructions
81 There are three components that need to be built and installed:
83 1: the Cyrus SASL2 library, along with the SASL GS2 Library which implements the GS2 GSS-API->SASL bridge mechanism.
85 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).
87 3: the Moonshot Identity Selector/Manager software which...
88 ToDo: Complete this section when the client software is ported to Mac OS
91 ###Getting the Moonshot source code
93 Follow the instructions at http://www.project-moonshot.org/developers/repository, cloning the repo in $HOME
95 Working in $HOME/moonshot/mac-client-installer
97 ###Building the Cyrus SASL2 library
99 $ cd $HOME/moonshot/cyrus_sasl
102 You will see the following message
104 configure.in:14 error: possibly undefined macro: AC_DEFINE
105 If this token and others are legitimate, please use m4_pattern_allow.
106 See the Autoconf documentation
108 $ ./configure --with-gss_impl=mit
111 To install to /usr/local in your build machine
115 Create the link from /usr/lib/sasl2 (where the library looks for the plugins)->/usr/local/lib/sasl2 (where the plugins will be installed)
118 $ ln -fs ../local/lib/sasl2
120 Or, if you are making the installer
122 $ make install DESTDIR=$HOME/moonshot/mac-client-installer/sasl
124 Create the link from /usr/lib/sasl2 (where the library looks for the plugins)->/usr/local/lib/sasl2 (where the plugins will be installed)
128 $ ln -fs ../local/lib/sasl2
130 $ cd ~/installerbuild
132 The files and directories that are installed are as listed in README.saslInstalledFiles
134 ###Building the downloaded Kerberos
136 Unpack the file to $HOME/krbbuild
138 $ cd $HOME/krbbuild/krb5-1.9.2-signed/krb5-1.9.2/src
142 To install to /usr/local in your build machine
146 Or, if you are making the installer
147 $ make install DESTDIR=$HOME/moonshot/mac-client-installer/krb
149 ###Building the Moonshot GSS EAP library
151 $ cd $HOME/moonshot/moonshot
153 $ ./configure --enable-acceptor=no
155 You will see the following warnings
158 ----------------------------------------------------------------------
159 Cannot find OpenSAML libraries, building without OpenSAML support.
160 Please install OpenSAML or specify installation directory with
161 --with-opensaml=(dir).
162 ----------------------------------------------------------------------
165 ----------------------------------------------------------------------
166 Cannot find Shibboleth resolver libraries, building without
168 Please install Shibboleth or specify installation directory with
169 --with-shibresolver=(dir).
170 ----------------------------------------------------------------------
175 $ libtool --finish /usr/local/lib/gss
177 Or, if you are making the installer
179 $ ./configure --enable-acceptor=no --with-krb5=$HOME/moonshot/mac-client-installer/krb/usr/local
182 We only need to install the mech_eap library
185 $ make install DESTDIR=$HOME/moonshot/mac-client-installer/krb
187 The files and directories that are installed are as listed in README.KrbInstalledFiles
189 ###Building the Moonshot Identity Selector/Manager software
190 ToDo: Complete this section when the client software is ported to Mac OS
192 ###Make the install package
193 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.
195 Ensure the permissions are correct for the files to be installed
197 $ sudo chown -R root:admin krb sasl
198 $ sudo chmod -R g+w krb sasl
202 $ /Developer/usr/bin/packagemaker --doc Moonshot\ Client\ Software.pmdoc \
203 --version 0.1 --filter "/.DS_Store" --resources ./resources/ --root-volume-only\
204 --domain system --verbose --no-relocate -l "/" --target 10.5 \
205 --id ja.net.moonshotClientSoftware --out Moonshot\ Client\ Software.pkg
207 Instructions in DevWiki at http://www.project-moonshot.org/devwiki//building_client_software_for_mac_os
209 ###Making the Disk Image
210 Create and mount the image - 2MB will be enough for now
212 $ hdiutil create -size 2m -fs HFS+ -volname "Moonshot Client Software" temp.dmg
213 $ hdiutil attach temp.dmg
215 Copy the package and the READMEs
216 $ cp Moonshot\ Client\ Software.pkg /Volumes/Moonshot\ Client\ Software/
217 $ cp resources/* /Volumes/Moonshot\ Client\ Software/
219 Get rid of hidden files and folders that we don't need
221 $ sudo rm -rf /Volumes/Moonshot\ Client\ Software/.fseventsd/
222 $ sudo rm -rf /Volumes/Moonshot\ Client\ Software/.Trashes/
223 $ sudo find /Volumes/Moonshot\ Client\ Software -name '.*' -type f -delete
227 $ hdiutil detach /Volumes/Moonshot\ Client\ Software
229 Convert the disk image to read-only
231 $ hdiutil convert temp.dmg -format UDZO -o moonshotclientsoftware.dmg
234 The compressed disk image containing the installer package and the READMEs is now in file *moonshotclientsoftware.dmg*