Howto: Setup Scratchbox environment for Lintrack development

Notes: Follow instructions step by step. Order is important.

Setup fresh sbox sandbox

Notes: These are brief notes. Read Scratchbox docs to get more info about setting it up.

You need these files:

Extract them:

tar xzf <file>

Move extracted files to / directory and run as root:

/scratchbox/sbin/sbox_adduser $USER

Then login:


Create sbox target and select it using sb-menu command.

Make your Scratchbox target look like Lintrack

Notes: We will need basic Lintrack packages inside Scratchbox. For simplicity: ~/lintrack is local Lintrack source directory (source:trunk/) and ~/lintrack-i686 is directory containing downloaded (compiled) Lintrack packages.

Install symlinks:


As normal user install following packages in -big versions using "installpkg" command (ignore "su" warnings).

  • readline
  • ncurses
  • bash

Then use fakeroot to get temporary passwd files etc.:

fakeroot installpkg <sysbase-package-big>
fakeroot installpkg <syslibs-package-big>
fakeroot installpkg <shadow-package-big>

Install su:

installpkg <coreutils-big-package>

From the outside of Scratchbox chown and chmod su binary (note: this assumes your target name is lintrack):

sudo chown root:root /scratchbox/users/$USER/targets/lintrack/bin/su
sudo chmod 4755 /scratchbox/users/$USER/targets/lintrack/bin/su

Check if su inside your target works (default password is 'asn').

Installpkg should now properly use su to get everything chmoded, chowned etc. Reinstall sysbase.

installpkg <sysbase-big-package>
installpkg <shadow-big-package>

You should have now properly installed basic environment. Your next packages to be installed are:

  • sudo
  • sed
  • pcre
  • grep
  • modutils
  • linux
  • kernel-headers

In order to make whoami utility work properly you should add an entry corresponding to your uid into /etc/passwd of the target. It can be easily done from the outside of Scratchbox:

sudo sh -c "grep ^$USER: /etc/passwd >>/scratchbox/users/$USER/targets/lintrack/etc/passwd"
Last modified 14 years ago Last modified on 09/28/07 20:07:40