ReferencePlatforms/Mac-10.6: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 143: Line 143:
  make install
  make install


export PYTHONHOME="/tools/python"
  export PATH="/tools/python/bin:$PATH"
  export PATH="/tools/python/bin:$PATH"



Revision as of 16:46, 11 March 2010

***DRAFT*** Reference Image Info ***DRAFT***

https://wiki.mozilla.org/Mac:64BitRelEng

Initial Setup and Account Creation

  1. Change the resolution to 1024 x 768, 60 Hz, Millions of Colours, under System Preferences->Displays (this is changed later)
  2. Change the password for the administrator user to the standard build system root password.
  3. Create a new admin-equiv account for the cltbld user using the standard build password.
  4. Under System Preferences->Sharing->Screen Sharing->Computer Settings 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.
  5. If the hostname is wrong, e.g. unused-*, use sudo scutil --set HostName new.hostname.mozilla.org to fix it. NOTE: you'll need to restart the machine for this to fully take effect.
  6. Under System Preferences->Software Update, turn off automatic update checking.
  7. 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/ - NEED TO FIGURE THIS OUT

Installing Xcode

  1. Mount the Xcode disk image, and begin installing the XcodeTools.mpkg.
    • A standard install is fine (we don't need 10.3.9 support or WebObjects).
    • Make sure to install the 10.5 SDK, as it is not installed by default.
    • CHUD is now installed by default

Installing wget

curl ftp://ftp.gnu.org/pub/gnu/wget/wget-1.10.2.tar.gz > wget-1.10.2.tar.gz
tar -zvxf wget-1.10.2.tar.gz
cd wget-1.10.2
./configure --prefix=/usr
make
sudo make install

Installing MacPorts

  • Install MacPorts-1.8.2 and the following MacPorts packages...
    • mercurial
    • libidl
    • autoconf213

Nagios

  • Copy over the appropriate package from bm-admin01, either nrpe-darwin-i386.tar.gz or nrpe-darwin-powerpc.tar.gz depending on your platform.
  • Create a nagios user and group
sudo dscl localhost -create /Local/Default/Users/nagios
sudo dscl localhost -create /Local/Default/Users/nagios UserShell /usr/bin/false
sudo dscl localhost -create /Local/Default/Users/nagios UniqueID 510
sudo dscl localhost -create /Local/Default/Groups/nagios
sudo dscl localhost -create /Local/Default/Groups/nagios UniqueID 1010
  • Unpack the package in /usr/local. Eg,
cd /usr/local && sudo tar xfz ~cltbld/nrpe-darwin-i386.tar.gz
  • Edit/checkout nrpe.cfg. The one in mozilla/tools/nagios/nrpe-mac.cfg may be useful.
  • Run enablenrpe to turn it on
sudo /usr/local/nagios/sbin/enablenrpe

Ask IT to setup the suite of checks.

Puppet

wget http://reductivelabs.com/downloads/puppet/puppet-0.24.8.gem
sudo gem install puppet-0.24.8.gem

ssh

scp the cltbld and appropriate role keys over directly from a machine that already has them installed. In .ssh, make sure the cltbld keys are called cltbld* and not id_dsa*, then symlink

ln -s cltbld_dsa id_dsa
ln -s cltbld_dsa.pub id_dsa.pub

This is temporary to get hold of the standard .profile (we should move that file to public cvs).

ENV setup

cvs -d :ext:cltbld@cvs.mozilla.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.

switch to role key

In ~/.ssh,

rm id_dsa id_dsa.pub
ln -s ffxbld_dsa id_dsa
ln -s ffxbld_dsa.pub id_dsa.pub

or substitute ffxbld for whatever key is appropriate for what you will be building.

Establish initial ssh connections and accept keys

Execute the following simple ssh calls to connect to the ftp server (stage), symbol server (if different from ftp), and update server so that the various pieces of the build can be uploaded automatically by the build scripts when needed:

ssh ffxbld@stage.mozilla.org pwd
ssh ffxbld@aus2-staging.mozilla.org pwd
ssh ffxbld@hg.mozilla.org
ssh ffxbld@dm-symbolpush01.mozilla.org pwd

Mail config

NB: Postfix config is tinderbox client specific, all the buildbot information goes over a socket to the master and is posted to the tinderbox server from there.

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-xserve16.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.

Also make sure that Mail.app is installed.

ntp config

sudo su -
echo "server ntp1.build.mozilla.org iburst" > /etc/ntp.conf
kill -2 `ps x | grep ntp | grep -v grep | awk '{print $1}'`
exit

Buildbot

Make directories

 mkdir -p /tools/dist/logs
 mkdir -p /builds/logs

Install Python 2.6.4

NB: 2.5.* would not compile in either 32bit or 64bit environments. gcc-4.0 complained about -Wno-long-double and gcc-4.2 did not provide all of the posix environment

mkdir -p /tools/dist
cd /tools/dist
wget http://www.python.org/ftp/python/2.6.4/Python-2.6.4.tar.bz2
tar jxvf Python-2.6.4.tar.bz2
cd Python-2.6.4
./configure --prefix=/tools/python --enable-framework=/tools/python --with-universal-archs=intel --enable-universalsdk=/
make
make test
make install
export PATH="/tools/python/bin:$PATH"

Installing Twisted

wget http://tmrc.mit.edu/mirror/twisted/Twisted/2.4/Twisted-2.4.0.tar.bz2
tar xfvj Twisted-2.4.0.tar.bz2 
cd Twisted-2.4.0
cd ZopeInterface-3.1.0c1
python setup.py build
sudo python setup.py install
cd ./Twisted-2.4.0
python setup.py build
sudo python setup.py install

Installing Buildbot

cvs -d:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -d buildbot mozilla/tools/buildbot
cd buildbot
python2.5 setup.py install
sudo python2.5 setup.py install

Installing PyYAML

wget http://pyyaml.org/download/pyyaml/PyYAML-3.05.tar.gz
tar -zvxf PyYAML-3.05.tar.gz
cd PyYAML-3.05
python setup.py build   
sudo python setup.py install

Final Configuration

Set the required Python environment variables in the Buildbot's user profile

echo 'export PYTHONHOME="/tools/python"' >> ~/.profile
echo 'export PATH="/opt/local/bin:/tools/buildbot/bin:/tools/twisted/bin:$PYTHONHOME/bin:$PATH"' >> ~/.profile

Current Changes for Compile

Currently the configs/mozilla2-staging/macosx/mozilla-central/nightly/mozconfig needs to have the universal mozconfig import removed:

sed -i -e "s/. \$topsrcdir\/build\/macosx\/universal\/mozconfig//" build/.mozconfig

Copy fonts from another Mac

cd /Library/Fonts
sudo rsync -av cltbld@moz2-darwin9-slave01:/Library/Fonts/ ./

Set dock size

defaults write com.apple.dock tilesize -int 49; killall Dock

(until a fix is in for bug 470420)

Symlink for autoconf

NB: I went to make this change but saw that there was already an autoconf213 binary at /opt/local/bin

Due to calling in RepackFactory to command=['bash', '-c', 'autoconf-2.13'] to fix this we have to add a symlink to autoconf213

sudo ln -s /opt/local/bin/autoconf213 /opt/local/bin/autoconf-2.13