[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
wiki:user:kikinovak [2013/03/09 06:16 (UTC)] – kikinovak | wiki:user:kikinovak [2014/02/09 16:39 (UTC)] – kikinovak | ||
---|---|---|---|
Line 47: | Line 47: | ||
Stuff I'm currently working on, and which will eventually end up as a page in the Slackware Documentation Project. | Stuff I'm currently working on, and which will eventually end up as a page in the Slackware Documentation Project. | ||
- | ===== Software Management ===== | ||
- | ==== Anatomy of a Slackware package ==== | ||
- | A Slackware package is a simple TGZ or TXZ compressed archive containing: | ||
- | * the structure of files and directories ; | ||
- | * post-installation scripts ; | ||
- | * the package description. | ||
- | The name of every package provides a series of informations: | ||
- | * the program name ; | ||
- | * the program version ; | ||
- | * the architecture of the package ; | ||
- | * the build number. | ||
- | |||
- | Here's a few examples: | ||
- | |||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | |||
- | ==== Manage Slackware package using the traditional tools ==== | ||
- | |||
- | Since its early releases, Slackware provides a collection of simple tools - the '' | ||
- | |||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | |||
- | === Installing software packages === | ||
- | |||
- | Install the Emacs editor from the Slackware DVD ((if it's not already installed)): | ||
- | |||
- | < | ||
- | # mount /dev/cdrom /mnt/cdrom | ||
- | # cd / | ||
- | # installpkg emacs-24.2-i486-1.txz | ||
- | Verifying package emacs-24.2-i486-1.txz. | ||
- | Installing package emacs-24.2-i486-1.txz [ADD]: | ||
- | PACKAGE DESCRIPTION: | ||
- | # emacs (GNU Emacs) | ||
- | # | ||
- | # Emacs is the extensible, customizable, | ||
- | # display editor. If this seems to be a bit of a mouthful, an | ||
- | # easier explanation is that Emacs is a text editor and more. At | ||
- | # its core is an interpreter for Emacs Lisp, a dialect of the Lisp | ||
- | # programming language with extensions to support text editing. | ||
- | # This version supports X. | ||
- | # | ||
- | # http:// | ||
- | # | ||
- | Executing install script for emacs-24.2-i486-1.txz. | ||
- | Package emacs-24.2-i486-1.txz installed. | ||
- | </ | ||
- | |||
- | <note tip>If you're using the CD set, Emacs is on the first CD.</ | ||
- | |||
- | === Checking if a package is installed === | ||
- | |||
- | The package install has created an entry in ''/ | ||
- | |||
- | < | ||
- | # ls / | ||
- | / | ||
- | </ | ||
- | |||
- | Knowing if a package is installed boils down to checking if the corresponding entry in ''/ | ||
- | |||
- | < | ||
- | # ls / | ||
- | / | ||
- | </ | ||
- | |||
- | Firefox is installed on the system, in version 15.0.1. Another example : | ||
- | |||
- | < | ||
- | # ls / | ||
- | /bin/ls: impossible d' | ||
- | dossier de ce type | ||
- | </ | ||
- | |||
- | There is no package '' | ||
- | |||
- | === Removing a package === | ||
- | |||
- | Une '' | ||
- | |||
- | < | ||
- | # removepkg emacs | ||
- | </ | ||
- | |||
- | It's also possible to provide the complete name as an argument. In that case, it's better to call the command from within ''/ | ||
- | |||
- | < | ||
- | # cd / | ||
- | # removepkg emacs-24.2-i486-1 | ||
- | </ | ||
- | |||
- | === Upgrading a package === | ||
- | |||
- | Slackware fournit des mises à jour de sécurité des paquets pour chaque version. Pour se renseigner sur les dernières actualités autour des mises à jour, visiter le site officiel : | ||
- | |||
- | < | ||
- | # links http:// | ||
- | </ | ||
- | |||
- | - Suivre le lien '' | ||
- | - Repérer '' | ||
- | - Lire le fichier '' | ||
- | |||
- | On pourra également utiliser le navigateur Links pour récupérer les mises à jour manuellement. Avant de lancer Links, créer un répertoire ''/ | ||
- | |||
- | < | ||
- | # cd | ||
- | # mkdir updates | ||
- | # cd updates/ | ||
- | # links mirrors.slackware.com | ||
- | </ | ||
- | |||
- | - Suivre le lien '' | ||
- | - Repérer le répertoire correspondant à la version et à l' | ||
- | - Aller dans le répertoire '' | ||
- | - Télécharger les mises à jour disponibles. | ||
- | | ||
- | Quitter Links et installer les mises à jour comme ceci : | ||
- | |||
- | < | ||
- | # upgradepkg bind-9.9.1_P4-i486-1_slack14.0.txz | ||
- | |||
- | +============================================================================== | ||
- | | Upgrading bind-9.9.1_P3-i486-1 package using ./ | ||
- | +============================================================================== | ||
- | Pre-installing package bind-9.9.1_P4-i486-1_slack14.0... | ||
- | Removing package / | ||
- | --> Deleting / | ||
- | --> Deleting / | ||
- | --> Deleting / | ||
- | ... | ||
- | Verifying package bind-9.9.1_P4-i486-1_slack14.0.txz. | ||
- | Installing package bind-9.9.1_P4-i486-1_slack14.0.txz: | ||
- | PACKAGE DESCRIPTION: | ||
- | bind (DNS server and utilities) | ||
- | # | ||
- | # The named daemon and support utilities such as dig, host, and | ||
- | # nslookup. | ||
- | # nameserver are included. | ||
- | # setup can be found in / | ||
- | # | ||
- | Executing install script for bind-9.9.1_P4-i486-1_slack14.0.txz. | ||
- | Package bind-9.9.1_P4-i486-1_slack14.0.txz installed. | ||
- | | ||
- | Package bind-9.9.1_P3-i486-1 upgraded with new package | ||
- | ./ | ||
- | </ | ||
- | |||
- | Autre exemple : | ||
- | |||
- | < | ||
- | # upgradepkg iptables-1.4.14-i486-2_slack14.0.txz | ||
- | </ | ||
- | |||
- | === En savoir plus sur le contenu d'un paquet === | ||
- | |||
- | À chaque paquet installé correspond une entrée dans ''/ | ||
- | |||
- | < | ||
- | # less / | ||
- | PACKAGE NAME: | ||
- | COMPRESSED PACKAGE SIZE: | ||
- | UNCOMPRESSED PACKAGE SIZE: 2.0M | ||
- | PACKAGE LOCATION: / | ||
- | PACKAGE DESCRIPTION: | ||
- | wget: wget (a non-interactive network retriever) | ||
- | wget: | ||
- | wget: GNU Wget is a free network utility to retrieve files from the | ||
- | wget: World Wide Web using HTTP and FTP, the two most widely used Internet | ||
- | wget: protocols. | ||
- | wget: background after having logged off. | ||
- | wget: | ||
- | wget: The author of Wget is Hrvoje Niksic < | ||
- | wget: | ||
- | wget: | ||
- | wget: | ||
- | FILE LIST: | ||
- | ./ | ||
- | install/ | ||
- | install/ | ||
- | install/ | ||
- | usr/ | ||
- | usr/bin/ | ||
- | usr/ | ||
- | usr/man/ | ||
- | usr/ | ||
- | usr/ | ||
- | usr/info/ | ||
- | usr/ | ||
- | ... | ||
- | </ | ||
- | |||
- | ==== Gérer les paquets Slackware avec slackpkg ==== | ||
- | |||
- | L' | ||
- | |||
- | Deux mises en garde s' | ||
- | |||
- | - Seuls les paquets officiels sont gérés par '' | ||
- | - La gestion des dépendances reste toujours à la charge de l' | ||
- | |||
- | |||
- | === Configuration initiale === | ||
- | |||
- | Éditer ''/ | ||
- | |||
- | < | ||
- | # / | ||
- | ... | ||
- | # FRANCE (FR) | ||
- | ftp:// | ||
- | # http:// | ||
- | </ | ||
- | |||
- | <note warning> | ||
- | |||
- | Si l'on préfère gérer les paquets localement et faire fi des mises à jour, on peut également utiliser le DVD d' | ||
- | |||
- | < | ||
- | # / | ||
- | ... | ||
- | # | ||
- | # Local CD/DVD drive | ||
- | # | ||
- | cdrom:// | ||
- | ... | ||
- | </ | ||
- | |||
- | Ne pas oublier de monter le DVD avant chaque invocation de '' | ||
- | |||
- | < | ||
- | # mount /dev/cdrom /mnt/cdrom | ||
- | </ | ||
- | |||
- | Mettre à jour les informations sur les paquets disponibles : | ||
- | |||
- | < | ||
- | # slackpkg update | ||
- | </ | ||
- | |||
- | < | ||
- | |||
- | <note tip> | ||
- | |||
- | |||
- | === Installer des paquets === | ||
- | |||
- | Exemple avec un seul paquet : | ||
- | |||
- | < | ||
- | # slackpkg install mplayerplug-in | ||
- | </ | ||
- | |||
- | Il suffit de confirmer l' | ||
- | |||
- | On peut également fournir plusieurs paquets en argument : | ||
- | |||
- | < | ||
- | # slackpkg install mplayerplug-in bittorrent | ||
- | </ | ||
- | |||
- | Les groupes de paquets sont également gérés : | ||
- | |||
- | < | ||
- | # slackpkg install kde | ||
- | </ | ||
- | |||
- | Ou encore : | ||
- | |||
- | < | ||
- | # slackpkg install xfce | ||
- | </ | ||
- | |||
- | === Supprimer des paquets === | ||
- | |||
- | Exemple avec un seul paquet : | ||
- | |||
- | < | ||
- | # slackpkg remove mplayerplug-in | ||
- | </ | ||
- | |||
- | Là aussi, il suffit de confirmer la suppression dans l' | ||
- | |||
- | Supprimer plusieurs paquets à la fois : | ||
- | |||
- | < | ||
- | # slackpkg remove mplayerplug-in bittorrent | ||
- | </ | ||
- | |||
- | Les groupes de paquets sont également gérés pour la suppression : | ||
- | |||
- | < | ||
- | # slackpkg remove kde | ||
- | </ | ||
- | |||
- | Ou encore : | ||
- | |||
- | < | ||
- | # slackpkg remove xfce | ||
- | </ | ||
- | |||
- | === Mettre à jour des paquets === | ||
- | |||
- | Lorsqu' | ||
- | ceci : | ||
- | |||
- | < | ||
- | # slackpkg upgrade iptables | ||
- | </ | ||
- | |||
- | De même pour plusieurs paquets : | ||
- | |||
- | < | ||
- | # slackpkg upgrade mozilla-firefox mozilla-thunderbird | ||
- | </ | ||
- | |||
- | Dans la pratique quotidienne, | ||
- | |||
- | < | ||
- | # slackpkg upgrade-all | ||
- | </ | ||
- | |||
- | === Rechercher des paquets ou des fichiers individuels === | ||
- | |||
- | Rechercher un paquet spécifique : | ||
- | |||
- | < | ||
- | # slackpkg search k3b | ||
- | Looking for k3b in package list. Please wait... DONE | ||
- | The list below shows all packages with name matching " | ||
- | [uninstalled] - k3b-2.0.2_20120226.git-i486-1 | ||
- | </ | ||
- | |||
- | Si le paquet est déjà installé, on obtiendra le résultat suivant : | ||
- | |||
- | < | ||
- | # slackpkg search Terminal | ||
- | Looking for Terminal in package list. Please wait... DONE | ||
- | The list below shows all packages with name matching " | ||
- | [ installed ] - Terminal-0.4.8-i486-1 | ||
- | </ | ||
- | |||
- | On peut également chercher des fichiers individuels, | ||
- | |||
- | < | ||
- | # slackpkg file-search libncurses.so | ||
- | Looking for libncurses.so in package list. Please wait... DONE | ||
- | The list below shows the packages that contains " | ||
- | [ installed ] - aaa_elflibs-14.0-i486-4 | ||
- | [ installed ] - ncurses-5.9-i486-1 | ||
- | </ | ||
- | |||
- | Si l'on veut en savoir plus sur le contenu d'un paquet : | ||
- | |||
- | < | ||
- | # slackpkg info mesa | ||
- | |||
- | PACKAGE NAME: mesa-8.0.4-i486-1.txz | ||
- | PACKAGE LOCATION: | ||
- | PACKAGE SIZE (compressed): | ||
- | PACKAGE SIZE (uncompressed): | ||
- | PACKAGE DESCRIPTION: | ||
- | mesa: mesa (a 3-D graphics library) | ||
- | mesa: | ||
- | mesa: Mesa is a 3-D graphics library with an API very similar to that of | ||
- | mesa: another well-known 3-D graphics library. | ||
- | mesa: used by X to provide both software and hardware accelerated graphics. | ||
- | mesa: | ||
- | mesa: Mesa was written by Brian Paul. | ||
- | mesa: | ||
- | </ | ||
- | |||
- | === Faire le ménage === | ||
- | |||
- | Supprimer tous les paquets tiers qui ne font pas partie de la distribution officielle : | ||
- | |||
- | < | ||
- | # slackpkg clean-system | ||
- | </ | ||
- | |||
- | Dans l' | ||
- | |||
- | On peut également se servir de '' | ||
- | |||
- | < | ||
- | # slackpkg file-search glxgears | ||
- | Looking for glxgears in package list. Please wait... DONE | ||
- | The list below shows the packages that contains " | ||
- | [ installed ] - mesa-8.0.4-i486-1 | ||
- | </ | ||
- | |||
- | À partir de là, il me suffit de réinstaller le paquet en question : | ||
- | |||
- | < | ||
- | # slackpkg reinstall mesa | ||
- | </ | ||
- | |||
- | ==== Recompiler des paquets officiels ==== | ||
- | |||
- | Slackware fournit le code source de l' | ||
- | |||
- | * le code source de l' | ||
- | * sa recette de fabrication sous forme de fichier '' | ||
- | * le descriptif du paquet, nommé '' | ||
- | * parfois, un fichier post-installation nommé '' | ||
- | * d' | ||
- | |||
- | === Fabriquer un paquet à partir du code source === | ||
- | |||
- | Dans l' | ||
- | |||
- | < | ||
- | # removepkg Terminal | ||
- | </ | ||
- | |||
- | Choisir un endroit pour ranger le code source et les scripts, par exemple : | ||
- | |||
- | < | ||
- | # cd | ||
- | # mkdir -pv source/ | ||
- | mkdir: création du répertoire « source » | ||
- | mkdir: création du répertoire « source/ | ||
- | # cd source/ | ||
- | # links mirrors.slackware.com | ||
- | </ | ||
- | |||
- | Récupérer le contenu de '' | ||
- | |||
- | < | ||
- | # ls -lh | ||
- | total 1,4M | ||
- | -rw-r--r-- 1 root root 821 nov. 24 15:09 slack-desc | ||
- | -rw-r--r-- 1 root root 1,4M nov. 24 15:11 Terminal-0.4.8.tar.xz | ||
- | -rw-r--r-- 1 root root 3,6K nov. 24 15:10 Terminal.SlackBuild | ||
- | </ | ||
- | |||
- | Rendre le fichier '' | ||
- | |||
- | < | ||
- | # chmod +x Terminal.SlackBuild | ||
- | # ./ | ||
- | </ | ||
- | |||
- | Le script lance alors la construction du paquet. L' | ||
- | |||
- | < | ||
- | Slackware package / | ||
- | </ | ||
- | |||
- | Il ne reste plus qu'à installer ce paquet : | ||
- | |||
- | < | ||
- | # installpkg / | ||
- | </ | ||
=== Modifier un paquet officiel === | === Modifier un paquet officiel === | ||
Line 878: | Line 418: | ||
* ibid., Installing Programs from Source Code, 55-57 | * ibid., Installing Programs from Source Code, 55-57 | ||
- | *********************************************************** | + | ----- |
===== Gestion des paquets logiciels ===== | ===== Gestion des paquets logiciels ===== |