From faba9f54b80d8b0ea237aecb7c3a3add944eebf3 Mon Sep 17 00:00:00 2001 From: "John P. Davis" Date: Mon, 12 Apr 2004 14:39:35 +0000 Subject: [PATCH] adding files git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@348 d1e1f19c-881f-0410-ab34-b69fee027534 --- targets/stage3/stage3-chroot.sh | 51 ++++++++++++++++++ targets/stage3/stage3-preclean-chroot.sh | 21 ++++++++ targets/tinderbox/tinderbox-chroot.sh | 54 +++++++++++++++++++ .../tinderbox/tinderbox-preclean-chroot.sh | 13 +++++ 4 files changed, 139 insertions(+) create mode 100755 targets/stage3/stage3-chroot.sh create mode 100755 targets/stage3/stage3-preclean-chroot.sh create mode 100755 targets/tinderbox/tinderbox-chroot.sh create mode 100755 targets/tinderbox/tinderbox-preclean-chroot.sh diff --git a/targets/stage3/stage3-chroot.sh b/targets/stage3/stage3-chroot.sh new file mode 100755 index 00000000..c0521153 --- /dev/null +++ b/targets/stage3/stage3-chroot.sh @@ -0,0 +1,51 @@ +#!/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/stage3-chroot.sh,v 1.1 2004/04/12 14:39:35 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 clst_myemergeopts="${clst_myemergeopts} --usepkg --buildpkg" +fi + +grep GRP_STAGE23_USE /etc/make.profile/make.defaults > /tmp/stage23 +source /tmp/stage23 +rm -f /tmp/stage23 + +# setup the build environment +export FEATURES="${clst_myfeatures}" +export USE="-* ${clst_HOSTUSE} ${GRP_STAGE23_USE}" +export CONFIG_PROTECT="-*" + +## START BUILD +# 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 + +emerge ${clst_myemergeopts} system || exit 1 diff --git a/targets/stage3/stage3-preclean-chroot.sh b/targets/stage3/stage3-preclean-chroot.sh new file mode 100755 index 00000000..21031c0e --- /dev/null +++ b/targets/stage3/stage3-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/stage3/stage3-preclean-chroot.sh,v 1.1 2004/04/12 14:39:35 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/tinderbox/tinderbox-chroot.sh b/targets/tinderbox/tinderbox-chroot.sh new file mode 100755 index 00000000..a9d2dba5 --- /dev/null +++ b/targets/tinderbox/tinderbox-chroot.sh @@ -0,0 +1,54 @@ +#!/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/tinderbox-chroot.sh,v 1.1 2004/04/12 14:39:35 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 THE BUILD +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" ] + then + echo "! $x" >> /tmp/tinderbox.log + else + echo "$x" >> /tmp/tinderbox.log + fi + echo "Syncing from original pristine tinderbox snapshot..." + rsync -avx --delete --exclude "/root/*" --exclude "/tmp/" --exclude "/usr/portage/*" /tmp/rsync-bak/ / +done diff --git a/targets/tinderbox/tinderbox-preclean-chroot.sh b/targets/tinderbox/tinderbox-preclean-chroot.sh new file mode 100755 index 00000000..8269588c --- /dev/null +++ b/targets/tinderbox/tinderbox-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/tinderbox/tinderbox-preclean-chroot.sh,v 1.1 2004/04/12 14:39:35 zhen Exp $ + +/usr/sbin/env-update +source /etc/profile + +if [ -n "${clst_DISTCC}" ] +then + killall -9 distccd + userdel distcc || exit 1 +fi -- 2.26.2