Michal Čihař - Blog Archives for Coding

Using PGP subkeys for signing

For quite some time, I wanted to use subkeys for signing at some places where I do not want to have my certification key stored, however I trust this location enough to have signing key available. I knew it should be possible with subkeys, however I never found time to look at it.

First I needed to add new subkey which will be used for signing:

gpg --edit-key 42B7511D
> addkey

Now choose 4 (RSA for signing) and wait until new key is created.

The only remaining step is to transfer subkeys to the other location:

gpg --export-secret-subkeys 42B7511D > /tmp/key-sub.gpg
scp /tmp/key-sub.gpg other.place:

Import them there and deleting any unwanted (eg. encryption) subkeys:

gpg --import key-sub.gpg
gpg --edit 42B7511D
> key 1
> delkey

And it's done ... much easier than I expected :-).

Documentation translation

Some weeks ago, I've started to change documentation structure of Gammu to move from separate documents here and there into one comprehensive documentation which would cover it all. As a tool to do this I've chosen Sphinx, simply because I felt most convenient with the format and outputs it provides.

So far the SMSD documentation has been converted from various places and formats, but it also opened up a question - how to deal with translations? So far we used po4a to translate man pages, however using it for generated man pages is slightly complicated (there are some macros which po4a does not understand and it seems to break encoding on the way).

Translating whole new documentation is something what is unlikely to be finished, especially considering fact, that the only real existing translation so far is Czech which was done by me.

For now I decided to keep old translated man pages and postpone the decision, but considering current situation, I will most likely just drop the translations for man pages unless I find some good solution how to translate Sphinx documents (po4a should be able to do that, but it will probably need some tuning).

Piwik not logging action URLs

For some time (probably since upgrade to 1.0) it looks like my Piwik installation did not log URLs and page titles from visitors. Simply all URLs and page titles logged were blank.

While I still postponed the investigation of this, I was pretty sure it must be some configuration issue and not a bug, so I felt reluctant to report this.

Today I finally found time and copied upstream global.ini.php to my installation and it seems to do the trick. I should better care of upgrading next time :-).

PS: Any volunteer for packaging piwik for Debian?

German-Czech dictionary for StarDict

As there was started project for German-Czech dictionary, I've quickly added it to my conversion scripts and these dictionaries are now available in StarDict format as well.

Don't expect much right now, the project has just started and contains only few words :-).

PS: Authors are aware of dicts.info and other free dictionaries and want to cooperate somehow.

Arrows navigation for Lazygal

One of things I missed for quite a long time in Lazygal compared to lot of other galleries is navigation using keys in between the images. Well, it should be easy to implement, shouldn't it?

A little bit of googling and reading jQuery documentation and the code is here :-).

It seems to work fine in browsers which I use, you can try it yourself.

Learning graphviz

While working on new Gammu documentation I came to need to include some graphs showing some workflows. Looking into Sphinx documentation (which is used for the documentation for Gammu), I've discovered nice integration with graphviz.

Fortunately it was pretty easy to learn the basics, though I've never used it before and here it comes - message processing workflows for SMSD.

Fun with processing patches from users

Once you release something what gets at least a little bit popular, you can expect to receive fixes in various strange forms. Since I started to use Git for Gammu development merging all these crazy things is much more easier.

The problem with these changes in past was that they are generally based on some random old versions (for example random daily snapshot). Now I just find the right place in history where to start (ChangeLog usually gives good hint where to search in the history), create branch and start to apply changes I received.

I worst case (like it happened today) the "changes" is whole tarball with different changes made to different files. Fortunately I recently found great git add -i, which allows me to pick whatever changes I want from the patch. When all this is done, all I need is to merge changes back to master and Git is usually clever enough to handle it.

PS: And yes, I'd really love if people would be able to send me series of patches, but it does not seem to happen in near future.

Photo uploader 0.8

It took some time since last Photo uploader release, but it's not dead an now comes new release. It mostly just fixes imageshack interaction and moves development to Git on Gitorious.

News in this release:

  • Fixed grabbing URL from imageshack.
  • Fixed defaults to not open browser.
  • Default to imageshack.us service.

Midterm evaluation for GSoC

So now it comes. Students are supposed to show what they managed to do so far and we should evaluate their projects and recommend Google (not) to send first part of money to them.

As far as I can see, most projects are quite in a good shape, even though we were afraid a bit about the progress several weeks ago.

However not all my students are active. One OpenSUSE project (Synchronization with Mobile Devices by Peter Somlo) did not actually start because student found time to look at it this week. A bit different case is Alexander Rutkowski with Tracking mechanism for phpMyAdmin, because he completely failed to reply to any of my mails.

I hope other students will complete their projects successfully and phpMyAdmin will greatly benefit from their work in future.