Spk Documentation

SliTaz Packages Toolset

SliTaz packages management new generation, fast, clean and unbloated. Spk consists of small separate programs for easier code maintenance and uses a shared library. Spk can handle multiple packages on a cmdline as well as the ability to manage your own mirror.

Graphical user interface

The Spk toolkit provides an Ncurses dialog interface for all basic tasks. You must use the up-down arrow and ENTER to activate a button or you can use your mouse to select menu items and press on the buttons. Spk-dialog can be found in the desktop menu under "System Tools" and can be run in the Linux framebuffer or an X terminal.

Cmdline usage and help

All spk tools provide a small built-in help usage that you can display with the command 'usage' or 'help'. It also has some options to perform special tasks on a package before executing a task or afterwards. To get help and usage:

# spk usage
# spk-add help

Packages info

To get the packages status and information:

# spk busybox glib

Add packages

Spk will handle dependencies. To install new packages simply use 'spk-add' or the --add option:

# spk-add package1 package2
# spk package --add

Remove packages

To remove packages simply:

# spk-rm package1 package2 ...

Message translations

WANTED_LANGS in /etc/slitaz/slitaz.conf (or in the environment, which wins) lists the languages whose message translations (gettext .mo files) spk-add installs, e.g. "fr de pt_BR". Empty or absent: all of them. "fr" also keeps fr_CA, "pt_BR" also keeps pt. With --root= the value comes from the target's slitaz.conf. After changing it, reapply it to the installed packages: translations to drop are removed in place, those to bring back reinstall their package from the cache or the mirror:

# spk relang
# WANTED_LANGS="en fr" spk-add package --root=/mnt/target

Packages update

To get the last list of packages and to update your system you have to use 'spk-up'. Before installing anything Spk will ask for confirmation. Spk lets you upgrade the full system at once (skipping blocked packages) or you can also upgrade packages individually:

# spk-up
# spk-up package1 package2 ...

Search packages and files

The spk-search util finds packages, files and provides across the installed system, the official mirror and extra mirrors. It supports human-readable output, raw TSV (--raw) and a JSON mode (--trame) for tools like Trame and TazPanel.

# spk-search package           # name + short description
# spk-search --file /bin/ash   # which package provides this file
# spk-search --provide awk     # alias / PROVIDE lookup
# spk-search --cat=games lib   # filter by category
# spk-search foo --src=mirror  # restrict to mirror (or installed/extra)

List packages & files

Spk-ls lets you get the list of installed or mirrored packages as well as the list of files installed by a package:

# spk-ls --short
# spk-ls gcc-lib-base
# spk-ls --apps                # desktop applications of the mirrors
# spk-ls --featured            # featured packages

The data behind --apps and --featured (apps.list from each mirror, featured.list from the Spk repository) is optional and only fetched by a recharge run with --apps, as the graphical front-end does:

# spk-up --list --apps

Mirrors, blocked packages and cache

Spk-mirror sets the main mirror (one of the official mirrors) or adds and removes extra mirrors. Blocked packages are held back from upgrades. With --raw these commands print plain TSV for scripts and the graphical front-end:

# spk-mirror --list            # --raw: main, official and extra lines
# spk-mirror http://example.org/packages/ [--rm]
# spk package --block          # or --unblock
# spk-ls --blocked             # --raw: blocked TAB name ...
# spk info                     # --raw: key TAB value
# spk clean                    # empty the packages cache