TazPkg Manual

Name

TazPkg — Tiny autonomous zone package manager

Syntax

tazpkg [command] [options...]

Description

TazPkg is a lightweight package manager to install, list, download, update or remove precompiled packages on a GNU/Linux system. TazPkg offers commands for searching and creating packages and was created independently for the project. The format of the packages using the *.tazpkg extension is a cpio archive containing a filesystem compressed with lzma, a receipt and an optional description. TazPkg also manages dependencies based on package receipts. Each receipt contains all the information about a package and can also include pre- and post-installation functions. The same receipt is used by Cookutils to compile sources and generate a .tazpkg package.

TazPkg is entirely built from scratch using Shell script, compatible with Bash; it runs under Ash — part of the Busybox project. TazPkg is distributed under the free GNU license GPL V3.

Environment

TazPkg uses some environment variables:

Files

Configuration files

Package database files

Default placement of the package database is /var/lib/tazpkg.

All the deprecated files will be deleted after we verify that the programs do not use them (and modify the programs as necessary).

In addition to the common package database files there is also individual folders for all installed packages placed by default in the /var/lib/tazpkg/installed/package. Every folder here may contain the following files:

Cache

Default placement of the packages cache is /var/cache/tazpkg with sub-folders for the different repositories.

It is exactly /var/cache/tazpkg/cooking/packages for the cooking-based SliTaz version.

Misc files

File with default placement /var/log/slitaz/tazpkg.log stores TazPkg activity log.

Log stores five types of actions: installing, uninstalling, blocking, unblocking, reconfiguring packages.

Shared MIME information which allows to “guess” SliTaz package files, package receipts and SliTaz flavor files.

File placed here: /usr/share/mime/packages/tazpkg.xml.

Plug-in for the TazPanel (SliTaz administration and configuration panel) /var/www/tazpanel/pkgs.cgi allows you to manage SliTaz packages in the web application.

TazPkg documentation is placed in the /usr/share/doc/tazpkg folder.

Commands

The first tazpkg parameter is a command followed by other mandatory and optional parameters as will be described hereinafter. Options begin with double dashes, you can arrange them in any order and in any place, even before the command. Unknown and inappropriate options are ignored. The following commands are equivalent:

$ tazpkg info nano --root=/mnt/sda6
$ tazpkg --root=/mnt/sda6 info nano
$ tazpkg info --root=/mnt/sda6 nano --color

You can add global option --root=… to any TazPkg command. This option allows to work with other SliTaz installations. Option points to the root of mounted file system from other SliTaz installation.

By the way, using this option allows to install SliTaz to the other file system “from scratch”, and upgrade SliTaz packages remotely.

Service commands

Working with lists

Search

Installing and removing packages

Working with packages

Working with repositories

Service commands

usage

Show the full list of the TazPkg commands with a brief description.

$ tazpkg usage
$ tazpkg

help

Display help for the selected command (help or -h). You can enter a short name of the command, the full name or a part of the full name. You can ignore hyphens at the beginning of the short name. If the requested part of the full name match the several commands, you will be asked to clarify the request.

$ tazpkg help -gi
$ tazpkg -h us

activity

Display TazPkg activity log (activity or log or -a). Optional parameter --nb= lets you set number of displayed lines.

$ tazpkg activity
$ tazpkg -a --nb=20

clean-cache

Remove *.tazpkg packages downloaded to the cache (clean-cache or -cc). During installation, TazPkg keeps a copy of packages downloaded from the Web. This is done to save bandwidth in case of reinstallation, but you may want to free up space on the hard drive or re-download the packages.

# tazpkg clean-cache
# tazpkg -cc

shell

Run interactive TazPkg shell. Here you can enter all the TazPkg commands listed above.

$ tazpkg shell
# tazpkg shell

Working with lists

list

List packages installed on the system (list or -l). This command displays a column list of all installed packages. It also allows you to list the categories (c or cat or categories), packages based on category and packages placed on hold (b or blocked). You can also use the search command for a list based on a term or package name.

$ tazpkg list
$ tazpkg list cat
$ tazpkg list games
$ tazpkg list blocked

list-mirror

List packages available on the mirror (list-mirror or -lm). This command will display the packages list recharged from the mirror. If it doesn't exist, you will be asked to launch tazpkg recharge as administrator (root) for a list of available packages. The --diff option is used to display the differences between the last and current list of packages.

$ tazpkg list-mirror
$ tazpkg -lm --diff

list-config

Lists the system configuration files. The --box option displays in table form. You can specify package name to display configuration files only for this package.

