Ceci est une ancienne révision du document !
Table des matières
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.
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
- 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 commandeinstallpkg
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
- Lisez la documentation de
sbopkg
! Voyez http://www.sbopkg.org/docs.php , sans oublier qu'il existe une page de man poursbopkg
. - 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?:
. Select C to create these required directories.
The program will then present its main screen:
- Your first task is to synchronize with the SlackBuilds.org repository - i.e. you let
sbopkg
create a local copy of all the SlackBuild entries on the remote server, for the Slackware release which you are running. You either use the first menu item in the curses-based main screen, or else you can do this from the commandline:# 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***
- You are now ready to select the packages you want
sbopkg
to build from source.
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
# 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
- Originally written by ldkraemer
- Contributions by Eric Hameleers
- Translated by P-M Averseng