[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

Ceci est une ancienne révision du document !


Faire puis installer des paquets avec sbopkg

Sbopkg est un outil en ligne de commande, avec des dialogues, qui synchronise un ensemble de scripts SlackBuild non-officiels, du dépôt SlackBuilds.org (“SBo”) pour créer des paquets Slackware. Le programme a une interface 'ncurses' qui vous permet de trouver et d'assembler les logiciels que vous voulez compiler et empaqueter à partir de leur source. Vous pouvez aussi l'utiliser de manière non-interactive si vous savez à l'avance quel est votre but - auquel cas il fonctionne en mode “lancez et n'y pensez plus”.

Les informations qui suivent vous aideront à installer sbopkg et à l'utiliser dans Slackware.

Notez que sbopkg crée des paquets Slackware. Comme pour tout programme de gestion de paquets Slackware, il vous faut être root pour utiliser le programme! Pour cela, appelez
$ su -

pour obtenir l'invite de commande du super-utilisateur dans son environnement.

Télécharger sbopkg:

Téléchargez sbopkg depuis: http://www.sbopkg.org/downloads.php
Vous pouvez utiliser les sources et construire un paquet vous-même, ou prendre seulement le paquet Slackware déjà préparé. La suite de cet article considère que vous avez téléchargé le paquet tout-prêt.

Installer sbopkg

  1. Si, par exemple, le nom de fichier du paquet sbopkg que vous avez téléchargé dans votre répertoire courant est sbopkg-0.36.0-noarch-1_cng.tgz, la commande installpkg qui permettra d'installer sbopkg (ou bien, le mettre à jour s'il était déjà présent dans votre système) est celle-ci:
    $ su -
    # cd /chemin/vers/mes_telechargements/
    # upgradepkg --install-new sbopkg-0.36.0-noarch-1_cng.tgz

Configurer sbopkg

  1. Lisez la documentation de sbopkg ! Voyez http://www.sbopkg.org/docs.php , sans oublier qu'il existe une page de man pour sbopkg.
  2. Au premier lancement de sbopkg, il vous sera demandé si vous êtes d'accord pour que le programme crée les fichiers de configuration nécessaires:
    # sbopkg
    
    The following directories do not exist:
    
    Variable                   Assignment
    --------                   ----------
    REPO_{ROOT,NAME,BRANCH} -> /var/lib/sbopkg/,SBo/,14.0
    LOGFILE directory -------> /var/log/sbopkg
    QUEUEDIR ----------------> /var/lib/sbopkg/queues
    SRCDIR ------------------> /var/cache/sbopkg
    TMP ---------------------> /tmp/SBo
    
    You can have sbopkg create them or, if these values are incorrect, you can
    abort to edit your config files or pass different flags.
    
    (C)reate or (A)bort?:

    . Choisissez C pour créer ces répertoires nécessaires.
    Le programme présentera alors son écran principal:

  3. Il vous faut commencer par synchroniser votre ordinateur avec le dépôt de SlackBuilds.org - i.e. ce qui consiste à faire créer par sbopkg une copie locale de tous les SlackBuilds enregistrés sur le serveur distant, pour la version de Slackware que vous utilisez. Ou bien vous le faites au moyen du premier article de menu 'Sync' dans l'écran principal en affichage semi-graphique 'curses', ou bien vous faites appel à la ligne de commande:
    # sbopkg -r
    Syncing with the remote repository into /var/lib/sbopkg/SBo/14.0.
    receiving incremental file list
    
    <long list of filenames...>
    
    sent 451288 bytes  received 36904793 bytes  371702.30 bytes/sec
    total size is 35271012  speedup is 0.94
    
    Rsync with the SBo repository for Slackware 14.0 complete.
    
    Importing SBo repository for Slackware 14.0 GPG Key...
    Import done.
    
    ***SYNC COMPLETE***
  4. Maintenant vous pouvez choisir les paquets que vous voulez faire construire depuis leurs sources, par sbopkg.

Using Queuefiles with sbopkg

The sbopkg program itself allows a great deal of automation: the interactive curses interface helps you manage the burden of downloading source code archives, and allowing you to select multiple programs and then compile and package all of those in one go.
But you can automate this process even further, by using queuefiles which contain pre-defined build sequences for a series of packages. Queuefiles themselves will be invoked recursively so that you can create a complex build chain with little effort.

Luckily Mauro Giachero (a sbopkg co-developer) already created queuefiles for the entire SlackBuilds.org repository. Check out the git repository http://gitorious.org/sbopkg-slackware-queues. Every program you find in the SBo repository has its own queuefile, containing every dependency which has to be compiled before your target program can be compiled.

The following URL has a listing of individual packages along with a tar.gz file of the complete index for Slackware 14: http://gitorious.org/sbopkg-slackware-queues/sbopkg-slackware-queues/trees/sbo-14.0

You can download an archive containing the full set for the Slackware 14.0 repository at SlackBuilds.org from this URL: http://gitorious.org/sbopkg-slackware-queues/sbopkg-slackware-queues/archive-tarball/sbo-14.0 . The resulting archive file will be named “sbopkg-slackware-queues-sbopkg-slackware-queues-sbo-14.0.tar.gz”.

Extract all of the *.sqf files to the directory which will be checked by sbopkg: “/var/lib/sbopkg/queues/” with the following commands:

# cd /var/lib/sbopkg/queues
# tar xvf /path/to/downloaded/sbopkg-slackware-queues-sbopkg-slackware-queues-sbo-14.0.tar.gz
# cd sbopkg-slackware-queues-sbopkg-slackware-queues
# mv * ../
# cd ..
# rm -r sbopkg-slackware-queues-sbopkg-slackware-queues

Now any queue file (*.sqf) can be selected to install any package (with dependencies) you desire.

Another way to obtain queuefiles is run:

cd /var/lib/sbopkg

And then:

git clone git://gitorious.org/sbopkg-slackware-queues/sbopkg-slackware-queues.git queues
To update queuesfiles in the future:
# cd /var/lib/sbopkg/queues
# git pull

Example of Using sbopkg

As an example, let's install Gramps. The queuefile for Gramps lists the following dependencies, in order of install:

orbit2
pyorbit
libbonobo
gnome-mime-data
gnome-vfs
libgnome
gnome-python
gramps

Load the “gramps.sqf” queue file in sbopkg's curses interface, and Gramps will be successfully built on your Slackware 14 system and installed, along with all its dependencies.

Alternatively you can use the less interactive command-line interface:

# sbopkg -i gramps
Both a queuefile and a package were found with the name "gramps".

Use (Q)ueuefile, (P)ackage, or (A)bort?: q

One or more build option files for the avahi
SlackBuild script were found:

Queuefile options: MONO=yes

Use (N)one, (Q)ueuefile, or (A)bort?: n

###########################################
       New queue process started on:
       Thu Nov 15 23:05:16 CET 2012
###########################################

+++++++++++++++++++++++++++++++++++++++++++
PACKAGE BUILDING/INSTALLATION PRE-CHECK LOG
Using the SBo repository for Slackware 14.0
Queue Process:  Build and install

<long list of package checks...>

Pre-check complete.

Do you wish to proceed based on the search results above? Packages not
found will be skipped during the process.

(P)roceed or (Q)uit?: p

etcetera.

References for sbopkg

Sources

 fr:howtos:slackware_admin:building_packages_with_sbopkg ()
Cette traduction est plus ancienne que la page originale et est peut-être dépassée. Voir ce qui a changé.