Thursday, December 31, 2009

Personal projects going ahead

I have been quite stressed in the last few weeks with a project that appeared out of nowhere; it has been more complicated than I thought but I finally managed to put it under control in the last week or so (Thanks that dolske found what was missing).

Regardless of this stressful time of the year, I have managed to get some projects going that had been stale for a really long time. I will be brief with all of them:

  • Study my bible. More than a project it is a life commitment that I had not put that much energy in the last two months until I finish my last course for my degree (I will soon have my degree yay!). I have been studying the book of Matthew and have been paying attention closely to when Jesus was referenced as the Son of Man versus the Son of God. It gets really interesting!
  • Firefox in Armenian. Some of my friends tease me about it but the reason why I got involved with Mozilla was that I wanted my grandpa to use Firefox in his native language. It should become a reality in this year. You can visit the bitbucket project by visiting this link.
  • Omid Media International. This is one of the Christian Ministries that I am involved with. We ported the site to Joomla and passed the old content into it. I have been learning a lot but I have very little knowledge on how to use it properly. You can visit the site by visiting this link.
  • Personal site. My personal site now looks a little better but there is need for more hours on it. It talks about the things I am involved with and who I am and believe in. Link to the site.
  • Analytics. I added Google analytics to few of my site and I got started on trying to make sense of it. Great tool to understand visitors behaviour.
  • Theology and philosophy blog. As I said before I am putting more effort into studying the Bible and I would like to share my thoughts and force myself to write very often. I would find very boring if I forced myself to blog about me but with God is simply new revelations every time I get the Bible. Don't visit it yet since I have not yet ramped up.

I have been quite for a while due to stress but there has been some really cool things happening with work as well as with my life which I will share soon.

Cheers and happy new year!
Armen




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

Wednesday, November 25, 2009

Fennec's en-US single-locale binaries being uploaded to a different location

Up until now, Fennec's en-US deb file (566K) was being overwritten every time by the multi-locale's deb file (1.2MB) due to that the name of the files cannot be different. To avoid this we upload now the single-locale under an "en-US" sub-directory. under "latest" directories on ftp.

For more details:
* Bug 529140 - upload Fennec single-locale tar and deb files under "en-US" sub-directory




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

Friday, November 20, 2009

hy-AM (Armenian) moving forward

Robert Sargsyan has been localizing Firefox into Armenian for a really long time through Narro.
He recently has contacted me to get things rolling since he has translated 98-99% (94% according to compare-locales) of the strings.

It is now my turn to get into the technical details and move it to mercurial. These are the steps that we have taken:
  • Robert ported the strings from 3.5 to 3.6 (Narro allows you to do this)
  • Through Narro's interface I exported the project and downloaded the zip file that it generates
  • I checked out my clone of the Armenian 1.9.2 tree
  • I overwrote my tree with the contents of the zip file
  • I run compare-locales like this:
    compare-locales /Users/armenzg/moz/repos/mozilla-1.9.2/browser/locales/l10n.ini .. hy-AM-1.9.2
  • I removed the files that were indicated to be removed
  • I pushed my changes to my repository
What comes next (if I am not mistaken)?
  • generate a langpack
  • submit it to AMO (submit page)
  • promote the add-on
  • get people's review
  • convince drivers to give us commit access
  • push the changes to the official Mozilla hy-AM repositories
We won't make it for 3.6 and I can't wait to see what the future holds for this language.

Big thanks to Serge!



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

libconic package needed for Maemo builds has been deployed

Thanks to puppet we were once again able to fix this easily.

All that puppet told the slaves to do is to run this command:
 su - cltbld -c '/scratchbox/moz_scratchbox -p apt-get --yes --force-yes install libconic0-dev'
 

What I did to fix this was:
  1. Check that a staging slave does not have that package "pkg-config conic --libs"
  2. Check that the file "targets/CHINOOK-ARMEL-2007/usr/include/conic/conic.h" does not exist
  3. Install it using a similar command that was used in a previous bug
  4. Check that "pkg-config conic --libs" returns what is expected "-lconic -ldbus-1 -lgobject-2.0 -lglib-2.0"
  5. Check that the conic.h exists where expected
  6. At this point we have a clear command to run by puppet and a "creates" argument.
  7. Deploy the patch in the staging-puppet server
  8. Login to another staging slave as root and run "puppetd --test --server staging-puppet.build.mozilla.org"
  9. Do checks 4 and 5 to see that the puppet changes took place
  10. Ask for review
  11. Commit and deploy to production-puppet
  12. Check a production like in step 8 and 9
  13. Check an hour later if a random slave has the change as well
