Projet

Général

Profil

GitHotfix » Historique » Version 66

« Précédent - Version 66/85 (diff) - Suivant » - Version actuelle
Joël Cuissinat, 13/07/2020 16:11


Préparer un correctif pour EOLE 2.4 ou EOLE 2.5

RAPPEL : Il ne faut jamais fusionner une branche d’une version supérieure à une version inférieure, par exemple :

  • NE PAS FAIRE
    moi@work:~/src/$PAQUET (2.4.0/master)$ git merge master
    
  • NE PAS FAIRE
    moi@work:~/src/$PAQUET (2.4.0/master)$ git merge release/2.4.1
    
  • NE PAS FAIRE
    moi@work:~/src/$PAQUET (2.4.0/master)$ git merge 2.4.2/master
    
  • NE PAS FAIRE
    moi@work:~/src/$PAQUET (2.4.0/master)$ git merge release/2.4.2
    
  • NE PAS FAIRE
    moi@work:~/src/$PAQUET (2.4.0/master)$ git merge 2.4.2/42-fix-machin-truc
    

Fixer un fichier ou deux

Se placer dans la branche de version la plus ancienne qui doit contenir le commit :

moi@work:~/src/$PAQUET (master)$ git checkout 2.6.2/master

Chercher le dernier commit effectué sur le fichier impacté à modifier

moi@work:~/src/$PAQUET (2.6.2/master)$ git log nomDuFichier
commit f1b38d73d5cc0ea3cca7fb15d3b77bb996df824d
Merge: 1b5ad84 636c2d6
Author: Prénom Nom <pnom@domaine.fr>
Date:   Fri Mar 31 16:16:53 2017 +0200
[…]

Créer la branche à partir du dernier commit :

moi@work:~/src/$PAQUET (2.6.2/master)$ git checkout f1b38d73d5cc0ea3cca7fb15d3b77bb996df824d -b 2.6.2/numeroDemande-fix-descriptif
moi@work:~/src/$PAQUET (2.6.2/numeroDemande-fix-descriptif)$

Corriger, commiter :

moi@work:~/src/$PAQUET (2.6.2/numeroDemande-fix-descriptif)$ git add nomDuFichier
moi@work:~/src/$PAQUET (2.6.2/numeroDemande-fix-descriptif)$ git commit

Se placer sur la branche recevant le merge :

moi@work:~/src/$PAQUET (2.6.2/numeroDemande-fix-descriptif)$ git checkout 2.6.2/master
moi@work:~/src/$PAQUET (2.6.2/master)$ git merge 2.6.2/numeroDemande-fix-descriptif

Pousser et empaqueter :

moi@work:~/src/$PAQUET (2.6.2/master)$ git push origin 2.6.2/master
moi@work:~/src/$PAQUET (2.6.2/master)$ git package 2.6.2
moi@work:~/src/$PAQUET (2.6.2/master)$ git package -b -d eole-2.6.2/proposed-updates 2.6.2

Principe de base

  • X/master : branche d’intégration de code pour la version X
  • dist/eole/X/master : branche de packaging pour la version EOLE X

On pourrait pousser la distinction pour les branches de codes :

  • 2.4.0/master: branche d’intégration des hotfix pour 2.4.0, intégrée dans dist/eole/2.4.0/master pour créer un paquet, ce qui donne :
moi@work:~/src/$PAQUET (2.4.0/master)$ git package 2.4.0
moi@work:~/src/$PAQUET (2.4.0/master)$ git package -b -d eole-2.4.0/proposed-updates 2.4.0
  • 2.4.1/master: branche d’intégration des hotfix pour 2.4.1, intégrée dans dist/eole/2.4.1/master pour créer un paquet, ce qui donne :
