Converting old Mac minis into CentOS Instantbird build slaves
By Florian Quèze on Friday, July 25 2014, 23:24 - Mozilla - Permalink
A while ago, I received a few retired Mozilla minis. Today 2 of them started their new life as CentOS6 build slaves for Instantbird, which means we now have Linux nightlies again! Our previous Linux build slave, running CentOS5, was no longer able to build nightlies based on the current mozilla-central code, and this is the reason why we haven't had Linux nightlies since March. We know it's been a long wait, but to help our dear Linux testers forgive us, we started offering 64bit nightly builds!
For the curious, and for future reference, here are the steps I followed to install these two new build slaves:
Partition table
The Mac minis came with a GPT partition table and an hfs+ partition that we don't want. While the CentOS installer was able to detect them, the grub it installed there didn't work. The solution was to convert the GPT partition table to the MBR older format. To do this, boot into a modern linux distribution (I used an Ubuntu 13.10 live dvd that I had around), install gdisk
(sudo apt-get update && sudo apt-get gdisk
) and use it to edit the disk's partition table:
sudo gdisk /dev/sda
Press 'r
' to start recovery/transformation, 'g
' to convert from GPT to MBR, 'p
' to see the resulting partition table, and finally 'w
' to write the changes to disk (instructions initially from here).
Exit gdisk.
Now you can check the current partition table using gparted. At this point I deleted the hfs+ partition.
Installing CentOS
The version of CentOS needed to use the current Mozilla build tools is CentOS 6.2. We tried before using another (slightly newer) version, and we never got it to work.
Reboot on a CentOS 6.2 livecd (press the 'c
' key at startup to force the mac mini to look for a bootable CD).
Follow the instructions to install CentOS on the hard disk.
I customized the partition table a bit (50000MB for /
, 2048MB of swap space, and the rest of the disk for /home
).
The only non-obvious part of the CentOS install is that the boot loaded needs to be installed on the MBR rather than on the partition where the system is installed. When the installer asks where grub should be installed, set it to /dev/sda (the default is /dev/sha2, and that won't boot). Of course I got this wrong in my first attempts.
Installing Mozilla build dependencies
First, install an editor that is usable to you. I typically use emacs, so: sudo yum install emacs
The Mozilla Linux build slaves use a specifically tweaked version of gcc so that the produced binaries have low runtime dependencies, but the compiler still has the build time feature set of gcc 4.7. If you want to use something as old as CentOS6.2 to build, you need this specific compiler.
The good thing is, there's a yum repository publicly available where all the customized mozilla packages are available. To install it, create a file named /etc/yum.repos.d/mozilla.repo
and make it contain this:
[mozilla] name=Mozilla baseurl=http://puppetagain.pub.build.mozilla.org/data/repos/yum/releng/public/CentOS/6/x86_64/ enabled=1 gpgcheck=0
Adapt the baseurl
to finish with i386
or x86_64
depending on whether you are making a 32 bit or 64 bit slave.
After saving this file, you can check that it had the intended effect by running this comment to list the packages from the mozilla repository: repoquery -q --repoid=mozilla -a
You want to install the version of gcc473 and the version of mozilla-python27 that appear in that list.
You also need several other build dependencies. MDN has a page listing them:
yum groupinstall 'Development Tools' 'Development Libraries' 'GNOME Software Development'
yum install mercurial autoconf213 glibc-static libstdc++-static yasm wireless-tools-devel mesa-libGL-devel alsa-lib-devel libXt-devel gstreamer-devel gstreamer-plugins-base-devel pulseaudio-libs-devel
Unfortunately, two dependencies were missing on that list (I've now fixed the page):
yum install gtk2-devel dbus-glib-devel
At this point, the machine should be ready to build Firefox.
Instantbird, because of libpurple, depends on a few more packages:yum install avahi-glib-devel krb5-devel
And it will be useful to have ccache:
yum install ccache
Installing the buildbot slave
First, install the buildslave command, which unfortunately doesn't come as a yum package, so you need to install easy_install first:
yum install python-setuptools python-devel mpfr
easy_install buildbot-slave
python-devel and mpfr here are build time dependencies of the buildbot-slave package, and not having them installed will cause compiling errors while attempting to install buildbot-slave.
We are now ready to actually install the buildbot slave. First let's create a new user for buildbot:
adduser buildbot
su buildbot
cd /home/buildbot
Then the command to create the local slave is:
buildslave create-slave --umask=022 /home/buildbot/buildslave buildbot.instantbird.org:9989 linux-sN password
The buildbot slave will be significantly more useful if it starts automatically when the OS starts, so let's edit the crontab (crontab -e
) to add this entry:@reboot PATH=/usr/local/bin:/usr/bin:/bin /usr/bin/buildslave start /home/buildbot/buildslave
The reason why the PATH environment variable has to be set here is that the default path doesn't contain /usr/local/bin, but that's where the mozilla-python27 packages installs python2.7 (which is required by mach
during builds).
One step in the Instantbird builds configured on our buildbot use hg clean --all
and this requires the purge mercurial extension to be enabled, so let's edit ~buidlbot/.hgrc
to look like this:$ cat ~/.hgrc
[extensions]
purge =
Finally, ssh needs to be configured so that successful builds can be uploaded automatically. Copy and adapt ~buildbot/.ssh
from an existing working build slave. The files that are needed are id_dsa
(the ssh private key) and known_hosts
(so that ssh doesn't prompt about the server's fingerprint the first time we upload something).
Here we go, working Instantbird linux build slaves! Figuring out all these details for our first CentOS6 slave took me a few evenings, but doing it again on the second slave was really easy.
Comments
Since Bug 1167201, we also need: yum install GConf2-devel
Have you wondered how search engines work? Easy methods too
rank on search engines is a continuous battle for a few internet promoters.
The internet iss huge and broad. Did yoou know that there are
about 13 billion English web pages on impact?The entire
population of the earth is aboiut 6.5 billion, sso which usually
is like sawying there are two webpages for absolutely everyone that walks this ground.
This total doesn't obviously count the net
pages in other languages.
Bllog marketing to earn means you'll be sikmply blogging for income.There is set amount oof money
you may well make from blogging as long as you remain focused,
persistent and continual. To make the best of your efforts, there
are specific techniques and tools you need to know. Methods for tips that you.
Article making. This is one traffic-generating technique
you shouldn't miss. Today, this is recognized one of your best too be able to drive enormous trafffic as part of your website.
Write articles on a regular base. If you caan commit to at least 2 articles a day, that would
ead to 712 articles per year givinhg you mor quality inbound
web page links. Just make sure yyou possess a kiler authors resource
box so you're able entice your potential clients to go to your site.
First be awre that SEO can be a long term thing. Algorithms of motors
like google change so you hae to be certain you continue to
change your SEO routine continuously to keep up with changes.
It is definitely not something you have to do one day
and forget the next. Keeping on practicing tthe tips will be sure
you get good page rankings consistently.
So perhaps you should get going with just adding say Meta tags andd seeing hoow that gets an outcome
when copy and paste a type of your pages text within a search locomotive.
Then change the Meta tags to another tthing and re-submit your pages to google search.
Next time you execute a search the new same key phrase
aas before, yyou may hhave a choice of as wrll as getrting youu the best listings.
Here's a very easy way to do this. Go to Google, type in sayy 10 seatches like youu
were looking for the topic of web page. Write them all down as planning becuse you want
to need them again here momentarily.
These are just a few ideas nevertheless the choice really iss endless.
Whatever you choose, a scrapbook possibly be a favorite memento of
this period with your child's our life. Whhy not make one each and every year.