Tuesday, October 7, 2008

Maemo Scratchbox Hell

That was SO much harder than yesterday. So, maybe it wasn't the same problem.

When trying to install the maemo-sdk-runtime in the ARMEL target of my scratchbox, I kept getting this HUGE error that started
[sbox-DIABLO_ARMEL: ~] > fakeroot apt-get install maemo-sdk-runtime
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
maemo-sdk-runtime
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
27 not fully installed or removed.
Need to get 0B/1890B of archives.
After unpacking 32.8kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
maemo-sdk-runtime
Install these packages without verification [y/N]? y
/scratchbox/tools/bin/sh: line 1: /usr/sbin/dpkg-preconfigure: No such file or directory
Selecting previously deselected package maemo-sdk-runtime.
(Reading database ... 16920 files and directories currently installed.)
Unpacking maemo-sdk-runtime (from .../maemo-sdk-runtime_1.0_all.deb) ...
Setting up gconf2 (2.16.0-1osso14) ...
/scratchbox/tools/bin/chown: `messagebus:messagebus': invalid user
dpkg: error processing gconf2 (--configure):
subprocess post-installation script returned error exit status 1

and ended
E: Sub-process /scratchbox/devkits/debian-etch/bin/dpkg returned an error code (1)



I'll now list ALL the things that it took to get this working...

Let us start with /etc/sysctl.conf
add the lines
vm.mmap_min_addr = 4096
net.ipv4.ip_local_port_range = 1024 65535
vm.vdso_enabled = 0

to this file. I recommend doing a search for each of those setting before you add the new lines. If you have the settings in there, comment them out, and then put the changed setting directly underneath with a comment about WHY you are doing this. (That's to save you heartache later if it breaks something else.)

Next, I ran apt-get install -f in both my normal shell and in the scratchbox. I used apt-get autoremove to get rid of some no-longer-needed packages in my regular shell.

Gnuton reported several problems and fixes and although I didn't have his 'messagebus:messagebus': invalid user problem I still did
cd /var/cache/apt/archives
fakeroot dpkg -i *dbus*

in the scratchbox, just in case.

Finally, I followed his advice and did
cp /usr/sbin/dpkg-preconfigure /scratchbox/users/lisha/targets/DIABLO_ARMEL/usr/sbin

and finally the &$%#! fakeroot apt-get install maemo-sdk-runtime worked.

No comments: