# 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.15 2004/01/14 06:21:56 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.16 2004/02/11 03:31:55 zhen Exp $
+
+ 10 Feb 2004; John Davis <zhen@gentoo.org> README, TODO, catalyst,
+ modules/builder.py, modules/catalyst_support.py, modules/targets.py,
+ targets/grp/grp.sh, targets/livecd-stage1/livecd-stage1.sh,
+ targets/livecd-stage2/livecd-stage2.sh, targets/stage1/stage1-chroot.sh,
+ targets/stage2/stage2.sh, targets/stage3/stage3.sh,
+ targets/tinderbox/tinderbox.sh:
+ added envscripts support (fixes bug #39832) massive cleanup of tree to prepare
+ it for ebuild - added headers to everything and removed deprecated dirs
14 Jan 2004; zhen <zhen@gentoo.org> arch/mips.py, modules/targets.py:
adding Kumba's patches for MIPS
-catalyst is released under the GNU General Public License version 2,
-and is copyright Gentoo Technologies, Inc. Will be adding official
-COPYING file and source file preambles soon.
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo/src/catalyst/README,v 1.4 2004/02/11 03:31:55 zhen Exp $
How do I use this thing?
========================
Questions, bug reports:
drobbins@gentoo.org
+
-Add support for ~x86, etc builds
-
-Add basic tinderbox support
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo/src/catalyst/Attic/TODO,v 1.4 2004/02/11 03:31:55 zhen Exp $
-Add distcc support
+Add support for ~x86, etc builds
Make sure to turn off grsec chroot restrictions before starting the build
(hint: echo 0 > /proc/sys/kernel/grsecurity/chroot_*)
Add rsync option for snapshot targets
+
+# completed by John Davis <zhen@gentoo.org>
+-basic distcc support
+
+#completed by Daniel Robbins <drobbins@gentoo.org>
+-add basic tinderbox support
+
#!/usr/bin/python
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo/src/catalyst/catalyst,v 1.28 2004/02/11 03:31:55 zhen Exp $
import os,sys,imp,string
try:
execfile("/etc/catalyst.conf",myconf,myconf)
except:
- print "catalyst: Unable to /etc/catalyst.conf config file (syntax error)"
+ print "catalyst: Unable to parse /etc/catalyst.conf config file (syntax error)"
sys.exit(1)
confdefaults={ "storedir":"/var/tmp/catalyst","sharedir":"/usr/share/catalyst","distdir":"/usr/portage/distfiles",
targets.register(targetmap)
myspec["CCACHE"]="1"
- print "Compiler cache support enabled."
+print "Compiler cache support enabled."
+
if "pkgcache" in string.split(myspec["options"]):
print "Package cache support enabled."
myspec["PKGCACHE"]="1"
print "Distcc support enabled."
myspec["DISTCC"]="1"
+if myconf.has_key("envscript"):
+ print "Envscript support enabled."
+ myspec["ENVSCRIPT"]=myconf["envscript"]
+
if sys.argv[1] in ["-f", "--file" ]:
try:
addlargs=read_spec(sys.argv[2])
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/builder.py,v 1.5 2004/02/11 03:31:55 zhen Exp $
+
class generic:
def __init__(self,myspec):
self.settings=myspec
# 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.15 2004/02/11 03:31:55 zhen Exp $
import sys,string,os,types
valid_config_file_values.append("PKGCACHE")
valid_config_file_values.append("CCACHE")
valid_config_file_values.append("DISTCC")
+valid_config_file_values.append("ENVSCRIPT")
valid_config_file_values.append("options")
verbosity=1
def spec_dump(myspec):
for x in myspec.keys():
print x+": "+repr(myspec[x])
-
-
# Distributed under the GNU General Public License version 2
# Copyright 2003-2004 Gentoo Technologies, Inc.
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/Attic/targets.py,v 1.78 2004/02/11 03:31:55 zhen Exp $
import os,string,imp,types,shutil
from catalyst_support import *
def chroot_setup(self):
cmd("cp /etc/resolv.conf "+self.settings["chroot_path"]+"/etc","Could not copy resolv.conf into place.")
+ if self.settings.has_key("ENVSCRIPT"):
+ if not os.path.exists(self.settings["ENVSCRIPT"]):
+ raise CatalystError, "Can't find envscript "+self.settings["ENVSCRIPT"]
+ cmd("cp "+self.settings["ENVSCRIPT"]+" "+self.settings["chroot_path"]+"/tmp/envscript","Could not copy envscript into place.")
cmd("rm -f "+self.settings["chroot_path"]+"/etc/make.conf")
myf=open(self.settings["chroot_path"]+"/etc/make.conf","w")
# 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.6 2004/02/10 00:14:33 drobbins Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/grp/Attic/grp.sh,v 1.7 2004/02/11 03:31:55 zhen Exp $
case $1 in
enter)
$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
+ 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
+ fi
if [ ${clst_rel_type} = "hardened" ]
then
emerge --oneshot --nodeps hardened-gcc || 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/livecd-stage1/Attic/livecd-stage1.sh,v 1.6 2004/01/20 23:56:43 drobbins Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/Attic/livecd-stage1.sh,v 1.7 2004/02/11 03:31:55 zhen Exp $
case $1 in
enter)
$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}"
+ 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:
# 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-stage2/Attic/livecd-stage2.sh,v 1.4 2004/01/07 17:47:26 drobbins Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/Attic/livecd-stage2.sh,v 1.5 2004/02/11 03:31:55 zhen Exp $
case $1 in
enter)
$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
export CONFIG_PROTECT="-*"
emerge genkernel
rm -f /usr/src/linux
env-update
source /etc/profile
+if [ -n "${clst_ENVSCRIPT}" ]
+then
+ source /tmp/envscript
+ rm -f /tmp/envscript
+fi
case $1 in
build)
#emerge and enable ccache before we set ROOT
# 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.7 2004/01/29 21:53:22 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage2/Attic/stage2.sh,v 1.8 2004/02/11 03:31:55 zhen Exp $
case $1 in
enter)
$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
cat /etc/make.profile/make.defaults | grep GRP_STAGE23_USE > /tmp/stage23
source /tmp/stage23
export USE="-* \${clst_HOSTUSE} \${GRP_STAGE23_USE}"
# 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.8 2004/01/29 21:53:22 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage3/Attic/stage3.sh,v 1.9 2004/02/11 03:31:55 zhen Exp $
case $1 in
enter)
$clst_CHROOT $clst_chroot_path /bin/bash << EOF
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}"
#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"
# 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.2 2003/11/30 03:52:03 drobbins Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/tinderbox/Attic/tinderbox.sh,v 1.3 2004/02/11 03:31:55 zhen Exp $
case $1 in
run)
$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}"
+ 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