issue50:tutoubuntudev
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue50:tutoubuntudev [2011/06/26 23:00] – créée fredphil91 | issue50:tutoubuntudev [2011/08/12 22:04] (Version actuelle) – fredphil91 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | There are a number of things you need to do to get started developing for Ubuntu. This article is designed to get your computer set up so that you can start working with packages, and upload your packages to Launchpad. Here’s what we’ll cover: | + | **There are a number of things you need to do to get started developing for Ubuntu. This article is designed to get your computer set up so that you can start working with packages, and upload your packages to Launchpad. Here’s what we’ll cover: |
• Installing packaging-related software. This includes: | • Installing packaging-related software. This includes: | ||
Ligne 6: | Ligne 6: | ||
• Additional encryption software so you can securely transfer files | • Additional encryption software so you can securely transfer files | ||
• Creating and configuring your account on Launchpad | • Creating and configuring your account on Launchpad | ||
- | • Setting up your development environment to help you do local builds of packages, interact with other developers, and propose your changes on Launchpad. | + | • Setting up your development environment to help you do local builds of packages, interact with other developers, and propose your changes on Launchpad.** |
+ | Il y a pas mal de choses qu'il faut faire pour pouvoir commencer à développer pour Ubuntu. Cet article est conçu pour que vous puissiez paramétrer votre ordinateur afin de travailler avec des paquets, puis télécharger vos paquets vers Launchpad. Voici ce que nous allons traiter : | ||
- | Note: It is advisable to do packaging work using the current development version of Ubuntu. Doing so will allow you to test changes in the same environment where those changes will actually be applied and used. | + | * L' |
+ | * Des utilitaires de création de paquets spécifiques à Ubuntu ; | ||
+ | * Un logiciel de cryptage qui permettra de vérifier que c'est vous qui avez fait le travail ; | ||
+ | * Un logiciel de cryptage supplémentaire qui vous permettra de transférer des fichiers en toute sécurité ; | ||
+ | |||
+ | * La création et la configuration de votre compte sur Launchpad ; | ||
+ | |||
+ | * Le paramétrage de votre environnement de développement pour vous aider à créer des paquets localement, à interagir avec d' | ||
+ | |||
+ | **Note: It is advisable to do packaging work using the current development version of Ubuntu. Doing so will allow you to test changes in the same environment where those changes will actually be applied and used. | ||
Don’t worry, though, the Ubuntu development release wiki page (https:// | Don’t worry, though, the Ubuntu development release wiki page (https:// | ||
Ligne 16: | Ligne 26: | ||
There are a number of tools that will make your life as an Ubuntu developer much easier. You will encounter these tools later in this guide. To install most of the required tools, run this command: | There are a number of tools that will make your life as an Ubuntu developer much easier. You will encounter these tools later in this guide. To install most of the required tools, run this command: | ||
+ | |||
+ | sudo apt-get install gnupg pbuilder ubuntu-dev-tools bzr-builddeb apt-file** | ||
+ | |||
+ | N.B. Il est recommandé de travailler sur les paquets en utilisant la version de développement d' | ||
+ | |||
+ | Ne vous inquiétez pas, cependant, car, sur la page wiki des versions développement d' | ||
+ | |||
+ | Installer les logiciels de base pour créer des paquets | ||
+ | |||
+ | Il existe de nombreux outils qui rendront votre vie en tant que développeur d' | ||
sudo apt-get install gnupg pbuilder ubuntu-dev-tools bzr-builddeb apt-file | sudo apt-get install gnupg pbuilder ubuntu-dev-tools bzr-builddeb apt-file | ||
- | This command will install the following software: | + | **This command will install the following software: |
gnupg – GNU Privacy Guard contains tools you will need to create a cryptographic key with which you will sign files you want to upload to Launchpad. | gnupg – GNU Privacy Guard contains tools you will need to create a cryptographic key with which you will sign files you want to upload to Launchpad. | ||
Ligne 26: | Ligne 46: | ||
bzr-builddeb (and bzr, a dependency) – distributed version-control tools that make it easy for many developers to collaborate and work on the same code while keeping it trivial to merge each other’s work. | bzr-builddeb (and bzr, a dependency) – distributed version-control tools that make it easy for many developers to collaborate and work on the same code while keeping it trivial to merge each other’s work. | ||
apt-file provides an easy way to find the binary package that contains a given file. | apt-file provides an easy way to find the binary package that contains a given file. | ||
- | apt-cache (part of the apt package) provides even more information about packages on Ubuntu. | + | apt-cache (part of the apt package) provides even more information about packages on Ubuntu.** |
- | Create your GPG key | + | Cette commande installera les logiciels suivants : |
+ | |||
+ | gnupg - GNU Privacy Guard contient les outils dont vous aurez besoin pour créer une clé cryptographique avec laquelle vous signerez les fichiers que vous voudrez télécharger vers Launchpad. | ||
+ | pbuilder - un outil qui permet la création de paquets reproductibles dans un environnement propre et isolé. | ||
+ | ubuntu-dev-tools (et devscripts, une dépendance directe) - un ensemble d' | ||
+ | bzr-builddeb (et bzr, une dépendance) - des outils distribués de contrôle de version qui font que beaucoup de développeurs peuvent collaborer et travailler sur le même code facilement, tout en rendant la fusion du travail de chacun extrêmement aisé. | ||
+ | apt-file vous donne la possibilité de trouver facilement le paquet binaire qui contient un fichier spécifique. | ||
+ | apt-cache (qui fait partie du paquet apt) vous donne encore plus d' | ||
+ | |||
+ | **Create your GPG key | ||
GPG stands for GNU Privacy Guard and it implements the OpenPGP standard which allows you to sign and encrypt messages and files. This is useful for a number of purposes. In our case, it is important that you can sign files with your key so they can be identified as something that you worked on. If you upload a source package to Launchpad, it will accept the package only if it can absolutely determine who uploaded the package. | GPG stands for GNU Privacy Guard and it implements the OpenPGP standard which allows you to sign and encrypt messages and files. This is useful for a number of purposes. In our case, it is important that you can sign files with your key so they can be identified as something that you worked on. If you upload a source package to Launchpad, it will accept the package only if it can absolutely determine who uploaded the package. | ||
Ligne 36: | Ligne 65: | ||
gpg --gen-key | gpg --gen-key | ||
- | GPG will first ask you which kind of key you want to generate. Choosing the default (RSA and DSA) is fine. Next it will ask you about the keysize. The default (currently 2048) is fine, but 4096 is more secure. Afterwards, it will ask you if you want it to expire the key at some stage. It is safe to say “0”, which means the key will never expire. The last questions will be about your name and email address. Just pick the ones you are going to use for Ubuntu development here, you can add additional email addresses later on. Adding a comment is not necessary. Then you will have to set a passphrase. Choose a safe one. | + | GPG will first ask you which kind of key you want to generate. Choosing the default (RSA and DSA) is fine. Next it will ask you about the keysize. The default (currently 2048) is fine, but 4096 is more secure. Afterwards, it will ask you if you want it to expire the key at some stage. It is safe to say “0”, which means the key will never expire. The last questions will be about your name and email address. Just pick the ones you are going to use for Ubuntu development here, you can add additional email addresses later on. Adding a comment is not necessary. Then you will have to set a passphrase. Choose a safe one.** |
+ | |||
+ | Créer votre clé GPG | ||
+ | |||
+ | GPG signifie GNU Privacy Guard et il exécute l'Open PGP standard qui vous permet de signer et de crypter des messages et des fichiers. Ceci est utile pour de nombreuses raisons. Dans ce cas-ci, il est important de pouvoir signer des fichiers au moyen de votre clé, afin qu'ils puissent être identifiés comme quelque chose sur lequel vous avez travaillé. Si vous téléchargez un paquet source vers Launchpad, il l' | ||
+ | |||
+ | Pour générer une nouvelle clé GPG, exécutez : | ||
+ | |||
+ | gpg --gen-key | ||
+ | |||
+ | D' | ||
- | Now GPG will create a key for you, which can take a little bit of time; it needs random bytes, so if you give the system some work to do it will be just fine. Move the cursor around! | + | **Now GPG will create a key for you, which can take a little bit of time; it needs random bytes, so if you give the system some work to do it will be just fine. Move the cursor around! |
Once this is done, you will get a message similar to this one: | Once this is done, you will get a message similar to this one: | ||
Ligne 47: | Ligne 86: | ||
sub | sub | ||
- | In this case 43CDE61D is the key ID. | + | In this case 43CDE61D is the key ID.** |
- | Next, you need to upload the public part of your key to a keyserver so the world can identify messages and files as yours. To do so, enter: | + | Maintenant, GPG créera une clé pour vous, ce qui peut prendre un peu de temps ; il lui faut des octets au hasard donc si vous donnez du travail à faire au système ça lui conviendra très bien. Bougez le curseur un peu partout ! |
+ | |||
+ | Une fois la clé faite, vous aurez un message qui ressemble à celui-ci : | ||
+ | |||
+ | pub | ||
+ | Key fingerprint = 5C28 0144 FB08 91C0 2CF3 37AC 6F0B F90F 43CD E61D | ||
+ | uid Daniel Holbach < | ||
+ | sub | ||
+ | |||
+ | Ici, l'ID de la clé est 43CDE61D. | ||
+ | |||
+ | **Next, you need to upload the public part of your key to a keyserver so the world can identify messages and files as yours. To do so, enter: | ||
gpg --send-keys <KEY ID> | gpg --send-keys <KEY ID> | ||
- | This will send your key to one keyserver, but a network of keyservers will automatically sync the key between themselves. Once this syncing is complete, your signed public key will be ready to verify your contributions around the world. | + | This will send your key to one keyserver, but a network of keyservers will automatically sync the key between themselves. Once this syncing is complete, your signed public key will be ready to verify your contributions around the world.** |
- | Create your SSH key | + | Vous devez ensuite télécharger la partie publique de votre clé vers un serveur de clés afin que tout le monde puisse identifier des messages et des fichiers comme étant les vôtres. Pour ce faire, saisissez : |
+ | |||
+ | gpg --send-keys <KEY ID> | ||
+ | |||
+ | Votre clé sera envoyée à un serveur de clés, mais un réseau de serveurs de clé synchronisera automatiquement la clé entre eux ; une fois cette synchronisation terminée, votre clé publique signée sera prête pour vérifier vos contributions partout dans le monde. | ||
+ | |||
+ | **Create your SSH key | ||
SSH stands for Secure Shell, and it is a protocol that allows you to exchange data in a secure way over a network. It is common to use SSH to access and open a shell on another computer, and to use it to securely transfer files. For our purposes, we will mainly be using SSH to securely communicate with Launchpad. | SSH stands for Secure Shell, and it is a protocol that allows you to exchange data in a secure way over a network. It is common to use SSH to access and open a shell on another computer, and to use it to securely transfer files. For our purposes, we will mainly be using SSH to securely communicate with Launchpad. | ||
Ligne 63: | Ligne 119: | ||
ssh-keygen -t rsa | ssh-keygen -t rsa | ||
- | The default file name usually makes sense, so you can just leave it as it is. For security purposes, it is highly recommended that you use a passphrase. | + | The default file name usually makes sense, so you can just leave it as it is. For security purposes, it is highly recommended that you use a passphrase.** |
+ | |||
+ | Créer votre clé SSH | ||
+ | |||
+ | SSH est l' | ||
+ | |||
+ | Pour générer une clé SSH, saisissez : | ||
+ | |||
+ | ssh-keygen -t rsa | ||
+ | |||
+ | Le nom de fichier par défaut est, la plupart du temps, assez compréhensible et vous pouvez donc le laisser tel quel. Pour les besoins de la sécurité, il est vivement recommandé d' | ||
- | Set up pbuilder | + | **Set up pbuilder |
Pbuilder allows you to build packages locally on your machine. It serves a couple of purposes: | Pbuilder allows you to build packages locally on your machine. It serves a couple of purposes: | ||
Ligne 81: | Ligne 147: | ||
pbuilder-dist < | pbuilder-dist < | ||
- | where < | + | where < |
- | Get Set Up To Work With Launchpad | + | Installer et configurer pbuilder |
+ | |||
+ | Pbuilder vous donne la possibilité de compiler des paquets localement, sur votre machine. Il a deux raisons d' | ||
+ | |||
+ | * La création se fera dans un environnement propre et minimal. Cela vous aide à vous assurer que les paquets créés par vos soins réussissent de façon reproductible, | ||
+ | |||
+ | * Vous n'avez pas besoin d' | ||
+ | |||
+ | * Vous pouvez configurer des instances multiples pour diverses versions d' | ||
+ | |||
+ | Configurer pbuilder est très facile. Éditez ~/ | ||
+ | |||
+ | COMPONENTS=" | ||
+ | |||
+ | Ainsi toutes les dépendances seront satisfaites au moyen de toutes les composantes. Exécutez ensuite : | ||
+ | |||
+ | pbuilder-dist < | ||
+ | |||
+ | où < | ||
+ | |||
+ | **Get Set Up To Work With Launchpad | ||
With a basic local configuration in place, your next step will be to configure your system to work with Launchpad. This section will focus on the following topics: | With a basic local configuration in place, your next step will be to configure your system to work with Launchpad. This section will focus on the following topics: | ||
Ligne 96: | Ligne 182: | ||
Launchpad is the central piece of infrastructure we use in Ubuntu. It not only stores our packages and our code, but also things like translations, | Launchpad is the central piece of infrastructure we use in Ubuntu. It not only stores our packages and our code, but also things like translations, | ||
- | You will need to register with Launchpad and provide a minimal amount of information. This will allow you to download and upload code, submit bug reports, and more. | + | You will need to register with Launchpad and provide a minimal amount of information. This will allow you to download and upload code, submit bug reports, and more.** |
- | Get a Launchpad account | + | Configurer votre machine pour travailler avec Launchpad |
+ | |||
+ | Le paramétrage local de base accompli, la prochaine étape sera de configurer votre système pour que vous puissiez travailler avec Launchpad. Cette partie se concentrera sur les sujets suivants : | ||
+ | |||
+ | * Ce qu'est Launchpad et la création d'un compte Launchpad ; | ||
+ | |||
+ | * Le téléchargement de vos clés GPG et SSH vers Launchpad ; | ||
+ | |||
+ | * Comment configurer Bazaar pour travailler avec Launchpad ; | ||
+ | |||
+ | * Comment configurer Bash pour travailler avec Bazaar. | ||
+ | |||
+ | À propos de Launchpad | ||
+ | |||
+ | Launchpad est l' | ||
+ | |||
+ | Vous aurez besoin de vous inscrire sur Launchpad et fournir quelques renseignements. Ainsi, vous pourrez télécharger du code de et vers Launchpad, soumettre des rapports de bogues et plus encore. | ||
+ | |||
+ | **Get a Launchpad account | ||
If you don’t already have a Launchpad account, you can easily create one (at: https:// | If you don’t already have a Launchpad account, you can easily create one (at: https:// | ||
Ligne 106: | Ligne 210: | ||
When you register a new account, Launchpad will send you an email with a link you need to open in your browser in order to verify your email address. If you don’t receive it, check in your spam folder. | When you register a new account, Launchpad will send you an email with a link you need to open in your browser in order to verify your email address. If you don’t receive it, check in your spam folder. | ||
- | The new account help page (https:// | + | The new account help page (https:// |
- | Upload your GPG key to Launchpad | + | Obtenir votre compte Launchpad |
+ | |||
+ | Si vous n'avez pas encore de compte Launchpad, vous pouvez en créer un facilement (à : https:// | ||
+ | |||
+ | Le procédé d' | ||
+ | |||
+ | Lorsque vous créez un nouveau compte, Launchpad vous enverra un mail contenant un lien qu'il faudra ouvrir dans votre navigateur pour vérifier votre adresse mail. Si vous ne le recevez pas, vérifiez dans votre dossier de pourriels. | ||
+ | |||
+ | La page aide pour les nouveaux comptes sur Launchpad (https:// | ||
+ | |||
+ | **Upload your GPG key to Launchpad | ||
To find out about your GPG fingerprint, | To find out about your GPG fingerprint, | ||
Ligne 129: | Ligne 243: | ||
Back on the Launchpad website, use the Confirm button and Launchpad will complete the import of your OpenPGP key. | Back on the Launchpad website, use the Confirm button and Launchpad will complete the import of your OpenPGP key. | ||
- | Find more information at https:// | + | Find more information at https:// |
- | Upload your SSH key to Launchpad | + | Télécharger votre clé GPG vers Launchpad |
+ | |||
+ | Pour découvrir votre « fingerprint » (empreinte digitale) GPG, exécutez : | ||
+ | |||
+ | gpg --fingerprint < | ||
+ | |||
+ | et vous verrez quelque chose comme : | ||
+ | |||
+ | pub | ||
+ | Key fingerprint = 5C28 0144 FB08 91C0 2CF3 37AC 6F0B F90F 43CD E61D | ||
+ | uid Daniel Holbach < | ||
+ | sub | ||
+ | |||
+ | Allez alors à https:// | ||
+ | |||
+ | Launchpad utilisera la « fingerprint » pour voir si votre clé se trouve sur le serveur de clés Ubuntu et, si c'est le cas, vous enverra un mail crypté vous demandant de confirmer l' | ||
+ | |||
+ | Launchpad crypte le mail en utilisant votre clé publique, afin de s' | ||
+ | |||
+ | De retour sur le site Web de Launchpad, utilisez le bouton « Confirm » et Launchpad terminera l' | ||
+ | |||
+ | Vous trouverez plus de renseignements à https:// | ||
+ | |||
+ | **Upload your SSH key to Launchpad | ||
Open https:// | Open https:// | ||
- | For more information on this process, visit the creating an SSH keypair page (https:// | + | For more information on this process, visit the creating an SSH keypair page (https:// |
+ | |||
+ | Télécharger votre clé SSH vers Launchpad | ||
+ | |||
+ | Ouvrez https:// | ||
+ | |||
+ | Pour plus de renseignements sur ce processus, visitez la page « Creating an SSH KeyPair » sur Launchpad (https:// | ||
- | Configure Bazaar | + | **Configure Bazaar |
Bazaar is the tool we use to store code changes in a logical way, to exchange proposed changes and merge them, even if development is done concurrently. To tell Bazaar who you are, simply run: | Bazaar is the tool we use to store code changes in a logical way, to exchange proposed changes and merge them, even if development is done concurrently. To tell Bazaar who you are, simply run: | ||
Ligne 147: | Ligne 290: | ||
whoami will tell Bazaar which name and email address it should use for your commit messages. With launchpad-login you set your Launchpad ID. This way, code that you publish in Launchpad will be associated with you. | whoami will tell Bazaar which name and email address it should use for your commit messages. With launchpad-login you set your Launchpad ID. This way, code that you publish in Launchpad will be associated with you. | ||
- | Note: If you can not remember the ID, go to https:// | + | Note: If you can not remember the ID, go to https:// |
- | Configure your shell | + | Configurer Bazaar |
+ | |||
+ | Bazaar est l' | ||
+ | |||
+ | bzr whoami "Bob Dobbs < | ||
+ | |||
+ | bzr launchpad-login subgenius | ||
+ | |||
+ | whoami dira à Bazaar à quels nom et adresse mail il devra envoyer vos messages « commit ». Avec launchpad-login, | ||
+ | |||
+ | N.B. Si vous n' | ||
+ | |||
+ | **Configure your shell | ||
Similar to Bazaar, the Debian/ | Similar to Bazaar, the Debian/ | ||
Ligne 163: | Ligne 318: | ||
(If you use a shell different from the default (which is bash), please edit the configuration file for that shell accordingly.) | (If you use a shell different from the default (which is bash), please edit the configuration file for that shell accordingly.) | ||
- | NEXT MONTH: Fixing a bug | + | NEXT MONTH: Fixing a bug** |
+ | |||
+ | Configurer votre « shell » (interpréteur de commandes) | ||
+ | |||
+ | Tout comme Bazaar, les outils de création de paquets Debian/ | ||
+ | |||
+ | export DEBFULLNAME=" | ||
+ | |||
+ | export DEBEMAIL=" | ||
+ | |||
+ | Maintenant sauvegardez le fichier et, soit redémarrez votre terminal, soit exécutez : | ||
+ | |||
+ | source ~/.bashrc | ||
+ | |||
+ | (Si votre interpréteur de commandes est différent de celui par défaut (autrement dit, bash) veuillez éditer le fichier de configuration pour le vôtre en conséquence.) | ||
+ | |||
+ | LE MOIS PROCHAIN : La réparation de bogues |
issue50/tutoubuntudev.1309122039.txt.gz · Dernière modification : 2011/06/26 23:00 de fredphil91