Prerequisites: - Linux system with X GB disk space - cdebootstrap, schroot installed - GPG key for signing packages 1. Setting up the chroot environment for backporting The filesystem where you create the chroot needs to be mounted with exec and dev options, and you have to be root to do this: cdebootstrap -a i386 -f build lenny lenny32 http://debian.tu-bs.de/debian This will create a i386 chroot with essential software for building packages in the newly created directory "lenny32". Of course, if you are backporting for a different release, substitute its name for lenny, also in the following. 2. Configuring your chroot for comfortable use with schroot Put an entry like this into your /etc/schroot/schroot.conf (mine is located on my external drive mounted on /exthd) [lenny32] description=Debian lenny i386 (etch32) location=/exthd/lenny32 personality=linux32 priority=3 users=ranke groups=ranke,root root-groups=root aliases=lenny-ia32 run-setup-scripts=true run-exec-scripts=true You can then login into your chroot (as root) with schroot -c lenny32 install the editor of your choice (after updating the list of available packages e.g. by apt-get update), add security and sid sources to your /etc/apt/sources.list (in order to be able to backport from sid), add a user (e.g. after installing adduser), install and configure console-data for the keymap, install and configure locales, install subversion, devscripts (for editing changelogs with dch, pulls a lot of dependencies unfortunately) and patchutils (for interdiff). In order to build packages as a normal user, use su username to change to the user account you want to use, then svn co http://kriemhild.uft.uni-bremen.de/svn/r-backports which will set up a couple of scripts and directories that I use for backporting. If you want to backport R, you can try apt-get build-dep r-base which would pull in everything you need for building r-base, if all build dependencies could be satisfied. This is unlikely, however, because then we would not have to backport... You also need you gpg key in your build environment. I achieved this by the following bind mount in /etc/fstab /home/ranke/.gnupg /exthd/lenny32/home/ranke/.gnupg noauto bind 0 0 because I don't want my secret key on the USB drive. 3. Backporting R Then go to directory r-base, edit the backporting script and try it with fakeroot sh backport_r-base_lenny.sh You will probably have to install some more build dependencies that have been introduced in newer R versions. 4. Backporting (compiling) recommended packages This is done in the parent directory, using the script backport_recommended.sh. You don't need fakeroot for this, because fakeroot is called in it where needed. You need to install an R backport in order to ensure compatibility and to satisfy build dependencies of recommended packages. You will also need cdbs for building the r-cran-* packages, unixodbc-dev for building r-cran-rodbc, and python-all-dev as well as python-numpy for building python-rpy. 5. Building packages for another architecture with pbuilder I usually do backports for i386 in a permanent chroot. Then, when I build the packages for amd64 using pbuilder, I find missing build dependencies. The scripts I use for this are r-base/build_r-base.sh and build_all_etch.sh. Of course, pbuilder has to be set up before...