moi@work:~/src/$PAQUET (2.4.1/master)$ git package 2.4.1
moi@work:~/src/$PAQUET (2.4.1/master)$ git package -b -d eole-2.4.1/proposed-updates 2.4.1
  • 2.4.1/42-fix-machin-bidule : branche contenant le correctif pour le bug machin bidule (numéro redmine #42) apparu sur 2.4.1.

Cette branche sera intégrée à 2.4.1/master, 2.4.2/master et toutes les autres 2.4.X/master si le problème machin bidule y est présent, jusqu’à la branche de développement.

Cela pourrait être représenté de la façon suivante, les o sont des commits et les M sont des merge commits :

o-o-o-o-o-o-o-o-o-o-o-o---M  <- master
   \   \   \             /
    \   \   o-o-o-o-M   /    <- 2.4.2/master
     \   \         /   /
      \   \     o-o---+      <- 2.4.1/42-fix-machin-bidule (amené à disparaître)
       \   \   /   \
        \   o-o-o-o-M        <- 2.4.1/master
         \
          \
           o-o-o-o-o-o-o-o-o  <- 2.4.0/master

Mode Opératiore

Voici une description succinte des manipulations à faire pour produire un correctif

  1. S’assurer qu’il y a une demande redmine, on l’appel $REDMINE_ISSUE
  2. Trouver le commit qui a introduit l’erreur, on l’appel $COMMIT_ID
  3. Trouver la release EOLE associée à ce commit, on l’appel $EOLE_RELEASE
    moi@work:~/src/$PAQUET (master)$ git describe --match release/* $COMMIT_ID
    
  4. Créer une branche temporaire pour faire le correctif
    moi@work:~/src/$PAQUET (master)$ git checkout -b $EOLE_RELEASE/$REDMINE_ISSUE-fix-machin-bidule $COMMIT_ID
    
  5. Faire le correctif
  6. Intégrer le correctif aux branches impactés, en commençant par master si le problème existe dans la branche de développement:
    moi@work:~/src/$PAQUET ($EOLE_RELEASE/$REDMINE_ISSUE-fix-machin-bidule)$ git checkout master
    moi@work:~/src/$PAQUET (master)$ git merge --no-ff $EOLE_RELEASE/$REDMINE_ISSUE-fix-machin-bidule
    
  7. Faire un paquet

EOLE 2.4

EOLE 2.4.0

moi@work:~/src/$PAQUET (master)$ git checkout 2.4.0/master
moi@work:~/src/$PAQUET (2.4.0/master)$ git package 2.4.0
moi@work:~/src/$PAQUET (2.4.0/master)$ git package -b -d eole-2.4.0/proposed-updates 2.4.0

EOLE 2.4.1

moi@work:~/src/$PAQUET (master)$ git checkout 2.4.1/master
moi@work:~/src/$PAQUET (2.4.1/master)$ git package 2.4.1
moi@work:~/src/$PAQUET (2.4.1/master)$ git package -b -d eole-2.4.1/proposed-updates 2.4.1

EOLE 2.4.2

Les branches 2.4.2/master et dist/eole/2.4.2/master ayant été créées à la demande, les projets n'ayant pas nécessité de modifications spécifiques pour la version 2.4.2 ne possèdent pas ces branches.

moi@work:~/src/$PAQUET (master)$ git checkout 2.4.2/master
moi@work:~/src/$PAQUET (2.4.2/master)$ git package 2.4.2
moi@work:~/src/$PAQUET (2.4.2/master)$ git package -b -d eole-2.4.2/proposed-updates 2.4.2

EOLE 2.5

EOLE 2.5.0

Seuls les paquets communs et ceux utilisés par les modules annoncés comme stables (Zéphir et Seshat) possèdent les branches 2.5.0/master et dist/eole/2.5.0/master.

moi@work:~/src/$PAQUET (master)$ git checkout 2.5.0/master
moi@work:~/src/$PAQUET (2.5.0/master)$ git package 2.5.0
moi@work:~/src/$PAQUET (2.5.0/master)$ git package -b -d eole-2.5.0/proposed-updates 2.5.0

EOLE 2.5.1

Les branche 2.5.1/master et dist/eole/2.5.1/master sont utilisées pour la 2.5.1

moi@work:~/src/$PAQUET (master)$ git checkout 2.5.1/master
moi@work:~/src/$PAQUET (2.5.1/master)$ git package 2.5.1
moi@work:~/src/$PAQUET (2.5.1/master)$ git package -b -d eole-2.5.1/proposed-updates 2.5.1

EOLE 2.5.2

Les branche 2.5.2/master et dist/eole/2.5.2/master sont utilisées pour la 2.5.2

moi@work:~/src/$PAQUET (master)$ git checkout 2.5.2/master
moi@work:~/src/$PAQUET (2.5.2/master)$ git package 2.5.2
moi@work:~/src/$PAQUET (2.5.2/master)$ git package -b -d eole-2.5.2/proposed-updates 2.5.2
La branche de packaging dist/eole/2.5/master ne doit plus être utilisée.

EOLE 2.6

EOLE 2.6.0

Les branches 2.6.0/master et dist/eole/2.6.0/master sont utilisées pour la 2.6.0

moi@work:~/src/$PAQUET (master)$ git checkout 2.6.0/master
moi@work:~/src/$PAQUET (2.6.0/master)$ git package 2.6.0
moi@work:~/src/$PAQUET (2.6.0/master)$ git package -b -d eole-2.6.0/proposed-updates 2.6.0

EOLE 2.6.1

Les branche 2.6.1/master et dist/eole/2.6.1/master sont utilisées pour la 2.6.1

moi@work:~/src/$PAQUET (master)$ git checkout 2.6.1/master
moi@work:~/src/$PAQUET (2.6.1/master)$ git package 2.6.1
moi@work:~/src/$PAQUET (2.6.1/master)$ git package -b -d eole-2.6.1/proposed-updates 2.6.1

NB : suivi graphique http://castor.eole.lan:9998/dist/eole-2.6.1-proposed-updates/arch/all

EOLE 2.6.2

Les branche 2.6.2/master et dist/eole/2.6.2/master sont utilisées pour la 2.6.2

moi@work:~/src/$PAQUET (master)$ git checkout 2.6.2/master
moi@work:~/src/$PAQUET (2.6.2/master)$ git package 2.6.2
moi@work:~/src/$PAQUET (2.6.2/master)$ git package -b -d eole-2.6.2/proposed-updates 2.6.2

NB : suivi graphique http://castor.eole.lan:9998/dist/eole-2.6.2-proposed-updates/arch/all

ATTENTION : Pas de version EOLE 2.6.3 prévue à ce jour

EOLE 2.7

EOLE 2.7.0

Les branche 2.7.0/master et dist/eole/2.7.0/master sont utilisées pour la 2.7.0

moi@work:~/src/$PAQUET (master)$ git checkout 2.7.0/master
moi@work:~/src/$PAQUET (2.7.0/master)$ git package 2.7.0
moi@work:~/src/$PAQUET (2.7.0/master)$ git package -b -d eole-2.7.0/proposed-updates 2.7.0

NB : suivi graphique http://castor.eole.lan:9998/dist/eole-2.7.0-proposed-updates/arch/all

EOLE 2.7.1

Les branche 2.7.1/master et dist/eole/2.7.1/master sont utilisées pour la 2.7.1

moi@work:~/src/$PAQUET (master)$ git checkout 2.7.1/master
moi@work:~/src/$PAQUET (2.7.1/master)$ git package 2.7.1/master
moi@work:~/src/$PAQUET (2.7.1/master)$ git package -b -d eole-2.7.1/proposed-updates 2.7.1/master

NB : suivi graphique http://castor.eole.lan:9998/dist/eole-2.7.1-proposed-updates/arch/all

EOLE 2.7.2

Les branches 2.7.2/master et dist/eole/2.7.2/master sont utilisées pour la 2.7.2

moi@work:~/src/$PAQUET (master)$ git checkout 2.7.2/master
moi@work:~/src/$PAQUET (2.7.2/master)$ git package 2.7.2/master
moi@work:~/src/$PAQUET (2.7.2/master)$ git package -b -d eole-2.7.2/proposed-updates 2.7.2/master

NB : suivi graphique http://castor.eole.lan:9998/dist/eole-2.7.2-proposed-updates/arch/all

La distribution eole-2.7-unstable ne devrait plus être utilisée

EOLE 2.8

EOLE 2.8.0 (unstable)

Depuis la publication de la version EOLE 2.8.x, les nouvelles fonctionnalités 2.8 doivent être compilés en version unstable :

moi@work:~/src/$PAQUET (master)$ git package 2.8.0/master
moi@work:~/src/$PAQUET (master)$ git package -b -d eole-2.8/unstable 2.8.0/master

NB : suivi graphique http://castor.eole.lan:9998/dist/eole-2.8-unstable/arch/all

ENVOLE 4

Les dépôts envole4 sont utilisés pour les versions EOLE 2.4.2 et EOLE 2.5.1

Paquets de dév

Distribution : envole-4-unstable

Paquets candidats

Distribution : envole-4-testing

ENVOLE 5

Les dépôts envole5 sont utilisés à partir de la version EOLE 2.5.2.

Certains des logiciels fournis dans cette version sont incompatibles avec les versions d'apache/php de la distribution Precise (2.4).

A terme les logiciels seront tous adaptés pour utiliser eole-db.

Paquets de dév

Distribution : envole-5-unstable

Paquets candidats

Distribution : envole-5-testing