These are the kernel versions we're starting with:
PPC: Darwin xserve03.build.mozilla.org 8.7.2 Darwin Kernel Version 8.7.2: Tue Jul 25 23:14:47 PDT 2006; root:xnu-792.10.96.obj~3/RELEASE_PPC Power Macintosh powerpc
Intel: Darwin bm-xserve08.build.mozilla.org 8.8.4 Darwin Kernel Version 8.8.4: Sun Oct 29 15:26:54 PST 2006; root:xnu-792.16.4.obj~1/RELEASE_I386 i386 i386
Initial Setup and Account Creation
- Change the resolution to 1024 x 768, 60 Hz, under System Preferences->Displays.
- Change the password for the administrator user to the standard build system root password.
- Create a new admin-equiv account for the cltbld user using the standard build password.
- Under System Preferences->Sharing->Apple Remote Desktop->Access Privileges change the VNc screen control password to the standard build password. NOTE: your VNC session will drop when you do this. You'll need to reconnect with the new password.
- If the hostname is wrong, e.g. unused-*, use
sudo scutil --set HostName new.hostname.mozilla.orgto fix it. NOTE: you'll need to restart the machine for this to fully take effect.
- Under System Preferences->Software Update, turn off automatic update checking.
- Using the Workgroup Manager, open the Preferences pane for the cltbld user. Under Software Update, set Manage: to Always, and set the Software Update server to use: as http://bm-xserve01.build.mozilla.org:8088/
The first step is to get ssh working with the cltbld keys on the new machine. Unfortunately, this presents a bit of a chicken-and-egg problem, as the ssh keys necessary to access cvs are not yet on the machine.
Two possible solutions are:
- checkout the cltbld ssh keys on a machine that already has the keys installed and then scp the .ssh directory over (
ocvs -d :ext:email@example.com:/mofo co -d .ssh release/tinderbox-configs/host/ssh; scp -r .ssh new_machine:~)
- scp the cltbld keys over directly from a machine that already has them installed (
cd ~;scp -r xserve06:~/.ssh .)
ocvs -d :ext:firstname.lastname@example.org:/mofo co release/tinderbox-configs/host ln -s release/tinderbox-configs/host/mac-osx-profile .profile
...at which point you'll probably want to restart your shell to use the new .profile.
Ref platform packages
The next step is to retrieve the Mac reference platform packages from CVS:
ocvs -d :ext:email@example.com:/mofo co ref-platforms/mac
This should yield 4 files:
e6d9176e0b56a4dfaff7aa6e98335a88 DarwinPorts-1.3.1-10.4.dmg 65c3aeb974f5f8c75b8daa92c9185122 SharedMenusCocoa.dmg 039b8961863bd240817a6eed38f67704 dports.tar.gz 1d89f956ea2ee3a248449c3c0e0d6834 xcode_2.2.1_8g1165_018213632.dmg 3f02477e0df2a3bc53d02fe0824c0015 chud_4.5.0.dmg
- Mount the Xcode disk image, and begin installing the XcodeTools.mpkg.
- When it comes time to choose the Installation Type, choose "Customize"
- Under "Cross-Development," select all the available SDKs, and then click "Install"
- Mount the CHUD disk image, install the CHUD.mpkg
- Install the DarwinPorts package from ref platform version 1.3.1-10.4
- Unpack the dport tarball of packages and move them into place:
cd ~/ref-platforms/mac tar zxf dports.tar.gz cd /opt/local/var mv db db.old mkdir db mv ~/ref-platforms/mac/dports.MozillaReferencePlatform db/ cd db/ ln -s dports.MozillaReferencePlatform dports
- Next, you need to install a series of ports, all of which should already be contained (and the right version) in the dports tarball you just unpacked. If you see the port command hitting the network at all while installing the needed ports, something has gone wrong.
Here is a short script that will install all the needed ports. Some of the ports have dependencies, so installing them in a different order would probably cut down on time, but I'm just listing them all here alphabetically for clarity:
#!/bin/bash port -f install apr @1.2.7_0 port -f install apr-util @1.2.7_0 port -f install cvs @1.11.21_0 port -f install db4 @4.3.29_0 port -f install expat @2.0.0_1 port -f install gettext @0.14.6_0 port -f install glib2 @2.10.3_0 port -f install libiconv @1.10_1 port -f install libidl @0.8.6_0 port -f install neon @0.25.5_0 port -f install openssl @0.9.8b_0 port -f install pkgconfig @0.20_0 port -f install subversion @1.3.2_0 port -f install wget @1.10.2_0 port -f install zlib @1.2.3_0
port installed after you're done should show only the 15 ports listed above as installed.
- Open the SharedMenusCocoa image.
- Copy the SharedMenusCocoa.framework directory from SharedMenusCocoa/build to /Library/Frameworks
- Follow the instructions on the Camino build reference page for creating the links in the older SDKs. If you are building on an Intel Mac or need to build a Universal Camino, you will also need to follow the instructions for recompiling a UB version of the framework. NOTE: make sure you have the SharedMenusCocoa.framework linked under ALL your SDKs (including 10.4) just to be safe.
After you've created your initial /builds/tinderbox directory structure, checkout and build the following tools that are also required for changing permissions while packaging on Macs:
cd ~ cvs -d :ext:firstname.lastname@example.org:/cvsroot co mozilla/build/macosx/permissions cd mozilla/build/macosx/permissions gcc -o chown_revert chown_revert.c gcc -o chown_root chown_root.c mkdir -p /builds/tinderbox/bin cp chown_revert chown_root /builds/tinderbox/bin cd /builds/tinderbox/bin chmod 4755 chown* sudo chown root chown* ln -s chown_revert revert_root
Establish initial ssh connections and accept keys
You'll need to execute the following simple ssh calls to connect to the ftp server (stage), symbol server, and update server so that the various pieces of the build can be uploaded automatically by the build scripts when needed:
ssh stage.mozilla.org pwd ssh -2 -f -L2222:hal:22 stage.mozilla.org sleep 20;ssh -2 -p2222 -l symbols localhost pwd ssh -i /Users/cltbld/.ssh/aus email@example.com pwd
You'll need to update the postfix config to make sure that
myhostname is set correctly and that large messages can be sent. The tail of
/etc/postfix/main.cf should look similar to:
myhostname = bm-xserve08.build.mozilla.org mailbox_transport = cyrus # Allow large messages (unlimited size, required for tinderbox) message_size_limit = 0
You'll then want to restart postfix to pick up the changes.