Saturday, November 29, 2014

Yesterday a Genius passed away

First thing, sorry for this completely non-technical post going to technical planets. If you don't want to ready about a completely emotional stuff, just stop reading now.

I'm a Brazilian that was born in the end of the 80's and grew up in the beginning of the 90's. Took me some time to have a telly at home, my parents were not so in favor of it. till the time they gave up following the religious rules ...
I remember the telly installed in a up corner of the room, it was a small one (14"). At that point I was experimenting a new world of four non-paid channels that we had access to. News, movies (from the 70's), culinary programs ... but one thing, in special, got my attention. It was a TV show about a "guy", with no name, with no family, living in a villa with: a poor widower dad and his smart daughter (the mom died during the birth), a middle-class widow mother and her spoiled son (the dad was a sailor that died in one of his travels), an old single woman (that loves the single dad), a teacher of the kids' school (in love with the single mom) and the owner of the villa, a rich and generous fat man that shows up every now and then to collect the rent, never paid by the widower dad. It was amazing, goddamn, it *is* amazing. A ~30 minutes episode (in Brazil we never had access to more than ~100 episodes), right after lunch, about this villa and the central character. The original name of the show is "El Chavo del 8". Episodes of "El Chavo del 8" where interleaved with episodes of "El Chapulín Colorado", a not strong, not smart, not fast, not powerful and not handsome hero, that always showed up to help anyone who asked for, usually in the most jumbled way, causing more confusion than actually helping. He was a perfect anti-hero. Goddamn, I cannot say how much I like these stupid TV shows. I remember my family sitting together and watching the Christmas special, the same one, for 10 years in a row. And it was better than the Christmas itself. Yesterday the genius who wrote these TV shows, and played the main character of both, passed way. Latino Americans with my age (+/- 10) are, for sure, sad today.
If you don't know this genius but are interested in: http://en.wikipedia.org/wiki/Chespirito
For those who feel the same pain, let's think that the man died, the legend will always be alive in our memories/hearts.



Buenas noches, maestro Bolaños!

Thursday, November 27, 2014

virt-viewer (using gtk3) for Windows

For the last few weeks I've been spending some time to have virt-viewer,
using gtk3, running on Windows. And it finally works!

Here is a not so brief description about the projects that I've hacked on (and the problems I've faced out during the process). if you're not interested in the process, just scroll down till the end of the email, where you will find the installer and a few instructions about what you need to generate the installer by yourself.

- msitools:
Apart from the broken build system on F21[0] and the wixl-heat generating the same ID for dirs used by other libraries/components[1] I have added .wxi files for the virt-viewer dependencies in order to have a build using gtk3. The dependencies are basically 3: 
- gtk3 itself[2]
- spice-gtk3[3]
- gtk-vnc2[4].
All the .wxi files were generated following the "How To" in the msitools webpage[5].
[0]: https://git.gnome.org/browse/msitools/commit/?id=c4c397438b797de4e68bb6d7fb891872db9e7bab
[1]: https://git.gnome.org/browse/msitools/commit/?id=41db587bae5a6c4cbc8f40a52bf2d6f25416653f
[2]: https://git.gnome.org/browse/msitools/commit/?id=c03676f95a348fd7da511355398f3a073400f819
[3]: https://git.gnome.org/browse/msitools/commit/?id=08cdc65a46f9eaaf49cd0acde0c3aaead341973d
[4]: https://git.gnome.org/browse/msitools/commit/?id=19c465b9f89583cdc905609abfd9cfb2c6beb26f
[5]: https://wiki.gnome.org/msitools/HowTo/CreateLibraryWxi

- virt-viewer:
Once that msitools has all the necessary bits included, it is time to hack a bit on virt-viewer and provide a way to generate the .msi file for virt-viewer using gtk3[6]. It is quite simple and basically a copy and paste from the file we already have been using for gtk2. just changing the dependencies and installation folder (just to avoid myself getting confused with the versions and so on).
[6]: https://fedorapeople.org/cgit/fidencio/public_git/virt-viewer.git/commit/?h=wip/msi-gtk3&id=4495b42a23ba5a795185bea0cadc540126b58751

