Vous n'êtes pas identifié(e).
L'icône rouge permet de télécharger chaque page du wiki visitée au format PDF et la grise au format ODT →
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente Prochaine révision Les deux révisions suivantes | ||
doc:mentors:git-buildpackage [01/03/2014 00:08] captnfab créée |
doc:mentors:git-buildpackage [01/03/2014 09:02] captnfab [Utilisations] |
||
---|---|---|---|
Ligne 25: | Ligne 25: | ||
<code root>apt-get install git gitk git-buildpackage pristine-tar</code> | <code root>apt-get install git gitk git-buildpackage pristine-tar</code> | ||
- | ===== Configuration de Git ===== | + | ===== Configuration ===== |
+ | |||
+ | ==== Configuration de Git ==== | ||
<code user>git config --global user.name "Votre Nom" | <code user>git config --global user.name "Votre Nom" | ||
Ligne 31: | Ligne 33: | ||
Si vous avez une clé GPG FIXME : | Si vous avez une clé GPG FIXME : | ||
- | <code user>git config --global user.signingkey "0xXXXXXXXX" | + | <code user>git config --global user.signingkey "0xXXXXXXXX"</code> |
+ | ==== Configuration de Git-BuildPackage ==== | ||
+ | |||
+ | Créer le fichier ''~/.gbp.conf'' contenant le texte suivant : | ||
+ | <code ini ~/.gbp.conf>[DEFAULT] | ||
+ | # Sign tags by default: | ||
+ | sign-tags = True | ||
+ | keyid = 0xXXXXXXXX | ||
+ | # use pristine tar by defaul | ||
+ | pristine-tar = True | ||
+ | |||
+ | [dch] | ||
+ | # Parse meta tags like Closes: from commit messages | ||
+ | meta = True | ||
+ | # Add seven digits of the commits sha1 to the commit message | ||
+ | id-length = 7 | ||
+ | # Regex for matching bugs to close | ||
+ | meta-closes = Closes|LP|BZ | ||
+ | # Use the full commit message instead of the first line only | ||
+ | full = True | ||
+ | # Ignore these in commit messages | ||
+ | ignore-regex = (Signed-off|Acked)-by: | ||
+ | |||
+ | [buildpackage] | ||
+ | # Automatically push to remote repo after tagging a new release | ||
+ | posttag = /usr/share/doc/git-buildpackage/examples/gbp-posttag-push | ||
+ | # Run Lintian after a succesful build | ||
+ | postbuild = lintian $GBP_CHANGES_FILE | ||
+ | # Build command | ||
+ | builder = dpkg-buildpackage -i -I -uc -us | ||
+ | # Clean command | ||
+ | cleaner = /bin/true | ||
+ | |||
+ | [import-orig] | ||
+ | # Automatically forward the changelog after importing a new upstream version | ||
+ | postimport = git-dch -N%(version)s -S -a --debian-branch=$GBP_BRANCH</code> | ||
+ | <note important>Remplacer ''0xXXXXXXXX'' par l'id de votre clé GPG !</note> | ||
===== Utilisations ===== | ===== Utilisations ===== | ||
FIXME | FIXME | ||
+ | |||
+ | ==== Mettre à jour la branche de patchs ==== | ||
+ | |||
+ | === Si elle n'existe pas === | ||
+ | <code user>gbp pq import</code> | ||
+ | |||
+ | === Si des commits ont été fait sur //master// depuis la dernière mise à jour === | ||
+ | <code user>gbp pq rebase</code> | ||
+ | |||
+ | ==== Mettre à jour les patchs depuis la branche de patchs ==== | ||
+ | <code user>gbp pq export</code> | ||
+ | |||
+ | |||
+ | ==== Compilation du paquet === | ||
+ | |||
+ | À faire depuis la branche //patch-queue/master// à jour : | ||
+ | <code user>DEB_HOST_ARCH=amd64 ARCH=amd64 DIST=sid git-buildpackage --git-pbuilder --git-arch=$ARCH --git-dist=$DIST --git-tag --git-debian-branch=patch-queue/master</code> | ||
+ | |||
+ | ===== Quelques rappels de git ===== | ||
+ | |||
+ | * Supprimer un tag localement et à distance : | ||
+ | <code user>git tag -d nomdutag && git push origin nomdutag</code> | ||
+ | * Revenir irréversiblement à un ancien commit : | ||
+ | <code user>git reset --hard hashprefix-du-commit</code> | ||
+ | * Établir une branche basée sur un ancien commit : | ||
+ | <code user>git checkout -b nomdelabranche hashprefix-du-commit</code> | ||
+ | |||
+ | |||
+ | ==== Références ==== | ||
+ | * [[http://stackoverflow.com/questions/6151970/how-do-you-remove-a-tag-from-a-remote-repository|How do you remove a tag from a remote repository]] | ||
+ | * [[http://stackoverflow.com/questions/4114095/revert-to-previous-git-commit|How to revert to a previous git commit]] | ||
===== Références ===== | ===== Références ===== |