cookutils view README @ rev 26

cooker: add option --list= and log all stderr
author Christophe Lincoln <pankso@slitaz.org>
date Fri May 06 04:07:11 2011 +0200 (2011-05-06)
parents c7af43cc8a07
children c1a2be11e84a
line source
1 SliTaz Cookutils
2 ================================================================================
5 The SliTaz Cookutils provide tools and utils to build SliTaz packages.
8 cook
9 ----
10 The cook tool should be used in a chroot environment, simply use the command
11 'tazdev gen-chroot' to build one. You can also build package directly but
12 build deps will not be handled correctly since cook will install missing
13 packages to perform a build and then remove them only if there wasn't
14 installed before, this way we can keep a clean build environment.
16 We use standard SliTaz path to work such as /home/slitaz/wok, if you work on
17 cooking from stable or want to keep a clean system: create a chroot.
19 Cook features:
21 * Setup a build env
22 * Check and install missing build deps
23 * Compile and generate the package
24 * Remove installed build deps
25 * Provide a log for each cook
26 * Clean one or all packages in the wok
27 * Check for receipt and package quality
29 Cook does not:
31 * Depends on Hg but can use it to manage a wok
32 * Do complex work about compiling the all system from source
33 * Check build deps for you, use: BUILD_DEPENDS
34 If all deps are also build deps do: BUILD_DEPENDS="$DEPENDS"
35 * The work of a Build Bot, unix philosophy: one tool for one task
36 * Cook a package if you receipt is crappy :-)
38 Cook variables used in receipt:
40 * $src : Path to package source: wok/pkg/source
41 * $stuff : Path to package stuff: wok/pkg/stuff
42 * $fs : Path to package file system: wok/pkg/taz/*/fs
43 * $install : Path to all installed files by the package
44 Old style is $_pkg and cook is compatible
46 Cook also manage packages list so they can be used for a personnal packages
47 repository or sent to the official mirror. We create and use:
49 * packages.list Simple list of package-version
50 * packages.md5 MD5sum list of all packages
51 * packages.desc Packages with name, version, category, desc
52 * packages.equiv Equivalent paclages list
53 * files.list.lzma A files provides by all packages
56 cooker
57 ------
58 The Cooker is a Build Bot who automate the build process but dont do the diner
59 for you! We need quality receipt to cook succefully and the goal is not to have
60 a bloated script so please Keep It Short and Simple.
62 Cmdline tool : /usr/bin/cooker
63 Web interface : /var/www/cgi-bin/cooker
64 Cache folder : /home/slitaz/cache
66 The web interface consist in one CGI script and one CSS style. Cook log can
67 are produced by cook and the cooker just act as a fronted to check them in
68 a nice way. Web interface also hightligh success and error, can show receipt
69 and the cooker logs such as the last ordered list or commits check.
72 Coding style
73 ------------
75 * Use tab and not space to ident
76 * Use name rater than $1 $2 $2
77 * Variables from config file are $UPERCASE
78 * Variables initialized by cook are $lowercase
79 * Function can be a single word or use_underline()
80 my_function() {
81 echo "Hello World"
82 }
83 * Use $(command) and not: `command`
84 * Cook use gettext for messages, not the cooker
85 * If you add a feature, add also the doc to explain it
86 * Use clean case with space before case end ;;
87 case "$pkg" in
88 a) echo "Hello World" ;;
89 *) continue ;;
90 esac
91 * Make commands and options as short as possible
92 * Think to log everything to help debug
95 ================================================================================