large amount of changes - see ChangeLog
authorJohn P. Davis <zhen@gentoo.org>
Wed, 11 Feb 2004 03:31:55 +0000 (03:31 +0000)
committerJohn P. Davis <zhen@gentoo.org>
Wed, 11 Feb 2004 03:31:55 +0000 (03:31 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@210 d1e1f19c-881f-0410-ab34-b69fee027534

14 files changed:
ChangeLog
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

index 69620db0f13fd953942a1b1905738011f056d89b..c89114c6ceb7741197f1a9c8e91ab4f2b8af5e9c 100644 (file)
--- 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 <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
diff --git a/README b/README
index e927f1e79cafd2e1d9a310462ca42d4881a753a4..6174019da0f9b20123e0152c73c7b163bc930d5b 100644 (file)
--- 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 7c8b2f7ef04115feba3308a7a3e34a60c77efc0a..26416b28cd32ac3ecfcf30199ec8d0b2758add7f 100644 (file)
--- 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 <zhen@gentoo.org>
+-basic distcc support
+
+#completed by Daniel Robbins <drobbins@gentoo.org>
+-add basic tinderbox support
+
index cd4f1065b6d559684a6172d4bd7bc434a8bdcc88..67bfc36bd63f2de6665cdb93528e43575a3dc6e1 100755 (executable)
--- 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])
index a176b42364677d7bdcdd67ab4c87f8dfa5ef0d59..8aa4a3d80bd15fdea288de485c1056a9ff0d2e74 100644 (file)
@@ -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
index da049ff7faba58b24ecd9c55e84fb2010636fe14..3b174734bf48683b46f0d22d8d16a74687394d24 100644 (file)
@@ -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])
-
-
index 1ae3a8fe2fd70535f56da2953924a8b2c289891b..1b71407ef510236c00588ff5becbb2b66dc8ef00 100644 (file)
@@ -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")
index 9b1f4da9120e1373e9f3df0e773d3e6bdeae2fcd..84fd06be614478a9509c6b2f4f3791b2b14f07d1 100755 (executable)
@@ -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
index 84f09ed759e0298b34a151d6015996eac1dd5e2a..f35d367e9d8cf76138405f142e14ba900048054c 100755 (executable)
@@ -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:
index 8d32e102a52c98763f872630f271d5cdf2ba37ee..3a29dda59ac7f8ba80dff4660c33b88a86a4dcf9 100755 (executable)
@@ -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
index 364cc4c27c25713bb9bd64b76cb36c48098cc753..4bd24e54d7cb51b678a83b10802bec360c2c3d04 100755 (executable)
@@ -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
index 25062431770590f3b8c7e4e1dd607ee31457bd18..125091ed0dd808f4ca3111185200cf484ac18887 100755 (executable)
@@ -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}"
index 91309fce01a1febba27c4c1eacd974071a2da814..f48ac06eeab9b9ebf9af7b08d6d4b813b0690d66 100755 (executable)
@@ -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"
index 9fe6201265df7caca851b4a75e31298c4cc13a4b..c5709138c5bfad159db4a9fa5bb55660358709ae 100755 (executable)
@@ -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