Thanks to mfinkle for having written such a good description of the bug.

If you want to read more details check out "Bug 529462 - Add libconic package to Maemo build slaves"



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

Wednesday, November 18, 2009

Check for add-ons compatibility changes

I had my check for add-ons compatibility disabled but it recently stopped working.

To fix this instead of using this:
 extensions.checkCompatibility;false
you can use this:
 extensions.checkCompatibility.3.6b;false

As always, do not use this for stable releases as a workaround because one of your add-ons has not yet been updated after a new release. Doing so might make your new Firefox not to work as expected.




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

Thursday, November 05, 2009

My first push ever!

I received the ultimate power (just the build repos) on Monday and I got to use ot for the first time on Wednesday!
I was nervous I can't deny it but that didn't keep me from checking and rechecking (hg diff, hg st, hg in, hg pull -u, hg out) everything before pushing.

Note: I can only push through ssh and I had to setup a config file under .ssh.

armenzg:~ armenzg$ cat ~/.ssh/config
Host hg.mozilla.org
User armenzg@mozilla.com
armenzg:~ armenzg$ cat moz/repos/buildbotcustom/.hg/hgrc
[paths]
default = ssh://hg.mozilla.org/build/buildbotcustom

Here is my first changeset:
http://hg.mozilla.org/build/buildbotcustom/rev/015d0fabaa4e

Here is a couple of blog post from my coworkers that I found good to have:

Cool!



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

Wednesday, November 04, 2009

Firefox - Release Engineering infrastructure for Localization (L10n) - Blogging Blitz

In addition to our RelEng's blogging blitz I am going to blog about how our L10n release infrastructure works. In this first blog post I will explain our Firefox's coverage.

Scenarios

We currently have 3 scenarios:
  • Repackages on change
  • Nightly localized builds
  • Release localized builds

Deliverables

What our different deliverables are:
  • Langpacks (you can add a language as an add-on)
  • Installers (we generate a different one for each platform)
  • Complete and partial mars (these are generated for updating from one version to another one)
How many locales do we process:
  • More than 70 and depends on each branch
  • The number of locales per branch is determined by the all-locale's file of that branch

Key concepts

  • compare-locales = it compares en-US strings with the strings of a locale showing the differences between the two of them.
  • l10n-merged or merged = when a repackage is merged it means that if the locale has any missing strings then the English strings will be inserted. When we run compare-locales we tell it to create a "merged" directory in case the locale has any missing strings. When we create the installer if the "merged" directory exists the localized repackaged repackage will be based off that directory instead of the locales' repository. This ensures that it won't have any missing entities; avoiding this way any crash due to missing entities

How it works

Before I explain how each scenario works let me explain what makes them distinct:
  • compare-locale. We run compare-locales in all 3 scenarios.
  • l10n-merge. For releases we don't l10n-merge. We just use plain compare-locales.
  • triggering. Repackages-on-change are triggered by localizers' pushes while the nightly and releases are triggered when the en-US build finishes.
  • upload. Each scenario uploads to a different location (tinderbox-builds, nightly or releases)
  • updates. Only nightly and release scenarios have updates
How the repack-on-change scenario works:
  • We have a poller that polls for changes in all locale's pushlog and we poll every 15 minutes. The reason that we poll every 15 minutes is because it adds a huge load on the master if we did it in smaller periods of time. If we think about mc, 191 and 192 we poll more than 210 different pushlogs and that takes quite some load of our masters.
  • When a change for that locale is detected it triggers the triggerable L10n builds for all 3 platforms.
  • The deliverables for the locale are pushed to the tinderbox-builds directory on ftp.
