Archive for the ‘Software’ Category

Lost: Minimum Requirements Script

Wednesday, July 29th, 2009

A couple years ago, I remember reading about a script that would scan a source tree and tell you the minimum required version of GTK+ based on the symbols used. I can’t find it anymore. Does anyone know what I’m talking about?

I assume it could be rewritten these days using sexy gobject introspection and thus apply to more than just GTK+. But I’d be happy with the older, basic script.

In exchange for clues about the script, here’s a neat bash tip: I discovered that if you put a space before a command you type on the console, it doesn’t show up in the bash history. It’s not in the output of history and doesn’t show up when you scroll up through your commands with the up arrow.

I’m not sure what the non-malicious uses of that trick are, but there you go.

When Is ö Less than o?

Friday, July 17th, 2009

I love the UCA (Unicode Collation Algorithm). It’s all about how to sort words in any given language. Some languages have intriguingly different rules (most of that page is pretty dry, but it does have interesting tidbits like: German dictionaries and German telephone directories have different sort orders).

Déjà Dup News

Monday, June 29th, 2009

It’s been a while since I’ve blogged about Déjà Dup. Actually, looking back in my archives, I haven’t blogged specifically about Déjà Dup since it’s first 1.0 release. As it’s now on it’s tenth feature release, I guess it’s fitting to give some news.

Since 1.0, Déjà Dup has continued to rock. Here are some of the new features:

  • Scheduled backups
  • All sorts of crazy backends, like SSH, FTP, WebDav, or samba(!)
  • Restoring from any given point in time
  • A nautilus extension to restore files with a right click
  • Sexy awesome backup and restore wizards that guide a user through setting up a backup
  • All sorts of usability tweaks, bug fixes, and minor improvements

Anyway, the point is, I have not been idle.

And the project is definitely looking for help. If you can translate or write code, please let me know!

UDS Barcelona Review

Wednesday, June 3rd, 2009

Woo! I’ve been back from Barcelona for a little while now. I think it was the best UDS so far (that I’ve been too, it’s only been my third).

Beforehand, Canonical held an all-employees event called AllHands. There was lots of information sharing about what different parts of the company were doing. It was very informative, and nice to get a chance to meet some of my new teammates in person.

Then UDS itself. Now that I’m on the Foundations team for the next six months, I’ll be working at a slightly lower level than I’m used to. So I attended a lot of sessions that I wouldn’t normally have and just soaked up the cleverness of those around me. I gotta say, most sessions were between two or three very smart people, with lots of others just watching, trying to keep up. At least, for the Foundations sessions which tended to be very technical.

The work that Scott James Remnant is doing to lower boot time is impressive. His goal is 10 seconds to a full desktop. There was a session about ‘what are we going to do about usplash, the boot progress bar program?’ Basically, it’s not very maintainable and has lots of bugs. Scott’s answer was basically ‘Eh, throw it out, we’re going to start X at the same time we would have started usplash; it will just slow us down.’ Love it!

There was also a nice commitment to more heavily move to pulseaudio. Historically, it’s been installed, but not all programs use it, which makes for a frustrating audio experience. So the plan is to convert lots of audio libraries to use a pulseaudio backend by default. Try to convert as many apps we can that way.

I also like the ’100 papercuts’ initiative, which aims to catalog and fix 100 small, aggravating bugs for Karmic. It’s often the little things that annoy you and add up to a bad experience.

The Foundations team signed up for a lot of work, but I still don’t quite know which parts of that I’ll be working on. Should be an interesting cycle!

Translate Your Documentation

Saturday, May 2nd, 2009

As a maintainer, I’ve always been a little sad that my man pages were not translated. Nor where my user help documentation (docbook files). They weren’t translated mainly because:

  • intltool doesn’t support those formats (well, intltool does xml, but not specifically docbook) and
  • the usage is slightly different — help docs need to be generated from po files, but normally those po files are just installed onto the system

Traditionally, projects like GNOME have translators handle docbooks separately from the rest of translations. Partly because of the problems above and partly because docbooks often have images which must be recreated in the correct locale. Gettext just isn’t equipped for that.

But I’m willing to concede the screenshot point. I’m OK with user docs that don’t have screenshots for my simple apps. After all, they’re usually just used to walk through the UI that the user can already see. They don’t generally explain anything.

So, how to integrate documentations to my existing gettext system?

Desired Solution

First, let me briefly review what I want the end product to look like:

  • I don’t want the documentation translations to end up installed on users’ systems in the compiled .mo files. That just wastes lots of space.
  • But I want all the translations to be in the same domain. Multiple domains is a pain for both translators and maintainers. Translators have to go translate two files, not one (I suspect most translators won’t bother-to-translate/notice the other domain), and the domains will have duplicated strings (meaning translators will duplicate work). This means one .pot file and consequently one .po file for each language. This would appear at odds with the previous desire.
  • Man pages and docbook are funky formats. There’s all sorts of syntax that makes breaking the content into logical paragraphs or phrases difficult. I want a tool that can handle that while spitting out gettext files. Intltool’s xml module, for example, doesn’t have enough docbook-specific smarts to make that happen, although it does integrate nicely with gettext.

