From: John P. Davis Date: Mon, 12 Apr 2004 14:38:26 +0000 (+0000) Subject: lots of changes to the bash backend X-Git-Tag: CATALYST_2_0_6_916~1026 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6f9d5cecf40f78c671a8f9bf0dbaa0dedc1e945c;p=catalyst.git lots of changes to the bash backend git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@347 d1e1f19c-881f-0410-ab34-b69fee027534 --- diff --git a/ChangeLog b/ChangeLog index f25e5f71..90c4ec88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,21 @@ # ChangeLog for gentoo/src/catalyst # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.39 2004/04/06 05:31:37 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.40 2004/04/12 14:38:26 zhen Exp $ + + 12 Apr 2004; John Davis modules/catalyst_support.py, + targets/embedded/cramfs-runscript.sh, targets/embedded/embedded-chroot.sh, + targets/embedded/embedded-preclean-chroot.sh, targets/embedded/embedded.sh, + targets/grp/grp-chroot.sh, targets/grp/grp-preclean-chroot.sh, + targets/grp/grp.sh, targets/livecd-stage1/livecd-stage1-chroot.sh, + targets/livecd-stage1/livecd-stage1-preclean-chroot.sh, + targets/livecd-stage1/livecd-stage1.sh, targets/stage1/stage1-chroot.sh, + targets/stage1/stage1-preclean1-chroot.sh, + targets/stage1/stage1-preclean2-chroot.sh, targets/stage1/stage1.sh, + targets/stage2/stage2-chroot.sh, targets/stage2/stage2-preclean-chroot.sh, + targets/stage2/stage2.sh, targets/stage3/stage3.sh, + targets/tinderbox/tinderbox.sh: + lots of cleanup on the bash backend. take a look @ the code and report bugs to + zhen@gentoo.org please. 06 Apr 2004; John Davis targets/stage1/stage1-chroot.sh: fix for /dev in stage1 diff --git a/modules/catalyst_support.py b/modules/catalyst_support.py index 0315978c..5bf5ac20 100644 --- a/modules/catalyst_support.py +++ b/modules/catalyst_support.py @@ -1,6 +1,6 @@ # Distributed under the GNU General Public License version 2 # Copyright 2003-2004 Gentoo Technologies, Inc. -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_support.py,v 1.17 2004/02/13 02:41:26 drobbins Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_support.py,v 1.18 2004/04/12 14:38:26 zhen Exp $ import sys,string,os,types @@ -14,8 +14,8 @@ def list_bashify(mylist): mypack[x]="'"+mypack[x]+"'" mypack=string.join(mypack) #escape ">" and "<" for the shell (using backslash) - mypack=string.replace(mypack,">","\\>") - mypack=string.replace(mypack,"<","\\<") + #mypack=string.replace(mypack,">","\\>") + #mypack=string.replace(mypack,"<","\\<") return mypack required_config_file_values=["storedir","sharedir","distdir","portdir"] diff --git a/targets/embedded/cramfs-runscript.sh b/targets/embedded/cramfs-runscript.sh index 4f7fe481..46a516b7 100644 --- a/targets/embedded/cramfs-runscript.sh +++ b/targets/embedded/cramfs-runscript.sh @@ -1,3 +1,4 @@ +#!/bin/bash # Copyright david@futuretel.com # puts a the embedded image into a cramfs @@ -9,20 +10,19 @@ die() { } case $1 in - -run) - # move this to preclean stage - # it's a hack because dhcpcd is lame - install -d $root_fs_path/var/lib/dhcpc + run) + # move this to preclean stage + # it's a hack because dhcpcd is lame + install -d $root_fs_path/var/lib/dhcpc - install -d $clst_image_path - mkcramfs $root_fs_path $clst_image_path/root.img - imagesize=`du -sk $clst_image_path/root.img | cut -f1` - echo "Created cramfs image at ${clst_image_path}/root.img" - echo "Image size: ${imagesize}k" + install -d $clst_image_path + mkcramfs $root_fs_path $clst_image_path/root.img + imagesize=`du -sk $clst_image_path/root.img | cut -f1` + echo "Created cramfs image at ${clst_image_path}/root.img" + echo "Image size: ${imagesize}k" ;; -preclean) + preclean) ;; esac diff --git a/targets/embedded/embedded-chroot.sh b/targets/embedded/embedded-chroot.sh new file mode 100755 index 00000000..16112308 --- /dev/null +++ b/targets/embedded/embedded-chroot.sh @@ -0,0 +1,49 @@ +#!/bin/bash +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-chroot.sh,v 1.1 2004/04/12 14:38:26 zhen Exp $ + +/usr/sbin/env-update +source /etc/profile + +if [ -n "${clst_ENVSCRIPT}" ] +then + source /tmp/envscript + rm -f /tmp/envscript +fi + +if [ -n "${clst_CCACHE}" ] +then + export clst_myfeatures="${clst_myfeatures} ccache" + emerge --oneshot --nodeps ccache || exit 1 +fi + +if [ -n "${clst_DISTCC}" ] +then + export clst_myfeatures="${clst_myfeatures} distcc" + export DISTCC_HOSTS="${clst_distcc_hosts}" + + USE="-gtk -gnome" emerge --oneshot --nodeps distcc || exit 1 + echo "distcc:x:240:2:distccd:/dev/null:/bin/false" >> /etc/passwd + /usr/bin/distcc-config --install 2>&1 > /dev/null + /usr/bin/distccd 2>&1 > /dev/null +fi + +if [ -n "${clst_PKGCACHE}" ] +then + export clst_myemergeopts="--usepkg --buildpkg" +fi + +# setup the environment +export FEATURES="${clst_myfeatures}" +export CONFIG_PROTECT="-*" +export clst_myemergeopts="${clst_myemergeopts} -O" +export USE="${clst_embedded_use}" + +if [ ! -d "/tmp/mergeroot" ] +then + install -d /tmp/mergeroot +fi + +## START BUILD +ROOT=/tmp/mergeroot emerge ${clst_myemergeopts} ${clst_embedded_packages} || exit 1 diff --git a/targets/embedded/embedded-preclean-chroot.sh b/targets/embedded/embedded-preclean-chroot.sh new file mode 100755 index 00000000..cd1e6c3b --- /dev/null +++ b/targets/embedded/embedded-preclean-chroot.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-preclean-chroot.sh,v 1.1 2004/04/12 14:38:26 zhen Exp $ + +/usr/sbin/env-update +source /etc/profile + +if [ -n "${clst_DISTCC}" ] +then + killall -9 distccd + userdel distcc || exit 1 +fi diff --git a/targets/embedded/embedded.sh b/targets/embedded/embedded.sh index 1cbbfaff..61bc0291 100644 --- a/targets/embedded/embedded.sh +++ b/targets/embedded/embedded.sh @@ -1,58 +1,37 @@ +#!/bin/bash # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/Attic/embedded.sh,v 1.2 2004/04/04 16:58:15 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/Attic/embedded.sh,v 1.3 2004/04/12 14:38:26 zhen Exp $ case $1 in -enter) - $clst_CHROOT $clst_chroot_path + enter) + ${clst_CHROOT} ${clst_chroot_path} ;; -run) - $clst_CHROOT $clst_chroot_path /bin/bash << EOF - /usr/sbin/env-update - source /etc/profile - export USE="\${clst_embedded_use}" - rm -f /tmp/stage23 - if [ -n "${clst_CCACHE}" ] - then - export FEATURES="ccache" - emerge --oneshot --nodeps ccache || exit 1 - fi - export CONFIG_PROTECT="-*" - - #portage needs to be merged manually with USE="build" set to avoid frying our - #make.conf. emerge system could merge it otherwise. - #USE="build" emerge portage - if [ ! -d "/tmp/mergeroot" ] - then - install -d /tmp/mergeroot - fi + run) + if [ -n "${clst_ENVSCRIPT}" ] + then + cp "${clst_ENVSCRIPT}" ${clst_chroot_path}/tmp/envscript + fi - if [ -n "${clst_PKGCACHE}" ] - then - ROOT=/tmp/mergeroot emerge -O $clst_embedded_packages --usepkg --buildpkg || exit 1 - else - ROOT=/tmp/mergeroot emerge -O $clst_embedded_packages || exit 1 - fi -EOF - [ $? -ne 0 ] && exit 1 + cp ${clst_sharedir}/targets/embedded/embedded-chroot.sh ${clst_chroot_path}/tmp + ${clst_CHROOT} ${clst_chroot_path} /tmp/embedded-chroot.sh + rm -f ${clst_chroot_path}/tmp/embedded-chroot.sh + + [ $? -ne 0 ] && exit 1 ;; -preclean) - $clst_CHROOT $clst_chroot_path /bin/bash << EOF - env-update - source /etc/profile - if [ -n "${clst_CCACHE}" ] - then - emerge -C dev-util/ccache || exit 1 - fi -EOF - [ $? -ne 0 ] && exit 1 + + preclean) + exit 0 ;; -clean) - exit 0 + + clean) + exit 0 ;; -*) - exit 1 + + *) + exit 1 ;; + esac exit 0 diff --git a/targets/grp/grp-chroot.sh b/targets/grp/grp-chroot.sh new file mode 100755 index 00000000..2f3ba15c --- /dev/null +++ b/targets/grp/grp-chroot.sh @@ -0,0 +1,63 @@ +#!/bin/bash +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/grp/grp-chroot.sh,v 1.1 2004/04/12 14:38:26 zhen Exp $ + +/usr/sbin/env-update +source /etc/profile + +if [ -n "${clst_ENVSCRIPT}" ] +then + source /tmp/envscript + rm -f /tmp/envscript +fi + +if [ -n "${clst_CCACHE}" ] +then + export clst_myfeatures="${clst_myfeatures} ccache" + emerge --oneshot --nodeps ccache || exit 1 +fi + +if [ -n "${clst_DISTCC}" ] +then + export clst_myfeatures="${clst_myfeatures} distcc" + export DISTCC_HOSTS="${clst_distcc_hosts}" + + USE="-gnome -gtk" emerge --oneshot --nodeps distcc || exit 1 + echo "distcc:x:240:2:distccd:/dev/null:/bin/false" >> /etc/passwd + /usr/bin/distcc-config --install 2>&1 > /dev/null + /usr/bin/distccd 2>&1 > /dev/null +fi + +# setup the environment +export FEATURES="${clst_myfeatures}" +export CONFIG_PROTECT="-*" + +## START BUILD +USE="build" emerge portage +#turn off auto-use: + +export USE_ORDER="env:conf:defaults" + +if [ "${clst_grp_type}" = "pkgset" ] +then + unset DISTDIR + export PKGDIR="/tmp/grp/${clst_grp_target}" + emerge --usepkg --buildpkg --noreplace ${clst_grp_packages} || exit 1 +else + unset DISTDIR + #don't grab MS core fonts, etc. + export USE="${USE} bindist" + #first grab to the normal distdir + + ## why don't we just set distdir first and fetch once??? + DISTDIR="/tmp/grp/${clst_grp_target}" emerge --fetchonly ${clst_grp_packages} || exit 1 + #export DISTDIR="/tmp/grp/${clst_grp_target}" + #export OLD_MIRRORS="${GENTOO_MIRRORS}" + #export GENTOO_MIRRORS="/usr/portage/distfiles" + #now grab them again, but with /usr/portage/distfiles as the primary mirror (local grab) + #emerge --fetchonly ${clst_grp_packages} || exit 1 + #restore original GENTOO_MIRRORS setting, if any + #export GENTOO_MIRRORS="${OLD_MIRRORS}" + unset PKGDIR +fi diff --git a/targets/grp/grp-preclean-chroot.sh b/targets/grp/grp-preclean-chroot.sh new file mode 100755 index 00000000..99be76c3 --- /dev/null +++ b/targets/grp/grp-preclean-chroot.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/grp/grp-preclean-chroot.sh,v 1.1 2004/04/12 14:38:26 zhen Exp $ + +/usr/sbin/env-update +source /etc/profile + +if [ -n "${clst_DISTCC}" ] +then + killall -9 distccd + userdel distcc || exit 1 +fi diff --git a/targets/grp/grp.sh b/targets/grp/grp.sh index fd6b3e7a..ff506c03 100755 --- a/targets/grp/grp.sh +++ b/targets/grp/grp.sh @@ -1,70 +1,46 @@ +#!/bin/bash # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/grp/Attic/grp.sh,v 1.12 2004/04/04 16:58:15 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/grp/Attic/grp.sh,v 1.13 2004/04/12 14:38:26 zhen Exp $ case $1 in -enter) - $clst_CHROOT $clst_chroot_path + enter) + ${clst_CHROOT} ${clst_chroot_path} ;; -run) - shift - export clst_grp_type=$1 - shift - export clst_grp_target=$1 - shift - export clst_grp_packages="$*" - $clst_CHROOT $clst_chroot_path /bin/bash << EOF - /usr/sbin/env-update - source /etc/profile - if [ -n "${clst_ENVSCRIPT}" ] - then - source /tmp/envscript - rm -f /tmp/envscript - fi - if [ -n "${clst_CCACHE}" ] - then - export FEATURES="ccache" - emerge --oneshot --nodeps ccache || exit 1 - fi - if [ -n "${clst_DISTCC}" ] - then - export FEATURES="distcc" - export DISTCC_HOSTS="${clst_distcc_hosts}" - USE="-gnome -gtk" emerge --oneshot --nodeps distcc || exit 1 - echo "distcc:x:240:2:distccd:/dev/null:/bin/false" >> /etc/passwd - /usr/bin/distcc-config --install 2>&1 > /dev/null - /usr/bin/distccd 2>&1 > /dev/null - fi - export CONFIG_PROTECT="-*" - - USE="build" emerge portage - #turn off auto-use: - export USE_ORDER="env:conf:defaults" - if [ "$clst_grp_type" = "pkgset" ] - then - unset DISTDIR - export PKGDIR="/tmp/grp/$clst_grp_target" - emerge --usepkg --buildpkg --noreplace $clst_grp_packages || exit 1 - else - unset DISTDIR - #don't grab MS core fonts, etc. - export USE="\$USE bindist" - #first grab to the normal distdir - emerge --fetchonly $clst_grp_packages || exit 1 - export DISTDIR="/tmp/grp/$clst_grp_target" - export OLD_MIRRORS="\$GENTOO_MIRRORS" - export GENTOO_MIRRORS="/usr/portage/distfiles" - #now grab them again, but with /usr/portage/distfiles as the primary mirror (local grab) - emerge --fetchonly $clst_grp_packages || exit 1 - #restore original GENTOO_MIRRORS setting, if any - export GENTOO_MIRRORS="\$OLD_MIRRORS" - unset PKGDIR - fi -EOF - [ $? -ne 0 ] && exit 1 + run) + shift + export clst_grp_type=$1 + shift + export clst_grp_target=$1 + shift + + if [ -n "${clst_ENVSCRIPT}" ] + then + cp ${clst_ENVSCRIPT} ${clst_chroot_path}/tmp/envscript + fi + + cp ${clst_sharedir}/targets/grp/grp-chroot.sh ${clst_chroot_path}/tmp + clst_grp_packages="$*" ${clst_CHROOT} ${clst_chroot_path} /tmp/grp-chroot.sh + rm -f ${clst_chroot_path}/tmp/grp-chroot.sh + + [ $? -ne 0 ] && exit 1 + ;; + + preclean) + cp ${clst_sharedir}/targets/grp/grp-preclean-chroot.sh ${clst_chroot_path}/tmp + ${clst_CHROOT} ${clst_chroot_path} /tmp/grp-preclean-chroot.sh + rm -f ${clst_chroot_path}/tmp/grp-preclean-chroot.sh + + [ $? -ne 0 ] && exit 1 ;; -*) - exit 1 + + clean) + exit 0 + ;; + + *) + exit 1 ;; + esac exit 0 diff --git a/targets/livecd-stage1/livecd-stage1-chroot.sh b/targets/livecd-stage1/livecd-stage1-chroot.sh new file mode 100755 index 00000000..bc164d10 --- /dev/null +++ b/targets/livecd-stage1/livecd-stage1-chroot.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/livecd-stage1-chroot.sh,v 1.1 2004/04/12 14:38:26 zhen Exp $ + +/usr/sbin/env-update +source /etc/profile + +if [ -n "${clst_ENVSCRIPT}" ] +then + source /tmp/envscript + rm -f /tmp/envscript +fi + +if [ -n "${clst_CCACHE}" ] +then + export clst_myfeatures="${clst_myfeatures} ccache" + emerge --oneshot --nodeps ccache || exit 1 +fi + +if [ -n "${clst_DISTCC}" ] +then + export clst_myfeatures="${clst_myfeatures} distcc" + export DISTCC_HOSTS="${clst_distcc_hosts}" + + USE="-gnome -gtk" emerge --oneshot --nodeps distcc || exit 1 + echo "distcc:x:240:2:distccd:/dev/null:/bin/false" >> /etc/passwd + /usr/bin/distcc-config --install 2>&1 > /dev/null + /usr/bin/distccd 2>&1 > /dev/null +fi + +if [ -n "${clst_PKGCACHE}" ] +then + clst_emergeopts="--usepkg --buildpkg" +else + clst_emergeopts="" +fi + +## setup the environment +export FEATURES="${clst_myfeatures}" +export CONFIG_PROTECT="-*" + +## START BUILD +USE="build" emerge portage +#turn off auto-use: +export USE_ORDER="env:conf:defaults" + +emerge ${clst_emergeopts} ${clst_packages} diff --git a/targets/livecd-stage1/livecd-stage1-preclean-chroot.sh b/targets/livecd-stage1/livecd-stage1-preclean-chroot.sh new file mode 100755 index 00000000..656c6c60 --- /dev/null +++ b/targets/livecd-stage1/livecd-stage1-preclean-chroot.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/livecd-stage1-preclean-chroot.sh,v 1.1 2004/04/12 14:38:26 zhen Exp $ + +/usr/sbin/env-update +source /etc/profile + +if [ -n "${clst_DISTCC}" ] +then + killall -9 distccd + userdel distcc || exit 1 +fi diff --git a/targets/livecd-stage1/livecd-stage1.sh b/targets/livecd-stage1/livecd-stage1.sh index 3d015320..feecc217 100755 --- a/targets/livecd-stage1/livecd-stage1.sh +++ b/targets/livecd-stage1/livecd-stage1.sh @@ -1,63 +1,41 @@ +#!/bin/bash # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/Attic/livecd-stage1.sh,v 1.8 2004/03/26 17:03:29 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/Attic/livecd-stage1.sh,v 1.9 2004/04/12 14:38:26 zhen Exp $ case $1 in -enter) - $clst_CHROOT $clst_chroot_path + enter) + ${clst_CHROOT} ${clst_chroot_path} ;; -run) - shift - $clst_CHROOT $clst_chroot_path /bin/bash << EOF - env-update - source /etc/profile - if [ -n "${clst_ENVSCRIPT}" ] - then - source /tmp/envscript - rm -f /tmp/envscript - fi - if [ -n "${clst_CCACHE}" ] - then - export FEATURES="ccache" - emerge --oneshot --nodeps ccache || exit 1 - fi - if [ -n "${clst_DISTCC}" ] - then - export FEATURES="distcc" - export DISTCC_HOSTS="${clst_distcc_hosts}" - USE="-gtk -gnome" emerge --oneshot --nodeps distcc || exit 1 - echo "distcc:x:240:2:distccd:/dev/null:/bin/false" >> /$ - /usr/bin/distcc-config --install 2>&1 > /dev/null - /usr/bin/distccd 2>&1 > /dev/null - fi - export CONFIG_PROTECT="-*" - USE="build" emerge portage - #turn off auto-use: - export USE_ORDER="env:conf:defaults" - for x in $* - do - if [ -n "${clst_PKGCACHE}" ] + run) + shift + + if [ -n "${clst_ENVSCRIPT}" ] then - emerge --usepkg --buildpkg "\$x" || exit 1 - if [ "\$?" -ne 0 ] - then - echo "\$x failed to build." - exit 1 - fi - else - emerge "\$x" - if [ "\$?" -ne 0 ] - then - echo "\$x failed to build." - exit 1 - fi + cp "${clst_ENVSCRIPT}" ${clst_chroot_path}/tmp/envscript fi - done -EOF - [ $? -ne 0 ] && exit 1 - ;; -*) - exit 1 + + cp ${clst_sharedir}/targets/livecd-stage1/livecd-stage1-chroot.sh ${clst_chroot_path}/tmp + clst_packages="$*" ${clst_CHROOT} ${clst_chroot_path} /tmp/livecd-stage1-chroot.sh + rm -f ${clst_chroot_path}/tmp/livecd-stage1-chroot.sh + [ $? -ne 0 ] && exit 1 ;; + + preclean) + cp ${clst_sharedir}/targets/livecd-stage1/livecd-stage1-preclean-chroot.sh ${clst_chroot_path}/tmp + ${clst_CHROOT} ${clst_chroot_path} /tmp/livecd-stage1-preclean-chroot.sh + rm -f ${clst_chroot_path}/tmp/livecd-stage1-preclean-chroot.sh + + [ $? -ne 0 ] && exit 1 + ;; + + clean) + exit 0 + ;; + + *) + exit 1 + ;; + esac exit 0 diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh index 11635bc4..367054d4 100755 --- a/targets/stage1/stage1-chroot.sh +++ b/targets/stage1/stage1-chroot.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/stage1-chroot.sh,v 1.12 2004/04/12 14:38:26 zhen Exp $ /usr/sbin/env-update source /etc/profile @@ -8,63 +11,45 @@ then source /tmp/envscript rm -f /tmp/envscript fi - -case $1 in - build) - - #emerge and enable ccache before we set ROOT - if [ -n "${clst_CCACHE}" ] - then - export FEATURES="ccache" - emerge --oneshot --nodeps ccache || exit 1 - fi - - if [ -n "${clst_DISTCC}" ] - then - export FEATURES="distcc" - export DISTCC_HOSTS="${clst_distcc_hosts}" - USE="-gtk -gnome" emerge --oneshot --nodeps distcc || exit 1 - echo "distcc:x:240:2:distccd:/dev/null:/bin/false" >> /etc/passwd - /usr/bin/distcc-config --install 2>&1 > /dev/null - /usr/bin/distccd 2>&1 > /dev/null - fi - - export ROOT=${2} - install -d $ROOT - if [ -n "${clst_PKGCACHE}" ] - then - export EMERGE_OPTS="--usepkg --buildpkg" - fi +if [ -n "${clst_CCACHE}" ] +then + export clst_myfeatures="${clst_myfeatures} ccache" + emerge --oneshot --nodeps ccache || exit 1 +fi - for x in $(/tmp/build.sh) - do - echo $x >> /tmp/build.log - USE="-* build" emerge ${EMERGE_OPTS} --noreplace $x || exit 1 - done +if [ -n "${clst_DISTCC}" ] +then + export clst_myfeatures="${clst_myfeatures} distcc" + export DISTCC_HOSTS="${clst_distcc_hosts}" - if [ ! -d ${ROOT}/dev ] - then - mkdir -p ${ROOT}/dev - cd ${ROOT}/dev - MAKEDEV generic-i386 - fi - ;; + USE="-gtk -gnome" emerge --oneshot --nodeps distcc || exit 1 + echo "distcc:x:240:2:distccd:/dev/null:/bin/false" >> /etc/passwd + /usr/bin/distcc-config --install 2>&1 > /dev/null + /usr/bin/distccd 2>&1 > /dev/null +fi - preclean) - #normal chroot is fine here since this is our second chroot (no $clst_CHROOT needed) - chroot ${2} /bin/bash << EOF - #now, some finishing touches to initialize gcc-config.... - unset ROOT - if [ -e /usr/sbin/gcc-config ] - then - mythang=\$( cd /etc/env.d/gcc; ls ${clst_CHOST}-* ) - gcc-config \${mythang}; /usr/sbin/env-update; source /etc/profile - fi - #stage1 is not going to have anything in zoneinfo, so save our Factory timezone - rm -f /etc/localtime - cp /usr/share/zoneinfo/Factory /etc/localtime -EOF - ;; -esac +if [ -n "${clst_PKGCACHE}" ] +then + export EMERGE_OPTS="--usepkg --buildpkg" +fi +# setup our environment +export FEATURES="${clst_myfeatures}" +export ROOT=${1} +install -d ${ROOT} + +## START BUILD +for x in $(/tmp/build.sh) +do + echo $x >> /tmp/build.log + USE="-* build" emerge ${EMERGE_OPTS} --noreplace $x || exit 1 +done + +# if baselayout did not fix up /dev, we do it +if [ ! -d i${ROOT}/dev ] +then + mkdir -p ${ROOT}/dev + cd ${ROOT}/dev + MAKEDEV generic-i386 +fi diff --git a/targets/stage1/stage1-preclean1-chroot.sh b/targets/stage1/stage1-preclean1-chroot.sh new file mode 100755 index 00000000..2c67bcb7 --- /dev/null +++ b/targets/stage1/stage1-preclean1-chroot.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/Attic/stage1-preclean1-chroot.sh,v 1.1 2004/04/12 14:38:26 zhen Exp $ + +/usr/sbin/env-update +source /etc/profile + +if [ -n "${clst_DISTCC}" ] +then + /bin/killall -9 distccd + userdel distcc || exit 1 +fi diff --git a/targets/stage1/stage1-preclean2-chroot.sh b/targets/stage1/stage1-preclean2-chroot.sh new file mode 100755 index 00000000..19308b9b --- /dev/null +++ b/targets/stage1/stage1-preclean2-chroot.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/Attic/stage1-preclean2-chroot.sh,v 1.1 2004/04/12 14:38:26 zhen Exp $ + +#now, some finishing touches to initialize gcc-config.... +unset ROOT + +if [ -e /usr/sbin/gcc-config ] +then + mythang=$( cd /etc/env.d/gcc; ls ${clst_CHOST}-* ) + echo $mythang; sleep 20 + gcc-config ${mythang}; /usr/sbin/env-update; source /etc/profile +fi + +#stage1 is not going to have anything in zoneinfo, so save our Factory timezone +rm -f /etc/localtime +cp /usr/share/zoneinfo/Factory /etc/localtime diff --git a/targets/stage1/stage1.sh b/targets/stage1/stage1.sh index ee95008c..93058c47 100755 --- a/targets/stage1/stage1.sh +++ b/targets/stage1/stage1.sh @@ -1,55 +1,80 @@ +#!/bin/bash # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/Attic/stage1.sh,v 1.9 2004/03/19 16:06:37 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/Attic/stage1.sh,v 1.10 2004/04/12 14:38:26 zhen Exp $ case $1 in -enter) - $clst_CHROOT $clst_chroot_path /bin/bash + enter) + ${clst_CHROOT} ${clst_chroot_path} /bin/bash ;; -run) - cp ${clst_sharedir}/targets/stage1/stage1-chroot.sh ${clst_chroot_path}/tmp - cp ${clst_sharedir}/targets/stage1/build.sh ${clst_chroot_path}/tmp - # set up "ROOT in chroot" dir - install -d ${clst_chroot_path}/tmp/stage1root/etc - # set up make.conf and make.profile link in "ROOT in chroot": - cp ${clst_chroot_path}/etc/make.conf ${clst_chroot_path}/tmp/stage1root/etc - cp -a ${clst_chroot_path}/etc/make.profile ${clst_chroot_path}/tmp/stage1root/etc - # enter chroot, execute our build script - $clst_CHROOT ${clst_chroot_path} /tmp/stage1-chroot.sh build /tmp/stage1root - [ $? -ne 0 ] && exit 1 + + run) + if [ -n "${clst_ENVSCRIPT}" ] + then + cp "${clst_ENVSCRIPT}" ${clst_chroot_path}/tmp/envscript + fi + + cp ${clst_sharedir}/targets/stage1/stage1-chroot.sh ${clst_chroot_path}/tmp + cp ${clst_sharedir}/targets/stage1/build.sh ${clst_chroot_path}/tmp + + # set up "ROOT in chroot" dir + install -d ${clst_chroot_path}/tmp/stage1root/etc + + # set up make.conf and make.profile link in "ROOT in chroot": + cp ${clst_chroot_path}/etc/make.conf ${clst_chroot_path}/tmp/stage1root/etc + cp -a ${clst_chroot_path}/etc/make.profile ${clst_chroot_path}/tmp/stage1root/etc + + # enter chroot, execute our build script + ${clst_CHROOT} ${clst_chroot_path} /tmp/stage1-chroot.sh /tmp/stage1root + [ $? -ne 0 ] && exit 1 ;; -preclean) - #preclean runs with bind mounts active -- for running any commands inside chroot - $clst_CHROOT ${clst_chroot_path} /tmp/stage1-chroot.sh preclean /tmp/stage1root - [ $? -ne 0 ] && exit 1 + + preclean) + #preclean runs with bind mounts active -- for running any commands inside chroot + + #first we cleanup after ourselves + cp ${clst_sharedir}/targets/stage1/stage1-preclean1-chroot.sh ${clst_chroot_path}/tmp + ${clst_CHROOT} ${clst_chroot_path} /tmp/stage1-preclean1-chroot.sh + rm -f ${clst_chroot_path}/tmp/stage1-preclean1-chroot.sh + [ $? -ne 0 ] && exit 1 + + #second we do the gcc magic + cp ${clst_sharedir}/targets/stage1/stage1-preclean2-chroot.sh ${clst_chroot_path}/tmp/stage1root/tmp + ${clst_CHROOT} ${clst_chroot_path}/tmp/stage1root /tmp/stage1-preclean2-chroot.sh + rm -f ${clst_chroot_path}/tmp/stage1root/tmp/stage1-preclean2-chroot.sh + [ $? -ne 0 ] && exit 1 ;; -clean) - #clean runs after preclean with bind mounts unmounted - keepers="sys-kernel/linux-headers sys-devel/binutils sys-devel/gcc sys-apps/baselayout sys-libs/glibc virtual/glibc virtual/kernel" - # set everything to uid 999 (nouser) - cd ${clst_chroot_path}/tmp/stage1root - install -d var/db/pkg2 - for x in $keepers - do - category=${x%%/*} - package=${x##*/} - [ "`ls var/db/pkg/${x}* 2>/dev/null`" = "" ] && continue - install -d var/db/pkg2/${category} - mv var/db/pkg/${category}/${package}* var/db/pkg2/${category} - done - rm -rf var/db/pkg - mv var/db/pkg2 var/db/pkg + + clean) + #clean runs after preclean with bind mounts unmounted + keepers="sys-kernel/linux-headers sys-devel/binutils sys-devel/gcc sys-apps/baselayout sys-libs/glibc virtual/glibc virtual/kernel" + # set everything to uid 999 (nouser) + cd ${clst_chroot_path}/tmp/stage1root + install -d var/db/pkg2 + + for x in $keepers + do + category=${x%%/*} + package=${x##*/} + [ "`ls var/db/pkg/${x}* 2>/dev/null`" = "" ] && continue + install -d var/db/pkg2/${category} + mv var/db/pkg/${category}/${package}* var/db/pkg2/${category} + done + rm -rf var/db/pkg + mv var/db/pkg2 var/db/pkg - # clean out man, info and doc files - rm -rf usr/share/{man,doc,info}/* - # zap all .pyc and .pyo files - find -iname "*.py[co]" -exec rm -f {} \; - # cleanup all .a files except libgcc.a, *_nonshared.a and /usr/lib/portage/bin/*.a - find -iname "*.a" | grep -v 'libgcc.a' | grep -v 'nonshared.a' | grep -v '/usr/lib/portage/bin/' | grep -v 'libgcc_eh.a' | xargs rm -f + # clean out man, info and doc files + rm -rf usr/share/{man,doc,info}/* + # zap all .pyc and .pyo files + find -iname "*.py[co]" -exec rm -f {} \; + # cleanup all .a files except libgcc.a, *_nonshared.a and /usr/lib/portage/bin/*.a + find -iname "*.a" | grep -v 'libgcc.a' | grep -v 'nonshared.a' | grep -v '/usr/lib/portage/bin/' | grep -v 'libgcc_eh.a' | xargs rm -f ;; + *) - exit 1 + exit 1 ;; + esac exit 0 diff --git a/targets/stage2/stage2-chroot.sh b/targets/stage2/stage2-chroot.sh new file mode 100755 index 00000000..4be1f192 --- /dev/null +++ b/targets/stage2/stage2-chroot.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage2/stage2-chroot.sh,v 1.1 2004/04/12 14:38:26 zhen Exp $ + +/usr/sbin/env-update +source /etc/profile + +if [ -n ${clst_ENVSCRIPT} ] +then + source /tmp/envscript + rm -f /tmp/envscript +fi + +if [ -n "${clst_CCACHE}" ] +then + export clst_myfeatures="${clst_myfeatures} ccache" + emerge --oneshot --nodeps ccache || exit 1 +fi + +if [ -n "${clst_DISTCC}" ] +then + export clst_myfeatures="${clst_myfeatures} distcc" + export DISTCC_HOSTS="${clst_distcc_hosts}" + + USE="-gnome -gtk" emerge --oneshot --nodeps distcc || exit 1 + echo "distcc:x:240:2:distccd:/dev/null:/bin/false" >> /etc/passwd + /usr/bin/distcc-config --install 2>&1 > /dev/null + /usr/bin/distccd 2>&1 > /dev/null +fi + +if [ -n "${clst_PKGCACHE}" ] +then + export EMERGE_OPTS="--usepkg --buildpkg" +fi + +grep GRP_STAGE23_USE /etc/make.profile/make.defaults > /tmp/stage23 +source /tmp/stage23 +rm -f /tmp/stage23 + +if [ -f /usr/portage/profiles/${clst_profile}/parent ] +then + export clst_bootstrap="bootstrap-cascade.sh" +else + export clst_bootstrap=bootstrap.sh +fi + +## setup the environment +export FEATURES="${clst_myfeatures}" + +## START BUILD +/usr/portage/scripts/${clst_bootstrap} || exit 1 diff --git a/targets/stage2/stage2-preclean-chroot.sh b/targets/stage2/stage2-preclean-chroot.sh new file mode 100755 index 00000000..f92d3dd8 --- /dev/null +++ b/targets/stage2/stage2-preclean-chroot.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage2/stage2-preclean-chroot.sh,v 1.1 2004/04/12 14:38:26 zhen Exp $ + +/usr/sbin/env-update +source /etc/profile + +export CONFIG_PROTECT="-*" + +if [ -n "${clst_CCACHE}" ] +then + emerge -C dev-util/ccache || exit 1 +fi + +if [ -n "${clst_DISTCC}" ] +then + killall -9 distccd + emerge -C sys-devel/distcc || exit 1 + userdel distcc || exit 1 +fi diff --git a/targets/stage2/stage2.sh b/targets/stage2/stage2.sh index 0ed8f6d8..751b1b2a 100755 --- a/targets/stage2/stage2.sh +++ b/targets/stage2/stage2.sh @@ -1,72 +1,41 @@ +#!/bin/bash # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage2/Attic/stage2.sh,v 1.11 2004/04/04 16:58:15 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage2/Attic/stage2.sh,v 1.12 2004/04/12 14:38:26 zhen Exp $ case $1 in -enter) - $clst_CHROOT $clst_chroot_path + enter) + + $clst_CHROOT ${clst_chroot_path} ;; -run) - $clst_CHROOT $clst_chroot_path /bin/bash << EOF - /usr/sbin/env-update - source /etc/profile - if [ -n "${clst_ENVSCRIPT}" ] - then - source /tmp/envscript - rm -f /tmp/envscript - fi - cat /etc/make.profile/make.defaults | grep GRP_STAGE23_USE > /tmp/stage23 - source /tmp/stage23 - export USE="-* \${clst_HOSTUSE} \${GRP_STAGE23_USE}" - if [ -n "${clst_CCACHE}" ] - then - export FEATURES="ccache" - emerge --oneshot --nodeps ccache || exit 1 - fi - if [ -n "${clst_DISTCC}" ] - then - export FEATURES="distcc" - export DISTCC_HOSTS="${clst_distcc_hosts}" - USE="-gnome -gtk" emerge --oneshot --nodeps distcc || exit 1 - echo "distcc:x:240:2:distccd:/dev/null:/bin/false" >> /etc/passwd - /usr/bin/distcc-config --install 2>&1 > /dev/null - /usr/bin/distccd 2>&1 > /dev/null - fi - if [ -n "${clst_PKGCACHE}" ] - then - export EMERGE_OPTS="--usepkg --buildpkg" - fi - if [ -f /usr/portage/profiles/${clst_profile}/parent ] - then - export clst_bootstrap="bootstrap-cascade.sh" - else - export clst_bootstrap=bootstrap.sh - fi - /usr/portage/scripts/\${clst_bootstrap} || exit 1 -EOF - [ $? -ne 0 ] && exit 1 + + run) + if [ -n "${clst_ENVSCRIPT}" ] + then + cp "${clst_ENVSCRIPT}" ${clst_chroot_path}/tmp/envscript + fi + + cp ${clst_sharedir}/targets/stage2/stage2-chroot.sh ${clst_chroot_path}/tmp + ${clst_CHROOT} ${clst_chroot_path} /tmp/stage2-chroot.sh + rm -f ${clst_chroot_path}/tmp/stage2-chroot.sh + [ $? -ne 0 ] && exit 1 ;; -preclean) - #preclean runs with bind-mounts active - $clst_CHROOT $clst_chroot_path /bin/bash << EOF - env-update - source /etc/profile - if [ -n "${clst_CCACHE}" ] - then - emerge -C dev-util/ccache || exit 1 - fi - if [ -n "${clst_DISTCC}" ] - then - emerge -C sys-devel/distcc || exit 1 - fi -EOF - [ $? -ne 0 ] && exit 1 + + preclean) + cp ${clst_sharedir}/targets/stage2/stage2-preclean-chroot.sh ${clst_chroot_path}/tmp + #preclean runs with bind-mounts active + $clst_CHROOT $clst_chroot_path /tmp/stage2-preclean-chroot.sh + rm -f ${clst_chroot_path}/tmp/stage2-preclean-chroot.sh + [ $? -ne 0 ] && exit 1 ;; -clean) - exit 0 + + clean) + exit 0 ;; -*) - exit 1 + + *) + exit 1 ;; + esac exit 0 diff --git a/targets/stage3/stage3.sh b/targets/stage3/stage3.sh index 4eb9ffa7..c1e84c47 100755 --- a/targets/stage3/stage3.sh +++ b/targets/stage3/stage3.sh @@ -1,73 +1,39 @@ +#!/bin/bash # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage3/Attic/stage3.sh,v 1.12 2004/04/04 16:58:15 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage3/Attic/stage3.sh,v 1.13 2004/04/12 14:38:26 zhen Exp $ case $1 in -enter) - $clst_CHROOT $clst_chroot_path + enter) + ${clst_CHROOT} ${clst_chroot_path} ;; -run) - $clst_CHROOT $clst_chroot_path /bin/bash << EOF - /usr/sbin/env-update - source /etc/profile - if [ -n ${ENVSCRIPT} ] - then - source /tmp/envscript - rm -f /tmp/envscript - fi - cat /etc/make.profile/make.defaults | grep GRP_STAGE23_USE > /tmp/stage23 - source /tmp/stage23 - export USE="-* \${clst_HOSTUSE} \${GRP_STAGE23_USE}" - rm -f /tmp/stage23 - export CONFIG_PROTECT="-*" - - #portage needs to be merged manually with USE="build" set to avoid frying our - #make.conf. emerge system could merge it otherwise. - USE="build" emerge portage - if [ -n "${clst_CCACHE}" ] - then - export FEATURES="ccache" - emerge --oneshot --nodeps ccache || exit 1 - fi - if [ -n "${clst_DISTCC}" ] - then - export FEATURES="distcc" - export DISTCC_HOSTS="${clst_distcc_hosts}" - USE="-gnome -gtk" emerge --oneshot --nodeps distcc || exit 1 - echo "distcc:x:240:2:distccd:/dev/null:/bin/false" >> /etc/passwd - /usr/bin/distcc-config --install 2>&1 > /dev/null - /usr/bin/distccd 2>&1 > /dev/null - fi - if [ -n "${clst_PKGCACHE}" ] - then - emerge system --usepkg --buildpkg || exit 1 - else - emerge system || exit 1 - fi -EOF - [ $? -ne 0 ] && exit 1 + + run) + if [ -n "${clst_ENVSCRIPT}" ] + then + cp "${clstr_ENVSCRIPT}" ${clst_chroot_path}/tmp/envscript + fi + + cp ${clst_sharedir}/targets/stage3/stage3-chroot.sh ${clst_chroot_path}/tmp + ${clst_CHROOT} ${clst_chroot_path} /tmp/stage3-chroot.sh + rm -f ${clst_chroot_path}/tmp/stage3-chroot.sh + [ $? -ne 0 ] && exit 1 ;; -preclean) - $clst_CHROOT $clst_chroot_path /bin/bash << EOF - env-update - source /etc/profile - if [ -n "${clst_CCACHE}" ] - then - emerge -C dev-util/ccache || exit 1 - fi - if [ -n "${clst_DISTCC}" ] - then - emerge -C sys-devel/distcc || exit 1 - userdel distcc - fi -EOF - [ $? -ne 0 ] && exit 1 + + preclean) + cp ${clst_sharedir}/targets/stage3/stage3-preclean-chroot.sh ${clst_chroot_path}/tmp + ${clst_CHROOT} ${clst_chroot_path} /tmp/stage3-preclean-chroot.sh + rm -rf ${clst_chroot_path}/tmp/stage3-preclean-chroot.sh + [ $? -ne 0 ] && exit 1 ;; -clean) - exit 0 + + clean) + exit 0 ;; -*) - exit 1 + + *) + exit 1 ;; + esac exit 0 diff --git a/targets/tinderbox/tinderbox.sh b/targets/tinderbox/tinderbox.sh index edd51ee6..7cfda32f 100755 --- a/targets/tinderbox/tinderbox.sh +++ b/targets/tinderbox/tinderbox.sh @@ -1,57 +1,39 @@ +#!/bin/bash # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/tinderbox/Attic/tinderbox.sh,v 1.5 2004/04/04 16:58:15 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/tinderbox/Attic/tinderbox.sh,v 1.6 2004/04/12 14:38:26 zhen Exp $ case $1 in -run) - shift - export clst_tinderbox_packages="$*" - $clst_CHROOT $clst_chroot_path /bin/bash << EOF - /usr/sbin/env-update - source /etc/profile - if [ -n "${clst_ENVSCRIPT}" ] - then - source /tmp/envscript - rm -f /tmp/envscript - fi - if [ -n "${clst_CCACHE}" ] - then - export FEATURES="ccache" - emerge --oneshot --nodeps ccache || exit 1 - fi - if [ -n "${clst_DISTCC}" ] - then - export FEATURES="distcc" - export DISTCC_HOSTS="${clst_distcc_hosts}" - USE="-gnome -gtk" emerge --oneshot --nodeps distcc || exit 1 - echo "distcc:x:240:2:distccd:/dev/null:/bin/false" >> /etc/passwd - /usr/bin/distcc-config --install 2>&1 > /dev/null - /usr/bin/distccd 2>&1 > /dev/null - fi - export CONFIG_PROTECT="-*" - - USE="build" emerge portage - #turn off auto-use: - export USE_ORDER="env:conf:defaults" - #back up pristine system - rsync -avx --exclude "/root/" --exclude "/tmp/" --exclude "/usr/portage/" / /tmp/rsync-bak/ - for x in $clst_tinderbox_packages - do - emerge --usepkg --buildpkg \$x - if [ "\$?" != "0" ] + run) + shift + + if [ -n "${clst_ENVSCRIPT}" ] then - echo "! \$x" >> /tmp/tinderbox.log - else - echo "\$x" >> /tmp/tinderbox.log + cp "${clst_ENVSCRIPT}" ${clst_chroot_path}/tmp/envscript fi - echo "Syncing from original pristine tinderbox snapshot..." - rsync -avx --delete --exclude "/root/*" --exclude "/tmp/" --exclude "/usr/portage/*" /tmp/rsync-bak/ / - done -EOF - [ $? -ne 0 ] && exit 1 - ;; -*) - exit 1 + + cp ${clst_sharedir}/targets/tinderbox/tinderbox-chroot.sh ${clst_chroot_path}/tmp + clst_tinderbox_packages="$*" ${clst_CHROOT} ${clst_chroot_path} /tmp/tinderbox-chroot.sh + rm -f ${clst_chroot_path}/tmp/tinderbox-chroot.sh + + [ $? -ne 0 ] && exit 1 ;; + + preclean) + cp ${clst_sharedir}/targets/grp/tinderbox-preclean-chroot.sh ${clst_chroot_path}/tmp + ${clst_CHROOT} ${clst_chroot_path} /tmp/tinderbox-preclean-chroot.sh + rm -f ${clst_chroot_path}/tmp/tinderbox-preclean-chroot.sh + + [ $? -ne 0 ] && exit 1 + ;; + + clean) + exit 0 + ;; + + *) + exit 1 + ;; + esac exit 0