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 the 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 you to work with other SliTaz installations and can point to the root of a mounted file system from another 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

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

list-cache

List *.tazpkg packages downloaded to the cache. Displays a list of file names and their sizes, as well as the total amount and size.

# tazpkg list-cache

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 slim --box
Search

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. You will get regular package, or get-package, or extra-package (in that order). You can specify --extra option to get an extra-package only.

You can specify multiple packages on the command line or give tazpkg a list of the packages you want to download or use get-list command.

# tazpkg get grub
# tazpkg get nano --root=/mnt/sda6
# tazpkg get palemoon --extra
# tazpkg -g nano mc
# tazpkg -g --list=/tmp/office

install

This command allows the installation of a local package with the .tazpkg extension (install or -i).

Option --forced allows you to update an already installed package. 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.

When TazPkg installs package dependencies, it prefers local packages (i.e. dependent packages located in the same folder as installed packages) over mirrored/cached packages with the --local option. It is useful when you want to install a lot of already downloaded packages and their dependencies without the need of a network connection.

You can specify multiple packages on the command line or give tazpkg a list of the packages you want to install or use install-list command.

See get-install to install a package from the internet.

# 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
# tazpkg -i nano-2.4.0.tazpkg mc-4.8.14.tazpkg
# tazpkg -i --list=/tmp/development
# cd /home/boot/packages; tazpkg -i nano-2.4.0.tazpkg --local

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.

Option --forced allows you to update an already installed package. 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.

You can specify multiple packages on the command line or give tazpkg a list of the packages you want to get and install or use get-install-list command.

For a list of packages on the mirror, you must use the list-mirror command.

# tazpkg get-install grub
# tazpkg -gi grub --forced
# tazpkg -gi nano --root=/mnt/sda6
# tazpkg -gi nano mc
# tazpkg -gi --list=/tmp/multimedia

get-list, install-list, get-install-list

Get and/or install a set of packages listed in a file. This command allows you to work with the several packages with a single command.

All options are the same as for respective simple commands: get, install and get-install.

# 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

set-release

This 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 (desc or -d).

$ 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

Check dependencies on installed packages and determine whether all the files needed for the repacking of packages are present. You can specify package name to check or check all installed packages. Option --full makes few more checks and need more time.

$ 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 nano

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

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

Recreate a package from the files on a system where it was previously installed.

# tazpkg repack package

repack-config

Recreate 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.

# 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 (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

mkdb

Make a TazPkg database for a selected folder with *.tazpkg packages.

The following files describing packages will be created inside the selected folder: packages.info, packages.equiv, descriptions.txt, files.list.lzma, IDs. Do nothing if the database already exists; you can also force database files rebuilding with the --forced option.

# tazpkg mkdb /home/boot/packages
# tazpkg mkdb /home/boot/packages --forced
Maintainer

Christophe Lincoln <pankso at slitaz.org>