pkgcheck - User Guide

Version 0.06



1. Overview

1.1. What is pkgcheck?

pkgcheck is a program to check the sanity of a Slackware package. This should be done in two situations:

As pkgcheck does some checks against the current system, the results may actually be different for a same package on two different computers. Therefore, you must not rely on a check having been done on the building system - always check the package on the system where it is about to be installed.

I wrote this progran before starting to create my own SlackBuilds, which is the recommended way of creating Slackware packages, by gathering the requirements from different sources. Not being an expert at it means that the program is certainly incomplete; nevertheless, it's a starting point.

1.2. Technical requirements

pkgcheck is written in Python and needs a Python interpreter, version 2.4 or above. It has been developped and tested on Slackware 10.1 and 10.2 installations.

1.3. Installation

pkgcheck comes as a Slackware package and is installed via the installpkg or upgradepkg commands. If you are not familiar with these commands, have a look at the corresponding chapter in Slackware Linux Essentials

1.4. Known limitations

None so far, except from being incomplete :-)

1.5. Feedback

Please feel free to send your feedback to <uselpa (a) gmail com>. I welcome all comments and will try to enhance this software as much as possible. If you request changes, additions or corrections, please send an example package along with your mail so that I can test the corrections on the specific case.

1.6. License

pkgcheck is licensed according to the GPL.

1.7. Download

from my website or from linuxpackages.net

2. Errorlevels

2.1. Semantic errorlevels

2.2. Technical errorlevels

2.3. Configuration files

Each check that pkgcheck knows of is associated with an errorlevel. Semantic errorlevels are defined in configuration files, whereas technical errorlevels are internal errorlevels that cannot be changed by the user.

A configuration file is a text file that associates a check with an errorlevel. Checks have an error code and a default errorlevel, and are indicated in the form {errorcode : errorlevel} in the rest of this document. The default configuration file is /etc/slackpkg/default.conf and is automatically read at startup.

If the default values do not make sense in your particular context, you can use custom configuration files. Create /etc/slackpkg/<configname>.conf or ~/slackpkg/<configname>.conf based on default.conf, modifying the errorlevels to suit your needs. To use a different configuration, add the -c <configname> switch at startup.

If pkgcheck finds both /etc/slackpkg/<configname>.conf and ~/slackpkg/<configname>.conf, both will be read in sequence. If multiple definitions are found for the same error, the last definition will be kept.

3. Performed checks

3.1. Package name

3.2. Required files

3.3. Optional files

3.4. Files that should not be in the package

3.5. Permissions

3.6. Existing objects

3.7. Various

4. Usage

The basic usage form is pkgcheck <list of packages>. To list the contexts of packages without performing any check, add the -l option.

pkgcheck's return code will correspond to the highest error level it encountered. In order to filter out lower errorlevels, you may add the -e (n) option, where (n) corresponds to the lowest errorlevel you want to be reported (i.e. -e 2 will suppress all info messages). On the other hand, adding -e 0 will also report messages that have been assigned to errorlevel "none".

To use a custom configuration file, add -c <configname>.

5. Additional information

5.1. Things to keep in mind when building packages

5.2. Package building resources

5.2.1. Instructions for package building

5.2.2. Package creation tools

5.2.3. Package managers

6. Revision History


Document last updated on Sunday 30 Oct 2005 11:19:44.