$ tazpkg list-config
$ tazpkg list-config --box
$ tazpkg list-config slim
$ tazpkg list-config --box slim

Search

Search for packages by owner or package name (search or -s). This command will search for the term wanted in the installed packages (-i or --installed) and the list of available packages on the mirror (-l or --list).

To obtain the latest list of installable packages on the mirror, just run tazpkg recharge before conducting a search.

$ tazpkg search gcc
$ tazpkg search mt -i
$ tazpkg search bit -l

search-pkgname

Search for a file on mirror and output only the packages names (search-pkgname or -sp).

$ tazpkg search-pkgname libnss
$ tazpkg -sp /usr/share/fonts

search-file

Search for a file among the files installed by the packages (search-file or -sf). This command is very useful to find the full path to a file and determine if a file is present on the system. Option --mirror allows to search for a file among all the files available on the mirror.

$ tazpkg search-file libnss
$ tazpkg -sf /usr/share/fonts --mirror

Installing and removing packages

get

Get a package from the mirror (get or -g). The downloaded package is stored in the current directory. To find the path you can use pwd.

# tazpkg get grub
# tazpkg get nano --root=/mnt/sda6

install

This command allows the installation of a local package with the .tazpkg extension (install or -i). See get-install to install a package from the internet. Note that you can force the installation via the --forced option. Option --newconf allows you to rewrite all user configuration files using the new files from package. Option --nodeps allows you to install only a specified package without its dependencies.

# tazpkg install package-1.0.tazpkg
# tazpkg -i path/to/package-1.0.tazpkg --forced
# tazpkg -i path/to/package-1.0.tazpkg --root=/mnt/rootfs

get-install

Get and install a package from a mirror on the internet (get-install or -gi). Command begins by checking whether the package exists on the mirror and if it has been already downloaded. For a list of packages on the mirror, we must use the list-mirror command. Note that you can force the installation via the --forced option. Option --newconf allows you to rewrite all user configuration files using the new files from a package. Option --nodeps allows you to install only a specified package without its dependencies.

Option --forced allows you to update an already installed package.

# tazpkg get-install grub
# tazpkg -gi grub --forced
# tazpkg -gi nano --root=/mnt/sda6

install-list, get-install-list

Install a set of packages listed in a file. This command allows you to (download and) install several packages with a single command and can also be forced.

# tazpkg install-list my-packages.list
# tazpkg get-install-list my-packages.list --forced

remove

Remove a package (remove or -r). You will be asked for confirmation (y/N) of removing the package, as well as for removing packages depending on this package, and for reinstalling packages modified by this package. This command will delete all files installed with the package.

Option --auto removes and reinstalls packages without your confirmation.

# tazpkg remove bc
# tazpkg -r gtk+-3 --root=/mnt/sda6
# tazpkg -r nano --auto

reconfigure

Replays the post-install script from the package.

# tazpkg reconfigure gcc
# tazpkg reconfigure gcc --root=/mnt/sda6

This command allows the installation of a package from another media device. The set up is done through symbolic links and consumes very little memory. It is generally used within the system RAM to install add-ons from a USB key.

# tazpkg link openoffice /media/usbdisk

set-release

The set-release command changes the current version and upgrades all of the packages to the latest release.

# tazpkg set-release cooking

add-flavor, install-flavor

Install a set of packages from a flavor. In addition, install-flavor purges other installed packages.

# tazpkg add-flavor gtkonly
# tazpkg install-flavor justx

Working with packages

info

Show all the available information related to your package. You can specify the name of the installed package or a package that is not yet installed, but available in the repository. You can also get information about a local file package by entering an absolute or relative path to the file .tazpkg. The information contained in the TazPkg database and in the package recipe — its version, category, maintainer, Web site and all the dependencies (see also Cookutils for more information on recipes).

$ tazpkg info busybox
$ tazpkg info minitube
$ tazpkg info packages/comix-4.0.4.tazpkg

desc

Description of the package (if it exists) (desc or -d). This command displays the description.txt file of each package (a simple text file, justified to 80 characters to fit in a standard terminal).

$ tazpkg desc busybox

list-files

List all files installed with a package (list-files or -lf). This command will simply read and display the files.list of each package which is automatically generated when the package is created and is also used to remove files when uninstalling a package.

$ tazpkg list-files bc

block, unblock, chblock

The block (or -b) and unblock (or -u) commands permit you to block installed package versions so that they are not maintained by an upgrade. Command chblock changes the blocking state of the package. The list of packages on hold are contained in the /var/lib/tazpkg/blocked-packages.list. This file can also be edited by hand.