How the nightly localized scenario works:
  • Instead of being triggered by a commit change on one of the locale's repositories, it is triggered by the en-US nightly build for that platform.
  • The nightly build triggers as many localized build jobs as the all-locale's file for that branch determines. This is accomplished in special buildbot schedulers that make use of the L10nMixin class by submitting a job per locale.
  • The repackages are l10n-merged!
  • The installers are uploaded to the nightly directories on ftp.
  • Unlike the repack-on-change scenario we have updates for this type of builds and that is why you will get to see complete mar files under the latest--l10n dir on ftp and partial mar files under the dated directories on ftp (NOTE that we don't keep the dated directories of localized builds forever as with the en-US builds).
 How the release localized scenario works:
  • This scenario is pretty similar to the nightly one but it has few differences.
  • The locales involved in the release are determined by shipped-locales and l10n-changesets and the revisions for each locale are specified in there.
  • The repackages are not l10n-merged.
  • We run l10n_verification to cross-check and make sure the repacks worked properly for the release builds.
  • We upload each locale's installers in its own subdirectory rather than all of them under an "-l10n" directory.  For instance you can see all the Windows localized builds for 3.5.4 in here. You can also note that en-US is in its own directory and all the langpacks under the xpi directory.
I know I have gone way into details but I believe it is worth having it recorded all together for once and for all. More to come on my next blog with regards to Fennec!

EXTRA: What builders we do have:
  • Firefox mozilla-{central, 1.9.0, 1.9.1, 1.9.2} {linux, macosx, win32} l10n build <- repack-on-change runs
  • Firefox mozilla-{central, 1.9.0, 1.9.1, 1.9.2} {linux, macosx, win32} l10n <- nightly runs
  • {linux, macosx, win32}_repack <- release runs
  • l10n_verification <- cross checking



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

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.

Saturday, August 22, 2009

en-US nightly updates for win32 not as timely as it used to be

A side effect of enabling the l10n updates is that en-US nightly builds that finish after 7AM PDT (which is when l10n nightly repackages are triggered) will take longer to receive an update offer. Specifically, this happens mainly for win32 builds since they take way longer to finish.

Currently there is only one machine that checks for pending updates to be generated and it generates them all pending jobs in one shot, pushes the snippets live and then checks again for more pending jobs.

The problem is that if the system picks X number of pending updates it will process them one by one but without pushing any snippets and partial MAR files live until it finishes with all X jobs.

Therefore, since the en-US nightly for win32 finishes after 7AM, it falls in the bucket of pending jobs and it can take two or three hours before the snippets are pushed live.

To fix this regression we have decided to have a temporary fix to our update generation system until we do the long term infrastructure changes.

To follow the work on this fix please follow the work on bug 511901.

We are really sorry for any inconvenience and we would like to have it fixed as soon as possible.



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

Monday, August 17, 2009

Updates + Nightly != just en-US

We finally have updates for all the locales we support instead of just en-US. This was enabled past Tuesday (right now only for mozilla-central) but not announced until we had it completely working.

Having updates with l10n-merge allow us to update users from a working l10n nightly build to the next working nightly.
This will help localizers to create a community of nightly testers and they won't have to worry for
A) having to tell their testers to manually download the latest nightly of their locale and/or B) worry that if their testers would have a nightly with missing entities (which meant a crashing experience).

This is a really short post but it has been by no means a short ride. Chris Cooper, Axel and I have been working for the last fifteen months on this project since I started as an intern. We had to untangle the logic from old tinderbox code, port it to buildbot, make buildbot do things that was not designed to do, unveil the "dark magic" of our updates generation system and fight any build ghosts trying to take us down.

Dramatization aside big thanks to Chris and Axel for working hard with me (and having patience), John O'Duinn and Seth for supporting us, Nick Thomas for the headaches I gave him, Ben Hearsum for helping understanding our snippet generation system and anyone from the community who helped me learn what I needed to learn.Last thanks for Mike Morgan with the AUS/Mac debugging.

I hope this contributes the L10n community's success in their respective countries and towards making more people support an open web!

PS = Party tonight at my place to celebrate :)



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

Monday, June 22, 2009

L10n nightly updates screenshots

Since my last blog post regarding l10n nightly updates there has been quite some progress. In fact, here are the screen shots from an l10n nightly update I generated on our staging servers. After a year and a couple of months working with Chris Cooper and Axel we are finally reaching our main goal that is to have nightly updates for localizers. Special thanks for Nick Thomas for helping us with the partial updates generation environment (pure black magic!)

Checkout specially the second screen shot which has plenty of information!

CC yourself to bug 480081 and dependents to know when this will be rolling out



































































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

Monday, June 15, 2009

Call for Armenian translators (Translate Firefox into hy-AM)

I am trying to help Robert Sargsyan who has been for many months trying to get Firefox translated into Armenian.
Since I can't read or write in Armenian I will try my best to help him get people who can to help him.

