Slackware Package Management, Part I: Anatomy of Slack Packages

If you ask a Slackware fan why she likes Slackware, she will probably mention Slackware package management as one of the features she likes. In what way does the Slackware package system differ from most other package managers? In one word: simplicity. In three articles I am going to cover some important aspects of Slackware package management. In this article I am going to show the anatomy of a Slackware packages. In part 2 and 3 I will cover the package tools and the process of creating a Slackware package.Plain old tarballs

Before getting into the details of Slackware packages I would like to explain a few basic characteristics of Slackware packages. These days most package managers are quite complex. For example, the most important feature of many package managers is dependency handling.
This means that if a package requires other packages the package manager will take care of installing them too. Most of the times this works, but dependencies can get a bit annoying. For example, if you install software that is not in the main distribution, version numbering
conflicts can arise. The Slackware package tools do not handle dependencies. The means to handle dependencies does not exist in the “format” of Slackware packages either. This can initially scare away users, but it is (at least in my opinion) more flexible and provides more freedom. Since there is no dependency management at all you are in control.

Well, what is a Slackware package? A Slackware package is a tarball (an archive created with tar and compressed by gzip) which contains information about the package and an installation script. The information about a package is stored in two ways, first of all in the filename
of the package, besides that the tarball contains a desctiption file. Both will be covered lateron. Last but not least a package contains an installation script. This script is automatically executed when installing or upgrading a package. Most packages only use an
installation script for making symlinks. Correct Slackware packages do not have symlinks in the tarball, symlinks are set up using the install script.

The package filename

The package filename provides some information about the package. This information is also used by the Slackware package tools, for example to decide whether some package is newer than the installed version. A package filename has the following syntax:


name-version-architecture-revision.tgz

The different variables in a package filename are seperated by
by a ‘-‘. Naturally, it is not wise to use the separation character
in one of the variables. The filename is usally in lower case. The
first variable defines the name of the package, usually this is
just the name of the software. For example, for Mozilla this is
‘mozilla’. The second field determines which version of the software
the package provides. This is usually used te determine when to
upgrade a package and when not. The third field specifies the
architecture of the package. Nowadays the official Slackware
distibution only supports x86 machines. Up to Slackware Linux
9.0 packages were compiled with ‘-march=i386’, so the name of
this variable is usually ‘i386’. Starting with Slackware-Current
after Slackware 9.0 support for 386 machines is dropped due to
some glibc issues. So new -current packages are compiled with
the ‘-march=i486’ gcc parameter. So, the architecture variable
is ‘i486’ in Slackware-Current. Last but not least the revision
number is specified. This is used when a newer version of a package
is released, but the package is still at the same version.
Usually this parameter is ‘1’ and increases after revisions.

More information about the package is in the /install/slack-desc
file in the package tarball. This file contains the package description
which is shown during the installation of a package. If you have
ever installed Slackware you have probably noticed these descriptions
during the installation. Basically this file just contains the
description on multiple lines behind a ‘name:’ part on each line.
I will discuss the slack-desc file in detail in the article about
creating a package.

The install script

Until we discuss package creation there is not much to say about the
install script. There are a few things you should be aware of. First
of all the script is in the /install/doinst.sh file. The second
thing I should notice is that, though symlinks need to be created
by the install script, you do not have to write the symlink (ln -s)
lines manually. The makepkg script can take care of this.

Some final words

This first article is not an introduction to pkgtools, but I hope
you have an idea what a Slackware package consists of. In the following
articles we will dive into package maintainance a little deeper. In
the meanwhile: happy Slacking;).

66 Comments

  1. 2003-07-06 7:50 pm
  2. 2003-07-06 7:57 pm
  3. 2003-07-06 8:02 pm
  4. 2003-07-06 8:04 pm
  5. 2003-07-06 8:08 pm
  6. 2003-07-06 8:13 pm
  7. 2003-07-06 8:38 pm
  8. 2003-07-06 9:06 pm
  9. 2003-07-06 9:11 pm
  10. 2003-07-06 9:28 pm
  11. 2003-07-06 9:31 pm
  12. 2003-07-06 9:37 pm
  13. 2003-07-06 9:37 pm
  14. 2003-07-06 9:55 pm
  15. 2003-07-06 10:25 pm
  16. 2003-07-06 10:28 pm
  17. 2003-07-06 10:33 pm
  18. 2003-07-06 10:41 pm
  19. 2003-07-06 11:01 pm
  20. 2003-07-06 11:14 pm
  21. 2003-07-06 11:17 pm
  22. 2003-07-06 11:20 pm
  23. 2003-07-06 11:21 pm
  24. 2003-07-06 11:34 pm
  25. 2003-07-07 12:13 am
  26. 2003-07-07 12:22 am
  27. 2003-07-07 12:23 am
  28. 2003-07-07 12:33 am
  29. 2003-07-07 12:52 am
  30. 2003-07-07 12:55 am
  31. 2003-07-07 12:59 am
  32. 2003-07-07 1:05 am
  33. 2003-07-07 1:32 am
  34. 2003-07-07 2:34 am
  35. 2003-07-07 3:07 am
  36. 2003-07-07 3:26 am
  37. 2003-07-07 3:41 am
  38. 2003-07-07 4:59 am
  39. 2003-07-07 5:08 am
  40. 2003-07-07 5:44 am
  41. 2003-07-07 5:51 am
  42. 2003-07-07 5:57 am
  43. 2003-07-07 6:35 am
  44. 2003-07-07 6:42 am
  45. 2003-07-07 7:14 am
  46. 2003-07-07 7:15 am
  47. 2003-07-07 9:27 am
  48. 2003-07-07 9:53 am
  49. 2003-07-07 9:55 am
  50. 2003-07-07 10:13 am
  51. 2003-07-07 10:14 am
  52. 2003-07-07 2:06 pm
  53. 2003-07-07 2:32 pm
  54. 2003-07-07 2:52 pm
  55. 2003-07-07 3:50 pm
  56. 2003-07-07 4:27 pm
  57. 2003-07-07 7:08 pm
  58. 2003-07-08 5:45 am
  59. 2003-07-08 9:53 am
  60. 2003-07-08 12:29 pm
  61. 2003-07-08 12:30 pm
  62. 2003-07-08 1:24 pm
  63. 2003-07-08 1:54 pm
  64. 2003-07-08 3:23 pm
  65. 2003-07-09 12:31 pm
  66. 2003-07-09 5:22 pm