Archive for August, 2009

Backup adventures

Saturday, August 22nd, 2009

Following a tip from a fellow blogger, I tried customizing the backup config in Maemo, with mixed results: on one hand I am extremely pleased that the system is smart enough to realize that you probably wish to restore one of the backups you have and prompts you to reinstall all those apps that you had after reflashing, on the other hand I am a bit puzzled that not all files have been properly saved and restored.

More specifically, this is supposed to backup all of /etc/openvpn:

<backup-configuration>
 <locations>
   <location type="dir" category="settings">/etc/openvpn</location>
 </locations>
</backup-configuration>

instead of leaving out the key file, forcing me to regenerate it. No, the file was not even saved while the following files were saved but not restored:

/etc/osso-backup/my-custom-backup.conf
/etc/hostname, hosts
/etc/systemui/systemui.xml

Something fishy is going on… will investigate.

EDIT: backup is missing those files which are not readable by user.

OpenVPN 2.1+ on Maemo Diablo

Sunday, August 16th, 2009

I wanted to try out the new “subnet” topology in recent versions of OpenVPN, but this required that all clients be running a version that supported such option: unfortunately, on Maemo “Diablo” the available version was v2.0.9-4etch1maemo1… close, but no cigar.

Easiest way besides having someone else do it for you is to download both the older Maemo version and the current Debian one and manually compare the patches, a long and tiresome proposition. Fortunately, there is a tool called the Debian Patch Splitter which can split your typical jumbo-sized Debian patch into more manageable chunks. Using it, I was able to determine that the changes required to “maemify” the package are rather small: openvpn-debian2maemo.diff.gz is just a couple of screenfuls and applies to the Debian-patched source directory.

As you can see in my patch, I removed the dependencies on the two blacklist packages (they’re quite big for the NIT) and changed a few minor options in the debian/rules file. Also, I edited /etc/default/openvpn to inhibit autostarting (password-protected keys and booting do not mix well), added a backup configuration entry and an adapted version of the resolvconf script.

Did I mention that the newer OpenVPN that we have just built here requires a more recent libssl than the one shipped with Diablo? Ouch. Luckily, the version in Maemo “Fremantle” works fine, after rebuilding from the sources.

Happy hacking.

EDIT: removed broken patch link.