We are using Narro to do the translations. To register visit:
https://l10n.mozilla.org/narro/narro_register.php?l=hy-AM
To see that 83% of the strings are translated into Armenian check this URL:
https://l10n.mozilla.org/narro/narro_project_list.php?l=hy-AM
To start giving your translation suggestions (after you have been registered) visit this link:
https://l10n.mozilla.org/narro/narro_context_suggest.php?l=hy-AM&p=13&f=0&c=0&tf=2&st=1&s=&ci=0&cc=755&o=-1&a=0

Once you make a suggestion Robert will see it and approve them if they are well translated as soon as he can.

If you need to contact us my email is armenzg [AT] mozilla.com and Robert's robyerevan [AT] gmail.com




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

Friday, May 15, 2009

L10n nightly updates starts with...

The main bug that I am currently working on is to generate MAR files for the different locales we have. This will be one more step towards having nightly updates for all the different locales.

A MAR file (Mozilla ARchive) is basically a zip file but custom made for Mozilla purposes. This type of file is downloaded by Firefox through the update mechanisms; These update systems are used by Firefox to know where the next available update will be.

These MAR files can be partial or complete updates. What does this mean? When you are in the previous release to the new update you just receive a small/partial MAR file which only contains the differences between your current release and the new one. When you skip an update falling behind one or more releases you will get a full/complete MAR file with all the files for the new release meaning that Firefox will download a larger file.

Currently I have been able to create locally with the help of a script a complete MAR file for the French locale. Check the code that I used at the end of this post.

What comes next? I have to make changes to the factory that produces the l10n nightly builds to generate them with the MAR files.

There are many more things to consider but I will skip the details for when I make a little bit more of progress.

To keep yourself up-to-date with this work, CC yourself to the following bug:
Bug 480081 - Generate partial & complete mars for nightly l10n builds

Here is a document explaining what a MAR file is:
https://wiki.mozilla.org/Software_Update:MAR

NOTE: Remove "dist/l10n-stage" if you run into weird problems

Here is the script I used to create the MAR file (check under dist/update):
#!/bin/bash
# Author: Armen Zambrano Gasparnian
# Contact: armenzg@mozilla.com
# Purpose: Repackage a locale in hg
#
export BRANCH='mozilla-central'
#export BRANCH='mozilla-1.9.1'
export REPO_PATH='mozilla-central'
#export REPO_PATH='releases/mozilla-1.9.1'
export L10N_REPO_PATH='l10n-central'
#export L10N_REPO_PATH='releases/l10n-mozilla-1.9.1'
export LOCALE='fr'
export EN_US_BINARY_URL="http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-$BRANCH/"
# 1) Get ready
set -ex
# Let's isolate our work depending on the branch
mkdir -p $BRANCH && cd $BRANCH
mkdir -p l10n
rm -rf $BRANCH/dist/upload
# 2) checkout the main repo
if [ -d $BRANCH ]; then
hg -R $BRANCH pull -r tip ;
else
hg clone http://hg.mozilla.org/$REPO_PATH/ ;
fi
hg -R $BRANCH update

# 3) checkout the locale's repo
cd l10n
if [ -d $LOCALE ]; then
hg -R $LOCALE pull -r tip ;
else
hg clone http://hg.mozilla.org/$L10N_REPO_PATH/$LOCALE/ ;
fi
hg -R $LOCALE update
cd ..
# 4) generate the configure file
cd $BRANCH
autoconf-2.13
cd js/src
autoconf-2.13
cd ../..
# 5) configure
./configure --enable-application='browser' --with-l10n-base=../l10n --enable-update-packaging
# 5.A) tools needed
make -C nsprpub
make -C config
make -C modules/libmar
# 6) get the en-US binary
make -C browser/locales wget-en-US
# 7) generate the xpi and the installers
make -C browser/locales installers-$LOCALE MOZ_MAKE_COMPLETE_MAR=1
# 8) rearrange the packages in the correct structure for a nightly on ftp
make -C browser/locales prepare-upload-latest-$LOCALE
# 9) list the packages in the correct place, the correct naming and the correct chmod
ls -l dist/upload/latest
ls -l dist/update
# I do not have an ftp server so I won't be running this command
# sh -c 'scp -i $KEY_PATH -r * $USER@$SERVER:$UPLOAD_PATH'





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

Thursday, May 14, 2009

