# 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.57 2004/06/02 06:35:29 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.58 2004/06/04 14:03:46 zhen Exp $
+
+ 04 Jun 2004; John Davis <zhen@gentoo.org> modules/generic_stage_target.py,
+ targets/embedded/embedded-chroot.sh,
+ targets/embedded/embedded-preclean-chroot.sh, targets/grp/grp-chroot.sh,
+ targets/grp/grp-preclean-chroot.sh, targets/grp/grp.sh,
+ targets/livecd-stage1/livecd-stage1-chroot.sh,
+ targets/livecd-stage1/livecd-stage1-preclean-chroot.sh,
+ targets/livecd-stage1/livecd-stage1.sh, targets/stage1/stage1-chroot.sh,
+ targets/stage1/stage1-preclean1-chroot.sh, targets/stage1/stage1.sh,
+ targets/stage2/stage2-chroot.sh, targets/stage2/stage2-preclean-chroot.sh,
+ targets/stage3/stage3-chroot.sh, targets/stage3/stage3-preclean-chroot.sh,
+ targets/tinderbox/tinderbox-chroot.sh,
+ targets/tinderbox/tinderbox-preclean-chroot.sh,
+ targets/tinderbox/tinderbox.sh:
+ Fixes bug 51603, a lot of distcc fixups (has to do w/ bind mounts and such)
02 Jun 2004; John Davis <zhen@gentoo.org> modules/snapshot_target.py:
Fixes to address bugs #51072 and #52045. The snapshot logic was tweaked to be
# Distributed under the GNU General Public License version 2
# Copyright 2003-2004 Gentoo Technologies, Inc.
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.1 2004/05/17 01:21:17 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.2 2004/06/04 14:03:46 zhen Exp $
"""
This class does all of the chroot setup, copying of files, etc. It is
else:
myf.write('CXXFLAGS="${CFLAGS}"\n')
myf.close()
+
+ #create entry in /etc/passwd for distcc user
+ if self.settings.has_key("DISTCC"):
+ myf=open(self.settings["chroot_path"]+"/etc/passwd","a")
+ myf.write("distcc:x:7980:2:distccd:/dev/null:/bin/false\n")
+ myf.close()
def clean(self):
destpath=self.settings["chroot_path"]
for x in cleanables:
print "Cleaning chroot: "+x+"..."
cmd("rm -rf "+destpath+x,"Couldn't clean "+x)
+
if self.settings["target"]=="livecd-stage2":
if self.settings.has_key("livecd/empty"):
if type(self.settings["livecd/empty"])==types.StringType:
cmd("/bin/bash "+self.settings["sharedir"]+"/targets/"+self.settings["target"]+"/"+self.settings["target"]+".sh clean","clean script failed.")
def preclean(self):
+ #cleanup after distcc
+ if self.settings.has_key("DISTCC"):
+ myf=open(self.settings["chroot_path"]+"/etc/passwd","r")
+ outf=open(self.settings["chroot_path"]+"/tmp/out.txt","w")
+ for line in myf:
+ if not line.startswith("distcc:"):
+ outf.write(line)
+ myf.close()
+ outf.close()
+ os.rename(self.settings["chroot_path"]+"/tmp/out.txt",self.settings["chroot_path"]+"/etc/passwd")
+ cmd("/usr/bin/pkill -U 7980","could not kill distcc process(es)")
try:
cmd("/bin/bash "+self.settings["sharedir"]+"/targets/"+self.settings["target"]+"/"+self.settings["target"]+".sh preclean","preclean script failed.")
except:
#!/bin/bash
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-chroot.sh,v 1.3 2004/04/14 22:35:29 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-chroot.sh,v 1.4 2004/06/04 14:03:46 zhen Exp $
/usr/sbin/env-update
source /etc/profile
export DISTCC_HOSTS="${clst_distcc_hosts}"
USE="-gtk -gnome" emerge --oneshot --nodeps distcc || exit 1
- echo "distcc:x:7980: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
#!/bin/bash
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-preclean-chroot.sh,v 1.2 2004/04/14 22:35:29 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-preclean-chroot.sh,v 1.3 2004/06/04 14:03:46 zhen Exp $
/usr/sbin/env-update
source /etc/profile
-
-if [ -n "${clst_DISTCC}" ]
-then
- pkill -signal 9 -U 7980
- userdel distcc || exit 1
-fi
#!/bin/bash
# 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/grp-chroot.sh,v 1.2 2004/04/14 14:27:38 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/grp/grp-chroot.sh,v 1.3 2004/06/04 14:03:46 zhen Exp $
/usr/sbin/env-update
source /etc/profile
export DISTCC_HOSTS="${clst_distcc_hosts}"
USE="-gnome -gtk" emerge --oneshot --nodeps distcc || exit 1
- echo "distcc:x:7980: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
unset DISTDIR
#don't grab MS core fonts, etc.
export USE="${USE} bindist"
- #first grab to the normal distdir
- ## why don't we just set distdir first and fetch once???
DISTDIR="/tmp/grp/${clst_grp_target}" emerge --fetchonly ${clst_grp_packages} || exit 1
- #export DISTDIR="/tmp/grp/${clst_grp_target}"
- #export OLD_MIRRORS="${GENTOO_MIRRORS}"
- #export GENTOO_MIRRORS="/usr/portage/distfiles"
- #now grab them again, but with /usr/portage/distfiles as the primary mirror (local grab)
- #emerge --fetchonly ${clst_grp_packages} || exit 1
- #restore original GENTOO_MIRRORS setting, if any
- #export GENTOO_MIRRORS="${OLD_MIRRORS}"
unset PKGDIR
fi
#!/bin/bash
# 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/grp-preclean-chroot.sh,v 1.2 2004/04/14 14:27:38 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/grp/grp-preclean-chroot.sh,v 1.3 2004/06/04 14:03:46 zhen Exp $
/usr/sbin/env-update
source /etc/profile
-
-if [ -n "${clst_DISTCC}" ]
-then
- pkill -signal 9 -U 7980
- userdel distcc || exit 1
-fi
#!/bin/bash
# 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.16 2004/04/14 22:35:29 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/grp/Attic/grp.sh,v 1.17 2004/06/04 14:03:46 zhen Exp $
case $1 in
enter)
;;
preclean)
- cp ${clst_sharedir}/targets/grp/grp-preclean-chroot.sh ${clst_chroot_path}/tmp
- ${clst_CHROOT} ${clst_chroot_path} /tmp/grp-preclean-chroot.sh || exit 1
- rm -f ${clst_chroot_path}/tmp/grp-preclean-chroot.sh
+ #cp ${clst_sharedir}/targets/grp/grp-preclean-chroot.sh ${clst_chroot_path}/tmp
+ #${clst_CHROOT} ${clst_chroot_path} /tmp/grp-preclean-chroot.sh || exit 1
+ #rm -f ${clst_chroot_path}/tmp/grp-preclean-chroot.sh
+ exit 0
;;
clean)
#!/bin/bash
# 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/livecd-stage1-chroot.sh,v 1.2 2004/04/14 22:35:29 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/livecd-stage1-chroot.sh,v 1.3 2004/06/04 14:03:46 zhen Exp $
/usr/sbin/env-update
source /etc/profile
export DISTCC_HOSTS="${clst_distcc_hosts}"
USE="-gnome -gtk" emerge --oneshot --nodeps distcc || exit 1
- echo "distcc:x:7980: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
#!/bin/bash
# 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/livecd-stage1-preclean-chroot.sh,v 1.2 2004/04/14 22:35:29 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/livecd-stage1-preclean-chroot.sh,v 1.3 2004/06/04 14:03:46 zhen Exp $
/usr/sbin/env-update
source /etc/profile
-
-if [ -n "${clst_DISTCC}" ]
-then
- pkill -signal 9 -U 7980
- userdel distcc || exit 1
-fi
#!/bin/bash
# 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.11 2004/04/14 22:35:29 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/Attic/livecd-stage1.sh,v 1.12 2004/06/04 14:03:46 zhen Exp $
case $1 in
enter)
;;
preclean)
- cp ${clst_sharedir}/targets/livecd-stage1/livecd-stage1-preclean-chroot.sh ${clst_chroot_path}/tmp
- ${clst_CHROOT} ${clst_chroot_path} /tmp/livecd-stage1-preclean-chroot.sh || exit 1
- rm -f ${clst_chroot_path}/tmp/livecd-stage1-preclean-chroot.sh
+ #cp ${clst_sharedir}/targets/livecd-stage1/livecd-stage1-preclean-chroot.sh ${clst_chroot_path}/tmp
+ #${clst_CHROOT} ${clst_chroot_path} /tmp/livecd-stage1-preclean-chroot.sh || exit 1
+ #rm -f ${clst_chroot_path}/tmp/livecd-stage1-preclean-chroot.sh
+ exit 0
;;
clean)
#!/bin/bash
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/stage1-chroot.sh,v 1.15 2004/05/11 20:03:49 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/stage1-chroot.sh,v 1.16 2004/06/04 14:03:46 zhen Exp $
/usr/sbin/env-update
source /etc/profile
export DISTCC_HOSTS="${clst_distcc_hosts}"
USE="-gtk -gnome" emerge --oneshot --nodeps distcc || exit 1
- echo "distcc:x:7980: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
#!/bin/bash
# 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-preclean1-chroot.sh,v 1.2 2004/04/14 22:35:29 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/Attic/stage1-preclean1-chroot.sh,v 1.3 2004/06/04 14:03:46 zhen Exp $
/usr/sbin/env-update
source /etc/profile
-
-if [ -n "${clst_DISTCC}" ]
-then
- pkill -signal 9 -U 7980
- userdel distcc || exit 1
-fi
#!/bin/bash
# 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.12 2004/04/14 22:35:29 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/Attic/stage1.sh,v 1.13 2004/06/04 14:03:46 zhen Exp $
case $1 in
enter)
#preclean runs with bind mounts active -- for running any commands inside chroot
#first we cleanup after ourselves
- cp ${clst_sharedir}/targets/stage1/stage1-preclean1-chroot.sh ${clst_chroot_path}/tmp
- ${clst_CHROOT} ${clst_chroot_path} /tmp/stage1-preclean1-chroot.sh || exit 1
- rm -f ${clst_chroot_path}/tmp/stage1-preclean1-chroot.sh
+ #cp ${clst_sharedir}/targets/stage1/stage1-preclean1-chroot.sh ${clst_chroot_path}/tmp
+ #${clst_CHROOT} ${clst_chroot_path} /tmp/stage1-preclean1-chroot.sh || exit 1
+ #rm -f ${clst_chroot_path}/tmp/stage1-preclean1-chroot.sh
#second we do the gcc magic
cp ${clst_sharedir}/targets/stage1/stage1-preclean2-chroot.sh ${clst_chroot_path}/tmp/stage1root/tmp
#!/bin/sh
# 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/stage2-chroot.sh,v 1.2 2004/04/14 22:35:29 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage2/stage2-chroot.sh,v 1.3 2004/06/04 14:03:46 zhen Exp $
/usr/sbin/env-update
source /etc/profile
export DISTCC_HOSTS="${clst_distcc_hosts}"
USE="-gnome -gtk" emerge --oneshot --nodeps distcc || exit 1
- echo "distcc:x:7980: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
#!/bin/bash
# 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/stage2-preclean-chroot.sh,v 1.2 2004/04/14 22:35:29 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage2/stage2-preclean-chroot.sh,v 1.3 2004/06/04 14:03:46 zhen Exp $
/usr/sbin/env-update
source /etc/profile
if [ -n "${clst_DISTCC}" ]
then
emerge -C sys-devel/distcc || exit 1
- userdel distcc || exit 1
fi
#!/bin/bash
# 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/stage3-chroot.sh,v 1.3 2004/04/14 22:35:29 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage3/stage3-chroot.sh,v 1.4 2004/06/04 14:03:46 zhen Exp $
/usr/sbin/env-update
source /etc/profile
export DISTCC_HOSTS="${clst_distcc_hosts}"
USE="-gnome -gtk" emerge --oneshot --nodeps distcc || exit 1
- echo "distcc:x:7980: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
#!/bin/bash
# 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/stage3-preclean-chroot.sh,v 1.2 2004/04/14 00:17:59 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage3/stage3-preclean-chroot.sh,v 1.3 2004/06/04 14:03:46 zhen Exp $
/usr/sbin/env-update
source /etc/profile
if [ -n "${clst_DISTCC}" ]
then
- pkill -signal 9 -U 7980
emerge -C sys-devel/distcc || exit 1
- userdel distcc || exit 1
fi
#!/bin/bash
# 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/tinderbox-chroot.sh,v 1.2 2004/04/14 22:35:29 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/tinderbox/tinderbox-chroot.sh,v 1.3 2004/06/04 14:03:46 zhen Exp $
/usr/sbin/env-update
source /etc/profile
export DISTCC_HOSTS="${clst_distcc_hosts}"
USE="-gnome -gtk" emerge --oneshot --nodeps distcc || exit 1
- echo "distcc:x:7980: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
#!/bin/bash
# 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/tinderbox-preclean-chroot.sh,v 1.2 2004/04/14 22:35:29 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/tinderbox/tinderbox-preclean-chroot.sh,v 1.3 2004/06/04 14:03:46 zhen Exp $
/usr/sbin/env-update
source /etc/profile
-
-if [ -n "${clst_DISTCC}" ]
-then
- pkill -signal 9 -U 7980
- userdel distcc || exit 1
-fi
#!/bin/bash
# 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.8 2004/04/14 22:35:29 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/tinderbox/Attic/tinderbox.sh,v 1.9 2004/06/04 14:03:46 zhen Exp $
case $1 in
run)
;;
preclean)
- cp ${clst_sharedir}/targets/grp/tinderbox-preclean-chroot.sh ${clst_chroot_path}/tmp
- ${clst_CHROOT} ${clst_chroot_path} /tmp/tinderbox-preclean-chroot.sh || exit 1
- rm -f ${clst_chroot_path}/tmp/tinderbox-preclean-chroot.sh
+ #cp ${clst_sharedir}/targets/grp/tinderbox-preclean-chroot.sh ${clst_chroot_path}/tmp
+ #${clst_CHROOT} ${clst_chroot_path} /tmp/tinderbox-preclean-chroot.sh || exit 1
+ #rm -f ${clst_chroot_path}/tmp/tinderbox-preclean-chroot.sh
+ exit 0
;;
clean)