Projet

Général

Profil

MigrationAppliEnvole4 » Historique » Version 48

Lionel Morin, 22/10/2013 15:08

1 1 Lionel Morin
h1. Migration d'une application Envole vers la version EOLE 2.4 (ébauche)
2 1 Lionel Morin
3 25 Joël Cuissinat
{{>toc}}
4 25 Joël Cuissinat
5 3 Lionel Morin
Pour faciliter le travail de packaging, il est nécessaire de [[eole-skeletor:Doc-geting-started| "skeletoriser"]] le dépot 2.3 pour le [[eole:EoleDebianPackaging24| transformer en dépot 2.4]].
6 5 Lionel Morin
7 13 Lionel Morin
h2. Nouvelle organisation du dépot git
8 1 Lionel Morin
9 13 Lionel Morin
Une nouvelle organisation globale des dépots git pour Envole est mise en place et sera commune pour 2.3 et 2.4.
10 13 Lionel Morin
11 13 Lionel Morin
h3. Description des branches
12 13 Lionel Morin
13 8 Lionel Morin
|_.Sources originales |_.Sources modifiées pour Envole |_.Ajouts EOLE  |_.Packaging      |
14 13 Lionel Morin
|/2=.upstream         |/2=.=>  patch                   |/2=.=>  master |=>  packaging 2.3|
15 1 Lionel Morin
|                                                                       =>  packaging 2.4|
16 4 Lionel Morin
17 15 Lionel Morin
* la branche _*upstream*_ ne contient que les sources originales de l'application et sert de référence pour la branche patch
18 13 Lionel Morin
* la branche _*patch*_ contient les sources patchées pour envole (il y a ici possibilité de générer un paquet envole-<nom_appli>)
19 1 Lionel Morin
* la branche _*master*_ est commune en 2.3 et 2.4 (sous réserve de rester compatible) et comporte, en plus des sources, tous les ajouts EOLE (templates, dicos, scripts, sql, password...)
20 14 Lionel Morin
* les branches de *_packaging_*, une par version
21 21 Lionel Morin
Les flèches "=>" représentent le sens de merge des branches. (*uptream* est mergée dans *patch* qui est mergée dans *master* qui est mergée dans *packaging*)
22 22 Lionel Morin
Il est important de bien respecter ce sens de merge au risque de perdre des fichiers et rendre le dépot git inutilisable.
23 13 Lionel Morin
24 13 Lionel Morin
h3. Étapes de migration d'un dépot
25 13 Lionel Morin
26 14 Lionel Morin
# Créer la branche "patch" à partir de "master" :
27 13 Lionel Morin
<pre>
28 14 Lionel Morin
user:~/depot/monappli (master)$ git checkout -b patch
29 1 Lionel Morin
</pre>
30 1 Lionel Morin
# Supprimer tout le contenu autre que le dossier src :
31 14 Lionel Morin
<pre>
32 16 Lionel Morin
user:~/depot/monappli (patch)$ git rm -r dicos/* sso/* tmpl/* sql/* Makefile eole.mk apps.mk # etc...
33 14 Lionel Morin
</pre>
34 14 Lionel Morin
# Commiter
35 14 Lionel Morin
<pre>
36 14 Lionel Morin
user:~/depot/monappli (patch)$ git commit -m "Suppression de la partie EOLE"
37 14 Lionel Morin
</pre>
38 17 Lionel Morin
# Créer la branche "upstream" à partir de "patch" :
39 17 Lionel Morin
<pre>
40 17 Lionel Morin
user:~/depot/monappli (patch)$ git checkout -b upstream
41 17 Lionel Morin
</pre>
42 17 Lionel Morin
# Supprimer toutes les sources du dossier src :
43 17 Lionel Morin
<pre>
44 17 Lionel Morin
user:~/depot/monappli (upstream)$ git rm -r src/monappli-1.0.0/* src/plugins-1.0.0/* # etc...
45 17 Lionel Morin
</pre>
46 17 Lionel Morin
# Télécharger les sources de l'application depuis le site d'origine (fichier tar.gz)
47 17 Lionel Morin
# Décompresser les sources dans le dossier src et renommer le dossier selon la nomenclature skeletor :
48 17 Lionel Morin
<pre>
49 18 Lionel Morin
user:~/depot/monappli (upstream)/src$ tar -xvzf ~/monappli-1.0.0.tar.gz 
50 18 Lionel Morin
user:~/depot/monappli (upstream)$ mv monappli monappli-1.0.0
51 17 Lionel Morin
</pre>
52 19 Lionel Morin
# Commiter
53 19 Lionel Morin
<pre>
54 19 Lionel Morin
user:~/depot/monappli (upstream)$ git commit -m "Mise en place des sources 1.0.0"
55 19 Lionel Morin
</pre>
56 19 Lionel Morin
# Merge de la branche "upstream" dans "patch" (avec une option pour conserver les fichiers de "patch") :
57 19 Lionel Morin
<pre>
58 19 Lionel Morin
user:~/depot/monappli (upstream)$ git checkout patch
59 19 Lionel Morin
user:~/depot/monappli (patch)$ git merge -s ours upstream
60 19 Lionel Morin
</pre>
61 19 Lionel Morin
# Merge de la branche "patch" dans "master" (avec une option pour conserver les fichiers de "master") :
62 19 Lionel Morin
<pre>
63 19 Lionel Morin
user:~/depot/monappli (patch)$ git checkout master
64 19 Lionel Morin
user:~/depot/monappli (master)$ git merge -s ours patch
65 19 Lionel Morin
</pre>
66 1 Lionel Morin
67 23 Lionel Morin
Les options de merge étant conservées, les prochains merge pourront se faire avec un simple "@git merge ...@".
68 20 Lionel Morin
Il est important de bien respecter le flux de merge des branches (représenté par "=>" dans le tableau au-dessus).
69 20 Lionel Morin
70 47 Lionel Morin
Pour simplifier ce travail, on pourra reporter la création de la branche "upstream" et l'effectuer à l'occasion d'une montée de version de l'application.
71 46 Lionel Morin
72 1 Lionel Morin
h2. Modification des dicos
73 1 Lionel Morin
74 1 Lionel Morin
Normalement il n'y a rien à changer.
75 1 Lionel Morin
76 1 Lionel Morin
h2. Modification des templates
77 1 Lionel Morin
78 1 Lionel Morin
Certaines variables souvent utilisées dans Envole ont changé de nom.
79 1 Lionel Morin
80 1 Lionel Morin
|_.Nom en 2.3                  |_.Nouveau nom en 2.4          |
81 1 Lionel Morin
|adresse_ip_annuaire           |container_ip_annuaire         |
82 1 Lionel Morin
|adresse_ip_fichier            |container_ip_fichier          |
83 1 Lionel Morin
|adresse_ip_mail               |container_ip_mail             |
84 1 Lionel Morin
|adresse_ip_mysql              |container_ip_mysql            |
85 1 Lionel Morin
|adresse_ip_web                |container_ip_web              |
86 1 Lionel Morin
87 24 Joël Cuissinat
*=> Ces variables peuvent être rajoutées en 2.4 pour une rétro-compatibilité (#5701)*
88 1 Lionel Morin
89 1 Lionel Morin
h2. Modification des scripts shell
90 2 Lionel Morin
91 2 Lionel Morin
h3. CreoleGet
92 2 Lionel Morin
93 2 Lionel Morin
<pre>
94 2 Lionel Morin
.ParseDico
95 2 Lionel Morin
echo $mavariable
96 2 Lionel Morin
</pre>
97 2 Lionel Morin
est remplacé par :
98 2 Lionel Morin
<pre>
99 2 Lionel Morin
echo $(CreoleGet mavariable)
100 2 Lionel Morin
</pre>
101 2 Lionel Morin
102 2 Lionel Morin
ATTENTION : à ce jour, pour accéder à une variable esclave, il faut connaître la variable maître :
103 2 Lionel Morin
<pre>
104 1 Lionel Morin
echo $(CreoleGet lamaster.lesclave)
105 1 Lionel Morin
</pre>
106 2 Lionel Morin
107 12 Lionel Morin
*=> Il est possible de tester la présence de ParseDico avant de le lancer et ainsi faire en sorte d'avoir des scripts communs en 2.3 et en 2.4*
108 3 Lionel Morin
109 10 Lionel Morin
Code à confirmer :
110 7 Lionel Morin
<pre>
111 10 Lionel Morin
if type -p ParseDico &> /dev/null; then
112 11 Lionel Morin
    .ParseDico
113 11 Lionel Morin
else
114 11 Lionel Morin
    # initialisation des variables utilisées
115 11 Lionel Morin
    adresse_ip_br0=$(CreoleGet adresse_ip_br0)
116 1 Lionel Morin
fi
117 11 Lionel Morin
118 11 Lionel Morin
echo $adresse_ip_br0
119 7 Lionel Morin
</pre>
120 7 Lionel Morin
121 2 Lionel Morin
h3. CreoleRun
122 2 Lionel Morin
123 2 Lionel Morin
<pre>
124 2 Lionel Morin
./usr/share/eole/FonctionsEoleNg
125 2 Lionel Morin
RunCmd "ma -commande" conteneur
126 2 Lionel Morin
</pre>
127 2 Lionel Morin
est remplacé par :
128 1 Lionel Morin
<pre>
129 1 Lionel Morin
CreoleRun "ma -commande" conteneur
130 2 Lionel Morin
</pre>
131 3 Lionel Morin
132 43 Lionel Morin
*=> Il est possible d'émuler la commande RunCmd en 2.4 ou bien émuler CreoleRun en 2.3.*
133 2 Lionel Morin
134 2 Lionel Morin
h2. Problèmes spécifiques
135 2 Lionel Morin
136 2 Lionel Morin
h3. Problème de connexion aux bases MySQL #5633
137 2 Lionel Morin
138 2 Lionel Morin
Pour y remédier temporairement, on peut mettre "localhost" à la place de "127.0.0.1" (penser à la fois aux fichiers sql et aux fichiers de config php).
139 26 Joël Cuissinat
140 26 Joël Cuissinat
h2. État des lieux application par application
141 26 Joël Cuissinat
142 26 Joël Cuissinat
h3. Ajaxplorer
143 26 Joël Cuissinat
144 35 Joël Cuissinat
OK après correction de #5922 
145 26 Joël Cuissinat
146 26 Joël Cuissinat
h3. phpMyAdmin
147 26 Joël Cuissinat
148 26 Joël Cuissinat
*OK*
149 26 Joël Cuissinat
150 26 Joël Cuissinat
h3. Piwik
151 26 Joël Cuissinat
152 26 Joël Cuissinat
_Non testé_
153 26 Joël Cuissinat
154 26 Joël Cuissinat
h3. SquirrelMail
155 26 Joël Cuissinat
156 26 Joël Cuissinat
Ne sera pas supporté
157 26 Joël Cuissinat
158 26 Joël Cuissinat
h3. CDC
159 26 Joël Cuissinat
160 26 Joël Cuissinat
_Non testé_
161 26 Joël Cuissinat
162 26 Joël Cuissinat
h3. Cdt
163 26 Joël Cuissinat
164 26 Joël Cuissinat
KO : utilise eole-envole-tools
165 26 Joël Cuissinat
166 26 Joël Cuissinat
h3. Dokuwiki
167 26 Joël Cuissinat
168 48 Lionel Morin
OK => *eole-dokuwiki (2012-01-25a-eole2-4)*
169 26 Joël Cuissinat
170 26 Joël Cuissinat
h3. FluxBB
171 26 Joël Cuissinat
172 45 Joël Cuissinat
OK => *eole-fluxbb (1.5.3.eole1-1)*
173 26 Joël Cuissinat
174 26 Joël Cuissinat
h3. Gepi
175 26 Joël Cuissinat
176 28 Joël Cuissinat
KO (problème avec les templates encodée en ISO-8859)
177 26 Joël Cuissinat
178 27 Joël Cuissinat
h3. -Gibii-
179 26 Joël Cuissinat
180 26 Joël Cuissinat
h3. GRR
181 26 Joël Cuissinat
182 26 Joël Cuissinat
KO : utilise eole-envole-tools
183 26 Joël Cuissinat
184 26 Joël Cuissinat
h3. Jappix
185 26 Joël Cuissinat
186 38 Joël Cuissinat
KO (_CAS Authentication failed!_)
187 26 Joël Cuissinat
188 26 Joël Cuissinat
h3. Moodle
189 26 Joël Cuissinat
190 44 Joël Cuissinat
KO : script _posttemplate/12-moodle_ non compatible 2.4 (#5964)
191 26 Joël Cuissinat
192 26 Joël Cuissinat
h3. Moodle BigBlueButton
193 26 Joël Cuissinat
194 26 Joël Cuissinat
_Non testé_
195 26 Joël Cuissinat
196 26 Joël Cuissinat
h3. Moodle Référentiel
197 26 Joël Cuissinat
198 26 Joël Cuissinat
_Non testé_
199 26 Joël Cuissinat
200 26 Joël Cuissinat
h3. Piwigo
201 26 Joël Cuissinat
202 30 Joël Cuissinat
OK
203 26 Joël Cuissinat
204 26 Joël Cuissinat
h3. Roundcube
205 26 Joël Cuissinat
206 26 Joël Cuissinat
KO : #5871
207 26 Joël Cuissinat
208 26 Joël Cuissinat
h3. SAP
209 26 Joël Cuissinat
210 26 Joël Cuissinat
_Non testé_
211 26 Joël Cuissinat
212 26 Joël Cuissinat
h3. SPIP Eva
213 26 Joël Cuissinat
214 26 Joël Cuissinat
OK après résolution de #5876
215 26 Joël Cuissinat
216 26 Joël Cuissinat
h3. Taskfreak
217 26 Joël Cuissinat
218 31 Joël Cuissinat
OK mais problème d'encodage sur 2.4 !
219 26 Joël Cuissinat
220 26 Joël Cuissinat
h3. Webcalendar
221 26 Joël Cuissinat
222 32 Joël Cuissinat
KO : utilise eole-envole-tools + #5879
223 26 Joël Cuissinat
224 26 Joël Cuissinat
h3. WordPress
225 26 Joël Cuissinat
226 33 Joël Cuissinat
OK après correction de #5880
227 26 Joël Cuissinat
228 26 Joël Cuissinat
h3. Zarafa
229 26 Joël Cuissinat
230 1 Lionel Morin
_Non testé_
231 39 Lionel Morin
232 39 Lionel Morin
h2. Compilation en EOLE 2.4
233 39 Lionel Morin
234 39 Lionel Morin
Voir : http://dev-eole.ac-dijon.fr/projects/eole/wiki/PrepareEOLE24
235 39 Lionel Morin
236 42 Lionel Morin
*La nouvelle procédure de compilation de paquet se base sur les noms de tag de la branche master.*
237 1 Lionel Morin
238 42 Lionel Morin
Donc à chaque modification du paquet il faudra taguer cette version avec un numéro supérieur à la précédente.
239 42 Lionel Morin
240 42 Lionel Morin
Pour différencier les versions upstream et les versions modifiées par EOLE, on pourra taguer la branche upstream avec "upstream/x.y.z" (où x.y.z est son numéro de version) et les releases EOLE (branche master) avec "release/x.y.z-eoleX" (où X est le numéro de la version EOLE).