HOWTO: Paste to pastebin from the command line

You need the script "paste2oastebin.pl" from http://de.pastebin.ca/tools.php.

Here is what I needed to do on Mac OS X to make it work:
  • I needed to have WWW::Mechanize in my Perl modules so I used CPAN's interactive shell to do it:
sudo /usr/bin/cpan
install WWW:Mechanize
  • NOTE: The script points to a specific perl path and that implies a specific CPAN. Remember that we have MacPorts taking preference over default MacOS X installed packages. Use whereis to find this out and compare with the first line of the script.
  • Put the script in a folder which is part of your PATH and set the right permissions

Here is how to use it:
  • paste2pastebin file_to_submit
It will return you the URL for it. The script has more advanced options.


Errors I found which required installing WWW::Mechanize and the second one I am ignoring it every time:
Can't locate WWW/Mechanize.pm in @INC (@INC contains: /System/Library/Perl/5.8.8/darwin-thread-multi-2level /System/Library/Perl/5.8.8 /Library/Perl/5.8.8/darwin-thread-multi-2level /Library/Perl/5.8.8 /Library/Perl /Network/Library/Perl/5.8.8/darwin-thread-multi-2level /Network/Library/Perl/5.8.8 /Network/Library/Perl /System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.8 /Library/Perl/5.8.6 /Library/Perl/5.8.1 .) at /Users/armenzg/scripts/paste2pastebin.pl line 23.
BEGIN failed--compilation aborted at /Users/armenzg/scripts/paste2pastebin.pl line 23.
Use of uninitialized value in string ne at /Library/Perl/5.8.8/HTML/Form.pm line 704, <> line 555.





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

Monday, May 11, 2009

My first day as a full-timer

I am really excited to become part of Mozilla as a full-time employee. For those who don't know about me here is a real short summary:
  • I am from Spain
  • Moved to Canada 3 years ago
  • Studied at Seneca College
  • Took the two open-source courses in my 3rd year of the Software Development Degree
  • I did an internship in the Release Engineering team during the summer
  • I have been working on improving the release infrastructure for making different languages of Firefox faster
  • I kept on working as a consultant during my last of my degree
  • and today I am starting my first day at Mozilla!! (one year and 2 weeks after the beginning on my internship)
You can find me on IRC as "armenzg" on the #build and #seneca channels!

Monday, April 27, 2009

Hugh Ross in Toronto



I am not sure if you are interested in theories regarding such topics as the Big Bang, the extra-dimensionality of the universe or string-theory but if you are and you are around Toronto this Friday or Saturday you can attend the event.

We are bringing Dr. Hugh Ross from California all the way to Toronto to give you the chance to debate all these theories with him. Register at this website: http://hughrosstoronto.com.

All video and audio recording during the sessions will be available at the end of May or beginning of June.

Whether you are a seasoned expert on cosmology or someone with more questions than answers, this will be a unique opportunity to have your questions discussed and answered by a renowned scientist as each lecture will be followed by an equal Q&A time.

Schedule

Friday, May 1, 2009

  • 7:15 PM - Introductions
  • 7:30 PM - Session 1 "An Astronomer's Quest"
  • 8:15 PM - Break
  • 8:30 PM - Session 1 Q&A
  • 9:00 PM - Adjourn

Saturday, May 2, 2009

  • 2:00 PM - Introductions
  • 2:10 PM - Session 2 "More Than A Theory: The testable creation model"
  • 3:00 PM - Session 2 Q&A
  • 3:30 PM - Break
  • 3:45 PM - Session 3 "What Darwin Didn’t Know: Why the fossil record is the way it is"
  • 4:30 PM - Session 3 Q&A
  • 5:00 PM - Dinner Break (Sandiches/snacks available for purchase)
  • 7:00 PM - Session 4 "Origin of Life and Humanity"
  • 8:00 PM - Break
  • 8:15 PM - Session 4 Q&A
  • 9:00 PM - Adjourn

Monday, March 30, 2009

Read code to find the source of your problems

On my previous blog post, I commented that I wanted to install mercurial in one of our school servers (in which I have no privileges) and what it was a success last week it has become problematic in this second time.

