Projet

Général

Profil

GitPackaging » Historique » Version 7

Daniel Dehennin, 11/01/2012 10:12
Ajout d’un lien vers le guide de packaging python d’ubuntu

1 6 Daniel Dehennin
{{toc}}
2 6 Daniel Dehennin
3 1 Daniel Dehennin
h1. Gestion des paquets EOLE
4 1 Daniel Dehennin
5 2 Daniel Dehennin
h2. Environnement de compilation personel
6 1 Daniel Dehennin
7 2 Daniel Dehennin
Il existe plusieurs outils afin de mettre en place des environnements de compilation personels.
8 2 Daniel Dehennin
9 2 Daniel Dehennin
L’outil utilisé dans le projet "Debian":http://www.debian.org se nomme "sbuild":http://wiki.debian.org/sbuild.
10 2 Daniel Dehennin
11 2 Daniel Dehennin
Ce système peut se reposer sur un système de snapshot : on installe un système de base, propre, et la compilation se fait dans un snapshot temporarire de ce système.
12 2 Daniel Dehennin
13 2 Daniel Dehennin
Cela permet de lancer des compilations en parallèles au besoin.
14 2 Daniel Dehennin
15 2 Daniel Dehennin
Deux méthodes sont utilisables pour la mise en place des snapshots :
16 2 Daniel Dehennin
17 1 Daniel Dehennin
* [[eole:GitPackagingSbuildLVM|avec LVM]]
18 1 Daniel Dehennin
* [[eole:GitPackagingSbuildBtrfs|avec le système de fichier btrfs]]
19 2 Daniel Dehennin
20 2 Daniel Dehennin
21 2 Daniel Dehennin
Lorsque les schroots sont en place et sbuild configuré, la compilation d’un paquet peut se dérouler comme suit :
22 2 Daniel Dehennin
23 2 Daniel Dehennin
<pre>
24 2 Daniel Dehennin
buildd@build:~$ sudo apt-get install git-core git-buildpackage fakeroot build-essential debhelper cdbs
25 2 Daniel Dehennin
buildd@build:~$ git clone http://dev-eole.ac-dijon.fr/git/eole-debsums
26 2 Daniel Dehennin
buildd@build:~$ cd eole-debsums
27 2 Daniel Dehennin
buildd@build:~$ git checkout -b dist/ubuntu/lucid/build origin/dist/ubuntu/lucid/master
28 2 Daniel Dehennin
buildd@build:~$ git buildpackage --git-builder="sbuild -A -d eole2.3-dev" --git-cleaner=/bin/true
29 2 Daniel Dehennin
</pre>
30 3 Daniel Dehennin
31 3 Daniel Dehennin
h2. TODO Proposition de workflow
32 3 Daniel Dehennin
33 4 Daniel Dehennin
h3. Partie développeur
34 4 Daniel Dehennin
35 4 Daniel Dehennin
# Création d’un tag signé contenant un nouveau numéro de version
36 4 Daniel Dehennin
# Envoi du tag sur le dépôt central dev-eole
37 4 Daniel Dehennin
38 4 Daniel Dehennin
h3. Partie serveur
39 4 Daniel Dehennin
40 3 Daniel Dehennin
# Vérification de la signature: si nok => suppression du tag + report + quit
41 3 Daniel Dehennin
# Checkout du tag == récup de la conf gbp.conf
42 3 Daniel Dehennin
# Switch sur la branche de build
43 3 Daniel Dehennin
# Merge du tag dans la branche de build
44 5 Daniel Dehennin
# Mise à jour de @debian/changelog@ :
45 5 Daniel Dehennin
  <pre>git-dch -a -R/-S debian/</pre>
46 5 Daniel Dehennin
# Ajout de @debian/changelog@ à l’index pour le prochain commit :
47 5 Daniel Dehennin
  <pre>git add debian/changelog</pre>
48 5 Daniel Dehennin
# Commit en utilisant le numéro de version du nouveau paquet :
49 5 Daniel Dehennin
  <pre>git commit -m "Nouveau paquet debian version: $(dpkg-parsechangelog | awk '/^Version/ {print $2}')"</pre>
50 5 Daniel Dehennin
# Construction du paquet en utilisant l’environnement de build correspondant à la distribution du paquet :
51 5 Daniel Dehennin
  <pre>git buildpackage \
52 5 Daniel Dehennin
  --git-builder="sbuild -A -d $(dpkg-parsechangelog | awk '/^Distribution/ {print $2}')" \
53 5 Daniel Dehennin
  --git-cleaner=/bin/true</pre>
54 3 Daniel Dehennin
# Si build OK => git buildpackage --git-tag-only + git push
55 7 Daniel Dehennin
56 7 Daniel Dehennin
h2. Webographie
57 7 Daniel Dehennin
58 7 Daniel Dehennin
* "PackagingGuide/Python":https://wiki.ubuntu.com/PackagingGuide/Python