tazwok rev 245

Automated merge with http://repos.slitaz.org/tazwok-experimental
author Antoine Bodin <gokhlayeh@slitaz.org>
date Sat Feb 12 02:29:59 2011 +0100 (2011-02-12)
parents d02c2f20ca37 54c47afef11a
children 7b283e090907
files tazwok web/conf.php web/slitaz.css
line diff
     1.1 --- a/tazwok	Wed Feb 09 19:17:52 2011 +0000
     1.2 +++ b/tazwok	Sat Feb 12 02:29:59 2011 +0100
     1.3 @@ -22,7 +22,7 @@
     1.4  ########################
     1.5  # Print the usage (English).
     1.6  
     1.7 -usage ()
     1.8 +usage()
     1.9  {
    1.10  	echo -e "\nSliTaz sources compiler and packages generator - Version: $VERSION\n
    1.11  \033[1mUsage: \033[0m `basename $0` [command] [package|list|category|dir|id] [--option]
    1.12 @@ -31,7 +31,6 @@
    1.13    stats          Print Tazwok statistics from the config file and the wok.
    1.14    edit           Edit a package receipt in the current wok.
    1.15    build-depends  Generate a list of packages to build a wok.
    1.16 -  cmp|compare*   Compare the wok and the cooked pkgs (--remove old pkgs).
    1.17    list           List all packages in the wok tree or by category.
    1.18    info           Get information about a package in the wok.
    1.19    check          Check every receipt for common errors.
    1.20 @@ -46,16 +45,18 @@
    1.21    cook-commit    Cook all modified receipts.
    1.22    cook-all       Cook all packages excepted toolchain.
    1.23    cook-toolchain Cook the toolchain packages.
    1.24 -  gen-cooklist   Generate a sorted cooklist using packages or list (--list) in argument.
    1.25 +  gen-cooklist   Generate a sorted cooklist using packages or list.
    1.26    sort-cooklist  Sort the cooklist given in argument.
    1.27    get-src        Download the tarball of the package given in argument.
    1.28    clean          Clean all generated files in the package tree.
    1.29    new-tree       Prepare a new package tree and receipt (--interactive).
    1.30    gen-list       (Re-)Generate a packages list for a repository.
    1.31 +  check-list     Update packages lists for a repository.
    1.32    gen-wok-db     (Re-)Generate wok lists with depends and wanted datas.
    1.33 -  gen-clean-wok  Gen a clean wok in a dir ('clean-wok' cleans current wok).
    1.34 +  gen-clean-wok  Generate a clean wok in a dir.
    1.35    clean-wok      Clean entirely the wok.
    1.36    remove         Remove a package from the wok.
    1.37 +  webserver      Enable/disable webserver on localhost.
    1.38    hgup           Pull and update a wok under Hg.
    1.39    maintainers    List all maintainers in the wok.
    1.40    maintained-by  List packages maintained by a contributor.\n
    1.41 @@ -92,7 +93,18 @@
    1.42  	else
    1.43  		LOCAL_REPOSITORY=$SLITAZ_DIR/$SLITAZ_VERSION
    1.44  	fi
    1.45 -
    1.46 +	
    1.47 +	if ! [ "$save_dir" ]; then
    1.48 +		if [ -f $LOCAL_REPOSITORY/tazwok.conf ] || [ -f $LOCAL_REPOSITORY/slitaz.conf ]; then
    1.49 +			save_dir=$LOCAL_REPOSITORY
    1.50 +			[ -f $LOCAL_REPOSITORY/slitaz.conf ] && source $LOCAL_REPOSITORY/slitaz.conf
    1.51 +			cd $save_dir
    1.52 +			get_tazwok_config
    1.53 +			unset save_dir
    1.54 +			return
    1.55 +		fi
    1.56 +	fi
    1.57 +	
    1.58  	# The path to the most important files/dir used by Tazwok.
    1.59  	PACKAGES_REPOSITORY=$LOCAL_REPOSITORY/packages
    1.60  	WOK=$LOCAL_REPOSITORY/wok
    1.61 @@ -116,7 +128,7 @@
    1.62  		check_dir $INCOMING_REPOSITORY
    1.63  		check_dir $LOCAL_REPOSITORY/log
    1.64  	fi
    1.65 -	
    1.66 +
    1.67  	# Some files are needed by tazwok in PACKAGES_REPOSITORY. Create
    1.68  	# them if they are missing.
    1.69  	for file in broken blocked commit incoming cooklist; do
    1.70 @@ -188,7 +200,7 @@
    1.71  	[ -f $WOK/$PACKAGE/receipt ] && return
    1.72  	if [ "$undigest" ]; then
    1.73  		[ -f "$SLITAZ_VERSION/wok/$PACKAGE/receipt" ] && return 1
    1.74 -		grep -q ^$PACKAGE$ $SLITAZ_VERSION/packages/packages.txt && return 1
    1.75 +		grep -q ^$PACKAGE$ $SLITAZ_DIR/$SLITAZ_VERSION/packages/packages.txt && return 1
    1.76  	fi
    1.77  	echo "Can't find $PACKAGE in wok or mirror" >&2
    1.78  	return 2
    1.79 @@ -423,22 +435,11 @@
    1.80  # Check for src tarball and wget if needed.
    1.81  check_for_tarball()
    1.82  {
    1.83 -	if [ "$SRC_WANTED" ]; then
    1.84 -		VERSION_SRCWANTED=$(grep  ^VERSION= $WOK/$SRC_WANTED/receipt | cut -d "=" -f2 | sed -e 's/"//g')
    1.85 -		[ "$VERSION" != "$VERSION_SRCWANTED" ] || return
    1.86 -		if [ "$SOURCE" ]; then
    1.87 -			tazwok get-src "$SRC_WANTED"  --target=$WOK/$PACKAGE/$SOURCE-$VERSION ${nounpack:+--nounpack} || return 1
    1.88 -		else
    1.89 -			tazwok get-src "$SRC_WANTED" --target=$WOK/$PACKAGE/$PACKAGE-$VERSION ${nounpack:+--nounpack} || return 1
    1.90 -		fi
    1.91 -		return
    1.92 -	fi
    1.93 -	
    1.94  	if [ "$WGET_URL" ]; then
    1.95  		report step "Checking for source tarball"
    1.96  			
    1.97  		if [ ! -f "$SOURCES_REPOSITORY/$TARBALL" ] && \
    1.98 -			[ ! -f "$SOURCES_REPOSITORY/$PACKAGE-$VERSION.tar.lzma" ] ; then
    1.99 +			[ ! -f "$SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" ] ; then
   1.100  			cd $SOURCES_REPOSITORY
   1.101  			download $WGET_URL
   1.102  			
   1.103 @@ -446,7 +447,11 @@
   1.104  			# mirror.
   1.105  			if [ ! -f "$SOURCES_REPOSITORY/$TARBALL" ]; then
   1.106  				report step "Download failed, try with mirror copy... "
   1.107 -				download http://mirror.slitaz.org/sources/packages/${PACKAGE:0:1}/$PACKAGE-$VERSION.tar.lzma
   1.108 +				if [ "$SOURCE" ]; then
   1.109 +					download http://mirror.slitaz.org/sources/packages/${SOURCE:0:1}/$SOURCE-$VERSION.tar.lzma
   1.110 +				else
   1.111 +					download http://mirror.slitaz.org/sources/packages/${PACKAGE:0:1}/$PACKAGE-$VERSION.tar.lzma
   1.112 +				fi
   1.113  			fi
   1.114  			if [ ! -f "$SOURCES_REPOSITORY/$TARBALL" ] && \
   1.115  				[ ! -f "$SOURCES_REPOSITORY/$PACKAGE-$VERSION.tar.lzma" ]; then
   1.116 @@ -462,10 +467,10 @@
   1.117  				return 1
   1.118  			fi
   1.119  		fi
   1.120 +		report end-step
   1.121  	fi
   1.122 -	report end-step
   1.123  	
   1.124 -	if [ -f "$SOURCES_REPOSITORY/$PACKAGE-$VERSION.tar.lzma" ] && [ "$nounpack" ]; then
   1.125 +	if [ -f "$SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" ] && [ "$nounpack" ]; then
   1.126  		return
   1.127  	fi
   1.128  
   1.129 @@ -487,8 +492,8 @@
   1.130  			
   1.131  	tmp_src=$WOK/$PACKAGE/tmp-src-$$
   1.132  	mkdir $tmp_src
   1.133 -	if [ -f "$SOURCES_REPOSITORY/$PACKAGE-$VERSION.tar.lzma" ]; then
   1.134 -		lzma d $SOURCES_REPOSITORY/$PACKAGE-$VERSION.tar.lzma -so | \
   1.135 +	if [ -f "$SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" ]; then
   1.136 +		lzma d $SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma -so | \
   1.137  			tar xf - -C $tmp_src
   1.138  	elif [ -f "$SOURCES_REPOSITORY/$TARBALL" ]; then
   1.139  		case "$TARBALL" in
   1.140 @@ -506,7 +511,7 @@
   1.141  			if check_for_var_modification src _pkg; then
   1.142  				mv $tmp_src $tmp_src-1
   1.143  				mkdir $tmp_src
   1.144 -				mv $tmp_src-1 $tmp_src/$PACKAGE-$VERSION
   1.145 +				mv $tmp_src-1 $tmp_src/${SOURCE:-$PACKAGE}-$VERSION
   1.146  			else
   1.147  				mv $tmp_src/* $WOK/$PACKAGE
   1.148  				repack_src=no
   1.149 @@ -517,7 +522,7 @@
   1.150  		if [ "$repack_src" = yes ]; then
   1.151  			report step "Repacking sources in .tar.lzma format"
   1.152  			cd $tmp_src
   1.153 -			tar -c * | lzma e $SOURCES_REPOSITORY/$PACKAGE-$VERSION.tar.lzma -si
   1.154 +			tar -c * | lzma e $SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma -si
   1.155  			rm $SOURCES_REPOSITORY/$TARBALL
   1.156  			prev_VERSION=$(get_pkg_version $INCOMING_REPOSITORY)
   1.157  
   1.158 @@ -1159,7 +1164,7 @@
   1.159  	unset PACKAGE SOURCE VERSION EXTRAVERSION CATEGORY SHORT_DESC \
   1.160  		MAINTAINER WEB_SITE WGET_URL DEPENDS BUILD_DEPENDS WANTED \
   1.161  		PACKED_SIZE UNPACKED_SIZE COOK_OPT PROVIDE CONFIG_FILES TAGS \
   1.162 -		src _pkg DESTDIR SRC_WANTED CONFIG_SITE
   1.163 +		src _pkg DESTDIR CONFIG_SITE
   1.164  	. ${RECEIPT:-$PWD/receipt}
   1.165  }
   1.166  
   1.167 @@ -1317,7 +1322,7 @@
   1.168  look_for_dep()
   1.169  {
   1.170  	if [ "$undigest" ] && [ ! -f "$WOK/$PACKAGE/receipt" ]; then
   1.171 -		grep ^$PACKAGE$'\t' $SLITAZ_DIR/$SLITAZ_VERSION/packages/wok-depends.txt \
   1.172 +		grep ^$PACKAGE$'\t' $SLITAZ_DIR/$SLITAZ_VERSION/packages-incoming/wok-depends.txt \
   1.173  			| cut -f 2
   1.174  	else
   1.175  		grep ^$PACKAGE$'\t' $INCOMING_REPOSITORY/wok-depends.txt | \
   1.176 @@ -1333,7 +1338,7 @@
   1.177  look_for_all()
   1.178  {
   1.179  	if [ "$undigest" ] && [ ! -f "$WOK/$PACKAGE/receipt" ]; then
   1.180 -		grep ^$PACKAGE$'\t' $SLITAZ_DIR/$SLITAZ_VERSION/packages/wok-depends.txt \
   1.181 +		grep ^$PACKAGE$'\t' $SLITAZ_DIR/$SLITAZ_VERSION/packages-incoming/wok-depends.txt \
   1.182  			| cut -f 2,3 | sed 's/ 	 / /'
   1.183  	else
   1.184  		grep ^$PACKAGE$'\t' $INCOMING_REPOSITORY/wok-depends.txt | \
   1.185 @@ -1345,7 +1350,7 @@
   1.186  {
   1.187  	fgrep ' '$PACKAGE' ' $INCOMING_REPOSITORY/wok-depends.txt | cut -f 1
   1.188  	if [ "$undigest" ]; then
   1.189 -		for rdep in $(fgrep ' '$PACKAGE' ' $SLITAZ_DIR/$SLITAZ_VERSION/packages/wok-depends.txt | cut -f 1); do
   1.190 +		for rdep in $(fgrep ' '$PACKAGE' ' $SLITAZ_DIR/$SLITAZ_VERSION/packages-incoming/wok-depends.txt | cut -f 1); do
   1.191  			if [ ! -f "WOK$/$rdep/receipt" ]; then
   1.192  				echo "$rdep"
   1.193  			fi
   1.194 @@ -1358,7 +1363,7 @@
   1.195  	fgrep ' '$PACKAGE' ' $INCOMING_REPOSITORY/wok-depends.txt | \
   1.196  		cut -f 1,3 | fgrep ' '$PACKAGE' ' | cut -f 1
   1.197  	if [ "$undigest" ]; then
   1.198 -		for rdep in $(fgrep ' '$PACKAGE' ' $SLITAZ_DIR/$SLITAZ_VERSION/packages/wok-depends.txt \
   1.199 +		for rdep in $(fgrep ' '$PACKAGE' ' $SLITAZ_DIR/$SLITAZ_VERSION/packages-incoming/wok-depends.txt \
   1.200  			| cut -f 1,3 | fgrep ' '$PACKAGE' ' | cut -f 1); do
   1.201  			if [ ! -f "WOK$/$rdep/receipt" ]; then
   1.202  				echo "$rdep"
   1.203 @@ -1371,7 +1376,7 @@
   1.204  look_for_wanted()
   1.205  {
   1.206  	if [ "$undigest" ] && [ ! -f "$WOK/$PACKAGE/receipt" ]; then
   1.207 -		grep ^$PACKAGE$'\t' $SLITAZ_DIR/$SLITAZ_VERSION/packages/wok-wanted.txt | cut -f 2
   1.208 +		grep ^$PACKAGE$'\t' $SLITAZ_DIR/$SLITAZ_VERSION/packages-incoming/wok-wanted.txt | cut -f 2
   1.209  	else
   1.210  		grep ^$PACKAGE$'\t' $INCOMING_REPOSITORY/wok-wanted.txt | cut -f 2
   1.211  	fi
   1.212 @@ -1382,7 +1387,7 @@
   1.213  {
   1.214  	grep $'\t'$PACKAGE$ $INCOMING_REPOSITORY/wok-wanted.txt | cut -f 1
   1.215  	if [ "$undigest" ]; then
   1.216 -		for rwanted in $(grep $'\t'$PACKAGE$ $SLITAZ_DIR/$SLITAZ_VERSION/packages/wok-wanted.txt | cut -f 1); do
   1.217 +		for rwanted in $(grep $'\t'$PACKAGE$ $SLITAZ_DIR/$SLITAZ_VERSION/packages-incoming/wok-wanted.txt | cut -f 1); do
   1.218  			if [ ! -f "$WOK/$rwanted/receipt" ]; then
   1.219  				echo "$rwanted"
   1.220  			fi
   1.221 @@ -1462,15 +1467,50 @@
   1.222  		gen_wan_db
   1.223  		look_for=all && with_args=yes && with_dev= && with_wanted=
   1.224  		filter=use_wanted
   1.225 -		append_to_dep()
   1.226 -		{
   1.227 -			check_for_commit && echo $PACKAGE >> $tmp/dep
   1.228 -		}
   1.229 +		if [ "$COMMAND" = gen-cooklist ]; then
   1.230 +   			for PACKAGE in $pkg_list; do
   1.231 +				grep -q ^$PACKAGE$'\t' $dep_db && continue
   1.232 +				[ -d "$WOK/$p" ] || continue
   1.233 +				check_for_missing
   1.234 +			done
   1.235 +			append_to_dep()
   1.236 +			{
   1.237 +				if ! grep -q ^$PACKAGE$'\t' $dep_db; then
   1.238 +					check_for_missing && echo $PACKAGE >> $tmp/dep
   1.239 +				else
   1.240 +					echo $PACKAGE >> $tmp/dep
   1.241 +				fi
   1.242 +			}
   1.243 +		else
   1.244 +			append_to_dep()
   1.245 +			{
   1.246 +				check_for_commit && echo $PACKAGE >> $tmp/dep
   1.247 +			}
   1.248 +		fi
   1.249  	else
   1.250  		append_to_dep()
   1.251  		{
   1.252  			echo $PACKAGE >> $tmp/dep
   1.253  		}
   1.254 +		# If requested packages are not in dep_db, partial generation of this db is needed.
   1.255 +		for PACKAGE in $pkg_list; do
   1.256 +			grep -q ^$PACKAGE$'\t' $dep_db && continue
   1.257 +			[ -d "$WOK/$p" ] || continue	
   1.258 +			plan_check_for_missing=yes	
   1.259 +			check_for_missing
   1.260 +		done
   1.261 +		if [ "$plan_check_for_missing" ]; then
   1.262 +			append_to_dep()
   1.263 +			{
   1.264 +				if ! grep -q ^$PACKAGE$'\t' $dep_db; then
   1.265 +					check_for_missing && echo $PACKAGE >> $tmp/dep
   1.266 +				else
   1.267 +					echo $PACKAGE >> $tmp/dep
   1.268 +				fi
   1.269 +			}
   1.270 +			check_db_status=yes
   1.271 +			unset plan_check_for_missing
   1.272 +		fi
   1.273  	fi
   1.274  	
   1.275  	[ "$with_dev" ] && filter=with_dev
   1.276 @@ -1509,6 +1549,14 @@
   1.277  		cat $tmp/dep | sort -u
   1.278  	fi
   1.279  	rm -f $tmp/dep $tmp/list
   1.280 +	if [ "$check_db_status" ]; then
   1.281 +		[ "$plan_sort_depdb" ] && sort -o $dep_db $dep_db && unset plan_sort_depdb
   1.282 +		[ "$plan_sort_wandb" ] && sort -o $wan_db $wan_db && unset plan_sort_wandb
   1.283 +		if [ "$plan_regen_cookorder" ]; then
   1.284 +			grep -q "^#" $PACKAGES_REPOSITORY/cookorder.txt || \
   1.285 +			sed 1i"#PlanSort" -i $PACKAGES_REPOSITORY/cookorder.txt
   1.286 +		fi
   1.287 +	fi
   1.288  }
   1.289  
   1.290  ########################################################################
   1.291 @@ -1516,6 +1564,24 @@
   1.292  # find which packages to cook.
   1.293  ########################
   1.294  
   1.295 +check_for_missing()
   1.296 +{
   1.297 +	local PACKAGE
   1.298 +	if ! check_for_pkg_in_wok; then
   1.299 +		[ "$?" = 2 ] && return 1
   1.300 +		return
   1.301 +	fi
   1.302 +	RECEIPT=$WOK/$PACKAGE/receipt
   1.303 +	source_receipt
   1.304 +	PACKAGE=${WANTED:-$PACKAGE}
   1.305 +	update_wan_db
   1.306 +	for PACKAGE in $(look_for_rwanted) $PACKAGE; do
   1.307 +		RECEIPT=$WOK/$PACKAGE/receipt
   1.308 +		source_receipt
   1.309 +		update_dep_db
   1.310 +	done
   1.311 +}
   1.312 +
   1.313  check_for_commit()
   1.314  {
   1.315  	if ! check_for_pkg_in_wok; then
   1.316 @@ -1613,7 +1679,7 @@
   1.317  		done
   1.318  	fi
   1.319  	
   1.320 -	if [ -s $PACKAGES_REPOSITORY/commit ]; then
   1.321 +	if [ -s $PACKAGES_REPOSITORY/commit ] && [ "$COMMAND" != gen-cooklist ]; then
   1.322  		cd $PACKAGES_REPOSITORY
   1.323  		for PACKAGE in $(cat commit); do
   1.324  			WANTED="$(look_for_wanted)"
   1.325 @@ -1982,10 +2048,7 @@
   1.326  		# List dependencies to rebuild wok, or only a package
   1.327  		get_tazwok_config
   1.328  		report(){ : ; }
   1.329 -		if [ "$PACKAGE" = toolchain-cooklist ]; then
   1.330 -			scan "$SLITAZ_TOOLCHAIN $SLITAZ_TOOLCHAIN_EXTRA" \
   1.331 -				--cooklist
   1.332 -		elif [ ! "$PACKAGE" ] || [ "$PACKAGE" = toolchain ]; then
   1.333 +		if [ ! "$PACKAGE" ] || [ "$PACKAGE" = toolchain ]; then
   1.334  			scan "$SLITAZ_TOOLCHAIN $SLITAZ_TOOLCHAIN_EXTRA" \
   1.335  				--look_for=dep --with_dev --with_args
   1.336  		else
   1.337 @@ -1999,9 +2062,12 @@
   1.338  		get_tazwok_config
   1.339  		report(){ : ; }
   1.340  		if ! [ "$pkg" ]; then
   1.341 -			cooklist=${LIST:-$PACKAGES_REPOSITORY/cooklist}
   1.342 +			if [ ! "$LIST" ] || [ "$LIST" = toolchain ]; then
   1.343 +				pkg="$SLITAZ_TOOLCHAIN $SLITAZ_TOOLCHAIN_EXTRA"
   1.344 +			else
   1.345 +				cooklist=${LIST:-$PACKAGES_REPOSITORY/cooklist}
   1.346 +			fi
   1.347  		fi
   1.348 -		forced=yes
   1.349  		gen_cook_list
   1.350  	;;
   1.351  	check-depends)
   1.352 @@ -2195,7 +2261,7 @@
   1.353  				fi
   1.354  			done
   1.355  			echo "================================================================================"
   1.356 -			echo -e "$PACKAGEs packages in category $ASKED_CATEGORY.\n"
   1.357 +			echo -e "$packages packages in category $ASKED_CATEGORY.\n"
   1.358  		else
   1.359  			# By default list all packages and version.
   1.360  			echo ""
   1.361 @@ -2211,7 +2277,7 @@
   1.362  				packages=$(($packages+1))
   1.363  			done
   1.364  			echo "================================================================================"
   1.365 -			echo -e "$PACKAGEs packages available in the wok.\n"
   1.366 +			echo -e "$packages packages available in the wok.\n"
   1.367  		fi
   1.368  		;;
   1.369  	info)
   1.370 @@ -2255,6 +2321,13 @@
   1.371  			cat $LOG
   1.372  			echo "================================================================================"
   1.373  			echo ""
   1.374 +			if [ -s "$WOK/$PACKAGE/warning.txt" ]; then
   1.375 +				echo -e "\033[1mCook warning(s) for :\033[0m $PACKAGE"
   1.376 +				echo "================================================================================"
   1.377 +				cat "$WOK/$PACKAGE/warning.txt"
   1.378 +				echo "================================================================================"
   1.379 +				echo ""
   1.380 +			fi
   1.381  		fi
   1.382  	;;
   1.383  	search)
   1.384 @@ -2279,7 +2352,7 @@
   1.385  			packages=$(($PACKAGEs+1))
   1.386  		done
   1.387  		echo "================================================================================"
   1.388 -		echo "$PACKAGEs packages found for : $2"
   1.389 +		echo "$packages packages found for : $2"
   1.390  		echo ""
   1.391  	;;
   1.392  	compile)
   1.393 @@ -2702,9 +2775,27 @@
   1.394  		check_root
   1.395  		get_tazwok_config
   1.396  		cd $PACKAGES_REPOSITORY
   1.397 -		for i in commit cooklist incoming broken blocked; do
   1.398 +		if [ "$2" ]; then
   1.399 +			case $2 in
   1.400 +				commit|cooklist|incoming|broken|blocked)
   1.401 +					show="$2"
   1.402 +				;;
   1.403 +				*)
   1.404 +					echo "usage : tazwok report [commit|cooklist|incoming|broken|blocked]" >&2
   1.405 +					exit 1
   1.406 +				;;
   1.407 +			esac	
   1.408 +		else
   1.409 +			show="commit cooklist incoming broken blocked"
   1.410 +		fi	
   1.411 +		for i in $show; do
   1.412  			if [ -s $i ]; then
   1.413 -				echo -e "\n********************* $i *********************\n$(cat $i)\n*********************"
   1.414 +				echo ""	
   1.415 +				echo -e "\033[1m$i\033[0m"
   1.416 +				echo "================================================================================"
   1.417 +				cat $i
   1.418 +				echo "================================================================================"
   1.419 +				echo ""
   1.420  			fi
   1.421  		done
   1.422  	;;
   1.423 @@ -2758,6 +2849,91 @@
   1.424  			exit 1
   1.425  		fi
   1.426  	;;
   1.427 +	webserver)
   1.428 +		check_root
   1.429 +		get_tazwok_config
   1.430 +		if [ "$ARG" = on ]; then
   1.431 +			if [ "$WEBSERVER" ] && [ -f "$WEBSERVER/repositories.list" ] && \
   1.432 +				grep -q ^"${undigest:-$SLITAZ_VERSION}"$ $WEBSERVER/repositories.list; then
   1.433 +				echo "Webserver is already enabled at $WEBSERVER for ${undigest:-$SLITAZ_VERSION}." >&2
   1.434 +				exit 1
   1.435 +			fi
   1.436 +			if ! [ -f $LOCAL_REPOSITORY/tazchroot.conf ]; then
   1.437 +				tazwok configure-chroot ${undigest:+--undigest=$undigest} --SLITAZ_VERSION=$SLITAZ_VERSION --SLITAZ_DIR=$SLITAZ_DIR
   1.438 +			fi
   1.439 +			for pkg in php lighttpd; do
   1.440 +				[ -d $INSTALLED/$pkg ] || missing="$missing $pkg"
   1.441 +			done
   1.442 +			if [ "$missing" ]; then
   1.443 +				echo "You need to install those packages to start webserver: $missing." >&2
   1.444 +				exit 1
   1.445 +			fi
   1.446 +			if [ ! -f "$LOCAL_REPOSITORY/tazwok.conf" ]; then
   1.447 +				echo "Copying /etc/slitaz/tazwok.conf to $LOCAL_REPOSITORY/tazwok.conf: webserver is configured repository-by-repository."
   1.448 +				cp /etc/slitaz/tazwok.conf $LOCAL_REPOSITORY
   1.449 +			fi
   1.450 +			if ! [ "$WEBSERVER" ]; then
   1.451 +				echo -n "Where to store php pages (default: /var/www/vhosts/bb)? "
   1.452 +				read WEBSERVER
   1.453 +				[ "$WEBSERVER" ] || WEBSERVER="/var/www/vhosts/bb"
   1.454 +			fi
   1.455 +			if [ -f "$WEBSERVER/repositories.list" ] && \
   1.456 +				grep -q ^"${undigest:-$SLITAZ_VERSION}"$ $WEBSERVER/repositories.list; then
   1.457 +				echo "Webserver is already enabled at $WEBSERVER for ${undigest:-$SLITAZ_VERSION}." >&2
   1.458 +				exit 1
   1.459 +			fi
   1.460 +			mkdir -p $WEBSERVER
   1.461 +			echo "${undigest:-$SLITAZ_VERSION}" >> $WEBSERVER/repositories.list
   1.462 +			for file in index.php log.php; do
   1.463 +				[ -f "$WEBSERVER/$file" ] || ln -s /usr/share/slitaz/web-bb/$file $WEBSERVER
   1.464 +			done
   1.465 +			source $LOCAL_REPOSITORY/tazchroot.conf	
   1.466 +			echo "<?php
   1.467 +
   1.468 +// Web interface configuration
   1.469 +
   1.470 +\$version=\"${undigest:-$SLITAZ_VERSION}\";
   1.471 +\$chroot=\"$chroot_dir\";
   1.472 +\$lockfile=\"\$chroot/proc/1\";
   1.473 +\$db_dir=\"$PACKAGES_REPOSITORY\";
   1.474 +\$log_dir=\"$LOCAL_REPOSITORY/log\";
   1.475 +\$packages=\"$PACKAGES_REPOSITORY\";
   1.476 +\$incoming=\"$INCOMING_REPOSITORY\";
   1.477 +
   1.478 +?>" > $WEBSERVER/conf-${undigest:-$SLITAZ_VERSION}.php
   1.479 +			[ -L "$WEBSERVER/web" ] || ln -s /usr/share/slitaz/web $WEBSERVER
   1.480 +			echo "WEBSERVER=\"$WEBSERVER\"" >> $LOCAL_REPOSITORY/tazwok.conf
   1.481 +			if [ -L "$WEBSERVER/conf.php" ]; then
   1.482 +				echo "Do yo want to make ${undigest:-$SLITAZ_VERSION} the default page (y/N) ? "
   1.483 +				read answer
   1.484 +				if [ "$answer" = y ]; then
   1.485 +					rm $WEBSERVER/conf.php
   1.486 +					ln -s $WEBSERVER/conf-${undigest:-$SLITAZ_VERSION}.php $WEBSERVER/conf.php
   1.487 +				fi
   1.488 +			else
   1.489 +				ln -s $WEBSERVER/conf-${undigest:-$SLITAZ_VERSION}.php $WEBSERVER/conf.php
   1.490 +			fi
   1.491 +		elif [ "$ARG" = off ]; then
   1.492 +			if ! [ "$WEBSERVER" ]; then
   1.493 +				echo "No webserver running for ${undigest:-$SLITAZ_VERSION}" >&2
   1.494 +				exit 1
   1.495 +			fi
   1.496 +			sed '/^WEBSERVER/d' -i $LOCAL_REPOSITORY/tazwok.conf
   1.497 +			sed "/^${undigest:-$SLITAZ_VERSION}$/d" -i $WEBSERVER/repositories.list
   1.498 +			rm $WEBSERVER/conf-${undigest:-$SLITAZ_VERSION}.php	
   1.499 +			if ! [ -s "$WEBSERVER/repositories.list" ]; then
   1.500 +				echo "$WEBSERVER/repositories.list is empty; tazwok doesn't remove the server automatically in case you have important stuff in it. If it's not the case, you can remove it using: rm -r $WEBSERVER"
   1.501 +				rm $WEBSERVER/conf.php	
   1.502 +			elif [ "$(readlink $WEBSERVER/conf.php)" = "$WEBSERVER/conf-${undigest:-$SLITAZ_VERSION}.php" ]; then
   1.503 +				echo "${undigest:-$SLITAZ_VERSION} was the default version to use; switched to : $(sed 1!d $WEBSERVER/repositories.list)"
   1.504 +				rm $WEBSERVER/conf.php
   1.505 +				ln -s $WEBSERVER/conf-$(sed 1!d $WEBSERVER/repositories.list).php $WEBSERVER/conf.php
   1.506 +			fi
   1.507 +		else
   1.508 +			echo "Usage: tazwok webserver on/off" >&2
   1.509 +			exit 1
   1.510 +		fi
   1.511 +	;;
   1.512  	usage|*)
   1.513  		# Print usage also for all unknown commands.
   1.514  		#
     2.1 --- a/web/conf.php	Wed Feb 09 19:17:52 2011 +0000
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,12 +0,0 @@
     2.4 -<?php
     2.5 -
     2.6 -// Tazwok web interface configuration
     2.7 -
     2.8 -$chroot     = "/home/slitaz/$version/chroot";
     2.9 -$lockfile   = "$chroot/home/slitaz/$version/packages/lock";
    2.10 -$db_dir     = "$chroot/home/slitaz/$version/packages";
    2.11 -$log_dir    = "$chroot/home/slitaz/$version/log";
    2.12 -$packages   = "$chroot/home/slitaz/$version/packages";
    2.13 -$hgurl      = "http://hg.slitaz.org/$wok";
    2.14 -
    2.15 -?>
     3.1 --- a/web/index.php	Wed Feb 09 19:17:52 2011 +0000
     3.2 +++ b/web/index.php	Sat Feb 12 02:29:59 2011 +0100
     3.3 @@ -1,13 +1,15 @@
     3.4 +
     3.5 +
     3.6  <?php
     3.7 -$version='cooking';
     3.8 -$notversion='stable';
     3.9 -$wok='wok';
    3.10 -if (isset($_GET['stable'])) {
    3.11 -	$version='stable';
    3.12 -	$notversion='cooking';
    3.13 -	$wok='wok-stable';
    3.14 +$version=$_GET["version"];
    3.15 +if (file_exists("conf-$version.php")) {
    3.16 +	include("conf-$version.php");
    3.17  }
    3.18 -include("conf.php");
    3.19 +else {
    3.20 +	if (file_exists("conf.php")) {
    3.21 +		include("conf.php");
    3.22 +	}
    3.23 +}
    3.24  ?>
    3.25  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    3.26      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    3.27 @@ -17,101 +19,98 @@
    3.28      <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    3.29      <meta name="description" content="Tazbb web interface" />
    3.30      <meta name="robots" content="index nofollow" />
    3.31 -    <link rel="shortcut icon" href="favicon.ico" />
    3.32 -    <link rel="stylesheet" type="text/css" href="slitaz.css" />
    3.33 +    <link rel="shortcut icon" href="web/favicon.ico" />
    3.34 +    <link rel="stylesheet" type="text/css" href="web/slitaz.css" />
    3.35  </head>
    3.36 +<body>
    3.37  
    3.38 -<body bgcolor="#ffffff">
    3.39  <!-- Header -->
    3.40  <div id="header">
    3.41 -    <a name="top"></a>
    3.42 -<!-- Access -->                                                                 
    3.43 -<div id="access">
    3.44 -    <a href="/<?php if ($version != 'stable')
    3.45 -echo "?stable"; ?>" title="Slitaz <?php
    3.46 -echo $notversion ?> packages"><?php echo $notversion ?></a>                          
    3.47 -</div>                                                                         
    3.48 +	<!-- Access -->
    3.49 +	<div id="access">
    3.50 +	    <?php
    3.51 +			$versions_list = fopen('repositories.list', 'r');
    3.52 +				if($versions_list)
    3.53 +				{
    3.54 +					$otherversion   = '';
    3.55 +					while(!feof($versions_list))
    3.56 +					{
    3.57 +						$otherversion = fgets($versions_list);
    3.58 +						echo "<a href=\"?version=$otherversion\">$otherversion</a>";
    3.59 +					}
    3.60 +				fclose($versions_list);
    3.61 +				}
    3.62 +		?>
    3.63 +	</div>
    3.64      <a href="http://bb.slitaz.org/"><img id="logo"
    3.65 -    src="pics/website/logo.png" title="bb.slitaz.org" alt="bb.slitaz.org"
    3.66 -    style="border: 0px solid ; width: 200px; height: 74px;" /></a>
    3.67 -    <p id="titre">#!/bb/packages/<?php echo $version; ?></p>
    3.68 -</div>
    3.69 -
    3.70 -<!-- Navigation menu -->
    3.71 -<div id="nav">
    3.72 -
    3.73 -<div class="nav_box">
    3.74 -<h4>SliTaz Network</h4>
    3.75 -<ul>
    3.76 -	<li><a href="http://www.slitaz.org/">Main Website</a></li>
    3.77 -	<li><a href="http://doc.slitaz.org/">Documentation</a></li>
    3.78 -	<li><a href="http://forum.slitaz.org/">Community Forum</a></li>
    3.79 -	<li><a href="http://labs.slitaz.org/">SliTaz Labs</a></li>
    3.80 -	<li><a href="http://pkgs.slitaz.org/">Packages Database</a></li>
    3.81 -	<li><a href="http://twitter.com/slitaz">SliTaz on Twitter</a></li>
    3.82 -	<li><a href="http://www.distrowatch.com/slitaz">SliTaz on DistroWatch</a></li>
    3.83 -</ul>
    3.84 -</div>
    3.85 -
    3.86 -<div class="nav_box">
    3.87 -<h4>SliTaz Developers</h4>
    3.88 -<ul>
    3.89 -	<li><a href="http://hg.slitaz.org/">Hg Repositories</a></li>
    3.90 -	<li><a href="http://tank.slitaz.org/">Tank Server</a></li>
    3.91 -	<li><a href="http://people.slitaz.org/">People Stuff</a></li>
    3.92 -	<li><a href="http://labs.slitaz.org/wiki/distro">Distro Wiki</a></li>
    3.93 -	
    3.94 -</ul>
    3.95 -</div>
    3.96 -
    3.97 -<!-- End navigation menu -->
    3.98 -</div>
    3.99 -
   3.100 -<!-- Content top. -->
   3.101 -<div id="content_top">
   3.102 -<div class="top_left"></div>
   3.103 -<div class="top_right"></div>
   3.104 +		src="web/logo.png"
   3.105 +		title="bb.slitaz.org" alt="bb.slitaz.org" /></a>
   3.106 +    <p id="titre">#!/Build/Bot/<?php echo $version; ?></p>
   3.107  </div>
   3.108  
   3.109  <!-- Content -->
   3.110 -<div id="content">
   3.111 +<div id="content-full">
   3.112  
   3.113 -<h1><font color="#3E1220">Build Bot</font></h1>
   3.114 -<h2><font color="#DF8F06">/usr/bin/tazbb</font></h2>
   3.115 +<!-- Block begin -->
   3.116 +<div class="block">
   3.117 +	<!-- Nav block begin -->
   3.118 +	<div id="block_nav">
   3.119 +		<h3><img src="pics/website/development.png" alt="" />Developers</h3>
   3.120 +		<ul>
   3.121 +			<li><a href="http://www.slitaz.org/en/devel/">Website/devel</a></li>
   3.122 +			<li><a href="http://labs.slitaz.org/">Laboratories</a></li>
   3.123 +			<li><a href="http://hg.slitaz.org/">Mercurial Repos</a></li>
   3.124 +			<li><a href="http://people.slitaz.org/">People Stuff</a></li>
   3.125 +			<li><a href="http://scn.slitaz.org/">Community Network</a></li>
   3.126 +		</ul>
   3.127 +	<!-- Nav block end -->
   3.128 +	</div>
   3.129 +	<!-- Top block begin -->
   3.130 +	<div id="block_top">
   3.131 +		<h1>Build Bot</h1>
   3.132 +		<p>
   3.133 +			Tazwok-experimental is a <a href="http://www.slitaz.org/">SliTaz GNU/Linux</a>
   3.134 +			Build Bot, it automatically cooks and tests packages commited in
   3.135 +			the wok. SliTaz <a href="http://pkgs.slitaz.org/">packages</a> are
   3.136 +			cooked on the project main server: code name 
   3.137 +			<a href="http://tank.slitaz.org">Tank</a>. This web interface gives
   3.138 +			the current status of the build bot and the last report
   3.139 +			about any packages modified by the SliTaz contributors in 
   3.140 +			the Mercurial repositories, aka 
   3.141 +			<a href="http://hg.slitaz.org/">Hg repos</a>.
   3.142 +		</p>
   3.143 +	<!-- Top block end -->
   3.144 +	</div>
   3.145 +<!-- Block end -->
   3.146 +</div>
   3.147 +
   3.148 +<h2>Cooklog</h2>
   3.149  
   3.150  <p>
   3.151 -Tazwok is the <a href="http://www.slitaz.org/">SliTaz GNU/Linux</a> Build Bot,
   3.152 -it automatically cooks and tests packages commited in the wok. SliTaz
   3.153 -<a href="http://pkgs.slitaz.org/">packages</a> are cooked on the project
   3.154 -main server: code name <a href="http://tank.slitaz.org">Tank</a>. This
   3.155 -web interface gives the current status of the build bot and the last report
   3.156 -about any packages modified by the SliTaz contributors in the Mercurial
   3.157 -repositories, aka <a href="http://hg.slitaz.org/">Hg repos</a>.
   3.158 +	<form action="log.php" method="get">
   3.159 +		<input type="hidden" name="version" value="<?php
   3.160 +echo "$version";
   3.161 +?>
   3.162 +" />
   3.163 +		Show pkg log:<br />
   3.164 +		 <input type="text" name="package" />
   3.165 +		<!-- <input type="submit" value="Show" /> -->
   3.166 +	</form><br />
   3.167 +Note:<br />
   3.168 +Flavors/Iso build log are named iso-?flavor <br />
   3.169 +Temporary toolchain log are named tmp-toolchain-?package <br />
   3.170  </p>
   3.171  
   3.172 -<form action="log.php" method="get">
   3.173 +<pre>
   3.174  <?php
   3.175 -	if ($version == 'stable')
   3.176 -		echo '<input type="hidden" name="stable" value="1" />';
   3.177 -?>	Show cooklog: <input type="text" name="package" />
   3.178 -	<!-- <input type="submit" value="Show" /> -->
   3.179 -</form>
   3.180 -
   3.181 -<h3>Summary</h3>
   3.182 -<pre class="package">
   3.183 -<?php
   3.184 -
   3.185  // Check curent status (update in real time) and display summary.
   3.186 -
   3.187  if (file_exists($lockfile)) {
   3.188 -	echo "Status   : Running ";
   3.189 -	include("$db_dir/running");
   3.190 +	echo "Status   : Chroot is mounted\n";
   3.191  }
   3.192  else {
   3.193 -	echo "Status   : Not currently running\n";
   3.194 +	echo "Status   : Chroot is not mounted\n";
   3.195  }
   3.196  include("$db_dir/summary");
   3.197 -
   3.198  ?>
   3.199  </pre>
   3.200  
   3.201 @@ -122,13 +121,6 @@
   3.202  ?>
   3.203  </pre>
   3.204  
   3.205 -<h3>Genpkglist</h3>
   3.206 -<pre class="package">
   3.207 -<?php
   3.208 -include("$db_dir/genpkglist");
   3.209 -?>
   3.210 -</pre>
   3.211 -
   3.212  <h3>Cooklist</h3>
   3.213  <pre class="package">
   3.214  <?php
   3.215 @@ -153,8 +145,8 @@
   3.216  <h3>Last cooked packages</h3>
   3.217  <pre class="package">
   3.218  <?php
   3.219 -system("cd $packages && ls -1t *.tazpkg | head -20 | \
   3.220 -	while read file; do echo -n \$(stat -c '%y' $packages/\$file | \
   3.221 +system("cd $incoming && ls -1t *.tazpkg | head -20 | \
   3.222 +	while read file; do echo -n \$(stat -c '%y' $incoming/\$file | \
   3.223  	cut -d. -f1); echo '   '\$file; done"); ?>
   3.224  </pre>
   3.225  
   3.226 @@ -173,26 +165,35 @@
   3.227  	cut -d. -f1); echo '   '\$file; done"); ?>
   3.228  </pre>
   3.229  
   3.230 -<!-- End of content with round corner -->
   3.231 +<!-- End of content -->
   3.232  </div>
   3.233  
   3.234 -<!-- Start of footer and copy notice -->
   3.235 -<div id="copy">
   3.236 -<p>
   3.237 -Copyright &copy; 2010 <a href="http://www.slitaz.org/">SliTaz</a> -
   3.238 -<a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>
   3.239 -</p>
   3.240 -<!-- End of copy -->
   3.241 -</div>
   3.242 -
   3.243 -<!-- Bottom and logo's -->
   3.244 -<div id="bottom">
   3.245 -<p>
   3.246 -<a href="http://validator.w3.org/check?uri=referer"><img
   3.247 -   src="pics/website/xhtml10.png" alt="Valid XHTML 1.0"
   3.248 -   title="Code validé XHTML 1.0"
   3.249 -   style="width: 80px; height: 15px;" /></a>
   3.250 -</p>
   3.251 +<!-- Footer -->
   3.252 +<div id="footer">
   3.253 +	<div class="right_box">
   3.254 +	<h4>SliTaz Network</h4>
   3.255 +		<ul>
   3.256 +			<li><a href="http://www.slitaz.org/">Main Website</a></li>
   3.257 +			<li><a href="http://doc.slitaz.org/">Documentation</a></li>
   3.258 +			<li><a href="http://forum.slitaz.org/">Support Forum</a></li>
   3.259 +			<li><a href="http://scn.slitaz.org/">Community Network</a></li>
   3.260 +			<li><a href="http://labs.slitaz.org/">Laboratories</a></li>
   3.261 +			<li><a href="http://twitter.com/slitaz">SliTaz on Twitter</a></li>
   3.262 +		</ul>
   3.263 +	</div>
   3.264 +	<h4>SliTaz Website</h4>
   3.265 +	<ul>
   3.266 +		<li><a href="#header">Top of the page</a></li>
   3.267 +		<li>Copyright &copy; <span class="year"></span>
   3.268 +			<a href="http://www.slitaz.org/">SliTaz</a></li>
   3.269 +		<li><a href="http://www.slitaz.org/en/about/">About the project</a></li>
   3.270 +		<li><a href="http://www.slitaz.org/netmap.php">Network Map</a></li>
   3.271 +		<li>Page modified the <?php echo (date( "d M Y", getlastmod())); ?></li>
   3.272 +		<li><a href="http://validator.w3.org/check?uri=referer"><img
   3.273 +		src="pics/website/xhtml10.png" alt="Valid XHTML 1.0"
   3.274 +		title="Code validé XHTML 1.0"
   3.275 +		style="width: 80px; height: 15px; vertical-align: middle;" /></a></li>
   3.276 +	</ul>
   3.277  </div>
   3.278  
   3.279  </body>
     4.1 --- a/web/log.php	Wed Feb 09 19:17:52 2011 +0000
     4.2 +++ b/web/log.php	Sat Feb 12 02:29:59 2011 +0100
     4.3 @@ -1,118 +1,23 @@
     4.4  <?php
     4.5 -$version='cooking';
     4.6 -$wok='wok';
     4.7 -if (isset($_GET['stable'])) {
     4.8 -	$version='stable';
     4.9 -	$wok='wok-stable';
    4.10 +$version=$_GET["version"];
    4.11 +if (file_exists("conf-$version.php")) {
    4.12 +	include("conf-$version.php");
    4.13  }
    4.14 -include("conf.php");
    4.15 -?>
    4.16 -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    4.17 -    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    4.18 -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    4.19 -<head>
    4.20 -    <title>Tazbb cooklog <?php echo $_GET['package']; ?></title>
    4.21 -    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    4.22 -    <meta name="description" content="Tazbb web interface cooklog" />
    4.23 -    <meta name="robots" content="index nofollow" />
    4.24 -    <link rel="shortcut icon" href="favicon.ico" />
    4.25 -    <link rel="stylesheet" type="text/css" href="slitaz.css" />
    4.26 -</head>
    4.27 -
    4.28 -<body bgcolor="#ffffff">
    4.29 -<!-- Header -->
    4.30 -<div id="header">
    4.31 -    <a name="top"></a>
    4.32 -    <a href="http://bb.slitaz.org/"><img id="logo"
    4.33 -    src="pics/website/logo.png" title="bb.slitaz.org" alt="bb.slitaz.org"
    4.34 -    style="border: 0px solid ; width: 200px; height: 74px;" /></a>
    4.35 -    <p id="titre">#!/bb/packages<?php if ($version == 'stable') echo '/stable'; ?></p>
    4.36 -</div>
    4.37 -
    4.38 -<!-- Navigation menu -->
    4.39 -<div id="nav">
    4.40 -
    4.41 -<div class="nav_box">
    4.42 -<h4>SliTaz Network</h4>
    4.43 -<ul>
    4.44 -	<li><a href="http://www.slitaz.org/">Main Website</a></li>
    4.45 -	<li><a href="http://doc.slitaz.org/">Documentation</a></li>
    4.46 -	<li><a href="http://forum.slitaz.org/">Community Forum</a></li>
    4.47 -	<li><a href="http://labs.slitaz.org/">SliTaz Labs</a></li>
    4.48 -	<li><a href="http://pkgs.slitaz.org/">Packages Database</a></li>
    4.49 -	<li><a href="http://twitter.com/slitaz">SliTaz on Twitter</a></li>
    4.50 -	<li><a href="http://www.distrowatch.com/slitaz">SliTaz on DistroWatch</a></li>
    4.51 -</ul>
    4.52 -</div>
    4.53 -
    4.54 -<div class="nav_box">
    4.55 -<h4>SliTaz Developers</h4>
    4.56 -<ul>
    4.57 -	<li><a href="http://hg.slitaz.org/">Hg Repositories</a></li>
    4.58 -	<li><a href="http://tank.slitaz.org/">Tank Server</a></li>
    4.59 -	<li><a href="http://people.slitaz.org/">People Stuff</a></li>
    4.60 -	<li><a href="http://labs.slitaz.org/wiki/distro">Distro Wiki</a></li>
    4.61 -</ul>
    4.62 -</div>
    4.63 -
    4.64 -<!-- End navigation menu -->
    4.65 -</div>
    4.66 -
    4.67 -<!-- Content -->
    4.68 -<div id="content">
    4.69 -
    4.70 -<h1><font color="#3E1220">Build Bot</font></h1>
    4.71 -<h2><font color="#DF8F06">Cooklog</font></h2>
    4.72 -
    4.73 -<p>
    4.74 -<form action="log.php" method="get">
    4.75 -	Show cooklog: <input type="text" name="package" />
    4.76 -	<!-- <input type="submit" value="Show" /> -->
    4.77 -<?php
    4.78 -
    4.79 -if ($_GET['package']) {
    4.80 -	$pkg = $_GET["package"];
    4.81 -	if (file_exists("$log_dir/$pkg.log")) {
    4.82 -		echo " Package $pkg: ";
    4.83 -		echo '<a href="' . "log/$pkg.log" . '">Raw log</a> ' . "\n";
    4.84 -		echo '</form></p>';
    4.85 -		echo '<pre class="log">' . "\n";
    4.86 -		echo date ("F d Y H:i:s", filemtime("log/$pkg.log"))."\n";
    4.87 -		include("$log_dir/$pkg.log");
    4.88 -		echo '</pre>';
    4.89 +else {
    4.90 +	if (file_exists("conf.php")) {
    4.91 +		include("conf.php");
    4.92  	}
    4.93 +}
    4.94 +$package=$_GET["package"];
    4.95 +if ("$package") {
    4.96 +	if (file_exists("$log_dir/$package.html")) {
    4.97 +		include ("$log_dir/$package.html");
    4.98 +	}	
    4.99  	else {
   4.100 -		echo " No log file found for: $pkg";
   4.101 -		echo '</form></p>';
   4.102 +		echo "No log available for $package.";
   4.103  	}
   4.104  }
   4.105  else {
   4.106 -	echo '</form></p>';
   4.107 +	echo "Strange things happens...";
   4.108  }
   4.109 -
   4.110  ?>
   4.111 -
   4.112 -<!-- End of content with round corner -->
   4.113 -</div>
   4.114 -
   4.115 -<!-- Start of footer and copy notice -->
   4.116 -<div id="copy">
   4.117 -<p>
   4.118 -Copyright &copy; 2010 <a href="http://www.slitaz.org/">SliTaz</a> -
   4.119 -<a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>
   4.120 -</p>
   4.121 -<!-- End of copy -->
   4.122 -</div>
   4.123 -
   4.124 -<!-- Bottom and logo's -->
   4.125 -<div id="bottom">
   4.126 -<p>
   4.127 -<a href="http://validator.w3.org/check?uri=referer"><img
   4.128 -   src="pics/website/xhtml10.png" alt="Valid XHTML 1.0"
   4.129 -   title="Code validé XHTML 1.0"
   4.130 -   style="width: 80px; height: 15px;" /></a>
   4.131 -</p>
   4.132 -</div>
   4.133 -
   4.134 -</body>
   4.135 -</html>
     5.1 --- a/web/slitaz.css	Wed Feb 09 19:17:52 2011 +0000
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,366 +0,0 @@
     5.4 -/*
     5.5 -	CSS style for SliTaz GNU/Linux website
     5.6 -	www.slitaz.org - (c) 2007 Pankso
     5.7 -*/
     5.8 -
     5.9 -html {
    5.10 -	height:  102%;
    5.11 -}
    5.12 -
    5.13 -body {
    5.14 -	background: #ffffff;
    5.15 -	color: black;
    5.16 -	font: 13px sans-serif, vernada, arial;
    5.17 -	margin: 0;
    5.18 -}
    5.19 -
    5.20 -/* Accessibility */
    5.21 -
    5.22 -#access {
    5.23 -	position: absolute;
    5.24 -	top: 4px;
    5.25 -	right: 4px;
    5.26 -	text-align: right;
    5.27 -	width: 100%;
    5.28 -	margin: 0;
    5.29 -	font-size: 11px;
    5.30 -	font-weight: bold;
    5.31 -}
    5.32 -
    5.33 -#access a {
    5.34 -	background: inherit;
    5.35 -	color: white;
    5.36 -	text-decoration: none;
    5.37 -}
    5.38 -
    5.39 -#access a:hover {
    5.40 -	background: inherit;
    5.41 -	color: #222222;
    5.42 -}
    5.43 -
    5.44 -/* Header and title */
    5.45 -
    5.46 -#header{
    5.47 -	background: #f0ba08 url(pics/website/header.png) repeat-x top;
    5.48 -	color: black;
    5.49 -	width: 100%;
    5.50 -	height: 50px;
    5.51 -	border-top: 1px solid black;
    5.52 -	border-bottom: 1px solid black;
    5.53 -	margin-bottom: 30px;
    5.54 -}
    5.55 -
    5.56 -#titre {
    5.57 -	position: absolute;
    5.58 -	font-size: 16px;
    5.59 -	font-weight: bolder ;
    5.60 -	margin-left: 200px;
    5.61 -	margin-top: 28px;
    5.62 -}
    5.63 -
    5.64 -#logo {
    5.65 -	position: absolute;
    5.66 -	float: left;
    5.67 -	margin-left: 16px;
    5.68 -	margin-top: 0px;
    5.69 -}
    5.70 -
    5.71 -/* Navigation */
    5.72 -
    5.73 -#nav {
    5.74 -	position: absolute;
    5.75 -	top: 76px;
    5.76 -	right: 80px;
    5.77 -	color: #555555;
    5.78 -	float: right;
    5.79 -	width: 250px;
    5.80 -	line-height: 1.5em;
    5.81 -	text-align: left;
    5.82 -	font-size: 12px;
    5.83 -}
    5.84 -
    5.85 -#nav ul {
    5.86 -	-moz-border-radius: 8px;
    5.87 -	-webkit-border-radius: 8px;
    5.88 -	list-style-type: none;
    5.89 -	margin: 10px 0;
    5.90 -	padding: 10px 24px 10px 24px;
    5.91 -	background-color: #eaeaea;
    5.92 -}
    5.93 -
    5.94 -#nav .nav_box ul {
    5.95 -	list-style-type: none;
    5.96 -	margin: 0;
    5.97 -	padding: 10px 24px 10px 0px;
    5.98 -}
    5.99 -
   5.100 -#nav li {
   5.101 -	display: inline;
   5.102 -}
   5.103 -
   5.104 -#nav h4 {
   5.105 -	font-size: 110%;
   5.106 -	color: #666666;
   5.107 -	font-weight: bold;
   5.108 -	margin: 0;
   5.109 -	padding: 0 0 1px 0;
   5.110 -	border-bottom: 1px solid #cecece;
   5.111 -}
   5.112 -
   5.113 -#nav a {
   5.114 -	color: #0F314E;
   5.115 -	background: inherit;
   5.116 -	display: block;
   5.117 -	text-decoration: none;
   5.118 -	font-weight: bold;
   5.119 -}
   5.120 -
   5.121 -#nav a:hover {
   5.122 -	color: #DF8F06;
   5.123 -	text-decoration: none;
   5.124 -	display: block;
   5.125 -}
   5.126 -
   5.127 -#nav hr {
   5.128 -	margin: 2px 0px 1px 0px;
   5.129 -	border: 0px;
   5.130 -	border-top: 1px solid #BDBDBD;
   5.131 -
   5.132 -}
   5.133 -
   5.134 -.nav_box {
   5.135 -	-moz-border-radius: 8px;
   5.136 -	-webkit-border-radius: 8px;
   5.137 -	margin: 10px 0;
   5.138 -	padding: 10px 24px 10px 24px;
   5.139 -	background-color: #eaeaea;
   5.140 -	text-align: justify;
   5.141 -}
   5.142 -
   5.143 -#nav .nav_box p {
   5.144 -	line-height: 1.3em;
   5.145 -}
   5.146 -
   5.147 -#nav .nav_box p a {
   5.148 -	display: inline;
   5.149 -	font-weight: normal;
   5.150 -	text-decoration: underline;
   5.151 -}
   5.152 -
   5.153 -#nav .nav_box p a:hover {
   5.154 -	text-decoration: none;
   5.155 -	color: blue;
   5.156 -	background: inherit;
   5.157 -}
   5.158 -
   5.159 -#nav hr {
   5.160 -	height: 0px;
   5.161 -	border: 0px solid #eaeaea;
   5.162 -}
   5.163 -
   5.164 -/* Page content */
   5.165 -
   5.166 -#content, #content_bottom, #content_top {
   5.167 -	background: white;
   5.168 -	color: black;
   5.169 -	text-align: justify;
   5.170 -}
   5.171 -
   5.172 -#content {
   5.173 -	height: auto;
   5.174 -	margin: 6px 320px 0px 0px;
   5.175 -	padding: 0px 40px 60px 80px;
   5.176 -}
   5.177 -
   5.178 -#content li {
   5.179 -	line-height: 1.5em;
   5.180 -	text-align: left;
   5.181 -}
   5.182 -
   5.183 -/* Legal informations */
   5.184 -
   5.185 -#copy {
   5.186 -	font-size: 11px ;
   5.187 -	text-align: left ;
   5.188 -	background: transparent;
   5.189 -	color: #a8a8a8;
   5.190 -	padding-top: 10px;
   5.191 -	margin: 0 0 0 80px;
   5.192 -}
   5.193 -
   5.194 -#copy a {
   5.195 -	background: inherit;
   5.196 -	color: #a8a8a8;
   5.197 -}
   5.198 -
   5.199 -#copy a:hover {
   5.200 -	background: inherit;
   5.201 -	color: #666666;
   5.202 -}
   5.203 -
   5.204 -/* Footer */
   5.205 -
   5.206 -#bottom {
   5.207 -	float: none;
   5.208 -	background: inherit;
   5.209 -	color: black;
   5.210 -	width: auto;
   5.211 -	clear: both;
   5.212 -	padding: 0;
   5.213 -	margin: 0 0 0 80px;
   5.214 -	text-align: left;
   5.215 -	vertical-align: middle;
   5.216 -}
   5.217 -
   5.218 -#news li {
   5.219 -	list-style-type: square;
   5.220 -	border-bottom: 1px dotted #BEBEBE;
   5.221 -	margin-left: -25px;
   5.222 -	padding: 4px 0px 4px 0px;
   5.223 -}
   5.224 -
   5.225 -#gallery {
   5.226 -	text-align: center;
   5.227 -}
   5.228 -
   5.229 -#gallery table {
   5.230 -	margin: 30px 0px 30px 0px;
   5.231 -}
   5.232 -
   5.233 -/* Clouds */
   5.234 -
   5.235 -#cloud {
   5.236 -	padding: 20px 0px 20px 0px;
   5.237 -	line-height: 3em;
   5.238 -	text-align: center;
   5.239 -}
   5.240 -#cloud a { padding: 4px; color: #956411; }
   5.241 -#cloud a.tag1 { font-size: 0.7em; font-weight: 100; }
   5.242 -#cloud a.tag2 { font-size: 0.8em; font-weight: 200; }
   5.243 -#cloud a.tag3 { font-size: 0.9em; font-weight: 300; }
   5.244 -#cloud a.tag4 { font-size: 1.0em; font-weight: 400; }
   5.245 -#cloud a.tag5 { font-size: 1.2em; font-weight: 500; }
   5.246 -#cloud a.tag6 { font-size: 1.4em; font-weight: 600; }
   5.247 -#cloud a.tag7 { font-size: 1.6em; font-weight: 700; }
   5.248 -#cloud a.tag8 { font-size: 1.8em; font-weight: 800; }
   5.249 -#cloud a.tag9 { font-size: 2.2em; font-weight: 900; }
   5.250 -#cloud a.tag10 { font-size: 2.5em; font-weight: 900; }
   5.251 -
   5.252 -/* CSS class. */
   5.253 -
   5.254 -.infobox {
   5.255 -	margin: 10px;
   5.256 -	padding: 12px;
   5.257 -	background: #f2f2f2;
   5.258 -	border: 1px solid #eaeaea;
   5.259 -	-moz-border-radius: 8px;
   5.260 -	-webkit-border-radius: 8px;
   5.261 -}
   5.262 -
   5.263 -/* HTML styles */
   5.264 -
   5.265 -h1 {
   5.266 -	color: blue;
   5.267 -	background: inherit;
   5.268 -	text-align: left;
   5.269 -	margin: 0px 0px 10px 0px;
   5.270 -	font-size: 140%;
   5.271 -	font-weight: bold;
   5.272 -}
   5.273 -
   5.274 -h2 {
   5.275 -	color: #DF8F06;
   5.276 -	/* border-top: 1px solid #f3f3f3; */
   5.277 -	border-left: 8px solid #f3f3f3;
   5.278 -	padding: 4px 0px 4px 4px;
   5.279 -	margin: 0;
   5.280 -	font-size: 140%;
   5.281 -	font-weight: bold;
   5.282 -}
   5.283 -
   5.284 -h3 {
   5.285 -	font-weight: bold;
   5.286 -	color: #6c0023;
   5.287 -	background: inherit;
   5.288 -}
   5.289 -
   5.290 -a {
   5.291 -	text-decoration: underline;
   5.292 -	color: #0F314E;
   5.293 -	background: inherit;
   5.294 -}
   5.295 -
   5.296 -a:hover {
   5.297 -	text-decoration: none;
   5.298 -	color: blue;
   5.299 -	background: inherit;
   5.300 -}
   5.301 -
   5.302 -code {
   5.303 -	font-size: 12px;
   5.304 -	color: #669900;
   5.305 -	background: inherit;
   5.306 -}
   5.307 -
   5.308 -tt {
   5.309 -	color: #15EE15;
   5.310 -	background: inherit;
   5.311 -}
   5.312 -
   5.313 -img {
   5.314 -	border: 0pt none;
   5.315 -}
   5.316 -
   5.317 -fieldset {
   5.318 -	background: #E2ECf6;
   5.319 -	color: black;
   5.320 -	margin-top: 25px;
   5.321 -	border: 1px solid black;
   5.322 -}
   5.323 -
   5.324 -legend {
   5.325 -	border: 1px solid black;
   5.326 -	color: #6c0023;
   5.327 -	background: #eaeaea;
   5.328 -	font-weight: bold;
   5.329 -}
   5.330 -
   5.331 -pre {
   5.332 -	padding: 5px;
   5.333 -	color: black;
   5.334 -	background: #E1E0B0;
   5.335 -}
   5.336 -
   5.337 -pre.script, pre.log {
   5.338 -	padding: 10px;
   5.339 -	color: black;
   5.340 -	background: #E8E8E8;
   5.341 -	border: 1px inset #606060;
   5.342 -}
   5.343 -
   5.344 -textarea {
   5.345 -	background: #E5E5E5;
   5.346 -	margin-top: 12px;
   5.347 -}
   5.348 -
   5.349 -/* Packages pages */
   5.350 -
   5.351 -.pkg_nav {
   5.352 -	border-top: 1px solid black;
   5.353 -	margin-top: 10px;
   5.354 -	padding-top: 10px;
   5.355 -}
   5.356 -
   5.357 -pre.package {
   5.358 -	padding: 0px;
   5.359 -	color: black;
   5.360 -	background: white;
   5.361 -}
   5.362 -
   5.363 -p.get {
   5.364 -	text-align: center;
   5.365 -	padding: 10px;
   5.366 -	color: black;
   5.367 -	background: #F3F3F3;
   5.368 -	border: 1px solid #DEDEDE;
   5.369 -}