# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.240 2005/04/26 18:30:50 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.241 2005/04/27 17:44:58 rocket Exp $
+
+ 27 Apr 2005; Eric Edgar <rocket@gentoo.org> modules/catalyst_support.py,
+ modules/generic_stage_target.py, modules/livecd_stage1_target.py,
+ modules/livecd_stage2_target.py, modules/snapshot_target.py,
+ targets/embedded/embedded-controller.sh, targets/grp/grp-controller.sh,
+ targets/livecd-stage1/livecd-stage1-chroot.sh,
+ targets/livecd-stage1/livecd-stage1-controller.sh,
+ targets/livecd-stage2/livecd-stage2-controller.sh,
+ targets/netboot/netboot-controller.sh,
+ targets/stage1/stage1-controller.sh, targets/stage2/stage2-controller.sh,
+ targets/stage3/stage3-controller.sh, targets/stage4/stage4-controller.sh,
+ targets/support/bootloader-setup.sh, targets/support/chroot-functions.sh,
+ targets/support/create-iso.sh, targets/support/kmerge.sh,
+ targets/support/target_image_setup.sh,
+ targets/tinderbox/tinderbox-controller.sh:
+ Fix some exception handling in catalyst_support.py
+ remove intermediate destination folder of iso and tarball
+ Add additional tests for folders not found on host but defined
+ in spec file. Keep catalyst from erroring in this case.
+ Change exit code on shell scripts so that errors are reported to catalyst
+ and causes catalyst to die on errors
+ Fix bug in livecd-stage1-chroot.sh so that it uses USE flags properly
+ Added additional check for mkisofs. Informs user of where to get the program.
+ Removed autoresume code from ccache and distcc installation until I can figure
+ out a way to have the autoresume flag go someplace outside the chroot.
26 Apr 2005; Eric Edgar <rocket@gentoo.org> catalyst:
Remove bind mounts before rm operations happen at startup
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_support.py,v 1.43 2005/04/26 14:58:04 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_support.py,v 1.44 2005/04/27 17:44:58 rocket Exp $
import sys,string,os,types,re,signal,traceback,md5,time
# a function to turn a string of non-printable characters into a string of
return # should never get reached
try:
retval=os.waitpid(mypid,0)[1]
+ if (retval & 0xff)==0:
+ return (retval >> 8) # return exit code
+ else:
+ return ((retval & 0xff) << 8) # interrupted by signal
+
except:
os.kill(mypid,signal.SIGTERM)
if os.waitpid(mypid,os.WNOHANG)[1] == 0:
# feisty bugger, still alive.
os.kill(mypid,signal.SIGKILL)
- if (retval & 0xff)==0:
- return (retval >> 8) # return exit code
- else:
- return ((retval & 0xff) << 8) # interrupted by signal
-
def cmd(mycmd,myexc=""):
try:
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.40 2005/04/26 18:28:26 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.41 2005/04/27 17:44:58 rocket Exp $
"""
This class does all of the chroot setup, copying of files, etc. It is
self.set_target_subpath()
# set paths
- self.set_autoresume_path()
self.set_snapshot_path()
self.set_source_path()
self.set_chroot_path()
+ self.set_autoresume_path()
self.set_root_path()
self.set_dest_path()
self.set_stage_path()
self.set_fsops()
self.set_iso()
self.set_packages()
- self.set_target_file()
- self.set_target_iso_path()
# this next line checks to make sure that the specified variables exist on disk.
"-"+self.settings["subarch"]+"-"+self.settings["version_stamp"]
def set_target_path(self):
- self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]
+ self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]+".tar.bz2"
if self.settings.has_key("AUTORESUME") \
and os.path.exists(self.settings["autoresume_path"]+"setup_target_path"):
print "Resume point detected, skipping target path setup operation..."
else:
# first clean up any existing target stuff
- if os.path.exists(self.settings["target_path"]):
- cmd("rm -rf "+self.settings["target_path"],
- "Could not remove existing directory: "+self.settings["target_path"])
- touch(self.settings["autoresume_path"]+"setup_target_path")
+ if os.path.isfile(self.settings["target_path"]):
+ cmd("rm -f "+self.settings["target_path"],
+ "Could not remove existing file: "+self.settings["target_path"])
+ touch(self.settings["autoresume_path"]+"setup_target_path")
- if not os.path.exists(self.settings["target_path"]):
- os.makedirs(self.settings["target_path"])
-
- def set_target_file(self):
- if not os.path.exists(self.settings["target_path"]+"/tarball/"):
- os.makedirs(self.settings["target_path"]+"/tarball/")
- self.settings["target_file"]=self.settings["target_path"]+"/tarball/"+self.settings["target"]+"-"+self.settings["subarch"]+"-"+self.settings["version_stamp"]+".tar.bz2"
+ if not os.path.exists(self.settings["storedir"]+"/builds/"):
+ os.makedirs(self.settings["storedir"]+"/builds/")
- def set_target_iso_path(self):
- if self.settings.has_key("iso"):
- print "setting up iso path"
- if not os.path.exists(self.settings["target_path"]+"/iso/"):
- os.makedirs(self.settings["target_path"]+"/iso/")
- self.settings["target_iso_path"]=self.settings["target_path"]+"/iso/"
-
def set_fsscript(self):
if self.settings.has_key(self.settings["spec_prefix"]+"/fsscript"):
self.settings["fsscript"]=self.settings[self.settings["spec_prefix"]+"/fsscript"]
self.settings["snapshot_path_md5sum"]=calc_md5(self.settings["snapshot_path"])
def set_chroot_path(self):
- self.settings["chroot_path"]=self.settings["storedir"]+"/tmp/"+self.settings["target_subpath"]
+ self.settings["chroot_path"]=self.settings["storedir"]+"/tmp/"+self.settings["target_subpath"]+"/"
def set_autoresume_path(self):
self.settings["autoresume_path"]=self.settings["storedir"]+"/tmp/"+self.settings["rel_type"]+"/"+\
print "Creating stage tarball..."
- cmd("tar cjf "+self.settings["target_file"]+" -C "+self.settings["stage_path"]+\
+ cmd("tar cjf "+self.settings["target_path"]+" -C "+self.settings["stage_path"]+\
" .","Couldn't create stage tarball")
touch(self.settings["autoresume_path"]+"capture")
print "Resume point detected, skipping unmerge operation..."
else:
if self.settings.has_key(self.settings["spec_prefix"]+"/unmerge"):
- print "has key unmerge"
if type(self.settings[self.settings["spec_prefix"]+"/unmerge"])==types.StringType:
self.settings[self.settings["spec_prefix"]+"/unmerge"]=[self.settings[self.settings["spec_prefix"]+"/unmerge"]]
- print "key is a string"
myunmerge=self.settings[self.settings["spec_prefix"]+"/unmerge"][:]
for x in range(0,len(myunmerge)):
print "Resume point detected, skipping target_setup operation..."
else:
print "Setting up filesystems per filesystem type"
- cmd("/bin/bash "+self.settings["controller_file"]+" target_image_setup "+ self.settings["target_iso_path"],"target_image_setup script failed.")
+ cmd("/bin/bash "+self.settings["controller_file"]+" target_image_setup "+ self.settings["target_path"],"target_image_setup script failed.")
touch(self.settings["autoresume_path"]+"target_setup")
def setup_overlay(self):
and os.path.exists(self.settings["autoresume_path"]+"setup_overlay"):
print "Resume point detected, skipping setup_overlay operation..."
else:
- if self.settings.has_key(self.settings["spec_prefix"]+"/overlay"):
- cmd("rsync -a "+self.settings[self.settings["spec_prefix"]+"/overlay"]+"/* "+\
- self.settings["target_iso_path"], self.settings["spec_prefix"]+"overlay copy failed.")
- touch(self.settings["autoresume_path"]+"setup_overlay")
+ if self.settings.has_key(self.settings["spec_prefix"]+"/overlay") \
+ and os.path.exists(self.settings["spec_prefix"]+"/overlay"):
+ cmd("rsync -a "+self.settings[self.settings["spec_prefix"]+"/overlay"]+"/* "+\
+ self.settings["target_path"], self.settings["spec_prefix"]+"overlay copy failed.")
+ touch(self.settings["autoresume_path"]+"setup_overlay")
def create_iso(self):
if self.settings.has_key("AUTORESUME") \
"Runscript kernel build failed")
if self.settings.has_key("boot/kernel/"+kname+"/initramfs_overlay"):
+ if os.path.exists(self.settings["chroot_path"]+"/tmp/initramfs_overlay/"):
print "Cleaning up temporary overlay dir"
cmd("rm -R "+self.settings["chroot_path"]+"/tmp/initramfs_overlay/")
print "Resume point detected, skipping bootloader operation..."
else:
try:
- cmd("/bin/bash "+self.settings["controller_file"]+" bootloader " + self.settings["target_iso_path"],\
+ cmd("/bin/bash "+self.settings["controller_file"]+" bootloader " + self.settings["target_path"],\
"Bootloader runscript failed.")
touch(self.settings["autoresume_path"]+"bootloader")
except CatalystError:
# stat the dir, delete the dir, recreate the dir and set
# the proper perms and ownership
mystat=os.stat(myemp)
+ #cmd("rm -rf "+myemp, "Could not remove existing file: "+myemp)
shutil.rmtree(myemp)
os.makedirs(myemp,0755)
+ os.chown(myemp,mystat[ST_UID],mystat[ST_GID])
+ os.chmod(myemp,mystat[ST_MODE])
def clear_packages(self):
if self.settings.has_key("PKGCACHE"):
# stat the dir, delete the dir, recreate the dir and set
# the proper perms and ownership
mystat=os.stat(myemp)
+ #cmd("rm -rf "+myemp, "Could not remove existing file: "+myemp)
shutil.rmtree(myemp)
os.makedirs(myemp,0755)
- def clear_autoresume(self):
+ os.chown(myemp,mystat[ST_UID],mystat[ST_GID])
+ os.chmod(myemp,mystat[ST_MODE])
+
+ def clear_autoresume(self):
# clean resume points since they are no longer needed
if self.settings.has_key("AUTORESUME"):
print "Removing AutoResume Points: ..."
# stat the dir, delete the dir, recreate the dir and set
# the proper perms and ownership
mystat=os.stat(myemp)
+ #cmd("rm -rf "+myemp, "Could not remove existing file: "+myemp)
shutil.rmtree(myemp)
os.makedirs(myemp,0755)
+ os.chown(myemp,mystat[ST_UID],mystat[ST_GID])
+ os.chmod(myemp,mystat[ST_MODE])
def purge(self):
countdown(10,"Purging Caches ...")
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage1_target.py,v 1.11 2005/04/21 14:45:09 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage1_target.py,v 1.12 2005/04/27 17:44:58 rocket Exp $
"""
Builder class for LiveCD stage1.
"config_profile_link","setup_confdir","portage_overlay",\
"bind","chroot_setup","setup_environment","build_packages",\
"unbind", "clean","clear_autoresume"]
-
- def set_spec_prefix(self):
+ def set_target_path(self):
+ self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]
+ if self.settings.has_key("AUTORESUME") \
+ and os.path.exists(self.settings["autoresume_path"]+"setup_target_path"):
+ print "Resume point detected, skipping target path setup operation..."
+ else:
+ # first clean up any existing target stuff
+ if os.path.exists(self.settings["target_path"]):
+ cmd("rm -rf "+self.settings["target_path"],\
+ "Could not remove existing directory: "+self.settings["target_path"])
+ touch(self.settings["autoresume_path"]+"setup_target_path")
+
+ if not os.path.exists(self.settings["target_path"]):
+ os.makedirs(self.settings["target_path"])
+
+
+ def set_target_path(self):
+ pass
+ def set_spec_prefix(self):
self.settings["spec_prefix"]="livecd"
def set_packages(self):
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.37 2005/04/22 18:33:06 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.38 2005/04/27 17:44:58 rocket Exp $
"""
Builder class for a LiveCD stage2 build.
def set_spec_prefix(self):
self.settings["spec_prefix"]="livecd"
-
+ def set_target_path(self):
+ self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]
+ if self.settings.has_key("AUTORESUME") \
+ and os.path.exists(self.settings["autoresume_path"]+"setup_target_path"):
+ print "Resume point detected, skipping target path setup operation..."
+ else:
+ # first clean up any existing target stuff
+ if os.path.isdir(self.settings["target_path"]):
+ cmd("rm -rf "+self.settings["target_path"],
+ "Could not remove existing directory: "+self.settings["target_path"])
+ touch(self.settings["autoresume_path"]+"setup_target_path")
+ if not os.path.exists(self.settings["target_path"]):
+ os.makedirs(self.settings["target_path"])
+
def unpack(self):
if not os.path.isdir(self.settings["source_path"]):
generic_stage_target.unpack(self)
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/snapshot_target.py,v 1.8 2005/04/04 17:48:33 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/snapshot_target.py,v 1.9 2005/04/27 17:44:58 rocket Exp $
"""
Builder class for snapshots.
x=self.settings["storedir"]+"/snapshots"
if not os.path.exists(x):
os.makedirs(x)
-
+
+ def mount_safety_check(self):
+ pass
+
def run(self):
self.setup()
print "Creating Portage tree snapshot "+self.settings["version_stamp"]+\
#!/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-controller.sh,v 1.2 2005/04/21 14:23:11 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-controller.sh,v 1.3 2005/04/27 17:44:58 rocket Exp $
. ${clst_sharedir}/targets/support/functions.sh
. ${clst_sharedir}/targets/support/filesystem-functions.sh
;;
esac
-exit 0
+exit $?
#!/bin/bash
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/grp/grp-controller.sh,v 1.1 2005/04/04 17:48:33 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/grp/grp-controller.sh,v 1.2 2005/04/27 17:44:58 rocket Exp $
. ${clst_sharedir}/targets/support/functions.sh
case $1 in
preclean)
exec_in_chroot ${clst_sharedir}/targets/grp/grp-preclean-chroot.sh
- exit 0
;;
clean)
;;
esac
-exit 0
+exit $?
#!/bin/bash
# Copyright 1999-2004 Gentoo Foundation
# 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.16 2005/04/04 17:48:33 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/livecd-stage1-chroot.sh,v 1.17 2005/04/27 17:44:58 rocket Exp $
. /tmp/chroot-functions.sh
#turn off auto-use:
export USE_ORDER="env:pkg:conf:defaults"
+export USE="${clst_livecd_use}"
run_emerge "${clst_packages}"
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/livecd-stage1-controller.sh,v 1.6 2005/04/21 14:23:11 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/livecd-stage1-controller.sh,v 1.7 2005/04/27 17:44:58 rocket Exp $
. ${clst_sharedir}/targets/support/functions.sh
find ${clst_chroot_path}/usr/lib -iname "*.pyc" -exec rm -f {} \;
;;
esac
-exit 0
+exit $?
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/livecd-stage2-controller.sh,v 1.8 2005/04/21 14:23:11 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/livecd-stage2-controller.sh,v 1.9 2005/04/27 17:44:58 rocket Exp $
. ${clst_sharedir}/targets/support/functions.sh
. ${clst_sharedir}/targets/support/filesystem-functions.sh
${clst_sharedir}/targets/support/create-iso.sh $1
;;
esac
-exit 0
+exit $?
#!/bin/bash
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/netboot-controller.sh,v 1.1 2005/04/04 17:50:30 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/netboot-controller.sh,v 1.2 2005/04/27 17:44:58 rocket Exp $
. ${clst_sharedir}/targets/support/functions.sh
. ${clst_sharedir}/targets/support/filesystem-functions.sh
exit 1;;
esac
-exit 0
+exit $?
#!/bin/bash
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/stage1-controller.sh,v 1.2 2005/04/14 14:59:48 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/stage1-controller.sh,v 1.3 2005/04/27 17:44:58 rocket Exp $
. ${clst_sharedir}/targets/support/functions.sh
;;
esac
-exit 0
+exit $?
#!/bin/bash
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage2/stage2-controller.sh,v 1.1 2005/04/04 17:48:33 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage2/stage2-controller.sh,v 1.2 2005/04/27 17:44:58 rocket Exp $
. ${clst_sharedir}/targets/support/functions.sh
esac
-exit 0
+exit $?
#!/bin/bash
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage3/stage3-controller.sh,v 1.1 2005/04/04 17:48:33 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage3/stage3-controller.sh,v 1.2 2005/04/27 17:44:58 rocket Exp $
. ${clst_sharedir}/targets/support/functions.sh
esac
-exit 0
+exit $?
#!/bin/bash
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage4/stage4-controller.sh,v 1.3 2005/04/21 14:23:11 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage4/stage4-controller.sh,v 1.4 2005/04/27 17:44:58 rocket Exp $
. ${clst_sharedir}/targets/support/functions.sh
esac
-exit 0
+exit $?
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/bootloader-setup.sh,v 1.1 2005/04/21 14:23:12 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/bootloader-setup.sh,v 1.2 2005/04/27 17:44:58 rocket Exp $
. ${clst_sharedir}/targets/support/functions.sh
. ${clst_sharedir}/targets/support/filesystem-functions.sh
fi
;;
esac
-exit 0
+exit $?
if [ -n "${clst_CCACHE}" ]
then
export clst_myfeatures="${clst_myfeatures} ccache"
- if [ "${clst_AUTORESUME}" = "1" -a -e /tmp/.clst_ccache ]
- then
- echo "CCACHE Autoresume point found not emerging ccache"
- else
- emerge --oneshot --nodeps -b -k ccache && touch /tmp/.clst_ccache || exit 1
- touch /tmp/.clst_ccache
- fi
+ #if [ "${clst_AUTORESUME}" = "1" -a -e /tmp/.clst_ccache ]
+ #then
+ # echo "CCACHE Autoresume point found not emerging ccache"
+ #else
+ emerge --oneshot --nodeps -b -k ccache || exit 1
+ # touch /tmp/.clst_ccache
+ #fi
fi
if [ -n "${clst_DISTCC}" ]
then
export clst_myfeatures="${clst_myfeatures} distcc"
export DISTCC_HOSTS="${clst_distcc_hosts}"
- if [ "${clst_AUTORESUME}" = "1" -a -e /tmp/.clst_distcc ]
- then
- echo "DISTCC Autoresume point found not emerging distcc"
- else
- USE="-gtk -gnome" emerge --oneshot --nodeps -b -k distcc && touch /tmp/.clst_distcc || exit 1
- fi
+ #if [ "${clst_AUTORESUME}" = "1" -a -e /tmp/.clst_distcc ]
+ #then
+ # echo "DISTCC Autoresume point found not emerging distcc"
+ #else
+ USE="-gtk -gnome" emerge --oneshot --nodeps -b -k distcc || exit 1
+ #touch /tmp/.clst_distcc
+ #fi
fi
}
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/create-iso.sh,v 1.1 2005/04/21 14:23:12 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/create-iso.sh,v 1.2 2005/04/27 17:44:58 rocket Exp $
. ${clst_sharedir}/targets/support/functions.sh
. ${clst_sharedir}/targets/support/filesystem-functions.sh
#. ${clst_sharedir}/targets/${clst_target}/${clst_mainarch}-archscript.sh
#source ${clst_livecd_archscript}
## START RUNSCRIPT
+if [ ! -f /usr/bin/mkisofs ]
+then
+ echo
+ echo
+ die " /usr/bin/mkisofs is not found. Have you merged cdrtools?"
+ echo
+ echo
+fi
+
case ${clst_mainarch} in
alpha)
# this is for the livecd-final target, and calls the proper
# command to build the iso file
case ${clst_fstype} in
zisofs)
- mkisofs -J -R -l -z -V "${clst_iso_volume_id}" -o ${1} ${clst_target_iso_path} || die "Cannot make ISO image"
+ mkisofs -J -R -l -z -V "${clst_iso_volume_id}" -o ${1} ${clst_target_path} || die "Cannot make ISO image"
;;
*)
- mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} ${clst_target_iso_path} || die "Cannot make ISO image"
+ mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} ${clst_target_path} || die "Cannot make ISO image"
;;
esac
isomarkboot ${1} /boot/bootlx
;;
hppa)
#this is for the livecd-stage2 target, and calls the proper command to build the iso file
- mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} ${clst_target_iso_path} || die "Cannot make ISO image"
+ mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} ${clst_target_path} || die "Cannot make ISO image"
palo -f boot/palo.conf -C ${1}
;;
ppc)
# The name of the iso should be retrieved from the specs. For now, asssume GentooPPC_2004.0
- mkisofs -J -r -l -netatalk -hfs -probe -map ${clst_target_iso_path}/boot/map.hfs -part -no-desktop -hfs-iso_volume_id \
- "${clst_iso_volume_id}" -hfs-bless ${clst_target_iso_path}/boot -V "${clst_iso_volume_id}" -o ${1} ${clst_target_iso_path}
+ mkisofs -J -r -l -netatalk -hfs -probe -map ${clst_target_path}/boot/map.hfs -part -no-desktop -hfs-iso_volume_id \
+ "${clst_iso_volume_id}" -hfs-bless ${clst_target_path}/boot -V "${clst_iso_volume_id}" -o ${1} ${clst_target_path}
;;
sparc)
# this is for the livecd-final target, and calls the proper
# command to build the iso file
- mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} -G ${clst_target_iso_path}/boot/isofs.b -B ... ${clst_target_iso_path} \
+ mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} -G ${clst_target_path}/boot/isofs.b -B ... ${clst_target_path} \
|| die "Cannot make ISO image"
;;
# Only silo 1.2.x seems to work for most hardware
# Seems silo 1.3.x+ breaks on newer machines
# when booting from CD (current as of silo 1.4.8)
- mv ${clst_target_iso_path}/boot/mkisofs.sparc.fu /tmp
+ mv ${clst_target_path}/boot/mkisofs.sparc.fu /tmp
/tmp/mkisofs.sparc.fu -o ${1} -D -r -pad -quiet -S 'boot/cd.b' -B '/boot/second.b' \
-s '/boot/silo.conf' -abstract 'Gentoo Linux Sparc' -copyright 'Gentoo Foundation' \
-P 'Gentoo Linux Sparc' -p 'Gentoo Linux Sparc' -V "${clst_iso_volume_id}" \
- -A 'G entoo Linux Sparc' ${clst_target_iso_path} || die "Cannot make ISO image"
+ -A 'G entoo Linux Sparc' ${clst_target_path} || die "Cannot make ISO image"
rm /tmp/mkisofs.sparc.fu
;;
#this is for the livecd-stage2 target, and calls the proper command
# to build the iso file
#
- if [ -e ${clst_target_iso_path}/boot/isolinux.bin ]
+ if [ -e ${clst_target_path}/boot/isolinux.bin ]
then
case ${clst_fstype} in
zisofs)
mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} -b boot/isolinux.bin -c boot/boot.cat -no-emul-boot \
- -boot-load-size 4 -boot-info-table -z ${clst_target_iso_path} || die "Cannot make ISO image"
+ -boot-load-size 4 -boot-info-table -z ${clst_target_path} || die "Cannot make ISO image"
;;
*)
mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} -b boot/isolinux.bin -c boot/boot.cat -no-emul-boot \
- -boot-load-size 4 -boot-info-table ${clst_target_iso_path} || die "Cannot make ISO image"
+ -boot-load-size 4 -boot-info-table ${clst_target_path} || die "Cannot make ISO image"
;;
esac
- elif [ -e ${clst_target_iso_path}/boot/grub/stage2_eltorito ]
+ elif [ -e ${clst_target_path}/boot/grub/stage2_eltorito ]
then
case ${clst_fstype} in
zisofs)
mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} -b boot/grub/stage2_eltorito -c boot/boot.cat -no-emul-boot \
- -boot-load-size 4 -boot-info-table -z ${clst_target_iso_path} || die "Cannot make ISO image"
+ -boot-load-size 4 -boot-info-table -z ${clst_target_path} || die "Cannot make ISO image"
;;
*)
mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} -b boot/grub/stage2_eltorito -c boot/boot.cat -no-emul-boot \
- -boot-load-size 4 -boot-info-table ${clst_target_iso_path} || die "Cannot make ISO image"
+ -boot-load-size 4 -boot-info-table ${clst_target_path} || die "Cannot make ISO image"
;;
esac
else
case ${clst_fstype} in
zisofs)
mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} \
- -z ${clst_target_iso_path} || die "Cannot make ISO image"
+ -z ${clst_target_path} || die "Cannot make ISO image"
;;
*)
mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} \
- ${clst_target_iso_path} || die "Cannot make ISO image"
+ ${clst_target_path} || die "Cannot make ISO image"
;;
esac
fi
;;
esac
-exit 0
+exit $?
GK_ARGS="${GK_ARGS} --gensplash=${clst_splash_theme}"
fi
- if [ -n "${clst_initramfs_overlay}" ]
+ if [ -d "${clst_initramfs_overlay}" ]
then
GK_ARGS="${GK_ARGS} --initramfs-overlay=/tmp/initramfs_overlay/${clst_initramfs_overlay}"
fi
loopret=$?
;;
esac
+if [ ${loopret} = "1" ]
+then
+ die "Filesystem not setup"
+fi
exit $loopret
#!/bin/bash
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/tinderbox/tinderbox-controller.sh,v 1.1 2005/04/04 17:48:33 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/tinderbox/tinderbox-controller.sh,v 1.2 2005/04/27 17:44:58 rocket Exp $
. ${clst_sharedir}/targets/support/functions.sh
preclean)
#exec_in_chroot ${clst_sharedir}/targets/grp/tinderbox-preclean-chroot.sh
delete_from_chroot /tmp/chroot-functions.sh
- exit 0
;;
clean)
esac
-exit 0
+exit $?