Overview

Spk (Simple PacKage management) is a set of libraries implementing a package management system and a command-line application to interface with that system. It is free software and is released under the terms of the GNU General Public License. You are free to modify it and redistribute it in accordance with that license.

Spk was written to make managing software installed from source code easier. Spk will execute the install commands for a software package and record the files that are placed on your system. For example, instead of executing make install you could execute spk make install and records of file additions, modifications, and deletions will be made. Deleted and changed files will be archived and can easily be restored.

Before spk executes an install command it sets the environment variable LD_PRELOAD to the location of one of its own libraries. That library overrides certain functions from libc (like fopen and mkdir). Spk's implementation of these functions writes information about changes to the file system to a file in spk's repository and then calls the underlying libc implementation. Eventually the recorded information is translated to a list of added, changed, and deleted files which is associated with the newly installed package.

There are several (quite excellent) source-based package managers available. Here are some of the reasons I had for writing another package manager.

  • Spk doesn't require an additional package manager like RPM (it goes especially well with a system like Linux From Scratch)
  • Its functionality is contained in libraries - I plan on writing a tightly integrated gui front end
  • It can scan a system for files not under package management
  • It can be told about dependencies
  • The repository is a simple, text-based format
  • If a directory is renamed, it will recurse that directory to record changed paths for its contents as well (this makes it easier to add existing files to package management - see here)
  • Removed or changed files are automatically archived in the repository with the new package and can optionally be restored when the package is uninstalled
  • Spk has an "append" feature which allows a lot of flexibility in adjusting things in the filesystem while keeping the repository in sync
  • If you decide to give spk a try, feel free to let me know what you think. (Comments/suggestions/bug reports are welcome.)