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:
- LANGUAGE: defines the language of output and user
confirmations.
Note, LANG and LC_ALL environment variables also affect output language
- LC_TIME: defines the date format in the activity command
- root: if defined it points to the root of file system where TazPkg should work. Note, value defined using --root= option has precedence over this environment variable
Files
Configuration files
Package database files
Default placement of the package database is /var/lib/tazpkg.
- ID
(deprecated): identifier of the current SliTaz repository state.
The value changes when new or updated packages appear in the repository.
- IDs:
identifier of the current SliTaz repository state and the UNIX time stamp.
The ID value changes when new or updated packages appear in the repository. Time stamp allows you to track how long a change is made in the repository and to track the freshness of repository mirrors. (To convert UNIX time stamp to the date:
date -d@timestamp
) - mirror: URL of the current repository mirror in
use.
URL points to the remote folder containing packages and database files.
- mirrors: list of URLs of available repository
mirrors.
Note the difference between URLs from these two files; you should append URL from this file by packages/cooking/ (for cooking-based Slitaz version).
- packages.list (deprecated): list of package names with version numbers available in the repository.
- packages.desc (deprecated): list contained package name, version, short description, category and upstream URL.
- packages.txt (deprecated): list containing
package name, version, short description and two package sizes
.
(first — traffic to download package, second — HDD size for installed package)
- packages.md5 (deprecated): list containing MD5 checksum with package file name.
- packages.info: list was built to replace and
extend above lists.
For every package available in the repository it contains: package name, version, category, short description, upstream URL, tags, package sizes, depends and MD5 checksum. Development continues, and the list can be extended by other fields, if necessary.
- packages.equiv: list of equivalent packages
available in the repository.
Format of the list item: package=rule rule….
Format of the rule: alternative:newname — if alternative is installed then newname will be installed instead of the package.
In the second format of the rule alternative: part is omitted — in this case newname can be installed instead of the package (in the user choice). - packages.diff: list created when you run
recharge command.
List contains package names with versions of the new packages available in the repository with the last recharge.
- packages.up: list created when you run
upgrade command.
List contains package names you can upgrade with the last recharge.
- descriptions.txt: list of the “long” descriptions of the all packages available on the repository.
- packages-desc.language — optional list of the packages
translated short descriptions .
(see the package tazpkg-desc-ru)
- descriptions.language.txt — optional list of the
packages translated “long” descriptions .
(see the package tazpkg-desc-ru)
- packages.icons — optional list of the packages icons for TazPanel.
- blocked-packages.list: optional list of the packages blocked for update.
- extra.list: list of the extra packages
(non-free packages; free packages but not compiled from sources). List contains package name, short description, upstream URL, category, version, license.
- files.list.lzma: very large compressed list which contains all
the files of all the packages available in the repository
.
(nearly 5,000 packages and nearly 0.7 million files now)
- files-list.md5: MD5 checksum of the files.list.lzma.
- installed.info: list of the installed packages
with the exact format of the packages.info list.
Idea is just to copy list item from packages.info to the installed.info during package installation.
- installed.md5 (deprecated): list containing MD5 checksum with file names of all installed packages.
- priority: optional list of the repositories
priority.
One repository name per line. Undigest repositories are called by their names and main repository by “main”. If priority list absent, then default priority is: main repository and all existing undigest repositories in the alphabetical order.
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:
- receipt (mandatory) — the package recipe
- files.list (mandatory) — list of package files
- md5sum (mandatory) — checksums of package files (other checksum files can be specified in the settings: cksum (CRC32), md5sum (MD5), sha1sum (SHA1), sha256sum (SHA256), sha512sum (SHA512), sha3sum (SHA3-512))
- description.txt (optional) — “long” description
- modifiers (optional) — list of packages that have replaced some of the files of this package
- volatile.cpio.gz (optional) — archive of “official” configuration 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
- usage: print short usage
- help: show help on the TazPkg commands
- activity: show TazPkg activity log
- clean-cache: clean all packages downloaded in cache directory
- shell: run interactive TazPkg shell
Working with lists
- list: list installed packages on the system
- list-mirror: list all available packages on the mirror
- list-config: list the configuration files
Search
- search: search for a package by pattern or name
- search-pkgname: search on mirror for package having a particular file
- search-file: search for file in all installed packages files
Installing and removing packages
- get: download a package into the current directory
- install: install a local package
- get-install: download and install a package from the mirror
- install-list: install all packages from a list of packages
- get-install-list: download and install a list of packages from the mirror
- remove: remove the specified package and all installed files
- reconfigure: replay post install script from package
- link: link a package from another SliTaz installation
- set-release: change release and update packages
- add-flavor: install the flavor list of packages
- install-flavor: install the flavor list of packages and remove other ones
Working with packages
- info: print information about a package
- desc: print description of a package
- list-files: list the files installed with a package
- block, unblock: block an installed package version or unblock it for upgrade
- check: verify consistency of installed packages
- bugs: show known bugs in packages
- depends: display dependencies tree
- rdepends: display reverse dependencies tree
- extract: extract a (*.tazpkg) package into a directory
- pack: pack an unpacked or prepared package tree
- repack: create a package archive from an installed package
- repack-config: create a package archive with configuration files
- recompress: rebuild a package with a better compression ratio
- convert: convert alien package to tazpkg
- list-suggested: print list of suggested packages
Working with repositories
- recharge: recharge your packages database from the mirror
- upgrade: check packages, list and install latest upgrades
- setup-mirror: change the mirror URL configuration
- setup-undigest: update an undigest mirror
- list-undigest: list undigest mirrors
- add-undigest: add an undigest mirror
- remove-undigest: remove an undigest mirror
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
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
link
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:
- Debian packages (*.deb, *.udeb)
- RPM packages (*.rpm)
- Slax packages (*.sb)
- Puppy packages (*.sfs, *.pet)
- Slackware packages (*.tgz)
- NuTyX packages (*.cards.tar.xz)
- Arch Linux / Alpine Linux packages (*.apk, *.pkg.tar.gz, *.pkg.tar.xz)
- OpenWrt packages (*.ipk, *.opk)
- 0Linux packages (*.spack)
- paldo packages (*.tar.bz2)
- Void packages (*.xbps)
- Tinycore packages (*.tce, *.tcel, *.tcem, *.tcz)
# 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>