Build native Arm packages from NetBSD pkgsrc on a Raspberry Pi
NetBSD 6 on Raspberry Pi
I used the installation image rpi_inst.img from http://nyftp.netbsd.org/pub/NetBSD-daily/HEAD/201405231330Z/evbarm/binary/gzimg/ to install NetBSD 6 on a Raspberry Pi. See my NetBSD on a Raspberry Pi page.
Build native Arm packages
I was not at all disappointed by the build time of screen
The boxes we used a decade or two or so ago to run our systems on didn't perform that much better then a Raspberry Pi and in those days we did compile our stuff on it without complaining.
Back then I used to run Slackware on a Pentium90 with 32 Mb RAM and compiled kernels and applications on it.
So it seems a nice experiment to skip the cross compile thing and do some native building on the Raspberry Pi itself.
In order to get things running, we have to do a little preparation.
Use a NFS mount for pkgsrc
NetBSD runs on a SD memory card. This is flash memory that will ware down with each write-cycle. Building packages is a very write-intensive process, so the building can better be done on a hard disk. To do so, I did a NFS-mount to my local SAN (an Atom mini ITX motherboard running Debian).
I created a directory /usr/pkgsrc and mounted a directory on the SAN over NFS to it. I downloaded the current pkgsrc.tar.gz file into this directory and untarred it.
This results in /usr/pkgsrc/pgksrc containing the pkgsrc tree.
Build and install packages
cd /usr/pkgsrc/pkgsrc/misc/screen/ make package make install
After this the famous and unmissable GNU screen runs happily on the Raspberry Pi.
The freshly build packages can be found in packages subdirectory in the pkgsrc directory.
Although the Raspberry Pi only has 512 MB of RAM memory and not a very fast processor, I was not at all disappointed by the build time of screen.
Also, the swap partion was still untouched. Impressive little box, that Raspberry Pi :)
These are desperate times that call for desperate measures
These are desperate times that call for desperate measures. Due to secret services compromising all kind of hard- and software and building as much backdoors as possible, you never know who is eaves dropping on what. If there is a backdoor in your router, and even if you trust the governments secret services, how do you know that the bad guys don't use it?
Normal communication over the internet is not safe anymore and encrypting your messages should be the norm, not the exception. When it comes to encryption. no commercial solution can be trusted. OpenPGP or GPG has been proven to withstand the most.
When it comes to instant messaging, Jabber is the most safe option. Jabber provides means to encrypt every message. This means you can chat safely with your buddies, even if you are using Facebook chat.
For more information, see the Encrypted instant messaging with Jabber and GnuPG page.
For this reason I wanted to install mcabber on my Raspberry Pi. Unfortunately, mcabber is not in the pkgin repository, so we will have to compile it through the pkgsrc build system.
Starting with the default NetBSD 6.1 install on the Raspberry Pi I first had to upgrade Perl5. Go to the lang/perl5 direcory in pkgsrc and give the update command:
This will keep the Rapsberry Pi bussy for a few hours.
It helps to first look at the dependencies and try to install those through pkgin. Everything you can install through pre-compiled packages saves you time.
After this, go to the chat/mcabber directory and build and install the package.
make package install
This will compile and build the packages including all dependencies and tries to install the lot. You can go to bed now and come back the next day, because the compilation time is a bit on the long side :)
My NetBSD Raspberry Pi is now running mcabber inside of screen.
It took some configuration of gpg-agent, but now I can chat secured by GPG with my buddies.