1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
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 etch etch32 http://debian.tu-bs.de/debian
This will create a i386 chroot with essential software for building packages in
the newly created directory "etch32". Of course, if you are backporting for a
different release, substitute its name for etch, 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)
[etch32]
description=Debian etch i386 (etch32)
location=/exthd/etch32
personality=linux32
priority=3
users=ranke
groups=ranke,root
root-groups=root
aliases=etch-ia32
run-setup-scripts=true
run-exec-scripts=true
You can then login into your chroot (as root) with
schroot -c etch32
install the editor of your choice, add security and sid sources to your
/etc/apt/sources.list (in order to be able to backport from sid), add a user,
install and configure console-data for the keymap, install and configure
locales, install subversion, devscripts (for editing changelogs with dch)
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... Last time I just put in an etch source entry
in my sources.list, and grabbed the build deps from there as a start.
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/etch32/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.sh
You will 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, which sometimes include other recommended packages
that you will need to have installed from another source.
|