print "Package cache support enabled."
myspec["PKGCACHE"]="1"
+if "distcc" in string.split(myspec["options"]):
+ print "Distcc support enabled."
+ myspec["DISTCC"]="1"
+
if sys.argv[1] in ["-f", "--file" ]:
try:
addlargs=read_spec(sys.argv[2])
valid_config_file_values=required_config_file_values[:]
valid_config_file_values.append("PKGCACHE")
valid_config_file_values.append("CCACHE")
+valid_config_file_values.append("DISTCC")
valid_config_file_values.append("options")
verbosity=1
if self.settings.has_key("CCACHE"):
self.mounts.append("/root/.ccache")
self.mountmap["/root/.ccache"]="/root/.ccache"
+
if self.settings["target"]=="grp":
self.mounts.append("/tmp/grp")
self.mountmap["/tmp/grp"]=self.settings["target_path"]
-
+
def mount_safety_check(self):
mypath=self.settings["chroot_path"]
#check and verify that none of our paths in mypath are mounted. We don't want to clean up with things still
if self.settings.has_key("CXXFLAGS"):
myf.write('CXXFLAGS="'+self.settings["CXXFLAGS"]+'"\n')
else:
- myf.write('CXXFLAGS="$CFLAGS"\n')
+ myf.write('CXXFLAGS="${CFLAGS}"\n')
myf.close()
def clean(self):
# 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.4 2004/01/10 22:23:44 drobbins Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/grp/Attic/grp.sh,v 1.5 2004/01/29 21:53:22 zhen Exp $
case $1 in
enter)
export FEATURES="ccache"
emerge --oneshot --nodeps ccache || exit 1
fi
+ if [ -n "${clst_DISTCC}" ]
+ then
+ export FEATURES="distcc"
+ export DISTCC_HOSTS="${clst_distcc_hosts}"
+ 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 [ ${clst_rel_type} = "hardened" ]
then
emerge --oneshot --nodeps hardened-gcc || exit 1
export FEATURES="ccache"
emerge --oneshot --nodeps ccache || exit 1
fi
+ if [ -n "${clst_DISTCC}" ]
+ then
+ export FEATURES="distcc"
+ export DISTCC_HOSTS="${clst_distcc_hosts}"
+ 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}" ]
# 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.7 2003/11/03 15:46:14 drobbins Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/Attic/stage1.sh,v 1.8 2004/01/29 21:53:22 zhen Exp $
case $1 in
enter)
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
+ $clst_CHROOT ${clst_chroot_path} /tmp/stage1-chroot.sh build /tmp/stage1root
[ $? -ne 0 ] && exit 1
;;
preclean)
# 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.6 2003/11/06 02:31:20 drobbins Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage2/Attic/stage2.sh,v 1.7 2004/01/29 21:53:22 zhen Exp $
case $1 in
enter)
export FEATURES="ccache"
emerge --oneshot --nodeps ccache || exit 1
fi
+ if [ -n "${clst_DISTCC}" ]
+ then
+ export FEATURES="distcc"
+ export DISTCC_HOSTS="${clst_distcc_hosts}"
+ 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"
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
;;
# 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.7 2003/11/06 03:45:15 drobbins Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage3/Attic/stage3.sh,v 1.8 2004/01/29 21:53:22 zhen Exp $
case $1 in
enter)
source /tmp/stage23
export USE="-* \${clst_HOSTUSE} \${GRP_STAGE23_USE}"
rm -f /tmp/stage23
- if [ -n "${clst_CCACHE}" ]
- then
- export FEATURES="ccache"
- emerge --oneshot --nodeps ccache || exit 1
- fi
if [ ${clst_rel_type} = "hardened" ]
then
emerge --oneshot --nodeps hardened-gcc || exit 1
#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}"
+ 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
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
;;