Slackware Package Management

Easy Update and Package Management for Slackware 13



Introduction

If you haven't played with Slackware within the past couple of years, you may still believe that the word “easy” doesn't go well with the words “update” and “package management”.  But, two fairly new utilities, “slackpkg” and “sbopkg”, may help to change your mind.


Initial Setup

When you first install Slackware, you'll be given the option of installing all packages that are in the official Slackware repository.  This is recommended practice, since it will eliminate any dependency problems you may encounter if you were to just pick and choose packages.  (Besides, there's not a whole lot in the official repository, so it won't take up much disk space.)

Before you can update your system, you'll need to edit the “/etc/slackpkg/mirrors” file, in order to choose a download mirror.  Find the appropriate section for your version of Slackware, and un-comment the appropriate line for the mirror that you wish to use.  (Note that you can only choose one mirror at a time.  Also note that some mirrors work better than others, so you may have to try a couple to get satisfactory results.)

#----------------------------------------------------------------
# Slackware current
#----------------------------------------------------------------
# Finland,
# ftp://ftp.funet.fi/pub/mirrors/ftp.slackware.com/pub/slackware-current/
# Belgium, 2x1Gbit
# http://ftp.belnet.be/packages/slackware/slackware-current/
# ftp://ftp.belnet.be/packages/slackware/slackware-current/
# Bulgaria, 5Mbit
. . .
. . .
# USA, 155Mbps
ftp://carroll.cac.psu.edu/pub/linux/distributions/slackware/slackware-current/
# Taiwan, 1Gbit
# ftp://ftp.isu.edu.tw/pub/Linux/Slackware/slackware-current/
, , ,
, , ,


In this case, I've chosen a mirror for the “current” branch, which is Slackware parlance for the “testing” branch.  If you're more conservative, or you're running a mission critical setup where you can't afford to experiment, you'll probably want to use a mirror for your specific, stable version of Slackware.




#
#----------------------------------------------------------------
# Slackware 13.0
#----------------------------------------------------------------
# Finland,
ftp://ftp.funet.fi/pub/mirrors/ftp.slackware.com/pub/slackware-13.0/
# Belgium, 2x1Gbit
# http://ftp.belnet.be/packages/slackware/slackware-13.0/
# ftp://ftp.belnet.be/packages/slackware/slackware-13.0/
# Bulgaria, 5Mbit
# http://mirrors.unixsol.org/slackware/slackware-13.0/
# ftp://mirrors.unixsol.org/slackware/slackware-13.0
. . .
. . .


slackpkg

This is an official Slackware package management utility.  Enter “slackpkg” without any arguments or options, and you'll get a list of the different available options.  But, if you've installed all of the official Slackware packages during initial installation, there will only be three options that you'll normally need to worry about.

To completely update your Slackware system, enter the following three commands:

# slackpkg update
# slackpkg install-new
# slackpkg upgrade-all

If any new or updated packages are found, you'll see an ncurses display.  You can either hit the “Enter” key to install or update everything, or use the spacebar to deselect anything that you don't want to install.

slackware


There's still no automatic dependency resolution, but you'll rarely run into problems.  The only times I've had a problem were when a new package compression scheme was implemented, and when a new “mirrors” file was installed.  In the first case, I just chose to install the new compression utility before trying to update anything else.  In the second case, I just needed to switch over to the new “mirrors” file and edit it appropriately.

When a new version of Slackware gets released, you'll receive a new copy of the “mirrors” file along with your normal updates.  This new file will reference a mirror for the new version.  Upgrading to the new version is as simple as running the above three commands.  (Really, it's the simplest version upgrade system that you'll find anywhere.)


sbopkg

Since there aren't a whole lot of packages in the official Slackware repository, you'll most likely want to install a third-party repository.  One of the best is “slackbuilds.org”.

slackware


With Slackbuilds, you'll download the source code for a package, along with an appropriate build script.  Run the script, and you'll both compile and install the package.  The advantage, is that you can edit the script in order to optimize the compiled executable file for your machine's processor.  The disadvantage, is that Slackbuilds doesn't give you a centralized way to keep track of what you have installed, or to update all of your installed packages at once.

The “sbopkg” utility is a third-party utility that eliminates this disadvantage.  Even thought it's still in beta, I've found it to be quite functional.

slackware

The first thing you'll want to do after installing “sbopkg”, is to ensure that you're plugged into the correct repository for your version of Slackware.


slackware

Next, sync your machine with the repository.

slackware


Then, either select new packages to install. . .

slackware

slackware

slack


. . . or, choose to update the packages that you've already installed.


slackware

slackware


Either way, the next step will be to process the queue.

slack

slackware


Since sbopkg is still under heavy development, expect to see it updated quite often.  Under the “Utilities” menu, you'll find the way to get the latest version.  It won't install it for you, but it will download it so that you can install it with the “pkgtool” utility later.

slackware

As with the official Slackware utilities, there's no dependency resolution.  So, for example, if you choose a package that uses the gtk image libraries, which aren't installed by default on Slackware, you'll get an error message when you try to build the package.  You'll then need to search for and install any packages that are needed to resolve the dependencies.


Conclusion

Slackware is a good, solid, reliable distro.  These new package management utilities make it even better.

submited by Donnie Tevault