Monday, October 26, 2009

Fennec - Multi-locale build automation (patches are up for review)

This blog post is to describe the code changes that I have done in my posted patches on bug 519684 (this means that the following comments do not necessarily mean that they will be how the system will be).

If you don't want to read the whole post, all I propose is:

  1. create single-locale as usual
  2. continue with multi-locale build

For more details: we currently generate a single-locale build for Maemo devices (tar balls and deb files) which is composed of Fennec + XulRunner and as soon as we are done we trigger the localized builds for it. The process can be seen as:

  1. normal scheduler triggers the build
  2. check out code
  3. make -f client.mk
  4. repackage binaries, tests and deb files for Fennec and XulRunner
  5. upload tar balls and deb files
  6. trigger L10n parallelized jobs (the # of them is as many locales are defined in all-locales)

The changes I have made to the MaemoBuildFactory class to generate the multi-locale and the new MultyNightlyL10n can be seen like this (NOTE: The changes to the process are highlighted):

  1. The MultyNightlyL10n scheduler is triggered and passes as a property a list of locales based on the file maemo-locales (which currently contains 7 locales)
  2. check out code
  3. make -f client.mk build (we pass L10NBASEDIR variable)
  4. repackage binaries, tests and deb files for Fennec and XulRunner
  5. upload tar balls and deb files
  6. trigger L10n parallelized jobs (the # of them is as many locales are defined in all-locales)
  7. checkout compare-locales
  8. remove any tar balls or deb files
  9. for each locale defined:
    1. checkout the locale's code
    2. run compare-locale
    3. add the .jar files to the build (currently l10n-merged)
  10. repackage the Fennec tar ball and the deb file (NOTE: I pass the parameter AB_CD=multi instead of AB_CD=en-US)
  11. upload them

This means that beside the single-locale build we will upload the multi-locale build and we will still be able to generate the individual locale repackages based on the single en-US build.

Let me know if you have any questions or suggestions.

Armen




Creative Commons License
This work by Zambrano Gasparnian, Armen is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.

Friday, October 16, 2009

Visiting Seneca - Encouraging students

Last Thursday Oct. 8th, Ben Hearsum and I visited Seneca College to talk with new students that are taking the open source courses taught by Dave Humphrey and Chris Tyler.

I believe that I talked with the students taking the students taking the "DPS909 Topics in Open Source Development" course and Ben talked with the LUX (Linux/Unix Sysadmins) post-grad students that were taking a course in "Build and Release".

I really enjoyed talking for an hour with these students since I was in their shoes two years ago (wow time flies!). I wanted to give them hope and confidence in themselves and that they could get really rewarding jobs in the open source industry through the course they are just taking. It is a large set of skills they can gain out of it.

I believe I covered these in the presentation:
  • Background of where I come from and where I am now: open-source student on Fall '07 & Winter '08, Mozilla intern Summer '08, Mozilla contractor while full-time student on Fall '08/Winter '09 and full-time employee since May '09.
  • Explained my day to day as an open-source student.
  • Explained them how weak I was technically before taking the course (I didn't use at all Linux and/or any open source tools) and how much more I know since then (as if I know that much :P). I emphasized the importance of self-discipline, self-guidance, a little of work almost every day, the importance of blogging correctly and inter-personal communication with other community members and developers.
  • Basics about our release infrastructure: developers commit, automation detects commit, it chooses slaves (virtual or physical machines) to build and run different tests.
  • Basics about stable branches and development branches. Naming of branches e.g. Gecko 1.9.1/Fx 3.5.x.
  • Covered daily used tools and what my day to day looks like with my work on bugzilla/patches.
  • Explained them my interview process and the company's working atmosphere. I also highlighted that my asset for my internship were the two projects I worked on school and specially my blog (my resume was meaningless!!). For reaching full-time position I believe that inter-personal skills (even though English is my 3rd language) and work diligence were quite important since technically I was not that strong and I made (and I still do) many mistakes.
Thanks to Dave Humphrey for raising important questions that students would not think at that moment to ask. I also thanks for the attention that many students payed while I talked and the questions they raised. I hope I was able to encourage them and get some eager and hard-working candidates for Mozilla internships.

I also attended partially to Ben's talk and this guy really knows our systems inside/out. It was also interesting to hear that Fedora had only one full-time Release Engineer and hundreds of volunteers for their project unlike us that we have ten full-time employees and very few volunteers from the community.

Cheers and see you at Seneca's symposium (FSOSS '09)!




Creative Commons License
This work by Zambrano Gasparnian, Armen is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.

Friday, October 09, 2009

Puppet - Installing a library for scratchbox

Today I deployed a library that was needed for the mobile team to add a feature to Fennec in all of our Linux slaves.

To do this we use Puppet and I had to modify our puppet-manifests to do so. It was kind of different that the last time Ben Hearsum guided me to deploy the latest binaries for the JS coverage (bug 511911). This time it was about adding a library inside of scratchbox rather than just adding it straight to the slave.

The puppet manifest pretty much work like this:
  • In the site-{staging,production}.pp files we declare the slaves we control and which classes to include for each one of them
  • In the buildslave.pp and staging-buildslave.pp file we include packages
  • Each package contains instructions on what to do. From user management, to file permission verification to file execution if a file is missing. A complete example is devtools.pp but a simple example is the extras.pp I wrote.
In my situation this deployment was a little special because puppet runs as root user but scratchbox does not allow calling it by a privileged user so I had to use "su - cltbld -c ".

For full details you can read the bug I worked on (bug 520562) or read my monologue on the puppet-users mailing list.





Creative Commons License
This work by Zambrano Gasparnian, Armen is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.

Friday, October 02, 2009

Fennec - Setup developers' environment to build Fennec on Maemo

Find in this blog post two different ways to setup the correct environment to develop for Fennec for Maemo.

If you want to have everything ready without too much trouble download the Centos VM from our ftp servers:
ftp://ftp.mozilla.org/pub/mozilla/VMs/CentOS5-ReferencePlatform.tar.bz2
and follow these instructions on how to bring the VM up-to-date: https://wiki.mozilla.org/ReferencePlatforms/Linux-CentOS-5.0#Fixup_Scratchbox_Install

If you want to do it the harder way but most rewarding, let me guide you through what was my experience.

NOTE: I followed the steps from the following page but finish reading the blog post before you do it yourself. https://wiki.mozilla.org/Mobile/Build/Maemo_Build_Instructions. Another note is that I am running Ubuntu 9.0.4 with VMWare

Brief summary
  1. Set up scratchbox with cs2007q3 toolchain
  2. Set up Maemo-scratchbox 4.0.1 from Maemo's repository
  3. Set up Maemo-SDK 4.0.1 from Nokia's tablet-dev web site
  4. Login to scratchbox and select our target which is CHINOOK_ARMEL (I think Chinook is the version of scratchbox and Armel is the CPU/architecture of the Nokia tablets)
  5. Get and configure exestack.armel from vladimir's page (These steps seem to wget and setup many packages)
Warnings
  • Not sure if the message ("# you may need to relog into your machine here") on the instructions means to close your terminal OR to actually restart to machine. I just closed and opened a new terminal as I have read in other Maemo instructions.
  • I hit a problem when I reached "bash maemo-sdk-install_4.0.1.sh" which is:
    E: Scratchbox login found but not executable by user.
    E: Please check that user is member of the group specified in scratchbox
    E: installation (default 'sbox').
    E: Also start a new login terminal after adding group membership.
    I fixed this by doing this: "newgrp sbox" which I read in here. From this other source this might just have been solved by restarting my machine without having to create the group.
  • The Maemo-SDK will ask you a lot of questions which I decided to choose the default ones. Check out this page for more detailed information: http://tablets-dev.nokia.com/chinook/INSTALL.txt
  • The Maemo-SDK takes a long time to install
  • Ubuntu offered me updates of scratchbox which I decided not to add since they are not mentioned in the instructions I followed
I hope this all you need to get going.

"Happy hacking!" as Nokia's SDKs finishes its installation with.



Creative Commons License
This work by Zambrano Gasparnian, Armen is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.

Installing Fennec nightly on N810

I will be helping this quarter to set up the L10n release infrastructure for mobile so I got a Nokia N810 to install localized versions when we actually have them.

In this blog post I will explain how to install a nightly deb file on your Nokia N810 (To install a nightly on Linux, Mac or Windows you can install the Fennec desktop builds - blog post to come)

The first two steps are to avoid you having to use XTerminal from your device. NOTE: You might be prompted to install
  1. Search on the Web app for "openssh maemo" or follow this link to go directly and install OpenSSH Client And Server v4.7p1-12.maemo2.
    1. You might be prompted to change the password of your "root" user. It didn't happen to me. I might have had openssh installed from before I loaned it.
  2. Search on the Web app for "homeip maemo" or follow this link to go directly and install HomeIP V0.9.1-2
    1. You have to add it to your N810's desktop by enabling it. On your desktop tap on "Home->Select applets...->HomeIP". You should now see your IP on your desktop. You are going to need this to connect to your device with SSH
  3. Make sure that your computer and your Nokia device are in the same wireless network and SSH to it by typing this:
    ssh root@
    and type the password for your root account. You should now be connected.
    1. If you don't know your password you can type "root" on your X Terminal and will grant you root privileges without a password. Read more in the "Root access" page by maemo.org
  4. Visit this link: http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mobile-1.9.2/?C=M;O=D (sorted by latest modified)
    1. You want to wget the latest deb files for XulRunner and Fennec (only en-US for now). For today's blog post are:
      • xulrunner_1.9.2b1pre-20091002010458_armel.deb
      • fennec_1.0b4_armel.deb
    2. Now install first Xulrunner and then Fennec by typing this:
      • dpkg -i xulrunner_1.9.2b1pre-20091002010458_armel.deb
      • dpkg -i fennec_1.0b4_armel.deb
  5. Now every time you want to open Fennec you can go to X Terminal and type: "fennec" which should do. You can check that it is there by typing "which fennec"
You will have to repeat this every morning after the nightly builds are generated (around 2 AM PDT)

I hope this helps you since I didn't get to find any instructions for doing this but through instructions on IRC



Creative Commons License
This work by Zambrano Gasparnian, Armen is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.