After generate and install the .msi file on my Windows VM I crossed my fingers and ran remote-viewer!
Well, the results were not exactly the expected ones. A crash in libGdk-3.0.dll with no more info could be seen and also a lack of icons.

Okay, okay. First things first. Let me try to hunt this crash. Where can I start from? Hmmm. What about getting a debugger? :-)

- gdb:
Just got the binary from the mingw sourceforge webpage[7]
[7]: http://sourceforge.net/projects/mingw/files/MinGW/Extension/gdb/

Now I have the gdb, let me hunt the crash!
gdb.exe remote-viewer.exe ... and more problems! There were no debug-symbols in any of the packages I've been using ... and I need them!

- debugging:
 - approach 1 - -debug packages are your friends: well, not always. I've
installed the -debug packages and have added the new installed files
into the respective .wxi files. Then I've generated a new build and ... same crash, same poor info I had before (and nothing more). :-(
 - approach 2 - compile everything by yourself: this is what worked for me, but we have to agree that it's not exactly the most handy thing to do when you just want to debug something. Also, it inserted new bugs when launching the application, something about missing files that, for sure, were in the correct path. Anyways, it helped me to debug and I found that the Gdk crash could be avoided with a simple patch on spice-gtk[8].
[8]: http://cgit.freedesktop.org/spice/spice-gtk/commit/?id=b0703419bf15facc0527a81afbb3b07e67de909b

Yay! Now I have the virt-viewer working, but still no icons (apart from
the ones provided by virt-viewer itself).

For the icons problem, here is the basic solution:
- Build the .msi file using only the needed icons from the system installed adwaita-icon-theme. It works pretty well for virt-viewer, but if any other app tries to take advantage of the gtk3 on Windows, the app *must* have to do the same.

Yay, again! virt-viewer shows all the icons! Let's do some tests ... I've started by clicking in the menu options. The first one: "File -> Screenshot" ... and then crash!
Okay, this is an easy one. Basically I had to include the schemas.compiled[9] and schemas.dtd[10] into our gtk3 .wxi file, They are not being included because these files are not distributed with the .rpm, they are generated during the rpm's installation process.
[9]: https://fedorapeople.org/cgit/fidencio/public_git/msitools.git/commit/?h=wip/gtk3&id=e8990a125537ead4fad5d1adedc028cd72f5c932
[10]: https://fedorapeople.org/cgit/fidencio/public_git/msitools.git/commit/?h=wip/gtk3&id=97eefd9a3279a1766c81e54b0eb0e5660fece737

And now, finally, we are able to have a functional build of virt-viewer for windows using gtk3!

Do you want to try the build?
https://fidencio.fedorapeople.org/virt-viewer-gtk3-x86-2.0.msi
https://fidencio.fedorapeople.org/virt-viewer-gtk3-x64-2.0.msi

Do you want to build it by your self?
Okay, you'll need to:
- mingw-spice-gtk with my patch (build already pushed to f21):
https://fidencio.fedorapeople.org/mingw-spice-gtk/

- virt-viewer with my patches:
https://fedorapeople.org/cgit/fidencio/public_git/virt-viewer.git/log/?h=wip/msi-gtk3

Compile and install msitools from git. Install mingw-spice-gtk and gtk-vnc2 packages. Then, inside the virt-viewer folder, do:
 $ mingw32-configure --with-spice-gtk --with-gtk=3.0
 $ make
 $ make -C data/ msi-gtk3

Next steps:
- generate the gtk2 or gtk3 build according to the configure options.
- add support for foreign menu for Windows.

Saturday, August 2, 2014

and GUADEC is over!

