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
16 copy file moonshot/mac-client-installer/.jhbuildrc-custom to $HOME
18 $ jhbuild bootstrap --ignore-system
21 Need MIT Kerberos 1.9.2 installed in ~/gtk/inst to build against -
22 in the Krb5 src directory
23 $ export CFLAGS="-arch i386"
24 $ ./configure --prefix=$HOME/gtk/inst/
28 and installed in moonshot/mac-client-installer/ to package up
31 $ make install DESTDIR=$HOME/moonshot/mac-client-installer/krb
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=/usr/local --with-gss_impl=mit
50 choose [1] Rerun phase build
51 *** Error during phase build of cyrus-sasl: ########## Error running make *** [1/1]
52 choose [1] Rerun phase build
54 *** 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]
55 choose [4] Start shell
56 $ git apply ~/moonshot/mac-client-installer/0001-Move-moonshot-files-up.patch
57 $ cp -R moonshot/libeap .
58 $ ./autogen.sh --prefix /Users/pete/gtk/inst --libdir '/Users/pete/gtk/inst/lib' --enable-acceptor=no
62 choose [1] Rerun phase build
65 *** Error during phase checkout of krb5: could not unpack tarball (expected krb5-1.9.2-signed.tar dir) *** [1/1]
66 choose [4] Start shell
67 unpack file ~/gtk/source/krb5-1.9.2.tar.gz to create directory krb5-1.9.2
69 choose [2] Ignore error and continue to configure
76 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.
78 It also contains instructions for creating an installer package allowing the Moonshot software to be installed on other machines running Mac OS X.
80 These notes are also in the file mac-client-installer/README.MacOsBuildInstructions
82 There are three components that need to be built and installed:
84 1: the Cyrus SASL2 library, along with the SASL GS2 Library which implements the GS2 GSS-API->SASL bridge mechanism.
86 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).
88 3: the Moonshot Identity Selector/Manager software which...
89 ToDo: Complete this section when the client software is ported to Mac OS
92 ###Getting the Moonshot source code
94 Follow the instructions at http://www.project-moonshot.org/developers/repository, cloning the repo in $HOME
96 Working in $HOME/moonshot/mac-client-installer
98 ###Building the Cyrus SASL2 library
100 $ cd $HOME/moonshot/cyrus_sasl
103 You will see the following message
105 configure.in:14 error: possibly undefined macro: AC_DEFINE
106 If this token and others are legitimate, please use m4_pattern_allow.
107 See the Autoconf documentation
109 $ ./configure --with-gss_impl=mit
112 To install to /usr/local in your build machine
116 Create the link from /usr/lib/sasl2 (where the library looks for the plugins)->/usr/local/lib/sasl2 (where the plugins will be installed)
119 $ ln -fs ../local/lib/sasl2
121 Or, if you are making the installer
123 $ make install DESTDIR=$HOME/moonshot/mac-client-installer/sasl
125 Create the link from /usr/lib/sasl2 (where the library looks for the plugins)->/usr/local/lib/sasl2 (where the plugins will be installed)
129 $ ln -fs ../local/lib/sasl2
131 $ cd ~/installerbuild
133 The files and directories that are installed are as listed in README.saslInstalledFiles
135 ###Building the downloaded Kerberos
137 Unpack the file to $HOME/krbbuild
139 $ cd $HOME/krbbuild/krb5-1.9.2-signed/krb5-1.9.2/src
143 To install to /usr/local in your build machine
147 Or, if you are making the installer
148 $ make install DESTDIR=$HOME/moonshot/mac-client-installer/krb
150 ###Building the Moonshot GSS EAP library
152 $ cd $HOME/moonshot/moonshot
154 $ ./configure --enable-acceptor=no
156 You will see the following warnings
159 ----------------------------------------------------------------------
160 Cannot find OpenSAML libraries, building without OpenSAML support.
161 Please install OpenSAML or specify installation directory with
162 --with-opensaml=(dir).
163 ----------------------------------------------------------------------
166 ----------------------------------------------------------------------
167 Cannot find Shibboleth resolver libraries, building without
169 Please install Shibboleth or specify installation directory with
170 --with-shibresolver=(dir).
171 ----------------------------------------------------------------------
176 $ libtool --finish /usr/local/lib/gss
178 Or, if you are making the installer
180 $ ./configure --enable-acceptor=no --with-krb5=$HOME/moonshot/mac-client-installer/krb/usr/local
183 We only need to install the mech_eap library
186 $ make install DESTDIR=$HOME/moonshot/mac-client-installer/krb
188 The files and directories that are installed are as listed in README.KrbInstalledFiles
190 ###Building the Moonshot Identity Selector/Manager software
191 ToDo: Complete this section when the client software is ported to Mac OS
193 ###Make the install package
194 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.
196 Ensure the permissions are correct for the files to be installed
198 $ sudo chown -R root:admin krb sasl
199 $ sudo chmod -R g+w krb sasl
203 $ /Developer/usr/bin/packagemaker --doc Moonshot\ Client\ Software.pmdoc \
204 --version 0.1 --filter "/.DS_Store" --resources ./resources/ --root-volume-only\
205 --domain system --verbose --no-relocate -l "/" --target 10.5 \
206 --id ja.net.moonshotClientSoftware --out Moonshot\ Client\ Software.pkg
208 Instructions in DevWiki at http://www.project-moonshot.org/devwiki//building_client_software_for_mac_os
210 ###Making the Disk Image
211 Create and mount the image - 2MB will be enough for now
213 $ hdiutil create -size 2m -fs HFS+ -volname "Moonshot Client Software" temp.dmg
214 $ hdiutil attach temp.dmg
216 Copy the package and the READMEs
217 $ cp Moonshot\ Client\ Software.pkg /Volumes/Moonshot\ Client\ Software/
218 $ cp resources/* /Volumes/Moonshot\ Client\ Software/
220 Get rid of hidden files and folders that we don't need
222 $ sudo rm -rf /Volumes/Moonshot\ Client\ Software/.fseventsd/
223 $ sudo rm -rf /Volumes/Moonshot\ Client\ Software/.Trashes/
224 $ sudo find /Volumes/Moonshot\ Client\ Software -name '.*' -type f -delete
228 $ hdiutil detach /Volumes/Moonshot\ Client\ Software
230 Convert the disk image to read-only
232 $ hdiutil convert temp.dmg -format UDZO -o moonshotclientsoftware.dmg
235 The compressed disk image containing the installer package and the READMEs is now in file *moonshotclientsoftware.dmg*