Applying a patch from Tais M. Hansen <tais.hansen@osd.dk> to add initial sys-devel...
authorChris Gianelloni <wolf31o2@gentoo.org>
Sun, 25 Nov 2007 05:39:33 +0000 (05:39 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Sun, 25 Nov 2007 05:39:33 +0000 (05:39 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1263 d1e1f19c-881f-0410-ab34-b69fee027534

12 files changed:
ChangeLog
catalyst
files/catalyst.conf
modules/catalyst_support.py
modules/generic_stage_target.py
targets/embedded/embedded-preclean-chroot.sh
targets/grp/grp-preclean-chroot.sh
targets/livecd-stage1/livecd-stage1-preclean-chroot.sh
targets/stage2/stage2-preclean-chroot.sh
targets/stage3/stage3-preclean-chroot.sh
targets/support/chroot-functions.sh
targets/tinderbox/tinderbox-preclean-chroot.sh

index de55ee246f2aed14f31a5c1b3a559c3d43f12014..dfbd1c40a16c597babcad2dd8558efeb38a6a169 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,37 +1,51 @@
 # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
 # $Id: $
 
+  25 Nov 2007; Chris Gianelloni <wolf31o2@gentoo.org> catalyst,
+  files/catalyst.conf, modules/catalyst_support.py,
+  modules/generic_stage_target.py,
+  targets/embedded/embedded-preclean-chroot.sh,
+  targets/grp/grp-preclean-chroot.sh,
+  targets/livecd-stage1/livecd-stage1-preclean-chroot.sh,
+  targets/stage2/stage2-preclean-chroot.sh,
+  targets/stage3/stage3-preclean-chroot.sh,
+  targets/support/chroot-functions.sh,
+  targets/tinderbox/tinderbox-preclean-chroot.sh:
+  Applying a patch from Tais M. Hansen <tais.hansen@osd.dk> to add initial
+  sys-devel/icecream cluster compiler support for bug #200095. This is
+  catalyst 2.0.5_pre6 for testing.
+
   25 Nov 2007; Andrew Gaffney <agaffney@gentoo.org> catalyst,
   files/catalyst.conf, modules/generic_stage_target.py:
-  add option for metadata_overlay use with portage
+  Add the option for using metadata_overlay with portage to speed up cache.
 
   25 Nov 2007; Andrew Gaffney <agaffney@gentoo.org>
   modules/stage1_target.py, modules/stage2_target.py,
   modules/stage3_target.py:
-  add /etc/portage to cleanables for stage 1-3
+  Add /etc/portage to cleanables for stages 1 through 3.
 
   17 Nov 2007; Andrew Gaffney <agaffney@gentoo.org>
   livecd/files/livecd-local.start,
   targets/livecd-stage2/livecd-stage2-controller.sh,
   targets/support/livecdfs-update.sh:
-  we apparently still need profiles/eclass for building the stage3 from the
-  livecd
+  We apparently still need profiles/eclass for building the stage3 from the
+  livecd with the installer.
 
   17 Nov 2007; Andrew Gaffney <agaffney@gentoo.org> arch/mips.py:
-  apply patch for mips n32 support from Stuart Longland <redhatter@gentoo.org>
-  in bug #197917
+  Apply patch for MIPS N32 support from Stuart Longland <redhatter@gentoo.org>
+  in bug #197917.
 
   17 Nov 2007; Andrew Gaffney <agaffney@gentoo.org>
   targets/livecd-stage2/livecd-stage2-controller.sh,
   targets/support/livecdfs-update.sh:
-  create symlink for /etc/gconf and /var/db when moving to /usr/livecd
-  remove preservation of eclasses/profiles
-  remove copying of livecd-local.start since it's not needed anymore
+  Create symlink for /etc/gconf and /var/db when moving to /usr/livecd, remove
+  preservation of eclasses/profiles, and remove copying of livecd-local.start
+  since it's not needed anymore.
 
   16 Nov 2007; Andrew Gaffney <agaffney@gentoo.org>
   targets/support/livecdfs-update.sh, targets/support/unmerge.sh:
-  move moving of /var/db back to livecdfs-update.sh but keep the symlink so we
-  can unmerge
+  Move moving of /var/db back to livecdfs-update.sh but keep the symlink so we
+  can unmerge.
 
   13 Nov 2007; Chris Gianelloni <wolf31o2@gentoo.org> catalyst,
   targets/support/livecdfs-update.sh, targets/support/unmerge.sh:
index e53569558f9610ff44b5a2a4ddc3ddcdc7762e6b..1fb6c55cfa73eab25ab05140ccfa960c875476ac 100755 (executable)
--- a/catalyst
+++ b/catalyst
@@ -9,7 +9,7 @@ import os,sys,imp,string,getopt
 import pdb
 
 __maintainer__="Chris Gianelloni <wolf31o2@gentoo.org>"
-__version__="2.0.5_pre5"
+__version__="2.0.5_pre6"
 
 conf_values={}
 
@@ -113,6 +113,10 @@ def parse_config(myconfig):
                print "Distcc support enabled."
                conf_values["DISTCC"]="1"
 
+       if "icecream" in string.split(conf_values["options"]):
+               print "Icecream compiler cluster support enabled."
+               conf_values["ICECREAM"]="1"
+
        if "kerncache" in string.split(conf_values["options"]):
                print "Kernel cache support enabled."
                conf_values["KERNCACHE"]="1"
index 909e0d7b144867e32407681e29f7b391a7e52e8b..cf62c922d6d656d63c104c60f7e18516f115963a 100644 (file)
@@ -34,6 +34,7 @@ hash_function="crc32"
 # ccache = enables build time ccache support (highly recommended)
 # distcc = enable distcc support for building. You have to set distcc_hosts in
 #      your spec file.
+# icecream = enables icecream compiler cluster support for building
 # kerncache = keeps a tbz2 of your built kernel and modules (useful if your
 #      build stops in livecd-stage2)
 # pkgcache = keeps a tbz2 of every built package (useful if your build stops
index da40a5ac1b2adfb6a0bc0b1ed4917e2403a81d59..a676fd19d7bc1cf6423a68ab01e7237a4f44676f 100644 (file)
@@ -154,6 +154,7 @@ valid_config_file_values.append("PKGCACHE")
 valid_config_file_values.append("KERNCACHE")
 valid_config_file_values.append("CCACHE")
 valid_config_file_values.append("DISTCC")
+valid_config_file_values.append("ICECREAM")
 valid_config_file_values.append("ENVSCRIPT")
 valid_config_file_values.append("AUTORESUME")
 valid_config_file_values.append("FETCH")
index f57443a92709fc207e802b8b698b135cac55c2c7..1e99f2433ab42054e8d5ab1cf224b2d7937ea18f 100644 (file)
@@ -202,6 +202,11 @@ class generic_stage_target(generic_target):
                        # for the chroot:
                        self.env["CCACHE_DIR"]="/var/tmp/ccache"        
 
+               if self.settings.has_key("ICECREAM"):
+                       self.mounts.append("/var/cache/icecream")
+                       self.mountmap["/var/cache/icecream"]="/var/cache/icecream"
+                       self.env["PATH"]="/usr/lib/icecc/bin:"+self.env["PATH"]
+
        def override_cbuild(self):
                if self.makeconf.has_key("CBUILD"):
                        self.settings["CBUILD"]=self.makeconf["CBUILD"]
index b4da9cb25fdabd4ff5b9eb40eb723f52f780664e..608c9fd4a4443311552ded974c1bc6deba678bab 100755 (executable)
@@ -7,3 +7,8 @@ if [ -n "${clst_DISTCC}" ]
 then
        cleanup_distcc
 fi
+
+if [ -n "${clst_ICECREAM}" ]
+then
+       cleanup_icecream
+fi
index 94b5bedf29af57bbd01c0dd60961e13be0e0ca57..3cefd5637842e851f99473498be1dfd16d2852f7 100755 (executable)
@@ -8,4 +8,9 @@ then
        cleanup_distcc
 fi
 
+if [ -n "${clst_ICECREAM}" ]
+then
+       cleanup_icecream
+fi
+
 gconftool-2 --shutdown
index b4da9cb25fdabd4ff5b9eb40eb723f52f780664e..608c9fd4a4443311552ded974c1bc6deba678bab 100755 (executable)
@@ -7,3 +7,8 @@ if [ -n "${clst_DISTCC}" ]
 then
        cleanup_distcc
 fi
+
+if [ -n "${clst_ICECREAM}" ]
+then
+       cleanup_icecream
+fi
index 9ad8aecf3212e5663347cf0b1a5bd78015994b72..f7813944c488986262c651b743fa6ca0268e48f6 100755 (executable)
@@ -15,4 +15,10 @@ then
        cleanup_distcc
 fi
 
+if [ -n "${clst_ICECREAM}" ]
+then
+       run_emerge -C sys-devel/icecream || exit 1
+       cleanup_icecream
+fi
+
 rm -f /var/log/emerge.log
index 9ad8aecf3212e5663347cf0b1a5bd78015994b72..f7813944c488986262c651b743fa6ca0268e48f6 100755 (executable)
@@ -15,4 +15,10 @@ then
        cleanup_distcc
 fi
 
+if [ -n "${clst_ICECREAM}" ]
+then
+       run_emerge -C sys-devel/icecream || exit 1
+       cleanup_icecream
+fi
+
 rm -f /var/log/emerge.log
index ee2097a356c5105d9b2c4f778dd142c23897668d..6f80b9e7477c2ce42380627d47df1b6879b461f1 100755 (executable)
@@ -99,6 +99,23 @@ setup_myfeatures(){
                chmod a+x /usr/lib/distcc/bin/${CHOST}-wrapper
                for i in cc gcc g++ c++; do ln -s ${CHOST}-wrapper ${i}; done
        fi
+
+       if [ -n "${clst_ICECREAM}" ]
+       then
+               clst_root_path=/ run_emerge --oneshot --nodeps sys-devel/icecream || exit 1
+
+               # This sets up automatic cross-icecc-fu according to
+               # http://gentoo-wiki.com/HOWTO_Setup_An_ICECREAM_Compile_Cluster#Icecream_and_cross-compiling
+               CHOST=$(portageq envvar CHOST)
+               LIBDIR=$(get_libdir)
+               cd /usr/${LIBDIR}/icecc/bin
+               rm cc gcc g++ c++ 2>/dev/null
+               echo -e '#!/bin/bash\nexec /usr/'${LIBDIR}'/icecc/bin/'${CHOST}'-g${0:$[-2]} "$@"' > ${CHOST}-wrapper
+               chmod a+x ${CHOST}-wrapper
+               for i in cc gcc g++ c++; do ln -s ${CHOST}-wrapper ${i}; done
+               export PATH="/usr/lib/icecc/bin:${PATH}"
+               export PREROOTPATH="/usr/lib/icecc/bin"
+       fi
 }
 
 setup_myemergeopts(){
@@ -166,6 +183,15 @@ cleanup_distcc() {
        rm /usr/lib/distcc/bin/*-wrapper
 }
 
+cleanup_icecream() {
+       LIBDIR=$(get_libdir)
+       for i in cc gcc c++ g++; do
+               rm /usr/${LIBDIR}/icecc/bin/${i}
+               ln -s /usr/bin/icecc /usr/${LIBDIR}/icecc/bin/${i}
+       done
+       rm /usr/${LIBDIR}/icecc/bin/*-wrapper
+}
+
 update_env_settings(){
        /usr/sbin/env-update
        source /etc/profile
index b4da9cb25fdabd4ff5b9eb40eb723f52f780664e..608c9fd4a4443311552ded974c1bc6deba678bab 100755 (executable)
@@ -7,3 +7,8 @@ if [ -n "${clst_DISTCC}" ]
 then
        cleanup_distcc
 fi
+
+if [ -n "${clst_ICECREAM}" ]
+then
+       cleanup_icecream
+fi