The conference was great, as usual, and quite more organized than I've expected (maybe I got a wrong impression due the issues that happened a few weeks before).
Kudos for Monsieur and Madame Franke for all the time spent on that. Special thanks for all volunteers as well!

I'm really happy that I had the opportunity to meet a few people there, that I've been working with but, till GUADEC, were just an IRC name. :-)

I want to thank Bastien Nocera, Felipe Borges, Rafael Martins, Victor Toso and Yuuma Sato (the dealers of Brazilian food), you guys made a couple really happy! \o/
I also want to thank Nimit for the Taj Mahal gift, man, it's awesome! And Parin/Nimit for testing Eliane's work and finding the (I hope so) last bugs to fix before push it upstream!

Next GUADEC is going to happen in Gothenburg, Sweden, the cradle of the Swedish Conspiracy and it will have at least a bit Carimbó! Maybe we will meet there again! :-)

Friday, July 11, 2014

Evolution-Data-Server: Backend-per-process!

I've been quite busy in the last weeks (months?) working in the latest big change in Evolution Data Server (EDS) and I'm glad to announce that EDS now has support to run each backend on its own process, what means that if one backend crashes, you can still have your whole factory (with another backends) running.
This change is enabled by default since commit f3f1e94f but the user also can have EDS behaving as it was before by simply passing  "--disable-backend-per-process" to the configure.

So, if you're running EDS from git master and have noticed any weird behavior with your application that could be a bug introduced by this task, please, file a bug in our bugzilla and put me cc'ed there. On the other hand, if you feel somehow happy with/thankful for this change, GUADEC is going to happen in 2 weeks, I'll be there and I do drink beer ;-)

A really big thanks to Milan Crha that reviewed the patches and was actively discussing this idea since the beginning of the prototyping part. Also thanks to Matthew Barnes and Tristan Van Berkom for sporadic help in #evolution channel, usually in the hours that only people living in America were awake :-)

Thursday, February 27, 2014

Evolution ideas for GSoC 2014!

I'm happy to announce the Evolution team has a few ideas of projects for this GSoC round!

Complete introspection support for EDS:
This is for evolution-data-server, but only marginally, because the most work might be done in libical, to provide a GObject-based interface for their icalcomponent/icaltimezone/... all structures, basically.
As a starter, the ECalComponent (the wrapper around icalcomponent) can be extended and made introspactable too (it is a GObject descendant already, but some structures are raw structures). The biggest problem is that the ECalComponent can hold only one icalcomponent, not a set of icalcomponents, which is required by ECalClient API, to be able to fetch events with timezones or a recurring event with detached instances. The student may see what is required by the ECalClient API and then propose "the easiest way".

Standalone app for editing server-side Sieve filters:
This doesn't touch evolution's code directly, as it's a prove of concept and a test application to allow editing of Sieve filters directly in evolution. Having it in mind, I'd like to see students with previous Sieve experience and able to discuss the project in #evolution and that end up with a prototype about what will be implemented 'til the end of the applications period.

Notmuch as indexer and search language:
Ideally, a student may create a new CamelIndex descendant, which will talk to Notmuch in the background, and will be usable with CamelFolderSummary (its camel_folder_summary_set_index()). Then the student will touch camel-folder-search.c, because it also uses CamelIndex for body-searches (that's basically the only usage of CamelIndex, for body-searches, but I know the notmuch knows much more).
A similar changes may come into camel-filter-driver.c, together with an addition of "notmuch-code" expression, which will require notmuch for providing output. Then, in evolution, the mail/vfoldertypes.xml,
mail/foltertypes.xml and mail/searchtypes.xml may be extended to also support "notmuch-code" expressions.
As the notmuch project is too much for a SoC period, we would like to have it done only for local Maildir accounts :-)

