# HG changeset patch # User Christopher Rogers # Date 1305015066 0 # Node ID 80c33ad3414d6da74f7cef697adccfdfed7e71fe # Parent 88800c1af28dd5c5333bd46ad459ec5eb169a0f1# Parent 9ea09bdcab4898b0cf4d7f3504ee74c8b6a37342 Merge bugfixes from default branch. diff -r 88800c1af28d -r 80c33ad3414d .hgtags --- a/.hgtags Wed May 04 13:16:02 2011 +0000 +++ b/.hgtags Tue May 10 08:11:06 2011 +0000 @@ -28,3 +28,4 @@ a99465ca9b36dc10eaf8ca255306f2a78f4deb5a 4.2.11 ada9fd93793699e4858c3102a7110bedb5e86710 4.2.12 621bcc0de8ca7e029c7ca34060786f4cf8fba0f9 4.2.13 +1165e2c0ac23be43123fef2fc5b3b13ef11e2099 4.2.14 diff -r 88800c1af28d -r 80c33ad3414d Makefile --- a/Makefile Wed May 04 13:16:02 2011 +0000 +++ b/Makefile Tue May 10 08:11:06 2011 +0000 @@ -2,17 +2,27 @@ # PREFIX?=/usr DOCDIR?=/usr/share/doc +CHSCRIPTS?=/usr/lib/slitaz/chroot-scripts +WWWBB?=/usr/share/slitaz/web-bb all: install: @echo "Installing Tazwok into $(PREFIX)/bin..." - install -g root -o root -m 0777 tazwok $(PREFIX)/bin - install -g root -o root -m 0644 examples/tazwok.conf /etc/slitaz - install -g root -o root -m 0644 examples/config.site /etc + install -g root -o root -m 0755 tazwok $(PREFIX)/bin + install -g root -o root -m 0755 examples/tazwok.conf /etc/slitaz + install -g root -o root -m 0755 examples/config.site /etc + install -g root -o root -m 0755 examples/tazbb $(PREFIX)/bin @echo "Installing documentation files..." install -g root -o root -m 0755 -d $(DOCDIR)/tazwok - install -g root -o root -m 0644 doc/* $(DOCDIR)/tazwok + install -g root -o root -m 0755 doc/* $(DOCDIR)/tazwok + install -g root -o root -m 0755 applications $(PREFIX)/share + @echo "Installing Chroot scripts..." + install -g root -o root -m 0755 -d $(CHSCRIPTS)/tazwok + install -g root -o root -m 0755 chroot-scripts/* $(CHSCRIPTS)/tazwok + @echo "Installing web files..." + install -g root -o root -m 0755 -d $(WWWBB) + install -g root -o root -m 0755 web/* $(WWWBB) uninstall: rm -f $(PREFIX)/bin/tazwok diff -r 88800c1af28d -r 80c33ad3414d doc/tazwok.en.html --- a/doc/tazwok.en.html Wed May 04 13:16:02 2011 +0000 +++ b/doc/tazwok.en.html Tue May 10 08:11:06 2011 +0000 @@ -38,7 +38,13 @@

SYNTAX

 tazwok [command] [package|list|category|dir] [--option]
 
- +

WARNING

+

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

DESCRIPTION

Tazwok is a command line tool to configure and compile a package from source. Tazwok can also create packages @@ -47,7 +53,7 @@ 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). +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 - @@ -55,6 +61,26 @@ Cookbook also provides documentation about Tazwok and the package receipts.

+

GENERAL OPTIONS

+

+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
+

COMMANDS

usage

@@ -134,11 +160,62 @@

cook-list

-This command will launch 'tazwok cook' on all the packages contained in the list file specified in the argument. -Cook-list is used for example, to cook the base system (base-system) without glibc. On SliTaz, you will find -examples of cooking lists in the directory /usr/share/examples/tazwok.cooklists: +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 packages.cooklist
+
 # tazwok cook-list 
+ # tazwok cook-list packages.cooklist --forced
+ # tazwok cook-list --pkg=firefox
+
+ +

cook-commit

+

+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
+
+ +

cook-all

+

+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

+

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

@@ -171,6 +248,33 @@ # tazwok gen-list --text # tazwok gen-list /path/to/repository
+ +

check-list

+

+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
+
+ +

gen-wok-db

+

+'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
+
+ +

report

+

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

@@ -206,6 +310,16 @@ # tazwok compare --remove # tazwok compare --cook + +

check-commit

+

+'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
+

check

@@ -213,7 +327,38 @@

 # tazwok check
 
