From: John P. Davis Date: Wed, 11 Feb 2004 03:31:55 +0000 (+0000) Subject: large amount of changes - see ChangeLog X-Git-Tag: CATALYST_1_0_1~30 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=10a214488a1c557a9b0a679a89d6068b376abdcb;p=catalyst.git large amount of changes - see ChangeLog git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@210 d1e1f19c-881f-0410-ab34-b69fee027534 --- diff --git a/ChangeLog b/ChangeLog index 69620db0..c89114c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,15 @@ # 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 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 arch/mips.py, modules/targets.py: adding Kumba's patches for MIPS diff --git a/README b/README index e927f1e7..6174019d 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ -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? ======================== @@ -130,3 +130,4 @@ Everything should work identically to if you were using a 32-bit system. Questions, bug reports: drobbins@gentoo.org + diff --git a/TODO b/TODO index 7c8b2f7e..26416b28 100644 --- a/TODO +++ b/TODO @@ -1,10 +1,17 @@ -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 +-basic distcc support + +#completed by Daniel Robbins +-add basic tinderbox support + diff --git a/catalyst b/catalyst index cd4f1065..67bfc36b 100755 --- a/catalyst +++ b/catalyst @@ -1,4 +1,7 @@ #!/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 @@ -33,7 +36,7 @@ if os.path.exists("/etc/catalyst.conf"): 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", @@ -60,7 +63,8 @@ targetmap={} 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" @@ -69,6 +73,10 @@ if "distcc" in string.split(myspec["options"]): 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]) diff --git a/modules/builder.py b/modules/builder.py index a176b423..8aa4a3d8 100644 --- a/modules/builder.py +++ b/modules/builder.py @@ -1,3 +1,7 @@ +# 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 diff --git a/modules/catalyst_support.py b/modules/catalyst_support.py index da049ff7..3b174734 100644 --- a/modules/catalyst_support.py +++ b/modules/catalyst_support.py @@ -1,5 +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.15 2004/02/11 03:31:55 zhen Exp $ import sys,string,os,types @@ -22,6 +23,7 @@ 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("ENVSCRIPT") valid_config_file_values.append("options") verbosity=1 @@ -191,5 +193,3 @@ def addl_arg_parse(myspec,addlargs,requiredspec,validspec): def spec_dump(myspec): for x in myspec.keys(): print x+": "+repr(myspec[x]) - - diff --git a/modules/targets.py b/modules/targets.py index 1ae3a8fe..1b71407e 100644 --- a/modules/targets.py +++ b/modules/targets.py @@ -1,5 +1,6 @@ # 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 * @@ -196,6 +197,10 @@ class generic_stage_target(generic_target): 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") diff --git a/targets/grp/grp.sh b/targets/grp/grp.sh index 9b1f4da9..84fd06be 100755 --- a/targets/grp/grp.sh +++ b/targets/grp/grp.sh @@ -1,6 +1,6 @@ # 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) @@ -16,20 +16,25 @@ 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 + 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 diff --git a/targets/livecd-stage1/livecd-stage1.sh b/targets/livecd-stage1/livecd-stage1.sh index 84f09ed7..f35d367e 100755 --- a/targets/livecd-stage1/livecd-stage1.sh +++ b/targets/livecd-stage1/livecd-stage1.sh @@ -1,6 +1,6 @@ # 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) @@ -11,11 +11,25 @@ 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" >> /$ + /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: diff --git a/targets/livecd-stage2/livecd-stage2.sh b/targets/livecd-stage2/livecd-stage2.sh index 8d32e102..3a29dda5 100755 --- a/targets/livecd-stage2/livecd-stage2.sh +++ b/targets/livecd-stage2/livecd-stage2.sh @@ -1,6 +1,6 @@ # 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) @@ -20,6 +20,11 @@ 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 export CONFIG_PROTECT="-*" emerge genkernel rm -f /usr/src/linux diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh index 364cc4c2..4bd24e54 100755 --- a/targets/stage1/stage1-chroot.sh +++ b/targets/stage1/stage1-chroot.sh @@ -2,6 +2,11 @@ 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 diff --git a/targets/stage2/stage2.sh b/targets/stage2/stage2.sh index 25062431..125091ed 100755 --- a/targets/stage2/stage2.sh +++ b/targets/stage2/stage2.sh @@ -1,6 +1,6 @@ # 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) @@ -10,6 +10,11 @@ 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 cat /etc/make.profile/make.defaults | grep GRP_STAGE23_USE > /tmp/stage23 source /tmp/stage23 export USE="-* \${clst_HOSTUSE} \${GRP_STAGE23_USE}" diff --git a/targets/stage3/stage3.sh b/targets/stage3/stage3.sh index 91309fce..f48ac06e 100755 --- a/targets/stage3/stage3.sh +++ b/targets/stage3/stage3.sh @@ -1,6 +1,6 @@ # 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) @@ -10,6 +10,11 @@ run) $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}" @@ -23,7 +28,6 @@ run) #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" diff --git a/targets/tinderbox/tinderbox.sh b/targets/tinderbox/tinderbox.sh index 9fe62012..c5709138 100755 --- a/targets/tinderbox/tinderbox.sh +++ b/targets/tinderbox/tinderbox.sh @@ -1,6 +1,6 @@ # 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) @@ -9,11 +9,25 @@ 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