ReleaseEngineering/How To/Clang update: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
 
Line 43: Line 43:


= How to add a new version =
= How to add a new version =
* Manifests should be attached to the bug by a developer
See [https://wiki.mozilla.org/ReleaseEngineering/Applications/Tooltool#How_To_Upload_To_Tooltool How To Upload To Tooltool]
* ssh to relengwebadm.private.scl3.mozilla.com
* Download files
mkdir ~/tooltool
cd ~/tooltool
rm -i *
# get latest setup.sh if its manifest was changed
wget https://hg.mozilla.org/mozilla-central/raw-file/default/build/unix/build-clang/setup.sh
# download new clang packages
wget http://people.mozilla.org/~user/clang-linux.tar.bz2
wget http://people.mozilla.org/~user/clang-linux64.tar.bz2
wget http://people.mozilla.org/~user/clang-osx.tar.bz2
# Fix permissions
chmod 644 *
* Copy files to the tooltool directory. Use the "digest" field from the generated manifests as target file name:
for f in clang-*.tar.bz2; do
  ls -l $f
  sudo cp -vi $f /var/www/html/runtime-binaries/tooltool/sha512/$(sha512sum $f | cut -f1 -d " ")
done
* repeat the same step for setup.sh if needed


= See Also =
= See Also =
* [[ReleaseEngineering/Applications/Tooltool]]
* [[ReleaseEngineering/Applications/Tooltool]]
* https://github.com/mozilla/build-tooltool
* https://github.com/mozilla/build-tooltool

Latest revision as of 01:22, 9 July 2015

Intro

Clang packages use tooltool to deploy itself run time. The binaries are hosted on relengweb1.dmz.scl3.mozilla.com (use your LDAP account) and accessible from http://runtime-binaries.pvt.build.mozilla.org/tooltool/.

Clang build is made by http://hg.mozilla.org/mozilla-central/file/tip/build/unix/build-clang/build-clang.py script. You may want to use this script to discover the recent used version of clang.

Compilation

MacOS X builders have everything installed to build clang.

Linux64 (Centos 6.2) needs the following packages installed:

yum install make gcc gcc-c++ mercurial subversion patch \
 http://puppetagain.pub.build.mozilla.org/data/repos/yum/releng/public/CentOS/6/x86_64/gcc473_0moz1-4.7.3-0moz1.x86_64.rpm \
 http://puppetagain.pub.build.mozilla.org/data/repos/yum/releng/public/CentOS/6/x86_64/mozilla-python27-2.7.3-1.el6.x86_64.rpm

Linux32 (Centos 6.2) needs the following packages installed:

yum install make gcc gcc-c++ mercurial subversion patch \
  http://puppetagain.pub.build.mozilla.org/data/repos/yum/releng/public/CentOS/6/i386/gcc473_0moz1-4.7.3-0moz1.i686.rpm \
  http://puppetagain.pub.build.mozilla.org/data/repos/yum/releng/public/CentOS/6/i386/mozilla-python27-2.7.3-1.el6.i686.rpm

Alternatively you can use vagrant with the following vagrant VMs:

Passwords for root and vagrant users are "vagrant". You can create your vagrant VMs similar to this (in 64bit or 32bit directory):

vagrant up
# ignore timeout warnings
vagrant ssh
# use "vagrant" as a password

Note: The current vagrant image doesn't have the gcc 4.7 and python 2.7 packages installed, you need to install them first using yum (see above).

You also need to install the argparse package. In order to do that, run the following commands:

sudo yum install python-setuptools
sudo easy_install argparse

To build clang clone mozilla-central and run the build script:

hg clone https://hg.mozilla.org/mozilla-central
cd mozilla-central/build/unix/build-clang
# adjust revision in build-clang.py if needed
time PATH=/tools/python27/bin:$PATH /tools/python27/bin/python2.7 build-clang.py -c clang-trunk.json
# go and drink something

Once the build is finished you can find 2 not tracked files (hg st) in the current directory. clang.manifest should be attached to the bug and $SHA512 should be uploaded to the tooltool server (see below).

How to add a new version

See How To Upload To Tooltool

See Also