- + +

update-wok

+

+'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

+

+'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
+
+

chroot

+

+Gen and Chroot into /home/slitaz/VERSION/chroot for building packages +

+
 # tazwok chroot
+

MAINTAINER

Christophe Lincoln <pankso at slitaz.org> diff -r 88800c1af28d -r 80c33ad3414d examples/README.tazbb --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/README.tazbb Tue May 10 08:11:06 2011 +0000 @@ -0,0 +1,9 @@ +Tazbb is a wrapper script to automate doing things when using crond +for doing daily builds. + +examples for /var/spool/cron/crontabs/root: +NOTE: you need full path for file you want to execute in chroot +*/2 * * * tazbb /usr/bin/tank-bin + +1 * * * tazbb /usr/bin/gen-iso + diff -r 88800c1af28d -r 80c33ad3414d examples/tazbb --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/tazbb Tue May 10 08:11:06 2011 +0000 @@ -0,0 +1,29 @@ +#!/bin/sh + +. /etc/slitaz/slitaz.conf + +LOCAL_REPOSITORY="$SLITAZ_DIR/${undigest:-$SLITAZ_VERSION}" +if [ -f $LOCAL_REPOSITORY/tazchroot.conf ]; then + . $LOCAL_REPOSITORY/tazchroot.conf +else + tazwok configure-chroot + . $LOCAL_REPOSITORY/tazchroot.conf +fi + +if [ -f $LOCAL_REPOSITORY/tazwok.conf ]; then + . $LOCAL_REPOSITORY/tazwok.conf +else + . /etc/slitaz/tazwok.conf +fi + +[ -d $chroot_dir ] || create_chroot + +if [ -f $LOCAL_REPOSITORY/chroot${1} -a -x $LOCAL_REPOSITORY/chroot${1} ]; then + mount_chroot + chroot $LOCAL_REPOSITORY/chroot $1 + umount_chroot +else + echo "Make sure to use full path and file is executable in chroot" + exit 1 +fi + diff -r 88800c1af28d -r 80c33ad3414d examples/tazwok.conf --- a/examples/tazwok.conf Wed May 04 13:16:02 2011 +0000 +++ b/examples/tazwok.conf Tue May 10 08:11:06 2011 +0000 @@ -130,6 +130,7 @@ # Note : order is not important here. SLITAZ_TOOLCHAIN_EXTRA="tazpkg tazwok +slitaz-boot-scripts pkg-config libtool libpthread-stubs" diff -r 88800c1af28d -r 80c33ad3414d tazwok --- a/tazwok Wed May 04 13:16:02 2011 +0000 +++ b/tazwok Tue May 10 08:11:06 2011 +0000 @@ -418,12 +418,12 @@ if [ "$auto_install" = yes ]; then install_missing else - echo "================================================================================" + horizontal_line for pkg in $MISSING_PACKAGE do echo "Missing : $pkg" done - echo "================================================================================" + horizontal_line echo "You can continue, exit or install missing dependencies." echo -n "Install, continue or exit (install/y/N) ? "; read answer case $answer in @@ -489,6 +489,8 @@ else _pkg=$src/_pkg fi + # compatibly with cookutils + install=$_pkg } # Output $VERSION-$EXTRAVERSION using packages.txt @@ -817,8 +819,12 @@ continue fi ;; - subversion\|*) - file=${file#subversion|} + svn*|subversion*) + if $(echo "$WGET_URL" | fgrep -q svn); then + file=${WGET_URL#svn|} + else + file=${WGET_URL#subversion|} + fi [ "$COMMAND" = get-src ] && [ ! -f $INSTALLED/subversion/receipt ] && tazpkg get-install subversion --forced if [ -f $INSTALLED/subversion/receipt ]; then mkdir $tmp_src @@ -834,8 +840,12 @@ continue fi ;; - mercurial\|*) - file=${file#mercurial|} + hg*|mercurial*) + if $(echo "$WGET_URL" | fgrep -q hg); then + file=${WGET_URL#hg|} + else + file=${WGET_URL#mercurial|} + fi [ "$COMMAND" = get-src ] && [ ! -f $INSTALLED/mercurial/receipt ] && tazpkg get-install mercurial --forced if [ -f $INSTALLED/mercurial/receipt ]; then mkdir $tmp_src @@ -1629,7 +1639,9 @@ cp -f $tmp/db /tmp/remain-depends.txt echo "Can't go further because of dependency loop(s). The remaining packages will be commented in the cookorder and will be unbuilt in case of major updates until the problem is solved." >&2 for remaining in $(cut -f 1 $tmp/db); do - echo "$remaining" >> $blocked + if ! grep -q ^$remaining $PACKAGES_REPOSITORY/blocked; then + echo "$remaining" >> $PACKAGES_REPOSITORY/blocked + fi done break fi @@ -2437,7 +2449,7 @@ sed 's/LC_ALL/LC_ALL=POSIX/' -i \$chroot_dir/etc/profile # The build bot may run in a sandbox: link sandbox lockfile. - ln -s \$LOCAL_REPOSITORY/sandbox/proc/1 \$chroot_dir/proc/1 + [ -d \$LOCAL_REPOSITORY/sandbox ] && ln -s \$LOCAL_REPOSITORY/sandbox/proc/1 \$chroot_dir/proc/1 } mount_chroot() @@ -2730,7 +2742,7 @@ ASKED_CATEGORY=$2 echo "" echo -e "\033[1mPackages in category :\033[0m $ASKED_CATEGORY" - echo "================================================================================" + horizontal_line for pkg in $WOK/* do [ ! -f $pkg/receipt ] && continue @@ -2741,13 +2753,13 @@ packages=$(($packages+1)) fi done - echo "================================================================================" + horizontal_line echo -e "$packages packages in category $ASKED_CATEGORY.\n" else # By default list all packages and version. echo "" echo -e "\033[1mList of packages in the wok\033[0m" - echo "================================================================================" + horizontal_line for pkg in $WOK/* do [ ! -f $pkg/receipt ] && continue @@ -2757,7 +2769,7 @@ echo -e "\033[42G $CATEGORY" packages=$(($packages+1)) done - echo "================================================================================" + horizontal_line echo -e "$packages packages available in the wok.\n" fi ;; @@ -2785,7 +2797,7 @@ if [ ! "$WANTED" = "" ]; then echo "Wanted src : $WANTED" fi - echo "================================================================================" + horizontal_line echo "" ;; check-log) @@ -2798,15 +2810,15 @@ else echo "" echo -e "\033[1mPackage process log for :\033[0m $PACKAGE" - echo "================================================================================" + horizontal_line cat $LOG - echo "================================================================================" + horizontal_line echo "" if [ -s "$WOK/$PACKAGE/warning.txt" ]; then echo -e "\033[1mCook warning(s) for :\033[0m $PACKAGE" - echo "================================================================================" + horizontal_line cat "$WOK/$PACKAGE/warning.txt" - echo "================================================================================" + horizontal_line echo "" fi fi @@ -2822,7 +2834,7 @@ fi echo "" echo -e "\033[1mSearch result for :\033[0m $2" - echo "================================================================================" + horizontal_line list=`ls -1 $WOK | fgrep $2` for pkg in $list do @@ -2832,7 +2844,7 @@ echo -e "\033[42G $CATEGORY" packages=$(($PACKAGEs+1)) done - echo "================================================================================" + horizontal_line echo "$packages packages found for : $2" echo "" ;; @@ -3075,7 +3087,7 @@ # Interactive mode, asking and seding. if [ "$3" = "--interactive" ]; then echo "Entering interactive mode..." - echo "================================================================================" + horizontal_line echo "Package : $PACKAGE" # Version. echo -n "Version : " ; read anser @@ -3110,7 +3122,7 @@ echo -n "Creating the description.txt file..." echo "" > description.txt && status fi - echo "================================================================================" + horizontal_line echo "" fi ;; @@ -3198,7 +3210,7 @@ get_tazwok_config echo "" echo "List of maintainers for: $WOK" - echo "================================================================================" + horizontal_line touch /tmp/slitaz-maintainers for pkg in $WOK/* do @@ -3208,7 +3220,7 @@ echo "$MAINTAINER" fi done - echo "================================================================================" + horizontal_line echo "Maintainers: `cat /tmp/slitaz-maintainers | wc -l`" echo "" # Remove tmp files @@ -3222,7 +3234,7 @@ exit 1 fi echo "Maintainer packages" - echo "================================================================================" + horizontal_line for pkg in $WOK/* do . $pkg/receipt @@ -3231,7 +3243,7 @@ packages=$(($PACKAGEs+1)) fi done - echo "================================================================================" + horizontal_line echo "Packages maintained by $2: $PACKAGEs" echo "" ;; @@ -3384,9 +3396,9 @@ if [ -s $i ]; then echo "" echo -e "\033[1m$i\033[0m" - echo "================================================================================" + horizontal_line cat $i - echo "================================================================================" + horizontal_line echo "" fi done