# tazpkg block grub
# tazpkg unblock grub
# tazpkg chblock grub

check

The check command can check dependencies on installed packages and determine whether all the files needed for the repacking of packages are present.

$ tazpkg check
$ tazpkg check --full
$ tazpkg check nano
$ tazpkg check sakura --full

bugs

Generates a list of known bugs in the packages. You can specify a single package to show bugs.

$ tazpkg bugs
$ tazpkg bugs my_package

depends, rdepends

Displays a dependency tree or reverse dependency tree for a package.

For depends command: option --mark marks installed packages with plus sign and not installed with a minus/dash. Option --total calculates the number of displayed packages and their size. Also, with both options at a time you'll get the number and size of packages to be installed.

For rdepends command: without the --all option you'll get the list of only installed reverse dependency packages, with this option — a list of all available packages. Option --mark marks packages as in the depends command.

$ tazpkg depends mpd
$ tazpkg rdepends mpd

extract

Extract a package into a directory (extract or -e). If you do not specify the destination directory, the package will be extracted in the current directory using the name package-version.

$ tazpkg extract package.tazpkg
$ tazpkg extract package.tazpkg target/dir

pack

The pack command will create a package from a directory prepared in advance or from an unpacked package. It can also manually create a .tazpkg package (see the Cookutils documentation for the automatic creation of packages).

# tazpkg pack package-version

repack

The repack command allows you to recreate a package from the files on a system where it was previously installed.

# tazpkg repack package

repack-config

The repack-config command recreates a package of the system configuration files (see list-config). It is enough to install the package to find the current configuration.

# tazpkg repack-config

recompress

Recompress .tazpkg cpio archive with lzma.

# tazpkg recompress package.tazpkg

convert

Converts an "alien" package into a SliTaz package (.tazpkg) (convert or -c).

Supported packages formats:

# tazpkg convert alien-package-file

list-suggested

List suggested packages for each of your installed packages. With option --all it shows all suggested packages, and without option it shows only non installed suggested packages.

$ tazpkg list-suggested
$ tazpkg list-suggested --all

Working with repositories

recharge

Recharge the list of available packages on the mirror. This command will download the most recent packages database of installable packages on the mirror and before starting will save the old database. Once the DB is updated, you can then use the list and search commands. To view and list the differences, you can use list-mirror --diff; and to view and update packages, you can simply upgrade.

Command without options will recharge databases of all your repositories. You can specify the repository to be recharged: "main" for main repo, or undigest repository name. Option --root= allows you to specify the root of the filesystem where you want to recharge DB.

# tazpkg recharge
# tazpkg recharge main
# tazpkg recharge My_Undigest
# tazpkg recharge --root=/mnt/sda6

upgrade

Upgrade allows you to update all installed packages available on the current mirror (upgrade or up). Upgrading packages is an important part of system security, it helps to keep you secure with the latest updates and fixes. The SliTaz project, although tiny, provides regular updates on security and generally offers the latest versions of software. Note that this function is aimed at people with SliTaz installed on a hard drive. Updated packages in Live CD mode will be lost on system shutdown.

At the beginning the packages database is updated automatically (recharge) in order to provide you with the current list of packages that you can update.

Without options it runs in interactive mode and asks before install. You can specify one of the next options: -c or --check to check only for available upgrades; -i or --install to check for upgrades and install them all.

# tazpkg upgrade
# tazpkg up --check
# tazpkg up -i

setup-mirror

Setup the URL for the mirror. The setup-mirror (or -sm) command will ask for the URL of the new mirror. Note that you can also modify the main /var/lib/tazpkg/mirror file. The URL must point to the directory containing the packages.info and packages.

# tazpkg setup-mirror

add-undigest, setup-undigest

Set the URL of an additional unofficial mirror to test packages that are not yet present on the official mirrors. Note, you can also manually edit the file in /var/lib/tazpkg/undigest/repository. The URL must point to the directory containing the packages and packages.info.

# tazpkg add-undigest public-repository http://my.home.org/slitaz
# tazpkg setup-undigest local-repository /home/slitaz/packages

list-undigest

Lists additional undigest mirrors. Option --box will output list in the table form.

$ tazpkg list-undigest
$ tazpkg list-undigest --box

remove-undigest

Removes the URL of an undigest mirror. You will be asked for confirmation.

# tazpkg remove-undigest my-repository

Maintainer

Christophe Lincoln <pankso at slitaz.org>