tazwok rev 542
Fixes: minor compatibility fixes & a change in extract_tarball which make it quicker and more reliable.
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Sat Nov 26 16:54:57 2011 +0100 (2011-11-26) |
parents | a1fb349257d8 |
children | 3b78028d5730 |
files | chroot-scripts/cook-toolchain examples/config.site examples/tazwok.conf tazwok |
line diff
1.1 --- a/chroot-scripts/cook-toolchain Sat Jun 18 19:05:21 2011 +0000 1.2 +++ b/chroot-scripts/cook-toolchain Sat Nov 26 16:54:57 2011 +0100 1.3 @@ -6,6 +6,12 @@ 1.4 source /usr/lib/slitaz/libtaz 1.5 source /etc/slitaz/tazwok.conf 1.6 1.7 +LOCAL_REPOSITORY=$SLITAZ_DIR/${undigest:-$SLITAZ_VERSION} 1.8 +if [ -f $LOCAL_REPOSITORY/tazwok.conf ]; then 1.9 + source $LOCAL_REPOSITORY/tazwok.conf 1.10 +fi 1.11 +WOK=$LOCAL_REPOSITORY/wok 1.12 + 1.13 # Report progress on webserver. 1.14 log_step="$LOCAL_REPOSITORY/log/step" 1.15 run_on_exit="$run_on_exit 1.16 @@ -18,10 +24,10 @@ 1.17 report step "Cooking temporary toolchain" 1.18 report open-bloc 1.19 1.20 -report step "Configuring repositories" 1.21 +report step "Configuring packages repositories" 1.22 # Incoming packages as the only source for packages. 1.23 rm -r /var/lib/tazpkg/undigest 1.24 -tazpkg setup-mirror $SLITAZ_DIR/${undigest:-$SLITAZ_VERSION}/packages-incoming 1.25 +tazpkg setup-mirror $LOCAL_REPOSITORY/packages-incoming 1.26 tazpkg recharge 1.27 1.28 report step "Refreshing SliTaz tools" 1.29 @@ -39,22 +45,18 @@ 1.30 LANG=POSIX 1.31 LC_ALL=POSIX 1.32 1.33 -# Set BUILD_HOST to something like $ARCH-tmp-linux-gnu to enable 1.34 +# Set HOST_SYSTEM to something like $ARCH-tmp-linux-gnu to enable 1.35 # the temporary toolchain. 1.36 -BUILD_HOST=$(echo $BUILD_HOST | sed 's/\(.*\)-\(.*\)-linux-gnu/\1-tmp-linux-gnu/') 1.37 +HOST_SYSTEM=$(echo $HOST_SYSTEM | sed 's/\(.*\)-\(.*\)-linux-gnu/\1-tmp-linux-gnu/') 1.38 1.39 PATH=/tools/bin:/tools/usr/bin:/tools/sbin:/tools/usr/sbin:/bin:/usr/bin:/sbin:/usr/sbin 1.40 CONFIG_SITE="/etc/config.site.tmptoolchain" 1.41 -echo 'prefix=/tools' > /etc/config.site.tmptoolchain 1.42 +echo "prefix=/tools" > /etc/config.site.tmptoolchain 1.43 1.44 export LANG LC_ALL PATH PS1 MAKEFLAGS CONFIG_SITE 1.45 unset CC CXX CPP CFLAGS CXXFLAGS LD_LIBRARY_PATH LD_PRELOAD DESTDIR 1.46 1.47 -LOCAL_REPOSITORY=$SLITAZ_DIR/$SLITAZ_VERSION 1.48 -[ "$undigest" ] && LOCAL_REPOSITORY=$SLITAZ_DIR/$undigest 1.49 -WOK=$LOCAL_REPOSITORY/wok 1.50 - 1.51 -# Create the dir for the temporary toolchain and link in root of host 1.52 +# Create the dir for the temporary toolchain and link in root of build 1.53 # system. 1.54 rm -rf /tools 1.55 mkdir /tools 1.56 @@ -76,6 +78,7 @@ 1.57 cd $WOK/$PACKAGE 1.58 } 1.59 1.60 + 1.61 # Binutils and gcc need to be compiled twice. 1.62 for PACKAGE in binutils gcc; do 1.63 rm $LOCAL_REPOSITORY/log/tmp-toolchain-$PACKAGE-firstpass.html 2>/dev/null 1.64 @@ -85,7 +88,7 @@ 1.65 report open-bloc 1.66 prepare_package 1.67 report step "Running compilation rules" 1.68 - precook_tmp_toolchain 1.69 + cook_cross_toolchain 1.70 report end-step || exit 1 1.71 report close-bloc 1.72 report end-sublog
2.1 --- a/examples/config.site Sat Jun 18 19:05:21 2011 +0000 2.2 +++ b/examples/config.site Sat Nov 26 16:54:57 2011 +0100 2.3 @@ -48,7 +48,7 @@ 2.4 { [ "$build" = NONE ] || [ ! "$build" ] ; } && build=$default_build 2.5 { [ "$host" = NONE ] || [ ! "$host" ] ; } && host=$default_host 2.6 2.7 -# Print information about these variables. 2.8 +# Print information about those variables. 2.9 echo "prefix = $prefix 2.10 datarootdir = $datarootdir 2.11 datadir = $datadir 2.12 @@ -59,5 +59,6 @@ 2.13 host = $host 2.14 " 2.15 2.16 -# config.site is used by tazwok to check that the config.site script has been used. 2.17 +# /tmp/config.site is used by tazwok to check that the config.site 2.18 +# script has been used. 2.19 touch /tmp/config.site
3.1 --- a/examples/tazwok.conf Sat Jun 18 19:05:21 2011 +0000 3.2 +++ b/examples/tazwok.conf Sat Nov 26 16:54:57 2011 +0100 3.3 @@ -10,7 +10,12 @@ 3.4 HG_WOK="http://hg.slitaz.org/wok" 3.5 3.6 # Default makeflags. 3.7 -MAKEFLAGS="-j$((`grep processor /proc/cpuinfo | wc -l`+1))" 3.8 +# This one make compilation use all cpu when possible, and have 3.9 +# priority hover other processes. 3.10 +# MAKEFLAGS="-j$((`grep processor /proc/cpuinfo | wc -l`+1))" 3.11 +# This one makes use of all cpu but without priority, so if you 3.12 +# run something else it can run smoothly even while compiling. 3.13 +MAKEFLAGS="-j`grep processor /proc/cpuinfo | wc -l`" 3.14 3.15 # Default architecture. 3.16 ARCH="i486" 3.17 @@ -18,12 +23,8 @@ 3.18 # Build and host. These options are for cross-compiling. If you specify 3.19 # both options and BUILD_SYSTEM is different from HOST_SYSTEM, configure 3.20 # will prepare to cross-compile from BUILD_SYSTEM to be used on HOST_SYSTEM. 3.21 -BUILD_SYSTEM="$(uname -m)-slitaz-linux" 3.22 -#BUILD_SYSTEM="$ARCH-slitaz-linux" 3.23 -HOST_SYSTEM="$ARCH-slitaz-linux" 3.24 - 3.25 -# Default build host. 3.26 -BUILD_HOST="$HOST_SYSTEM" 3.27 +BUILD_SYSTEM="$ARCH-pc-linux-gnu" 3.28 +HOST_SYSTEM="$ARCH-pc-linux-gnu" 3.29 3.30 # Default compilation flags. 3.31 # More details at :
4.1 --- a/tazwok Sat Jun 18 19:05:21 2011 +0000 4.2 +++ b/tazwok Sat Nov 26 16:54:57 2011 +0100 4.3 @@ -127,6 +127,7 @@ 4.4 check_dir $SOURCES_REPOSITORY 4.5 check_dir $INCOMING_REPOSITORY 4.6 check_dir $LOCAL_REPOSITORY/log 4.7 + check_dir $LOCAL_REPOSITORY/tmp 4.8 [ -f $dep_db ] || touch $dep_db 4.9 [ -f $wan_db ] || touch $wan_db 4.10 [ -f $PACKAGES_REPOSITORY/cookorder.txt ] || touch $PACKAGES_REPOSITORY/cookorder.txt 4.11 @@ -450,7 +451,7 @@ 4.12 [ "$WGET_URL" ] || return 0 4.13 [ "$WANTED" ] && return 0 4.14 report step "Checking for source tarball: $PACKAGE" 4.15 - local repack_src=$repack_src TARBALL=$TARBALL local nounpack=$nounpack 4.16 + local repack_src=$repack_src TARBALL=$TARBALL nounpack=$nounpack 4.17 look_for_cookopt !unpack && nounpack=yes 4.18 if [ "$repack_src" = yes ] && look_for_cookopt !repack_src; then 4.19 repack_src=no 4.20 @@ -460,7 +461,7 @@ 4.21 else 4.22 set_src_path 4.23 fi 4.24 - tmp_src=$tmp/tarball-$$ 4.25 + tmp_src=$LOCAL_REPOSITORY/tmp/tarball-$$ 4.26 if [ ! -f "$SOURCES_REPOSITORY/$TARBALL" ] && \ 4.27 [ ! -f "$SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-${KBASEVER:-$VERSION}.tar.lzma" ] ; then 4.28 cd $SOURCES_REPOSITORY 4.29 @@ -654,7 +655,7 @@ 4.30 [ "$CONFIG_SITE" ] || CONFIG_SITE=/etc/config.site 4.31 export CFLAGS=$(echo "$CFLAGS" | tr -s ' ') \ 4.32 CXXFLAGS=$(echo "$CXXFLAGS" | tr -s ' ') \ 4.33 - MAKEFLAGS DESTDIR BUILD_HOST CONFIG_SITE default_prefix \ 4.34 + MAKEFLAGS DESTDIR CONFIG_SITE default_prefix \ 4.35 default_datarootdir default_datadir default_localedir \ 4.36 default_infodir default_mandir default_build default_host \ 4.37 BUILD_SYSTEM HOST_SYSTEM