Mounir Lamouri's Blog

To content | To menu | To search

Tag - {{tpl:TagID}}

Entries feed - Comments feed

A script to get tinderbox logs without going to the web interface

The new try server is really cool but it is still a real pain to get the tinderbox logs when you have warnings or failures. Except if I am missing something, the way to do it is to grep your rev id in the web interface then manually open every log you need.
There is some work in progress to fix that and send the build log URL in the email so it can be more straightforward (bug 511749) but until then, we have to suffer...

I really think these kind of repeating boring tasks should be avoided all the more for a software engineer so today, while waiting for a compilation, I tried to write a python script to grep the build log URL's for me. Surprisingly, it works.
The script fetches the tinderbox web interface HTML page (for MozillaTry only, at the moment) and tries to find with a plain and simple heuristic where the build logs corresponding to your rev id are.

The script has been tested with python 2.6 and python 3.1 and requires lxml python library (for parsing).

You can download it here:
http://people.mozilla.org/~mlamouri...

Let me know if it helps (or if you find bugs) !

Why some Firefox plugins need to be compiled, example with Weave

Gentoo let the user installing a few Firefox and Thunderbird plugins via the package manager and people often consider it is useless. Actually, there are at least two reasons why it can be useful.
The first one is obvious : when installing a plugin with the package manager, you are sure it will be available for every users (except if it is manually disabled by the user). For example, you can install noscript for security reasons directly by enabling restrict-javascript USE flag.
The other reason is the compilation. Indeed, most plugins are platform-independent but some of them are not and those ones are not guarantee to work on your computer. For example, you can install Firefox on a lot of different platforms. If you stay with GNU/Linux, you can install Firefox 3.5 on alpha, amd64 (x86-64), arm, hppa, ia64, ppc, ppc64, x86[1] . This is true at least with Gentoo. It goes without saying if a plugin has a platform-dependent part, it will not provide a binary for all these platforms.

Concretely, I tried to install Weave 1.0 beta 1 and 2 from addons.mozilla.org. When launching Firefox, I got this output in the Weave Activity Log view:

2009-11-25 12:34:02	Service.Main         INFO	Loading Weave 1.0b2 in 5 sec.
2009-11-25 12:34:08	Engine.Bookmarks     DEBUG	Engine initialized
2009-11-25 12:34:09	Engine.Forms         DEBUG	Engine initialized
2009-11-25 12:34:10	Engine.History       DEBUG	Engine initialized
2009-11-25 12:34:10	Engine.Passwords     DEBUG	Engine initialized
2009-11-25 12:34:10	Engine.Prefs         DEBUG	Engine initialized
2009-11-25 12:34:10	TabTracker           DEBUG	Failed to load json: this.changedIDs is undefined JS Stack trace: ([object Object])@trackers.js:125 < Utils_jsonLoad("weave/changes/tab_tracker.json",[object Object],(function (json) {for (let id in json) {this.changedIDs[id] = 1;}}))@util.js:559 < T_loadChangedIDs()@trackers.js:123 < T__init()@trackers.js:76 < TabTracker__init()@tabs.js:356 < TabTracker()@tabs.js:345 < ()@engines.js:161 < Engine__init()@engines.js:179 < _init()@engines.js:303 < TabEngine()@tabs.js:56 < EngMgr_register(TabEngine,5,[object Array])@engines.js:113 < EngMgr_register([object Array])@engines.js:106 < WeaveSvc__registerEngines()@service.js:379 < _onStartup([object Object])@service.js:278 < notify([object XPCWrappedNative_NoHelper])@util.js:624
2009-11-25 12:34:11	Engine.Tabs          DEBUG	Engine initialized
2009-11-25 12:34:11	Service.Main         INFO	Resetting client syncID from _onStartup.
2009-11-25 12:34:11	Service.Main         INFO	Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.9.1.4) Gecko/20091109 Gentoo Firefox/3.5.4
2009-11-25 12:34:11	Service.Util         WARN	Component @labs.mozilla.com/Weave/Crypto;1 requested, but doesn't exist on this platform.
2009-11-25 12:34:11	Service.Main         DEBUG	Crypto check failed: TypeError: Svc.Crypto is null
2009-11-25 12:34:11	Service.Main         ERROR	Could not load the Weave crypto component. Disabling Weave, since it will not work correctly.
2009-11-25 12:34:11	Service.Main         INFO	Weave Sync disabled

If you unzip the xpi file, you will found a platform/ directory which is containing platform-dependent files. If we stay with GNU/Linux, we have Linux/, Linux_x86_64-gcc3/ and Linux_x86-gcc3/ directories. If we launch 'file platform/Linux/components/WeaveCrypto.so', we got:

platform/Linux/components/WeaveCrypto.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped

So, x86, x86-64 and arm are supported, not surprising. But my old Powerbook G4 (PowerPC) is not. Actually, it would be if I was using MacOS X instead of GNU/Linux.

I don't know if addons.mozilla.org should specify the supported platforms for platform-dependent plugins because arm, x86 and x86-64 are covering most of the target systems. Actually, as far as I know PowerPC is fully supported only by Gentoo and Debian. Anyway, if you are using an unconventional platform, you may want to compile your own weave plugin and probably a few others.

Luckily, weave has just been updated to 1.0b2 in the Gentoo tree :)

Notes

[1] mips is working with Firefox 2.0.0.19 and sparc with Firefox 3.0.11

Lecture about Mozilla at INSA Lyon

Last Friday (November 13 2009), I gave a lecture/conference titled Mozilla and its technologies in the context of the Mozilla Campus Reps program. Indeed, I am a Mozilla Campus Rep at INSA Lyon, my university.

The lecture had four parts. First of them was a classic presentation of Mozilla and Netscape history. Then, a presentation of some Mozilla projects like applications, libraries, tools and especially Mozilla Labs. The real technical part was about the Mozilla Platform (Gecko, XUL, ...). To complete, the Open Web and web standards.

Everything went well. I planned to give a 30-minute to 45-minute length lecture with 15 minutes of questions but it looks like I had a lot of things to say and I talked one hour long. Fortunately, there wasn't a lot of questions so I finished in time.
The most important is I had only good feedback which is pretty cool for a first experience !

The Mozilla campus Reps program wasn't able to send me a swag pack so I asked to Tristan Nitot (Mozilla Europe) who seemed delighted to help. Paul Rouget (Mozilla Europe too) also helped with some advices. A big thank you to both of them !

Finally, you can download my slides. You can also get the source files here. The slides have been made in latex with beamer. All this stuff is available in Creative Common Attribution 3.0 (CC-BY).
The slides aren't really verbose. They have been made only to get attention of the audience and let them follow me. I've spoke about a lot of subjects that are not even mentioned like JavaScript benchmarking, V8, FOSS work-flow... I find it more dynamic and -I hope- less boring for the audience.

It was a nice experience and I'm glad to have spread Firefox and Mozilla !