Running GSR on Familiar Linux 0.8.2

Introduction

Installing GMail SMTP Relay on my iPAQ was a mistake. I incorrectly believed it would act as a local SMTP server and send all its data via a HTTPS connection to Google. Turns out the former is true, but the latter sadly isn't. As I spent a considerable amount of time trying to get this thing to work, I've documented hereunder what needs to be done.

On to business...

The first requirement isn't available in the World feed, so you'll have to download SMTP-Server yourself. Simply copy the required modules to the right place in /usr/lib/perl5. README is your friend. Next, do

ipkg install perl-module-arm-linux-io-socket perl-module-io-socket-inet perl-module-strict \
perl-module-vars perl-module-warnings-register perl-module-warnings perl-module-carp perl-module-exporter \
perl-module-arm-linux-io-handle perl-module-symbol perl-module-selectsaver perl-module-io \
perl-module-arm-linux-xsloader perl-module-socket perl-module-sys-hostname perl-module-arm-linux-errno \
perl-module-io-socket-unix perl-module-arm-linux-config perl-module-sys-hostname perl-module-io-socket-inet \
perl-module-exporter-heavy perl-module-autoloader

I also took a small detour install CPAN. In retrospect, that isn't entirely necessary, but I can't tell which of the following modules might not have been necessary:

ipkg install perl-module-cpan perl-module-cwd perl-module-dirhandle perl-module-extutils-makemaker \
perl-module-file-basename perl-module-file-path perl-module-file-copy perl-module-file-find \
perl-module-filehandle perl-module-text-parsewords perl-module-text-wrap perl-module-file-spec \
perl-module-extutils-mm perl-module-extutils-liblist perl-module-file-spec-unix perl-module-extutils-liblist-kid \
perl-module-extutils-mm-unix perl-module-extutils-mm-any perl-module-extutils-my perl-module-arm-linux-io-file \
perl-module-arm-linux-io-handle perl-module-arm-linux-io-seekable perl-module-fcntl perl-module-arm-linux-safe \
perl-module-opcode perl-module-subs perl-module-re perl-module-text-tabs perl-module-arm-linux-lib \
perl-module-overload perl-module-cpan-firsttime perl-module-term-readline

At this point, you need to get ready to compile some modules on your own, because that whole CPAN module will make you very angry. Trust me.

First, prepare your iPAQ for native development. Next, replace the busybox gzip with the real one (rm /bin/gzip && ipkg install gzip).

Just so you keep the hang of it, install some more modules.

ipkg install perl-module-extutils-manifest perl-module-carp-heavy perl-module-scalar-util \
perl-module-test perl-module-digest-md5 perl-module-digest-base perl-module-data-dumper

You'll also need the Perl development files. Install them with a simple ipkg install perl-dev_5.8.4-r2_arm.ipk.

You are now ready to install some crypto on your machine. OK, you actually already did that with the MD5 module above, but you probably didn't notice that.

ipkg install openssl

Get the OpenSSL development files too. By now you know what to do with such a file. Actually, someone that didn't know that at the top of this document, in all likelihood stopped reading quite some time ago.

We now need to compile and install IO::Socket::SSL. To do that we need, guess what, some more modules...

ipkg install perl-module-extutils-command perl-module-file-compare perl-module-file-glob \
perl-module-extutils-install perl-module-extutils-packlist perl-module-autosplit perl-module-file-spec-functions \
perl-module-extutils-command-mm perl-module-pod-man perl-module-pod-parselink perl-module-pod-parser \
perl-module-pod-inputobjects perl-module-getopt-long perl-module-constant

Another requirement we have to deal with first is Net::SSLeay. In order to compile that one, we need even more Perl modules. I know, it seems hardly possible to have even more modules, but I guess that's the beauty of modular systems...

ipkg install perl-module-extutils-mkbootstrap perl-module-dynaloader perl-module-mime-base64

You'll also need to get Digest::HMAC yourself, as it's not in the feed. Untar it and move the 3 files we need to the right position: cp lib/Digest/HMAC* /usr/lib/perl5/5.8.4/Digest/

By now you should be ready to compile IO::Socket::SSL, so go ahead with that.

Download and compile TermReadKey. Also download and compile Proc::Daemon. Now install just a few more modules, and you're ready to roll!!!

ipkg install perl-module-test-harness perl-module-test-harness-straps perl-module-test-harness-assert \
perl-module-test-harness-iterator perl-module-benchmark perl-module-sys-syslog perl-module-arm-linux-io-select

About compiling Perl modules on Familiar 0.8.2

You will soon find out who the maintainer of Perl in this distribution is, as he seems to have made a minor mistake somewhere, which results in all your self-compiled modules being installed in /home/koen/OE/build/tmp/familiar/work/arm-linux/perl-5.8.4-r2/image/usr/. That is only a minor inconvenience though; simply move them to the corresponding location in /usr/lib/perl5/ and you are good to go.

Acknowledgments

A special thanks to the people that keep releasing all these goodies, especially the Familiar and the OpenEmbedded folks!!!