Enter po4a

There’s a program called po4a that can handle some of the more unusual formats well while consuming po files and generating pot files. It does a really great job, but it has a few shortcomings:

  • it likes to own the .po files
  • it likes to own the .pot file
  • it uses its own list of languages (not po/LINGUAS)

All of those shortcomings will make it hard to have one pot file.

Enter Lots of Makefile Magic

I stole the original bits of Makefile goodness for po4a from dpkg, which used it for its man pages. But I added a bit more to meet my desired goals above.

Basically the sequence is as follows when making a distribution tarball (make dist):

  1. Copy all the .po files from po/ to the help/ directory
  2. Import the contents of po/LINGUAS to po4a’s configuration file in the help directory
  3. Run po4a, generating compiled, translated help documentation from the base versions and the copied po files. This will generate a .pot file.
  4. Filter all the po/*.po files through the standard .pot file, dropping all their help documentation translations. This is so we don’t distribute space-wasting translations that we already ship in the compiled version above.
  5. Merge the generated help .pot file with the standard .pot file in po/ for shipping and distributing to translators.

Ta-da! It’s a bit convoluted, but means that I can have all the benefits of translated help documentation, with none of the disadvantages of multiple .pot files. Of course, I more than doubled my string count, but I assume translators prefer better coverage than not.

The code is mostly in Déjà Dup‘s help/Makefile.am, help/po4a.cfg, and Makefile.am. I encourage you to steal it and use it for your own projects. Too few man pages are translated.

If there are better tools or more elegant methods, I’d love to hear them!

Ubuntu Distribution

Tuesday, April 28th, 2009

When I recently joined the Ubuntu Members team, I was surprised to note the user map:

many flags in North America and Europe, none elsewhere

Seems a bit more concentrated than I expected. I guess the UDS policy of alternating Europe and America locations is more fair than I supposed. (Though in truth, that map suggests it should always be in Europe.)

I know we have rocking LoCo and translation teams pretty much everywhere. As well as developers. Just not many that are both official members and willing to share their latitude and longitude?

Update: So apparently the real map is much more inclusive. The one on the team front page is some optimized subset to make rendering faster. False alarm! Although the algorithm could use tweaking to get a nicer spread.

I’m an Ubuntu Member!

Wednesday, April 15th, 2009

W00t! I survived the council meeting and am now an official Ubuntu Member! A small step on my way to MOTU.

Dogtail and LDTP

Saturday, March 21st, 2009

So I was looking into an automated test framework for Déjà Dup and naturally, I tried the current contenders: Dogtail and LDTP.

I have to say, I liked Dogtail’s Python interface more, but it kept crashing my at-spi daemon, meaning I had to log out and log back in again. That was enough to keep me disinterested.

So I tried LDTP. It was just fine in terms of robustness (modulo a bug with its UTF-8 support). So I’ve been cooking up a kick-ass test suite framework for Déjà Dup.

The one big problem is that GtkAssistant accessibility support seems broken. It just doesn’t expose the widgets correctly. Which means I can’t automate much of Déjà Dup. Does anyone know atk well? Please fix my bug. :)

Déjà Dup in Ubuntu

Thursday, February 19th, 2009

Woohoo! Déjà Dup squeezed into Ubuntu Jaunty 9.04, just before Feature Freeze.

Still not in Debian (or any other distribution that I know of), but it’s a start.

UDS Debriefing

Wednesday, January 7th, 2009

Phew, I meant to write this a million years ago.

I went to UDS Jaunty, got the shirt, came back. It was at the Googleplex, but seemingly the backwater part of it. The food wasn’t amazing, and we weren’t allowed to really wander around. So it was just a bunch of conference rooms. With weird cameras that would move by themselves and that you couldn’t turn off.

And Mountain View, California is no Prague. There wasn’t much nightlife, and you needed a car to get anywhere. So the locale as a whole was disappointing. Next time, let’s do New Orleans!

It was neat to see how forward-thinking most of the sessions were. I felt like it was more about planning for Jaunty+1 than Jaunty. Really long-term views, with an eye towards what first steps can be done by Jaunty.

I attended the Jaunty Backup session. You can even see the videos from the session, although no one was moving the camera around as people spoke, so I’m perpetually off stage right.

The session was inconclusive, and I fear I spent too much of its time talking about Déjà Dup, but I was there to evangalize I guess. I haven’t heard back, and the spec writeup seems like it’s willing to wait until Jaunty+1, as none of the current solutions are ideal.

Which is good. Throwing Déjà Dup together in time to meet Jaunty deadlines would have been tight. But honestly, I think it’s coming along fantastically. The recently released 5.0 is really hot, and could have served as a decent first draft for Jaunty.

Besides the backup session, I did a lot of work in our secret OEM Services room, and attended the odd session. It was fun.