Packages
SliTaz images ship with a small set of software on purpose: you add what you need. About 6000 packages are available for i486 and 5700 for x86_64, from the official mirror. Browse them online at pkgs.slitaz.org.
The tools
spk is the package manager of SliTaz 5.1. It is a set of
small commands: spk-search, spk-ls and
spk run as a normal user; spk-add,
spk-rm, spk-up and spk-mirror need
root. spk-gui (GTK3) and spk-tui (text
mode) are front-ends to the same commands. The classic
tazpkg is still installed and shares the same package
database, so both can be used on the same system.
Graphical package manager
On the desktop, open Spk Package Manager from the Dash or the welcome window. Spk-gui asks for the root password, then lets you search, install, remove and upgrade packages. Started by a normal user, it opens read-only with a button to relaunch it as administrator.
Search
$ spk-search editor $ spk-search --name gimp $ spk-search --file /usr/bin/convert
Without option, the pattern is searched in package names and
descriptions. --file tells which package provides a file,
--rdeps which packages depend on a package. Search is
instant: the whole mirror is searched in a fraction of a second.
Install and remove
# spk-add geany # spk-add mtpaint xarchiver # spk-rm geany
spk-add downloads the package and its dependencies from the
mirror and installs them; it also installs a local package file:
spk-add ./package-1.0-x86_64.tazpkg. spk-rm
--autoremove also removes the dependencies nothing else uses.
Add --dry-run to any of them to see what would happen.
Upgrade the system
# spk-up
spk-up refreshes the package lists, shows the available
upgrades and asks for confirmation. spk-up --check only
reports them, spk-up --list only refreshes the lists.
Before upgrading, spk-up takes a snapshot and keeps the replaced
packages in /var/cache/spk/previous/, so that
reprise can undo a bad upgrade, even
without network. Installs are atomic: an interrupted install does not
leave a half-installed package.
List and inspect
$ spk-ls # installed packages $ spk-ls --count $ spk-ls nano # files installed by nano $ spk nano # status, version and description $ spk info # mirror, cache and database statistics $ spk activity # last installs, upgrades and removals $ spk history nano # what happened to one package # spk-doctor # check the package database, --fix repairs it
Block a package
A blocked package is never upgraded, useful to keep a known good version:
# spk firefox-official --block # spk firefox-official --unblock $ spk-ls --blocked
Mirrors and extra repositories
The mirror is set in /var/lib/tazpkg/mirror. The default
ones are:
- i486:
http://mirror.slitaz.org/i486/cooking/packages/ - x86_64:
https://mirror.slitaz.org/x86_64/cooking/packages/
Change it with trame mirror set <url>. Extra
repositories, such as your own packages, are added with
spk-mirror:
# spk-mirror https://example.org/packages/ # spk-mirror /home/slitaz/packages --gendb
Downloaded packages are kept in /var/cache/tazpkg;
spk clean empties it.
Tazpkg
Tazpkg does the same jobs with one command and sub-commands; it is also the tool available on SliTaz Base i486:
| spk | tazpkg |
|---|---|
spk-up --list | tazpkg recharge |
spk-search word | tazpkg search word |
spk-add pkg | tazpkg get-install pkg |
spk-add file.tazpkg | tazpkg install file.tazpkg |
spk-rm pkg | tazpkg remove pkg |
spk-up | tazpkg up |
spk-ls | tazpkg list |
spk clean | tazpkg clean-cache |
Use one tool to block packages: spk and tazpkg keep separate block lists.
Renamed and replaced packages
| Before | SliTaz 5.1 |
|---|---|
linux (3.16) | linux-lts and its module packages, see Kernel; linux stays for SliTaz Core Retro |
udev | eudev |
tazpanel | trame-gui; TazPanel can still be installed |
tazinst-gui | tazinst-gtk, tazinst-tui |
lxsession-logout | lxtaz-logout |
leafpad | l3afpad |
py3k | python3 |
tazbug | filature-report |
slitaz-doc | This site |
midori, tazweb (i486) | firefox-official; the old ones are still available but cannot open most of today's web |
Package format
A package is a .tazpkg file named
name-version.tazpkg on i486,
name-version-x86_64.tazpkg on x86_64 and
name-version-any.tazpkg for architecture-independent
packages on the x86_64 mirror. It is a cpio archive
holding the receipt (the recipe it was built from), the file
list, the checksums and the compressed files. Installed packages are
recorded in /var/lib/tazpkg/installed/. Packages are built
with cookutils, see Build your own.
SliTaz Doc