I tried to build and I got this:
azambran@matrix:~/sources/mercurial-1.2.1> python setup.py build
running build
running build_py
running build_ext
error: invalid Python installation: unable to open /usr/lib/python2.5/config/Makefile (No such file or directory)
I looked for the string: "invalid Python installation: unable to open" and found the file "/usr/lib/python2.5/distutils/sysconfig.py", I found the string :
def _init_posix():
"""Initialize the module as appropriate for POSIX systems."""
g = {}
# load the installed Makefile:
try:
filename = get_makefile_filename()
parse_makefile(filename, g)
except IOError, msg:
my_msg = "invalid Python installation: unable to open %s" % filename
if hasattr(msg, "strerror"):
my_msg = my_msg + " (%s)" % msg.strerror

raise DistutilsPlatformError(my_msg)
which lead me here:
def get_makefile_filename():
"""Return full pathname of installed Makefile from the Python build."""
if python_build:
return os.path.join(os.path.dirname(sys.executable), "Makefile")
lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
return os.path.join(lib_dir, "config", "Makefile")
I am leaving this blog post and will follow it up with comments in case somebody needs the solution to this problem.

The main goal of this post is to show that even if you have no clue about the code that you are using you can still reach the internals of a large code base. Following this approach will help others who might want to help you and help you narrowing down the questions that you ask.



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

A piece of the Mercurial guide for students

If you are still interested on this Mercurial guide for students, we will be releasing it pretty soon (since our assignment is due this Friday).

One of the parts that I am writing is explaining many concepts by using simple examples. If you want to have a look at it you can do so by reading in the next section of this post.

Another part of what I will be writing is how to setup your own infrastructure since you can't always rely on school to set things up for you. In my case scenario, I chose our school's server called "matrix" in which we have ssh access and has python 2.5 installed.
  • ssh into the server
  • wget http://www.selenic.com/mercurial/release/mercurial-1.2.1.tar.gz
  • tar -xzvf mercurial-1.2.1.tar.gz
  • cd mercurial-1.2.1
  • python setup.py build
  • python setup.py install --prefix="${HOME}"
  • echo "export PYTHONPATH="/${HOME}/lib/python2.5/site-packages" > ~/.bashrc
Unfortunately, I have tried to repeat this installation on my matrix account and it is not happening. I will do a follow up blog post regarding this issue.





Create the repository
First thing you have to create is the repository which will hold the project:
  1. open the command prompt
  2. create a folder where you will have your project(s)
  3. inside the folder type this command
    hg init
You will now see a folder called ".hg" (the period in front of a folder indicates a hidden folder in Linux) this folder contains the metadata of your repository.

Create the first file
You have many ways to create files but if you are still in the command line do the following:
notepad readme.txt
Modify the file and save it. Back in the command line type the following:
hg status
The output of this will show you the following:
C:\Documents and Settings\student\hg_project>hg status
? readme.txt
The question mark indicates that there is a file that is not part of the VCS system.
If you try an "hg commit", you will get a message saying that nothing has changed.
If you try an "hg diff", you will see that there is no output

To add this file for the next commit do the following:
C:\Documents and Settings\student\hg_project>hg add readme.txt

C:\Documents and Settings\student\hg_project>hg status
A readme.txt

C:\Documents and Settings\student\hg_project>hg diff
diff -r 000000000000 readme.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/readme.txt Wed Mar 25 19:02:48 2009 -0400
@@ -0,0 +1,1 @@
+hey there
\ No newline at end of file
If we now look at the status of the repository we can see that the file has been "added" indicated by the "A" in front of the file name. You can also see that "hg diff" shows the differences of your working copy.

NOTE: The file is not part of the repo yet. It is only part of your local working copy.

Let's now commit the file into the repository, to do so:
C:\Documents and Settings\student\hg_project>hg commit -u me@nowhere.com -m "adding readm
e.txt file"

C:\Documents and Settings\student\hg_project>hg log
changeset: 0:b85f2cde9d27
tag: tip
user: me@nowhere.com
date: Wed Mar 25 19:07:09 2009 -0400
summary: adding readme.txt file
We indicate who the user that is doing the commit is with the parameter -u (stands for user) and we add a message by using the parameter -m (stands for message) and indicate the message between double quotes.

