EoleDebianVersioning24 » Historique » Version 4
Daniel Dehennin, 25/07/2012 14:59
Retravaillage de la page
1 | 1 | Daniel Dehennin | h1. Numérotation pour EOLE 2.4 |
---|---|---|---|
2 | 1 | Daniel Dehennin | |
3 | 1 | Daniel Dehennin | h2. Introduction |
4 | 1 | Daniel Dehennin | |
5 | 1 | Daniel Dehennin | La mise en place du nouveau système de build permet de choisir la façon dont les paquets sont numérotés. |
6 | 1 | Daniel Dehennin | |
7 | 4 | Daniel Dehennin | h2. Numérotation indépendante des paquets |
8 | 4 | Daniel Dehennin | |
9 | 4 | Daniel Dehennin | La branche @master@ contenant le code d’une application externe sera taguée avec le numéro de version de l’application. |
10 | 4 | Daniel Dehennin | |
11 | 4 | Daniel Dehennin | Par exemple, pour project:tiramisu version @0.1@: |
12 | 4 | Daniel Dehennin | |
13 | 4 | Daniel Dehennin | <pre> |
14 | 4 | Daniel Dehennin | # First upstream |
15 | 4 | Daniel Dehennin | user:~/src/eole/tiramisu (master)$ git tag -s -m "First development release" release/0.1 |
16 | 4 | Daniel Dehennin | user:~/src/eole/tiramisu (master)$ git push origin release/0.1 |
17 | 4 | Daniel Dehennin | |
18 | 4 | Daniel Dehennin | # First Package |
19 | 4 | Daniel Dehennin | user:~/src/eole/tiramisu (master)$ git checkout -b dist/ubuntu/precise/master |
20 | 4 | Daniel Dehennin | user:~/src/eole/tiramisu (dist/ubuntu/precise/master)$ <ADD PACKAGING UNDER debian/> |
21 | 4 | Daniel Dehennin | user:~/src/eole/tiramisu (dist/ubuntu/precise/master)$ git commit -m "Fist package" |
22 | 4 | Daniel Dehennin | |
23 | 4 | Daniel Dehennin | # New upstream |
24 | 4 | Daniel Dehennin | user:~/src/eole/tiramisu (dist/ubuntu/precise/master)$ git checkout master |
25 | 4 | Daniel Dehennin | user:~/src/eole/tiramisu (master)$ $EDITOR <some file> |
26 | 4 | Daniel Dehennin | user:~/src/eole/tiramisu (master)$ git add <some file> |
27 | 4 | Daniel Dehennin | user:~/src/eole/tiramisu (master)$ git commit -m "Update some file" |
28 | 4 | Daniel Dehennin | user:~/src/eole/tiramisu (master)$ git tag -s -m "New development version" release/0.2 |
29 | 4 | Daniel Dehennin | user:~/src/eole/tiramisu (master)$ git push origin release/0.2 |
30 | 4 | Daniel Dehennin | |
31 | 4 | Daniel Dehennin | # New package |
32 | 4 | Daniel Dehennin | user:~/src/eole/tiramisu (master)$ git checkout -b dist/ubuntu/precise/master |
33 | 4 | Daniel Dehennin | user:~/src/eole/tiramisu (dist/ubuntu/precise/master)$ git merge -m "New upstream release" release/0.2 |
34 | 4 | Daniel Dehennin | </pre> |
35 | 4 | Daniel Dehennin | |
36 | 4 | Daniel Dehennin | Cela produira des paquets numérotés: |
37 | 4 | Daniel Dehennin | |
38 | 4 | Daniel Dehennin | * @0.1-1@: premier paquet de la première version |
39 | 4 | Daniel Dehennin | * @0.1-2@: second paquet de la première version qui ne corrige que du packaging ou intègre des patches pour @upstream@ dans @debian/patches/@ |
40 | 4 | Daniel Dehennin | * @0.2-1@: premier paquet de la seconde version |
41 | 4 | Daniel Dehennin | * @0.2-2@: second paquet de la seconde version qui ne corrige que du packaging ou intègre des patches pour @upstream@ dans @debian/patches/@ |
42 | 4 | Daniel Dehennin | |
43 | 2 | Daniel Dehennin | h2. Numérotation par version de distribution EOLE |
44 | 1 | Daniel Dehennin | |
45 | 4 | Daniel Dehennin | Les paquets sont numérotés en fonction de la distribution EOLE, par exemple, pour EOLE 2.4 : @2.4-<version>@ |
46 | 2 | Daniel Dehennin | |
47 | 1 | Daniel Dehennin | <pre> |
48 | 2 | Daniel Dehennin | user:~/src/project (master)~$ git describe --abbrev=0 --match=release/* |
49 | 2 | Daniel Dehennin | release/2.4 |
50 | 2 | Daniel Dehennin | # La branche 2.4 passe en mode support afin de commencer la 2.5 |
51 | 1 | Daniel Dehennin | user:~/src/project (master)~$ git branch 2.4 master |
52 | 2 | Daniel Dehennin | |
53 | 2 | Daniel Dehennin | # On commence la version 2.5, cela nécessite au minimum un commit qui n’est pas sur la branche 2.4 |
54 | 2 | Daniel Dehennin | user:~/src/project (master)~$ <UN NOUVEAU COMMIT SUR MASTER> |
55 | 2 | Daniel Dehennin | user:~/src/project (master)~$ git tag -s -m "Naissance de EOLE 2.5" release/2.5 |
56 | 2 | Daniel Dehennin | |
57 | 2 | Daniel Dehennin | # On vérifie |
58 | 1 | Daniel Dehennin | user:~/src/project (master)~$ git describe --abbrev=0 --match=release/* |
59 | 1 | Daniel Dehennin | release/2.5 |
60 | 1 | Daniel Dehennin | user:~/src/project (master)~$ git checkout 2.4 |
61 | 1 | Daniel Dehennin | user:~/src/project (2.4)~$ git describe --abbrev=0 --match=release/* |
62 | 1 | Daniel Dehennin | release/2.4 |
63 | 1 | Daniel Dehennin | </pre> |
64 | 2 | Daniel Dehennin | |
65 | 4 | Daniel Dehennin | Cette numérotation est celle utilisé pour la version 2.3 (qui était imposé à tous les paquets) : |
66 | 4 | Daniel Dehennin | * On ne versionne pas la branche master, sauf une fois lors de la mise en place d’une nouvelle distribution ; |
67 | 4 | Daniel Dehennin | * Les paquets Debian doivent être au format *@3.0 (natif)@* ; |
68 | 4 | Daniel Dehennin | * Lorsque deux distributions sont maintenues en parallèle, on n’utilise que du cherry-picking entre les branches : l’utilisation de la commande @merge@, dans le mauvais sens, apporterait un nouveau tag et donc une nouvelle numérotation : |
69 | 1 | Daniel Dehennin | <pre> |
70 | 1 | Daniel Dehennin | user:~/src/project (master)~$ git describe --abbrev=0 --match=release/* |
71 | 2 | Daniel Dehennin | release/2.4 |
72 | 1 | Daniel Dehennin | user:~/src/project (master)~$ git branch 2.4 master |
73 | 4 | Daniel Dehennin | user:~/src/project (master)~$ <UN NOUVEAU COMMIT SUR MASTER> |
74 | 1 | Daniel Dehennin | user:~/src/project (master)~$ git tag -s -m "Naissance de EOLE 2.5" release/2.5 |
75 | 1 | Daniel Dehennin | user:~/src/project (master)~$ git describe --abbrev=0 --match=release/* |
76 | 1 | Daniel Dehennin | release/2.5 |
77 | 1 | Daniel Dehennin | user:~/src/project (master)~$ git checkout 2.4 |
78 | 1 | Daniel Dehennin | user:~/src/project (2.4)~$ git describe --abbrev=0 --match=release/* |
79 | 1 | Daniel Dehennin | release/2.4 |
80 | 1 | Daniel Dehennin | user:~/src/project (2.4)~$ git merge master |
81 | 1 | Daniel Dehennin | user:~/src/project (2.4)~$ git describe --abbrev=0 --match=release/* |
82 | 2 | Daniel Dehennin | release/2.5 |
83 | 2 | Daniel Dehennin | </pre> |
84 | 2 | Daniel Dehennin | |
85 | 2 | Daniel Dehennin | Cette méthode de numérotation pourrait permettre de numéroter les paquets en fonction des "release redmine":http://dev-eole.ac-dijon.fr/projects/modules-eole/roadmap, il suffirait de créer un nouveau tag sur la branche master avec la version EOLE: |
86 | 2 | Daniel Dehennin | |
87 | 2 | Daniel Dehennin | <pre> |
88 | 2 | Daniel Dehennin | user:~/src/project (master)~$ git describe --abbrev=0 --match=release/* |
89 | 2 | Daniel Dehennin | release/2.5 |
90 | 3 | Daniel Dehennin | |
91 | 3 | Daniel Dehennin | # On commence une nouvelle RC |
92 | 1 | Daniel Dehennin | user:~/src/project (master)~$ git checkout -b rc/2.5.1 |
93 | 3 | Daniel Dehennin | |
94 | 3 | Daniel Dehennin | # On corrige tous les bugs |
95 | 3 | Daniel Dehennin | user:~/src/project (rc/2.5.1)~$ $EDITOR source_file |
96 | 3 | Daniel Dehennin | user:~/src/project (rc/2.5.1)~$ git add source_file |
97 | 3 | Daniel Dehennin | user:~/src/project (rc/2.5.1)~$ git commit |
98 | 3 | Daniel Dehennin | [...] |
99 | 1 | Daniel Dehennin | |
100 | 1 | Daniel Dehennin | # On tag la nouvelle version |
101 | 1 | Daniel Dehennin | user:~/src/project (rc/2.5.1)~$ git tag -s -m "Naissance de EOLE 2.5.1" release/2.5.1 |
102 | 1 | Daniel Dehennin | |
103 | 1 | Daniel Dehennin | # On intègre à la branche master |
104 | 1 | Daniel Dehennin | user:~/src/project (rc/2.5.1)~$ git checkout master |
105 | 1 | Daniel Dehennin | user:~/src/project (master)~$ git merge release/2.5.1 |
106 | 1 | Daniel Dehennin | </pre> |
107 | 1 | Daniel Dehennin | |
108 | 4 | Daniel Dehennin | Cela est configurable par [[EoleDebianPackaging24#Il-est-possible-de-modifier-les-sources-dans-le-packaging-ou-il-n’y-a-pas-de-sources-upstream|branche de packaging]]. |
109 | 1 | Daniel Dehennin | |
110 | 4 | Daniel Dehennin | h2. Extraction des versions depuis les tags. |
111 | 1 | Daniel Dehennin | |
112 | 4 | Daniel Dehennin | Il est possible de configurer le format des tags upstream afin d’en extraire un numéro de version, la configuration par défaut de l’utilisateur « @buildd@ » qui consrtuit les paquets source est la suivante : |
113 | 1 | Daniel Dehennin | |
114 | 1 | Daniel Dehennin | <pre> |
115 | 4 | Daniel Dehennin | # ~/.gbp.conf |
116 | 4 | Daniel Dehennin | # Configuration file for git-buildpackage and friends |
117 | 1 | Daniel Dehennin | |
118 | 4 | Daniel Dehennin | [DEFAULT] |
119 | 4 | Daniel Dehennin | # Where I track upstream |
120 | 4 | Daniel Dehennin | upstream-branch = master |
121 | 1 | Daniel Dehennin | |
122 | 4 | Daniel Dehennin | # Branch I use to build package |
123 | 4 | Daniel Dehennin | debian-branch = debian/build |
124 | 1 | Daniel Dehennin | |
125 | 4 | Daniel Dehennin | # the default tag formats used: |
126 | 4 | Daniel Dehennin | upstream-tag = release/%(version)s |
127 | 4 | Daniel Dehennin | debian-tag = debian/%(version)s |
128 | 4 | Daniel Dehennin | |
129 | 4 | Daniel Dehennin | # Look for a tag matching the upstream version when creating an orig.tar.gz tarball |
130 | 4 | Daniel Dehennin | upstream-tree = tag |
131 | 4 | Daniel Dehennin | |
132 | 4 | Daniel Dehennin | # Build only source package |
133 | 4 | Daniel Dehennin | builder = dpkg-buildpackage -nc -d -sa -S -kbuildd@listeseole.ac-dijon.fr |
134 | 4 | Daniel Dehennin | |
135 | 4 | Daniel Dehennin | # Upload to reprepro which spool binary builds to rebuildd |
136 | 4 | Daniel Dehennin | postbuild = dput eole $GBP_CHANGES_FILE |
137 | 3 | Daniel Dehennin | </pre> |
138 | 3 | Daniel Dehennin | |
139 | 4 | Daniel Dehennin | Il est possible d’écraser ces "paramètres":http://honk.sigxcpu.org/projects/git-buildpackage/manual-html/gbp.man.gbp.conf.html par branche de packaging en créant un fichier @debian/gbp.conf@. |
140 | 1 | Daniel Dehennin | |
141 | 4 | Daniel Dehennin | Par exemple, dans le cadre de paquet [[EoleDebianPackaging24#Il-est-possible-de-modifier-les-sources-dans-le-packaging-ou-il-n’y-a-pas-de-sources-upstream|natif]], on peut vouloir forcer l’extraction du fichier @orig.tar.gz@ depuis la branche de packaging : |
142 | 4 | Daniel Dehennin | |
143 | 4 | Daniel Dehennin | <pre> |
144 | 4 | Daniel Dehennin | # Per debian package configuration |
145 | 4 | Daniel Dehennin | # It is just used to override defaults upstream tag format |
146 | 4 | Daniel Dehennin | |
147 | 4 | Daniel Dehennin | [DEFAULT] |
148 | 4 | Daniel Dehennin | # specific tag format |
149 | 4 | Daniel Dehennin | upstream-tag = upstream/%(version)s |
150 | 4 | Daniel Dehennin | |
151 | 4 | Daniel Dehennin | # Extract orig.tar.gz from a branch |
152 | 4 | Daniel Dehennin | upstream-tree = branch |
153 | 4 | Daniel Dehennin | |
154 | 4 | Daniel Dehennin | # Force the use of the same branch |
155 | 4 | Daniel Dehennin | # The orig.tar.gz will contain the packaging which is valid only for native package |
156 | 4 | Daniel Dehennin | upstream-branch = mycustom-build-branch |
157 | 4 | Daniel Dehennin | debian-branch = mycustom-build-branch |
158 | 4 | Daniel Dehennin | </pre> |