Implement a simple PKCS#11 module using evolution's addressbook as a backend:
Nowadays we have an address book, and it contains details of X509 certificates for people. But that information is basically in the wrong place. When we come to do S/MIME signing or encryptionm we need the NSS library to be able to find the certificates by the normal lookup process that it uses. In the certificate database(s). So the idea is that the student provides a PKCS#11 module which appears to contain all the keys that are found in the address. When it's asked to search for a certain key, it goes and looks in the addressbook for matching user with an E_CONTACT_X509_CERT field in their addressbook entry and returns that cert, if found.

A nice way to start working on this idea was described on #evolution by David Woodhouse:
<dwmw2> I'd start simple; create a trivial PKCS#11 module with a *hardcoded* cert in it. Just one
<dwmw2> so you can send email to that user and it can find that cert in your module
<dwmw2> that'll get you putting together the basic guts of the PKCS#11 module with its search and get certs functions.
<dwmw2> and wiring it into the right place in Evolution to *use* it
<dwmw2> then after that, we make it a proper addressbook client and make it do the right search in the addressbook for *real* data.


If something is not clear and/or you want to discuss the ideas, please visit the #evolution channel or send us an email through evolution-hackers mailing list (https://mail.gnome.org/mailman/listinfo/evolution-hackers) and we will be glad to help with anything that is necessary.

Have fun!

Wednesday, January 15, 2014

Evolution EWS: TimeZones operations

Long story short:
For those who are using evolution-ews from git master, calendar is  back to the game.

Long story:
With the changes I've made to add support for streaming notifications I've also introduced a big bug.
Calendar was not working anymore for Exchange servers newer than 2010.

Why?
Because newer versions of EWS do handle an event time in a completely different way than older versions and I had to add support to a new operation that was not supported from our side so far.
.
Why? I thought we were already using the proper server version to talk to EWS servers (damned, I would love have it blog posted, unfortunately I don't have).
Hmmm. Yes. Or better, not exactly. When I've made the changes to speak to the server using the proper server version, instead of use the oldest one, I didn't touch in the calendar part, because it would take a not small time to implement this operation and so on. With the streaming notifications code added, I had to do this changes (once it works only for EWS servers 2010_SP1 or newer). And ... Boom! ... I broke the calendar backend.

And now it is working again, right?
Yes, it is! :-)
The code is still not reviewed but can be used/seen from/on this branch.

By the way, tests were written and the calendar backend code was refactored in favor to reuse backend's code in our tests, and it took me considerably more time than adding the new operation itself. :-p

Sunday, January 5, 2014

Google Gym!

During my vacations, I traveled to cities I didn't know, having to use Google Maps and trusting in its integration with public transportation, what is the motivation of this post.
That Google is always looking on our searches and using it to offer us "personalized" advertisements is not something new, but that Google does care about your health care is something , at least, unexpected. If you, reader, do not know me in person, let me tell you, I'm fat. I'm not a bit overweight, that guy that ate a bit more than he should. I'm really fat ;-) And when I'm travelling my internet usage can be summarized in basically 2 things: look for a place to eat and get the directions to go to this place (of course, walking less possible).
But, as I said before. Google does care about my health care. More than I do, apparently. Looking for the "less walking" and "best route" options from one place to another, with a 100% of accuracy, Google provided me the "more walking" route possible. In the first 2, 3 times I need to admit, I was completely pissed off. After that, I started to realized they were testing their new product and I am one the of luckiest guys in the earth to have access to it first: Google Gym!
And what the heck is Google Gym? Simple, based on your searches Google will calculate how many calories you're eating in each meal and based on your pictures Google will decide how many calories you should eat in each meal. Do you eat more than you should? Okay, Google makes you walk for 30 minutes next time you're going to a restaurant! Com'on, it's better than a personal trainer!

Google, please, if I am not in the test group and everything said above is just part of my sick mind, please, consider start to implement it. People would love it! (And, please, remember this blog post and send me a gift :-)). Or, at least, fix the map routes because it's getting worst since last maps update :-p