With the command "hg log" we can see that the changeset is number 0 (let's ignore for now the number after the colon TODO), the user who commited the changeset (which we provided) , the date and the summary (which we provided as well).

Modifying multiple files but only one changeset
TODO

Back out a changeset
TODO

Clone a repository living in your local file system

If you want to have more than one working copy of a repository you do it like this (note the quotes):
hg clone "C:\Documents and Settings\student\hg_project"
This might be nonsense but it might help you to work on separate bugs.

NOTE: this second working copy takes less space than the first one. Mercurial did not really created copies of your first repository but created symbolic links to them. These files will only really be created if you make changes to them. TODO QUOTE

If we do changes in the readme.txt file from the second working copy and we do a commit:
C:\Documents and Settings\student\other_working_copy\hg_project>hg status
M readme.txt

C:\Documents and Settings\student\other_working_copy\hg_project>hg commit -u sec
ond@nowhere.com -m "This is a commit from the second working copy"

C:\Documents and Settings\student\other_working_copy\hg_project>hg log
changeset: 1:522aef5bea8a
tag: tip
user: second@nowhere.com
date: Wed Mar 25 19:25:07 2009 -0400
summary: This is a commit from the second working copy

changeset: 0:b85f2cde9d27
user: Me_me
date: Wed Mar 25 19:07:09 2009 -0400
summary: adding readme.txt file
You can note that the


Who did it and what changes for a certain changeset
If you want to know who did what in a certain changeset, you can do so by dumping the header and diffs for one or more changesets. In the following example we use the export command and indicate changesets 0 and 1.
C:\Documents and Settings\student\other_working_copy\hg_project>hg export 0 1
# HG changeset patch
# User Me_me
# Date 1238022429 14400
# Node ID b85f2cde9d2702abb2df3d6d44cfb212d00f3a48
# Parent 0000000000000000000000000000000000000000
adding readme.txt file

diff -r 000000000000 -r b85f2cde9d27 readme.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/readme.txt Wed Mar 25 19:07:09 2009 -0400
@@ -0,0 +1,1 @@
+hey there
\ No newline at end of file
# HG changeset patch
# User second@nowhere.com
# Date 1238023507 14400
# Node ID 522aef5bea8adfb62ccaacfca1d35c4f2fe90044
# Parent b85f2cde9d2702abb2df3d6d44cfb212d00f3a48
This is a commit from the second working copy

diff -r b85f2cde9d27 -r 522aef5bea8a readme.txt
--- a/readme.txt Wed Mar 25 19:07:09 2009 -0400
+++ b/readme.txt Wed Mar 25 19:25:07 2009 -0400
@@ -1,1 +1,2 @@
-hey there
\ No newline at end of file
+hey there
+modification from second working copy
\ No newline at end of file





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

Saturday, March 28, 2009

How to add a creative commons license to your blog

I always wanted to understand the creative commons licenses and it is now that I decided that all my blog posts should have it by default making life easier for other people to reshare whatever I blog about.

I visited this link to generate the code snippet by just answering few questions:
and I also read a little bit this document which explains briefly some concepts:

This is the license I chose Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License and here is the break down:
  • BY - created BY
  • NC - No Commercial use
  • SA - Share Alike
I have decided to add the snippet of code in every single post by adding it to Blogger's "Post Template" under "Settings->Formatting"

Make other people's life easier and keep just the rights you want!




NOTE: I tried to use the following code to show you what the code snippet looks like but I ended up using a "textarea". Is there a better way to share HTML code? http://bguide.blogspot.com/2008/02/howto-add-custom-css-class-to-blogger.html


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

Monday, March 23, 2009

Survey for Senecans who took the open-source course

I am writing a research paper regarding the skills that you gain as a Seneca student from taking the open-source courses for my BTR820 course.

If you are taking the course(s) or have taken it, I would greatly appreciate if you can give few minutes to do this survey that I have prepared. 

I am not sure if you can fill the form from the blog post so I recommend you to follow the link provided.

Thanks ahead of time!



If you have trouble viewing or submitting this form, you can fill it out online: 
http://spreadsheets.google.com/viewform?formkey=cEdwdkVYei1ENnVwNm5ESXdsclU0UXc6MA..

Open-source course survey

This survey is totally anonymous and tries to gather information regarding students' opinions regarding if taking the open-source course will help them in their career or if the open-source course has motivated them in any special way compared to a traditional course.

By doing this survey you are contributing on how this course can be helpful for other people who might want to implement this type of course in other schools. This survey is done by Armen Zambrano a Seneca's BSD student. No personal information is being collected and I will make the results publicly available athttp://armenzg.blogspot.com/ before the end of the semester.











No, not reallyYes, it will be really useful