Projet

Général

Profil

GitPackagingSbuildLVM » Historique » Version 9

Daniel Dehennin, 11/05/2012 09:54
Mise en commun de la gestion des aliases

1 1 Daniel Dehennin
{{include(eole:GitPackagingSbuildCommon)}}
2 2 Daniel Dehennin
3 3 Daniel Dehennin
h3. Avant l’installation du chroot: création d’un volume logique
4 2 Daniel Dehennin
5 2 Daniel Dehennin
Dans le modèle @LVM@ chaque chroot est installé sur un volume logique
6 2 Daniel Dehennin
dédié.
7 2 Daniel Dehennin
8 2 Daniel Dehennin
La taille de ce volume doit pouvoir contenir :
9 2 Daniel Dehennin
10 2 Daniel Dehennin
* Un système minimal ;
11 2 Daniel Dehennin
12 2 Daniel Dehennin
* L’intégralité des dépendances pour la compilation d’un paquet.
13 2 Daniel Dehennin
14 2 Daniel Dehennin
<pre>
15 5 Daniel Dehennin
system@build:~$ sudo lvcreate -L2g -n ${dist}-${arch}-sbuild ${YOUR_VG}
16 5 Daniel Dehennin
system@build:~$ sudo mkfs.ext4 -m0 -L ${dist}-${arch}-sbuild /dev/${YOUR_VG}/${dist}-${arch}-sbuild
17 6 Daniel Dehennin
system@build:~$ sudo mkdir -p /srv/chroot/${dist}-${arch}-sbuild
18 5 Daniel Dehennin
system@build:~$ sudo mount /dev/${YOUR_VG}/${dist}-${arch}-sbuild /srv/chroot/${dist}-${arch}-sbuild
19 2 Daniel Dehennin
</pre>
20 1 Daniel Dehennin
21 3 Daniel Dehennin
h3. Installation du système de base
22 1 Daniel Dehennin
23 3 Daniel Dehennin
{{include(eole:GitPackagingCreateSchroot)}}
24 3 Daniel Dehennin
25 3 Daniel Dehennin
h3. Adaptation post-installation
26 3 Daniel Dehennin
27 2 Daniel Dehennin
Nous devons adapter la configuration de @schroot@ à l’utilisation des
28 2 Daniel Dehennin
snapshot @LVM@ une fois le système installé :
29 2 Daniel Dehennin
30 2 Daniel Dehennin
<pre>
31 5 Daniel Dehennin
system@build:~$ sudo sed -i -e "s,type=directory,type=lvm-snapshot," \
32 2 Daniel Dehennin
    -e "/directory=/d" \
33 2 Daniel Dehennin
    /etc/schroot/chroot.d/$dist-$arch-sbuild*
34 2 Daniel Dehennin
buildd@build:~$ sudo /bin/sh -c "cat >> `expr /etc/schroot/chroot.d/$dist-$arch-sbuild*` <<EOT
35 2 Daniel Dehennin
lvm-snapshot-options=--size 2G
36 2 Daniel Dehennin
mount-options=-o noatime
37 2 Daniel Dehennin
device=/dev/${YOUR_VG}/$dist-$arch-sbuild
38 2 Daniel Dehennin
source-groups=root,sbuild
39 2 Daniel Dehennin
source-root-groups=root,sbuild
40 2 Daniel Dehennin
EOT
41 2 Daniel Dehennin
"
42 2 Daniel Dehennin
</pre>
43 1 Daniel Dehennin
44 9 Daniel Dehennin
h4. Gestion des alias
45 7 Daniel Dehennin
46 9 Daniel Dehennin
{{include(eole:GitPackagingSbuildAliases)}}
47 7 Daniel Dehennin
48 2 Daniel Dehennin
{{include(eole:GitPackagingWebographie)}}