issue51:labo_linux_pp._24-26
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue51:labo_linux_pp._24-26 [2011/08/01 11:14] – créée auntiee | issue51:labo_linux_pp._24-26 [2011/08/24 14:16] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | All software installed by default on a Debian-based system (like Ubuntu and Kubuntu) is organized in packages. The packages themselves are stored in a repository. The installation CD contains such a repository, but, in most cases, one accesses a repository via a server, the so-called mirror. Such a mirror gives access to a copy of the original repository created by the owner of the distribution. Any new version of a package is added to the distribution repository and afterwards copied to all mirrors. | + | **All software installed by default on a Debian-based system (like Ubuntu and Kubuntu) is organized in packages. The packages themselves are stored in a repository. The installation CD contains such a repository, but, in most cases, one accesses a repository via a server, the so-called mirror. Such a mirror gives access to a copy of the original repository created by the owner of the distribution. Any new version of a package is added to the distribution repository and afterwards copied to all mirrors. |
One system (for example your PC) can obtain packages from one to many repositories. The list of repositories used by a system can be found in the files / | One system (for example your PC) can obtain packages from one to many repositories. The list of repositories used by a system can be found in the files / | ||
Ligne 5: | Ligne 5: | ||
The contents of all repositories is reread when we execute the command “apt-get update,” or when we press the Reload button in Synaptic. This allows the tools to verify which packets have new versions and offer them for upgrade. | The contents of all repositories is reread when we execute the command “apt-get update,” or when we press the Reload button in Synaptic. This allows the tools to verify which packets have new versions and offer them for upgrade. | ||
- | It is also possible to create your own repository for private use. | + | It is also possible to create your own repository for private use.** |
- | Why would you create a private repository? | + | Tous les logiciels installés par défaut sur un système basé sur Debian (comme Ubuntu et Kubuntu) sont organisés en paquets. Les paquets eux-mêmes sont stockés dans un dépôt. Le CD d' |
+ | |||
+ | Un système (par exemple votre PC) peut obtenir des paquets depuis un ou plusieurs dépôts. La liste des dépôts utilisés par un système peut être trouvée dans les fichiers / | ||
+ | |||
+ | Le contenu de tous les dépôts est relu lorsque nous exécutons la commande « apt-get update » ou quand nous appuyons sur le bouton Recharger dans Synaptic. Cela permet aux outils de vérifier quels paquets ont de nouvelles versions et de proposer leur mise à niveau. | ||
+ | |||
+ | Il est également possible de créer votre propre dépôt pour un usage privé. | ||
+ | |||
+ | **Why would you create a private repository? | ||
Well, I have a number of packages that are not available from the standard repositories. I downloaded packages from vendor sites containing drivers for my all-in-one scanner and my graphical card, I have some packages that are required by these driver packages and that are no longer supported by the newer Ubuntu versions and, finally, I created some packages myself. | Well, I have a number of packages that are not available from the standard repositories. I downloaded packages from vendor sites containing drivers for my all-in-one scanner and my graphical card, I have some packages that are required by these driver packages and that are no longer supported by the newer Ubuntu versions and, finally, I created some packages myself. | ||
- | I put any new version of such a package in my private repository. When my children come home on the weekend from university, and they push on the Reload button in Synaptic, the new package versions are nicely installed on their laptops. That is easy for me as I'm sure that any new package version will find its way to each PC without any further intervention from my side. | + | I put any new version of such a package in my private repository. When my children come home on the weekend from university, and they push on the Reload button in Synaptic, the new package versions are nicely installed on their laptops. That is easy for me as I'm sure that any new package version will find its way to each PC without any further intervention from my side.** |
+ | |||
+ | Pourquoi voudriez-vous créer un référentiel privé ? | ||
+ | |||
+ | Eh bien, j'ai un certain nombre de paquets qui ne sont pas disponibles depuis les dépôts standard. J'ai téléchargé des paquets à partir des sites de constructeurs qui contiennent les pilotes pour mon scanner tout-en-un et ma carte graphique, j'ai quelques paquets qui sont requis par ces pilotes et qui ne sont plus pris en charge par les versions récentes d' | ||
+ | |||
+ | Je place toute nouvelle version d'un tel paquet dans mon dépôt privé. Quand mes enfants rentrent de l' | ||
- | Procedure | + | **Procedure |
The creation of a repository takes five steps: | The creation of a repository takes five steps: | ||
Ligne 22: | Ligne 36: | ||
• make your repository known to the package tools on your system. Repeat this step for each system you manage. | • make your repository known to the package tools on your system. Repeat this step for each system you manage. | ||
- | In case you have multiple systems, you must decide if you want to distribute your repository to the other systems via a web-server (http) or using a directory shared via NFS or Samba. | + | In case you have multiple systems, you must decide if you want to distribute your repository to the other systems via a web-server (http) or using a directory shared via NFS or Samba.** |
- | Step 1 | + | Procédure |
+ | |||
+ | La création d'un dépôt se fait en cinq étapes : | ||
+ | |||
+ | • Installer les paquets avec les outils nécessaires ; | ||
+ | |||
+ | • créer une signature numérique ; | ||
+ | |||
+ | • créer le répertoire de dépôt et les fichiers de configuration liés ; | ||
+ | |||
+ | • ajouter des paquets dans le dépôt et construire le dépôt. Répétez cette étape à chaque fois que vous avez ajouté un nouveau paquet ou une nouvelle version d'un paquet. | ||
+ | |||
+ | • rendre votre dépôt visible dans les outils de gestion de paquets sur votre système. Répétez cette étape pour chaque système que vous gérez. | ||
+ | |||
+ | Dans le cas où vous disposez de plusieurs systèmes, vous devez décider si vous voulez distribuer votre dépôt aux autres systèmes via un serveur web (http) ou en utilisant un répertoire partagé via NFS ou Samba. | ||
+ | |||
+ | **Step 1 | ||
Install the packages apt-utils, gzip, make and gnupg. You need additionally a web-server like apache2 in case you want to make your repository accessible via the web. | Install the packages apt-utils, gzip, make and gnupg. You need additionally a web-server like apache2 in case you want to make your repository accessible via the web. | ||
Ligne 34: | Ligne 64: | ||
gpg --gen-key | gpg --gen-key | ||
- | This tool will ask a lot of questions. The most important ones are your name, your e-mail address, and a pass-phrase. A reasonable default is proposed for the other, more difficult questions. | + | This tool will ask a lot of questions. The most important ones are your name, your e-mail address, and a pass-phrase. A reasonable default is proposed for the other, more difficult questions.** |
+ | |||
+ | Étape 1 | ||
+ | |||
+ | Installez les paquets apt-utils, gzip, make et gnupg. Vous avez également besoin d'un serveur web comme apache2 dans le cas où vous voulez rendre votre dépôt accessible via le web. | ||
+ | |||
+ | Étape 2 | ||
+ | |||
+ | Si vous n'avez pas encore de signature numérique, créez-en une maintenant avec la commande : | ||
+ | |||
+ | gpg --gen-key | ||
+ | |||
+ | Cet outil va poser beaucoup de questions. Les plus importantes sont votre nom, votre adresse de courriel et une phrase de passe. Les autres questions, plus difficiles, ont une réponse par défaut qui convient. | ||
- | Step 3 | + | **Step 3 |
Make now a directory to store the packages. This directory must finally be accessible by all your systems. | Make now a directory to store the packages. This directory must finally be accessible by all your systems. | ||
Ligne 51: | Ligne 93: | ||
The steer-file apt-ftparchive.conf can be created with a text editor (e.g. kate), and should have the following contents (above right, but replace “John Doe” with your own name). | The steer-file apt-ftparchive.conf can be created with a text editor (e.g. kate), and should have the following contents (above right, but replace “John Doe” with your own name). | ||
- | Create also a makefile (below right), Makefile. Notice that all lines, except the first one, must start with a tab (not spaces !). | + | Create also a makefile (below right), Makefile. Notice that all lines, except the first one, must start with a tab (not spaces !).** |
- | Step 4 | + | Étape 3 |
+ | |||
+ | Créez maintenant un répertoire pour stocker les paquets. Ce répertoire doit au final être accessible par tous vos systèmes. | ||
+ | |||
+ | / | ||
+ | /mnt/depot pourrait être utilisé si vous avez décidé d' | ||
+ | |||
+ | Vous aurez besoin des fichiers de configuration suivants dans ce répertoire : une clé publique, le fichier d' | ||
+ | |||
+ | Vous pouvez créer la clé publique avec : | ||
+ | |||
+ | gpg --export -a > depot.gpp | ||
+ | |||
+ | Le fichier d' | ||
+ | |||
+ | Créez également un fichier makefile (en bas à droite), Makefile. Notez que toutes les lignes, sauf la première, doivent commencer par une tabulation (et non par des espaces !). | ||
+ | |||
+ | **Step 4 | ||
Put your binary and/or source packages in this directory. | Put your binary and/or source packages in this directory. | ||
Ligne 63: | Ligne 122: | ||
When you are ready, go to your repository directory and type “make” on the command line: your repository will be built. You will be prompted for the pass-phrase linked to your digital signature at the end of the execution. | When you are ready, go to your repository directory and type “make” on the command line: your repository will be built. You will be prompted for the pass-phrase linked to your digital signature at the end of the execution. | ||
- | Execute “make” again, each time you add a new package or package version. This will update the repository. | + | Execute “make” again, each time you add a new package or package version. This will update the repository.** |
- | Step 5 | + | Étape 4 |
- | The last step is to make your repository known to the package tools on your PC. | + | Mettez vos binaires et/ou sources des paquets dans ce répertoire. |
- | Make first your public key known to apt, so that it can verify the signature of the repository files: | + | Je vais utiliser comme exemple un paquet que j'ai créé moi-même. Il relie aux commandes adéquates les touches multimédia sur mon clavier Cherry. Le paquet binaire est appelé cherry-keyboard_1.1_all.deb. Les paquets source connexes sont cherry-keyboard_1.1.dsc, cherry-keyboard_1.1_i386.changes et cherry-keyboard_1.1.tar.gz. |
- | sudo cp repository.gpg / | + | Vous pouvez placer les paquets dans des sous-répertoires si vous voulez : l' |
+ | Lorsque vous êtes prêt, allez dans votre répertoire de dépôt et saisissez « make » sur la ligne de commande : votre dépôt sera construit. On vous demandera la phrase de passe liée à votre signature numérique à la fin de l' | ||
- | sudo apt-key add / | + | Exécutez « make » à nouveau à chaque fois que vous ajoutez un nouveau paquet ou une nouvelle version d'un paquet. Ceci mettra à jour le dépôt. |
- | Finally, configure the location of your repository by creating a file / | + | **Step 5 |
- | The contents depends on the distribution method you have chosen: | + | The last step is to make your repository |
- | when you have exported | + | |
- | deb file:/mnt/repository/. ./ | + | Make first your public key known to apt, so that it can verify the signature of the repository |
+ | sudo cp repository.gpg / | ||
- | deb-src | ||
- | when you made your repository | + | sudo apt-key add / |
- | deb http://192.168.0.5/repository/. ./ | + | Finally, configure the location of your repository by creating a file /etc/apt/sources.list.d/ |
+ | Étape 5 | ||
- | deb-src | + | La dernière étape consiste à rendre votre dépôt visible dans les outils de gestion de paquets sur votre PC. |
- | We are ready now. Verify that everything is working fine by executing the following commands: | + | Faites d' |
- | sudo apt-get update | + | sudo cp depot.gpg / |
+ | | ||
- | apt-cache show cherry-keyboard | + | Enfin, configurez l' |
- | You should now get something like: | + | **The contents depends on the distribution method you have chosen: |
+ | when you have exported your directory via NFS or Samba as / | ||
- | cherry-keyboard - Enables multimedia keys on Cherry keyboard | + | deb file:/ |
+ | deb-src | ||
+ | when you made your repository available via web-server 192.168.0.5: | ||
+ | deb http:// | ||
+ | deb-src | ||
+ | Le contenu dépend de la méthode de distribution que vous avez choisie : | ||
+ | lorsque vous avez exporté votre répertoire via NFS ou Samba en tant que /mnt/depot : | ||
+ | deb file:/ | ||
+ | deb-src | ||
+ | lorsque vous avez rendu votre dépôt disponible via le serveur web 192.168.0.5 : | ||
+ | deb http:// | ||
+ | deb-src | ||
+ | **We are ready now. Verify that everything is working fine by executing the following commands: | ||
+ | sudo apt-get update | ||
+ | apt-cache show cherry-keyboard | ||
+ | You should now get something like: | ||
+ | cherry-keyboard - Enables multimedia keys on Cherry keyboard | ||
+ | References: | ||
+ | “The Debian System - Concepts and Techniques” by Martin F. Krafft, 2005, Open Source Press GmbH, Germany, ISBN 3-937514-07-4** | ||
+ | Nous sommes prêts maintenant. Vérifiez que tout fonctionne correctement en exécutant les commandes suivantes : | ||
+ | sudo apt-get update | ||
+ | apt-cache show cherry-keyboard | ||
+ | Vous devriez maintenant obtenir quelque chose comme : | ||
+ | cherry-keyboard - Enables multimedia keys on Cherry keyboard | ||
+ | Références: | ||
+ | « Le système Debian - Concepts et Techniques » par Martin F. Krafft, 2005, Open Source Presse GmbH, Allemagne, ISBN 3-937514-07-4 | ||
- | References: | ||
- | “The Debian System - Concepts and Techniques” by Martin F. Krafft, 2005, Open Source Press GmbH, Germany, ISBN 3-937514-07-4 |
issue51/labo_linux_pp._24-26.1312190051.txt.gz · Dernière modification : 2011/08/01 11:14 de auntiee