slackpkg - Slackware package management system

Slackware has an automated tool for managing its software packages in its official package. The one we are talking here is slackpkg. Although it's not included in default installation, slackpkg can be install later after you finish the standard installation. Slackpkg can be found in /extra directory in the official dvd installer.

Slackware, which is the oldest Linux distribution available today, however is less popular for beginner compared to other major distributions (currently number 13 and has 499 hits per day in distrowatch.com). Although Slackware has proved to be a stable and secure Linux server, it's only appreciated by it's loyal followers. Maybe because Slackware itself is unique. Slackware has it's own personality. If you ask true slackers, one of the reason they love Slackware is because it is the only distribution that still maintain the originality of Linux and it's nostalgic. We can see that Slackware still maintains lilo and fdisk in its official release. Most tasks in Slackware have to be done manually too and that includes managing software packages. Maybe that's why Linux beginner is avoiding Slackware. Well, that's only my personal opinion. Don't forget that everything depend on personal preferences. User can have what they want, how they want it to be. And that reason has been the biggest asset of Linux as you can see many Linux distributions available and they have their own followers.

That's quite a long shabby introduction. Let's see a piece of information about slackpkg in the manual page:

NAME
slackpkg - Automated tool for managing Slackware Linux packages

SYNOPSIS
slackpkg [OPTIONS] {install|remove|search|upgrade|reinstall|blacklist}
{ PATTERN | FILE }

slackpkg [OPTIONS] info PACKAGE

slackpkg [OPTIONS] update [gpg]

slackpkg [OPTIONS] (clean-system|upgrade-all|install-new|new-config)

DESCRIPTION
Slackpkg is a tool for those who want to easily install or upgrade
packages via the network. With slackpkg, you can have a minimal
installation of Slackware Linux and install/upgrade only those packages
you need most.

As you can see from the synopsis above, slackpkg is doing the same job as pkgtool, which is to install, remove and upgrade packages. Actually slackpkg did use pkgtool to do the base job plus it enhanced the job one step and provides automatic update via the Internet. Many Slackware system administrator is going to love Slackware for this feature (Pat loves slackpkg too and he mentioned it in his email).

Here are the complete slackpkg options with descriptions:

  • update gpg - Update Slackware GPG's key. The GPG key doesn't change. This should be a "one time" command
  • update - Update will download the latest package lists from a Slackware mirror
  • search packagename - Search the official Slackware packages for any file in the Slackware distribution.
  • install packagename - Package will be downloaded and installed.
  • upgrade packagename - Installs the most recent official version of the specified package.
  • reinstall packagename - Reinstall the same version of a package that is currently installed (in case of package corrupted).
  • remove packagename - Remove certain installed packages.
  • clean-system - Removes all of the packages that don't belong to a standard Slackware installation.
  • upgrade-all - Upgrades every package installed on the system to the version in the official Slackware tree.
  • install-new - Installs any new packages that are added to the official Slackware package set.
  • new-config - Searches for .new configuration files and ask the user what to do with those files.
  • blacklist packagename - Blacklisted packages will not be installed, upgraded, or removed by slackpkg.
  • download packagename- Download the packages, but do not install them.
  • info packagename - Prints information about the package(s).

The first thing you need to do before using slackpkg is to choose and enable a mirror in it's configuration file. Use your favorite text editor and edit /etc/slackpkg/mirrors file. Here is an example using vim editor:

[email protected]:~# vim /etc/slackpkg/mirrors

# mirrors - List of Slackware Linux mirrors.
#
# SlackPkg - An Automated packaging tool for Slackware Linux
# Copyright (C) 2003,2004,2005,2006,2007 Roberto F. Batista, Evaldo Gardenali
#
...
...
...
#----------------------------------------------------------------
# Slackware 12.1
#----------------------------------------------------------------
#Australia, 155Mbit
#http://ftp.planetmirror.com/pub/slackware/slackware-12.1/
#ftp://ftp.planetmirror.com/pub/slackware/slackware-12.1/
#Australia, 250Mbit
#http://mirror.pacific.net.au/linux/slackware/slackware-12.1/
#ftp://mirror.pacific.net.au/linux/slackware/slackware-12.1/
#Australia, 45mbit, 100Mbit
#ftp://mirror.veridas.net/pub/slackware/slackware-12.1/

Choose a mirror close to your city. Remove # to enable that mirror. Save and exit.

If you just finished the installation and already has Internet connection, it's time to update your Slackware. Number 1 step is to run slackpkg update. See example below:

[email protected]:~# slackpkg update

