Howto Schroot

Schroot allows users to execute commands or interactive shells in different chroots (see schroot).
More info:
- (in German)

Notice, this tutorial was made in the context of installing "svn2git" with a special version of Git provided by Debian Sid.

Install Software

apt-get -u install schroot debootstrap

Create the destination folder

mkdir -p /srv/chroot/debian-sid-amd64

Install a Debian base system into a subdirectory of another with debootstrap

debootstrap --arch amd64 sid /srv/chroot/debian-sid-amd64

Configure schroot

cd /etc/schroot
mcedit chroot.d/debian-sid-amd64.conf

description=Debian Sid (amd64)
# old versions use "script-config", newer versions use "profile" 
# personalities: linux=amd64, linux32=x64

if you need to have a folder mounted in the schroot, then you can define it in fstab
or create a new profile dedicated for your usage

Enter schroot and install necessary software

schroot -c sid64

Install LOCALE

sudo vi /etc/locale.gen  # add de_CH.UTF-8 en_US.UTF-8
sudo locale-gen

Install packages

aptitude install debian-keyring -y
aptitude install php5 git debian-keyring rubygems1.8
gem install --no-ri --no-rdoc svn2git

Run command

Running a command sudo schroot -c sid64 "whoami"
Notice "schroot" command may have problem if having white space arguments -> solution wrap commands within a script