[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.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
wiki:user:kikinovak [2014/01/29 10:57 (UTC)] – Continued translation of "Software Management" article kikinovakwiki:user:kikinovak [2014/02/09 15:21 (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 tree 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: 
- 
-  * ''emacs-24.2-i486-1'' 
-  * ''mozilla-firefox-15.0.1-i486-1'' 
-  * ''vim-7.3.645-x86_64-1'' 
- 
-==== Managing Slackware packages using the traditional tools ==== 
- 
-Since its early releases, Slackware provides a collection of simple tools - the ''pkgtools'' - enabling the user to install, upgrade and remove software packages, as well as build them: 
- 
-  * ''installpkg'' 
-  * ''removepkg'' 
-  * ''upgradepkg'' 
-  * ''explodepkg'' 
-  * ''makepkg'' 
- 
-=== Installing software packages === 
- 
-Install the Emacs editor from the Slackware DVD ((if it's not already installed)): 
- 
-<code> 
-# mount /dev/cdrom /mnt/cdrom 
-# cd /mnt/cdrom/slackware/e 
-# 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, self-documenting real-time 
-# 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://www.gnu.org/software/emacs/ 
-# 
-Executing install script for emacs-24.2-i486-1.txz. 
-Package emacs-24.2-i486-1.txz installed. 
-</code> 
- 
-<note tip>If you're using the CD set, Emacs is on the first CD.</note> 
- 
-=== Checking if a package is installed === 
- 
-The package installation process has created a new entry in ''/var/log/packages'' : 
- 
-<code> 
-# ls /var/log/packages/em* 
-/var/log/packages/emacs-24.2-i486-1 
-</code> 
- 
-Knowing if a package is installed boils down to checking the existence of the corresponding entry in ''/var/log/packages''. Example : 
- 
-<code> 
-# ls /var/log/packages/*firefox* 
-/var/log/packages/mozilla-firefox-15.0.1-i486-1 
-</code> 
- 
-Firefox is installed on the system, in version 15.0.1. Another example : 
- 
-<code> 
-# ls /var/log/packages/kdebase* 
-ls: cannot access /var/log/packages/kdebase*: No such file or directory 
-</code> 
- 
-There is no  ''kdebase-*'' package installed on the system. 
- 
-=== Removing a package === 
- 
-Use ''removepkg'' to remove an installed package. The command can take the simple basename of the package as an argument. Example: 
- 
-<code> 
-# removepkg emacs 
-</code> 
- 
-It's also possible to provide the complete name as an argument. In that case, it's better to call the command from within ''/var/log/packages'' and use tab completion: 
- 
-<code> 
-# cd /var/log/packages 
-# removepkg emacs-24.2-i486-1 
-</code> 
- 
-=== Upgrading a package === 
- 
-Slackware provides security updates for its latest releases. Visit the official site to know more about the latest updates: 
- 
-<code> 
-# links http://www.slackware.com 
-</code> 
- 
-  - Follow the ''ChangeLogs'' link. 
-  - Check out ''Slackware-stable ChangeLog''. 
-  - Read the file ''ChangeLog.txt'' corresponding to the architecture of your system. 
- 
-You can also use the Links browser to fetch updates manually. Before launching Links, create a ''/root/updates'' directory ((This is just an example, of course. Feel free to use any convenient place on your system.)) to store your downloaded updates: 
- 
-<code> 
-# cd 
-# mkdir updates 
-# cd updates/ 
-# links mirrors.slackware.com 
-</code> 
- 
-  - Follow the ''Slackware File Tree'' link. 
-  - Check out the directory corresponding to your release and architecture. 
-  - Change into the ''patches/packages'' directory. 
-  - Download any available updates. 
-   
-Quit Links and install your updates like this : 
- 
-<code> 
-# upgradepkg bind-9.9.1_P4-i486-1_slack14.0.txz 
- 
-+============================================================================== 
-| Upgrading bind-9.9.1_P3-i486-1 package using ./bind-9.9.1_P4-i486-1_slack14.0.txz 
-+============================================================================== 
-Pre-installing package bind-9.9.1_P4-i486-1_slack14.0... 
-Removing package /var/log/packages/bind-9.9.1_P3-i486-1-upgraded-2012-11-21,12:14:32... 
-  --> Deleting /usr/doc/bind-9.9.1-P3/CHANGES 
-  --> Deleting /usr/doc/bind-9.9.1-P3/COPYRIGHT 
-  --> Deleting /usr/doc/bind-9.9.1-P3/FAQ 
-  ... 
-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.  Sample configuration files for running a simple caching 
-# nameserver are included.  Documentation for advanced name server 
-# setup can be found in /usr/doc/bind-9.x.x/. 
-# 
-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 
-./bind-9.9.1_P4-i486-1_slack14.0.txz. 
-</code> 
- 
-Another example : 
- 
-<code> 
-# upgradepkg iptables-1.4.14-i486-2_slack14.0.txz 
-</code> 
  
 === Know more about the contents of a package === === Know more about the contents of a package ===
Line 452: Line 292:
 </code> </code>
  
-==== Recompiler des paquets officiels ====+==== Rebuild official packages ==== 
 + 
 +Slackware provides the entire system's source code in the ''source'' directory. Every binary system package will have his corresponding source directory. These source directories usually contain:
  
-Slackware fournit le code source de l'ensemble du système dans le répertoire ''source''À chaque paquet du système correspond un répertoire sourceCes répertoires source contiennent généralement :+  * the source code for the application or the library; 
 +  * its fabrication recipe in the shape of a ''*.SlackBuild'' file; 
 +  * the package description in a ''slack-desc'' file; 
 +  * eventually, a post-installation script named ''doinst.sh''; 
 +  * various other files like patches, custom menu entries, etc.
  
-  * le code source de l'application ou de la bibliothèque en question ; +=== Build a package from source ===
-  * sa recette de fabrication sous forme de fichier ''*.SlackBuild''+
-  * le descriptif du paquet, nommé ''slack-desc''+
-  * parfois, un fichier post-installation nommé ''doinst.sh''+
-  * d'autres fichiers comme les patches, les entrées de menu, etc.+
  
-=== Fabriquer un paquet à partir du code source ===+In the example below, we will build the ''Terminal'' application from the source code provided by Slackware. You might want to remove the corresponding package if it is installed.
  
-Dans l'exemple ci-dessous, nous allons compiler l'application ''Terminal'' à partir des sources fournies par Slackware. Au préalableil faut donc désinstaller le paquet correspondant s'il est installé :+<note warning>The ''Terminal'' package is Xfce's terminal. In Slackware 14.1the package has been renamed to ''xfce4-terminal''.</note>
  
 <code> <code>
Line 470: Line 312:
 </code> </code>
  
-Choisir un endroit pour ranger le code source et les scripts, par exemple :+Choose an appropriate place on your system to store the source code and the scripts, for example:
  
 <code> <code>
 # cd # cd
 # mkdir -pv source/Terminal # mkdir -pv source/Terminal
-mkdir: création du répertoire « source » +mkdir: created directory 'source' 
-mkdir: création du répertoire « source/Terminal »+mkdir: created directory 'source/Terminal'
 # cd source/Terminal/ # cd source/Terminal/
 # links mirrors.slackware.com # links mirrors.slackware.com
 </code> </code>
  
-Récupérer le contenu de ''source/xfce/Terminal'' sur un miroir de Slackware. Au total, on a :+Fetch the content from the ''source/xfce/Terminal'' directory on a Slackware mirror. Here's what we get:
  
 <code> <code>
Line 491: Line 333:
 </code> </code>
  
-Rendre le fichier ''Terminal.SlackBuild'' exécutable et lancer la construction du paquet :+Make the ''Terminal.SlackBuild'' file executable and start the building process:
  
 <code> <code>
Line 498: Line 340:
 </code> </code>
  
-Le script lance alors la construction du paquetL'opération se termine par le message suivant :+The script initiates the package compilationIf everything goes as expected, the operation exits with the following message:
  
 <code> <code>
Line 504: Line 346:
 </code> </code>
  
-Il ne reste plus qu'à installer ce paquet :+Now we can install the resulting package:
  
 <code> <code>
 wiki:user:kikinovak ()