Tazwok - SliTaz sources and packages cooker.
tazwok [command] [package|list|category|dir] [--option]
This version of tazwok (tazwok-3.9 .*) is currently subject to active development and parts of program have not yet been completely revised and corrected. In its current state, however you should not encounter major problems during use. Any suggestions/comments/contributions are welcome: you will find the email address of the maintainer at the end of this document.
Tazwok is a command line tool to configure and compile a package from source. Tazwok can also create packages ready to be used by Tazpkg, the SliTaz package manager. To work, Tazwok uses a directory containing the receipt and any necessary information (stuff) for the construction of the package. This receipt is also used by Tazpkg and consists of different variables and functions. Tazwok uses a configuration file (/etc/tazwok.conf) to find the path to the wok, the package sources, and any generated .tazpkg packages. Tazwok can also generate a list of packages with their md5, create packages interactively, search for packages in the wok, clean generated files and even cook several packages at once (See available commands). Tazwok can be used to recompile SliTaz entirely from source.
Tazwok is entirely built from scratch using SHell script, compatible with Bash; it runs under Ash - part of the Busybox project. Tazwok is distributed under the free GNU license GPL V3. The SliTaz Cookbook also provides documentation about Tazwok and the package receipts.
Three options can be used with almost all orders tazwok. They are used to define the deposit to which to apply the command, ie the folder containing subfolders clean-wok, wok, packages, packages, incoming, src, log, optionally chroot. They are: SLITAZ_DIR: the directory in which are deposits (default: /home/slitaz as defined in /etc/slitaz/slitaz.conf) SLITAZ_VERSION name of the reference version, such stable cooking, ... (default: version that you use as defined in /etc/slitaz-release) undigest: Indicates the use of a secondary deposit, for which the reference is SLITAZ_VERSION.
In the absence of the option undigest, the address used will be depositing $SLITAZ_DIR/$SLITAZ_VERSION (example would be /home/slitaz/cooking by default if you use cooking) undigest If the option is present, it will $SLITAZ_DIR/$undigest undigest option is important for some commands (eg configure-chroot build-depends, etc..), when packets are missing from the secondary deposit, or information concerning them must be found in the deposit reference. In other cases the use of or undigest SLITAZ_VERSION gives the same result.
# tazwok build-depends linux --SLITAZ_DIR=/home/pas-slitaz --SLITAZ_VERSION=cooking --undigest=undigest
Usage displays a summary of available commands with a short description in English:
# tazwok usage
Stats displays information contained in the configuration file and the number of packages available in the wok:
# tazwok stats
List allows you to list all the packages contained in the wok or the default categories (you can create your own). It can also list packages by category:
# tazwok list # tazwok list category
This command provides information on the package - name, version, etc. Info on the basic package receipt is the same as displayed by Tazpkg and the installed packages:
# tazwok info package
When compiling a binary source, Tazwok generates a few messages stored in the file 'process.log'. To view:
# tazwok check-log package
Search allows you to search for packages in the wok. You can specify a term or package name:
# tazwok search name
This command uses the compilation rules (compile_rules) specified in the receipt for the package in question to compile the sources. Note compilation rules are not always necessary - packages generated by 'genpkg' and 'cook' can also compile sources and generate the binary package. Example:
# tazwok compile package
Genpkg will generate the .tazpkg package using the 'genpkg_rules' found in the receipt. Once the package is generated, it's stored in the repository of packages specified in the configuration file ('tazwok stats' to view). The package can be used by Tazpkg or Tazlito to generate a LiveCD distribution. Note that the standard files such as local, pixmap or name.desktop are automatically copied to $fs/usr/share, provided the paths are standard or if the file exists in /stuff. Example using 'genpkg':
# tazwok genpkg package
Cook will simply compile and generate the package:
# tazwok cook package
This command will launch 'tazwok cook' on all packages in the list specified as an argument, and their dependencies cooking if they are missing or need updating. Cook-list is used, for example, to cook the base system, core applications, the X, packets of flavor, etc.. Cooklist can also be used on a single package with the option - pkg. The option - Forced can be used to anneal all the dependencies required cooking, even if they are already available and current, example toolchain (see SLITAZ_TOOLCHAIN in /etc/slitaz/tazwok.conf). Without argument, cook-list uses the default list of cooking, located in the folder 'package '.
# tazwok cook-list # tazwok cook-list packages.cooklist --forced # tazwok cook-list --pkg=firefox
The command 'cook-commit' to look for packages with revenue /stuff/descriptions were modified and updated using cook. The research uses data changes md5 (identification by measuring different characteristics of files) elements used in the previous cooking packages. This information is stored in the wok, if they are absent they are derived from packages already prepared. The option - Forced commit forces to check md5 use data from the packages, which is useful for retrieving consistent information if you changed the lists commit/cooklist manually (rare). Default check-commit targets only those packages which are already present in the package pools. The option - missing can scan the entire wok and add all the packages that have not been cooked to the list.
# tazwok cook-commit # cook packages that need updating # tazwok cook-commit --forced # Same, correting any inconsistencies in the data # tazwok cook-commit --missing # Cook packages that need updating + the missing packets # tazwok cook-commit --missing --forced
The command 'cook-all ' anneal allows all packets from wok. Without options, it is identical to cook-commit: annealing only packets with receipts / description.txt / stuffs have been modified. The option - missing also has the same effect as in cook-commit: add all the packages that have not yet been prepared. The difference lies in the - Forced: here it means anneal all packets, even if they have not been updated since the last firing. As explained below, the core of the tool chain will never be annealed by this command.
# tazwok cook-all # identical to tazwok cook-commit # tazwok cook-all --missing # identical to tazwok cook-commit --missing # tazowk cook-all --forced # annealing all existing packages in your repository except the toolchain # tazwok cook-all --forced --missing # annealing all packages of the wok execpt the toolchain
Cook-toolchain is dedicated to controlling the firing of packages that allow all other preparations. Indeed, the packets in the heart of the tool chain (for SliTaz linux-api-headers/glibc/binutils/gcc) can not / should not be cooked differently in SliTaz. The preparation process of the tool chain is unique, and uses the script 'cook-toolchain' from 'tazchroot'. The method used is an adaptation of that presented in the book Linux From Scratch: a first toolchain temporary and unrelated to the equipment / system used is prepared and used in cooking packages from the "real" chain tools. It should be noted that this operation is quite long (several hours to several tens of hours depending on hardware). This is the first step to fully realize SliTaz to compile from source.
# tazwok cook-toolchain
Clean can simply delete all files generated by compiling and packaging:
# tazwok clean package
The 'new-tree' command can create a new package in the wok and can be used interactively. It will create a directory of the package and a receipt that can then be edited with your favorite text editor. The receipt can also be configured using the '--interactive' option. For help you can look at existing receipts or read the documentation in the Cookbook. Example:
# tazwok new-tree package # tazwok new-tree package --interactive
The 'gen-list' command can generate a list of packages (packages.list), their md5 (packages.md5) and a list of options containing information (packages.txt). The lists are created on the basis of packages contained in a directory. The list in text format is built using a receipt contained in a wok. The default packages directory is the one specified in the configuration file, you can also specify the directory on the command line. Examples:
# tazwok gen-list # tazwok gen-list --text # tazwok gen-list /path/to/repository
The command 'checklist' fulfills the same function as 'gen-list', but it looks for packages that information must be updated. For this reason it is generally faster, particularly when few packets have been modified. Commands automatically use the cook. As for 'gen-list', if you do not specify a target, 'packages'and 'packages-incoming' will both be updated.
# tazwok check-list # tazwok check-list /path/to/repository
'wok-db' means files used to quickly obtain the dependency relationships between revenue. This information is usually added whenever necessary, and automatically, by tazwok. 'gen-wok-db ' is used to re-generate them in case of file corruption (eg you killed tazwok while automatically generating these files).
# tazwok gen-wok-db
Displays the contents of lists: commit / cooklist / broken / blocked, or only the requested list argument.
# tazwok report # tazwok report cooklist
gen-clean-wok and clean-wok
The 'gen-clean-wok' command can create a new wok, this is useful to save a version of the wok, or create a new wok to test with another. Running 'clean-wok' will clean all packages in the current wok and delete any generated files. To generate a clean wok or clean the current wok:
# tazwok gen-clean-wok path/to/new-wok # tazwok clean-wok
Removes the package specified from the wok, including the receipt, stuff, all files, etc:
# tazwok remove package
Build-depends generates a list of packages to build a wok:
# tazwok build-depends
Compares the wok and the cooked packages and generates a report. Obsolete packages can be deleted with the --remove option. The --cook option compiles the packages. Examples:
# tazwok compare # tazwok compare --remove # tazwok compare --cook
'check-commit' scans the wok to find recipes that have been modified and added to the cooklist default. Options --forced and --missing here play the same role for cook-commit.
# tazwok check-commit # tazwok check-commit --forced # tazwok check-commit --missing
Checks the receipts for common errors:
# tazwok check
'update-wok' downloads or updates the contents in the wok-wok clean record of the deposit. Then it copies the new elements in the cooking wok (wok folder) and remove those that no longer exist in the new version. The addresses and the method (or tarball hg) used by this command are defined in tazwok.conf. The --local option allows for only the second operation (copy files to the wok). This is useful if you have make changes in the local clean-wok and want to add to wok cooking. This is especially useful for users of mercurial (hg), since this tool is much faster with a wok that contains no files associated with the compilation. In this case, make changes in the clean-wok then: tazwok update-wok --local.
# tazwok update-wok # tazwok update-wok --local
'webserver' is the command that creates a PHP interface that provides information about the status of deposits. Several deposits can be added/removed by using the options --SLITAZ_VERSION/--undigest. The argument 'on ' you can add a deposit to the web interface, while the 'off' withdraw (in each case). Using the default configuration, the interface will be available in your browser address http://localhost/vhosts/bb/. Package 'php' should be installed to use this command.
# tazwok webserver on # tazwok webserver off
Gen and Chroot into /home/slitaz/VERSION/chroot for building packages
# tazwok chroot
Christophe Lincoln <pankso at slitaz.org>