GitPackagingSbuildLVM » Historique » Version 8
Daniel Dehennin, 11/05/2012 09:50
Ne lister que la commande d’ajout des alias
| 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 | 4 | Daniel Dehennin | -e "/type=/ialiases=eole-2.3,eole-2.3-dev,eole-2.3-proposed,eole-2.3-security" \ |
| 34 | 2 | Daniel Dehennin | /etc/schroot/chroot.d/$dist-$arch-sbuild* |
| 35 | 2 | Daniel Dehennin | buildd@build:~$ sudo /bin/sh -c "cat >> `expr /etc/schroot/chroot.d/$dist-$arch-sbuild*` <<EOT |
| 36 | 2 | Daniel Dehennin | lvm-snapshot-options=--size 2G |
| 37 | 2 | Daniel Dehennin | mount-options=-o noatime |
| 38 | 2 | Daniel Dehennin | device=/dev/${YOUR_VG}/$dist-$arch-sbuild |
| 39 | 2 | Daniel Dehennin | source-groups=root,sbuild |
| 40 | 2 | Daniel Dehennin | source-root-groups=root,sbuild |
| 41 | 2 | Daniel Dehennin | EOT |
| 42 | 2 | Daniel Dehennin | " |
| 43 | 2 | Daniel Dehennin | </pre> |
| 44 | 2 | Daniel Dehennin | |
| 45 | 7 | Daniel Dehennin | Les alias ci-dessus font que l’appel à @sbuild -d eole-2.3-dev@ utilisera l’architecture @AMD64@ par défaut. |
| 46 | 7 | Daniel Dehennin | |
| 47 | 7 | Daniel Dehennin | La création d’un schroot @i386@ devrait ajouter des alias contenant l’architecture afin de ne pas entrer en conflit : |
| 48 | 7 | Daniel Dehennin | <pre> |
| 49 | 8 | Daniel Dehennin | system@build:~$ sudo sed -i \ |
| 50 | 7 | Daniel Dehennin | -e "/type=/ialiases=eole-2.3-i386,eole-2.3-dev-i386,eole-2.3-proposed-i386,eole-2.3-security-i386" \ |
| 51 | 7 | Daniel Dehennin | /etc/schroot/chroot.d/$dist-$arch-sbuild* |
| 52 | 7 | Daniel Dehennin | </pre> |
| 53 | 7 | Daniel Dehennin | |
| 54 | 7 | Daniel Dehennin | Ainsi, la commande @sbuild -d eole-2.3-dev --arch=i386@ utilisera le schroot @i386@ et non le @AMD64@. |
| 55 | 7 | Daniel Dehennin | |
| 56 | 2 | Daniel Dehennin | {{include(eole:GitPackagingWebographie)}} |