Downloading /GPG-KEY...
- - - -
- - - -
- - - -
HTTP request sent, awaiting response... 200 OK
Length: 1565 (1.5K) [text/plain]
Saving to: `/tmp/slackpkg.AmK8eg/gpgkey'

100%[======================================>] 1,565 --.-K/s in 0s

2008-11-15 01:49:59 (145 MB/s) - `/tmp/slackpkg.AmK8eg/gpgkey' saved [1565/1565]
...
...
...
2008-11-15 02:01:10 (111 MB/s) - `/tmp/slackpkg.AmK8eg/testing-PACKAGES.TXT' saved [914/914]

Formatting lists to slackpkg style...
Package List
Package descriptions

[email protected]:~#

The second step is to run slackpkg update gpg command.

[email protected]:~# slackpkg update gpg

The third step is running slackpkg install-new

[email protected]:~# slackpkg install-new
[email protected]:~# slackpkg install-new

Looking for NEW packages to install. Please wait... DONE

No packages match the pattern for install. Try:

/usr/sbin/slackpkg upgrade|reinstall

[email protected]:~#

The next step is running slackpkg upgrade-all and select which software you want to update. See the example below on how to run the command:

[email protected]:~# slackpkg upgrade-all

Sometimes there are many software and applications need to be upgraded including software security patches as you can see in the screenshot example below. Since the command option is upgrade all, you should upgrade all the patches for Slackware security and stability. If you have a slow Internet connection, you can deselect some upgrades and run 'slackpkg upgrade-all' command again when the first upgrade is finished.

Slackware slackpkg upgrade-all screenshot

The final step is running slackpkg clean-system

[email protected]:~# slackpkg clean-system

Troubleshooting slackpkg

There is no big problem and there is no fatal error I had while using slackpkg. The one that maybe hits you is Error downloading from ftp://mirror.name.domain/pub/slackware/slackware-12.2/. Please, check your mirror and try again. That's only a small problem. Change the mirror and it fixed. Below is the example about this:

[email protected]:~# slackpkg update

Updating the package lists...
Downloading...
Downloading ChangeLog.txt...
--2009-07-15 20:17:53-- ftp://mirror.name.domain/pub/slackware/slackware-12.2/ChangeLog.txt
=> `/tmp/slackpkg.ZYk2hG/ChangeLog.txt'
Resolving mirror.name.domain... 123.45.67.89
Connecting to mirror.name.domain|123.45.67.89|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD /pub/slackware/slackware-12.2 ...
No such directory `pub/slackware/slackware-12.2'.

Error downloading from ftp://mirror.name.domain/pub/slackware/slackware-12.2/.
Please, check your mirror and try again.

[email protected]:~#

What you need to do is to open the slackpkg mirrors' file with text editor and change to different mirror. See example below:

[email protected]:~# vim /etc/slackpkg/mirrors

Comment(insert #) the current mirror and choose a new mirror(remove #):

#
#----------------------------------------------------------------
# Slackware 12.2
#----------------------------------------------------------------
#Australia, 155Mbit
#http://ftp.planetmirror.com/pub/slackware/slackware-12.2/
ftp://ftp.planetmirror.com/pub/slackware/slackware-12.2/ --> Active mirror
#Australia, 250Mbit
#http://mirror.pacific.net.au/linux/slackware/slackware-12.2/
#ftp://mirror.pacific.net.au/linux/slackware/slackware-12.2/
#Australia, 45mbit, 100Mbit
#ftp://mirror.veridas.net/pub/slackware/slackware-12.2/
...
...

Try run slackpkg update again after you change to a new mirror. If your problem persist, change to another mirror until you got the one that's working.

Other issues

For a new Slackware user (or if you are a Ubuntu user before), there is a small problem if you are upgrading Linux kernel automatically using slackpkg. If you are using nvidia driver, upgrading the Linux kernel would give you nvidia driver error when you are trying to enter x-window. This is because the nvidia driver is a kernel module, so every time you upgrade the Linux kernel, you need to recompile the nvidia driver.

Another issue is, when recompile the nvidia driver, a new xorg.conf file is created, so all configurations you set previously such as enable mouse scroll and monitor size setting are gone. Well, the file is not totally removed from the system but it has been saved as a backup file called 'xorg.conf.backup'. You can copy your previous configurations and the problem solved.

Comments

1

I got 'kernel panic' error after upgrade to the new kernel image using slackpkg. The slackpkg doesn't return any error and finish the upgrade successfully. When I start my computer after being shutdown, I got the kernel panic error. Fortunately, I have my /home directory in a separate partition. So, I just reinstall Slackware 13 in my computer and spend a day configuring everything again.

I wonder what is going on. Does it really safe to upgrade kernel version using slackpkg? If it is, could you please show the correct steps to do it. I am new to Slackware and Linux. I hope I don't have to go through all the ruckus again in the future.

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.