# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.661 2006/09/13 18:32:35 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.662 2006/10/02 20:25:25 wolf31o2 Exp $
+
+ 02 Oct 2006; Chris Gianelloni <wolf31o2@gentoo.org> README,
+ modules/generic_stage_target.py, modules/livecd_stage1_target.py,
+ modules/stage4_target.py, targets/embedded/embedded-chroot.sh,
+ targets/embedded/embedded-controller.sh,
+ targets/embedded/embedded-fs-runscript.sh,
+ targets/embedded/embedded-preclean-chroot.sh,
+ targets/livecd-stage2/livecd-stage2-controller.sh,
+ targets/netboot2/netboot2-copyfile.sh,
+ targets/stage4/stage4-controller.sh, targets/support/kmerge.sh,
+ targets/support/pre-kmerge.sh:
+ Fixed lots of spacing issues, removed livecd/type from livecd-stage1, add
+ splash capabilities to stage4, change 'cp -a' to 'cp -pPR', add -q to emerge
+ calls in kmerge.sh, and updated README.
13 Sep 2006; Chris Gianelloni <wolf31o2@gentoo.org>
livecd/files/livecd-bashrc, targets/support/livecdfs-update.sh:
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/README,v 1.15 2005/12/21 16:56:01 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/README,v 1.16 2006/10/02 20:25:25 wolf31o2 Exp $
Licensing
========================
-Catalyst is copyrighted by the Gentoo Foundation, and released
-under the terms of the GNU General Public License v.2.0 or later. For more
-information, please consult COPYING.
+Catalyst is copyrighted by the Gentoo Foundation, and is released under the
+terms of the GNU General Public License v.2.1. For more information, please
+consult COPYING.
Disclaimer
========================
-Gentoo Linux extends no warranty or guarantee for catalyst. Use at
-your own risk.
+The Gentoo Foundation extends no warranty or guarantee for catalyst. This
+software is provided to the public to comply with the Gentoo social contract
+and to assist other distributors and integrators of Gentoo and Gentoo-based
+solutions. Use at your own risk.
Requirements
=======================
- Python 2.4 or greater (may still work with 2.3)
- A portage snapshot (or portage tree to make your own)
-- A Gentoo seed stage tarball
+- A Gentoo generic stage3 tarball
- shash for digest support
What is Catalyst?
Catalyst is the Gentoo Linux project's release building tool. With catalyst,
you are able to completely customize your Gentoo install by customizing
-the very tools you install your system with.
+the very tools that are used to install a system. Official Gentoo Linux release
+media is built with catalyst.
Catalyst is capable of:
-- Building installation stages for every architecture supported by Gentoo.
-- Building bootable LiveCDs for every architecture supported by Gentoo.
-- Building GRP (Gentoo Reference Platform) sets for every architecture supported by Gentoo.
-- Setting up a Tinderbox target for test building.
-- Building netboot images.
+- Building installation stages for every architecture supported by Gentoo
+- Building bootable LiveCDs for every architecture supported by Gentoo
+- Building GRP (Gentoo Reference Platform) sets for every architecture supported by Gentoo
+- Setting up a Tinderbox target for test building
+- Building netboot images
Configuring catalyst
========================
-After emerging catalyst, the first thing (and probably only thing)
+After emerging/installing catalyst, the first (and probably only) thing
that you will have to do is edit /etc/catalyst/catalyst.conf to your liking.
Example catalyst.conf:
There are many more options that can be set, but those defaults are good
for out of the box operation. For more documentation on what you can do
with catalyst, please check the man page or the online documentation at
-<http://www.gentoo.org/proj/en/releng/catalyst>.
+http://www.gentoo.org/proj/en/releng/catalyst.
# Copyright 1999-2005 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.138 2006/07/11 21:40:59 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.139 2006/10/02 20:25:25 wolf31o2 Exp $
"""
This class does all of the chroot setup, copying of files, etc. It is
self.set_valid_build_kernel_vars(addlargs)
generic_target.__init__(self,myspec,addlargs)
# map the mainarch we are running under to the mainarches we support for
- # building stages and LiveCDs. (for example, on amd64, we can build stages for
- # x86 or amd64.
+ # building stages and LiveCDs. (for example, on amd64, we can build
+ # stages for x86 or amd64.
targetmap={
"x86" : ["x86"],
"amd64" : ["x86","amd64"],
sys.exit(2)
print "Using target:",self.settings["target"]
- # self.settings["mainarch"] should now be set by our arch constructor, so we print
- # a nice informational message:
+ # self.settings["mainarch"] should now be set by our arch constructor,
+ # so we print a nice informational message:
if self.settings["mainarch"]==self.settings["hostarch"]:
print "Building natively for",self.settings["hostarch"]
self.set_portage_overlay()
self.set_root_overlay()
- # this next line checks to make sure that the specified variables exist on disk.
+ # This next line checks to make sure that the specified variables exist
+ # on disk.
#pdb.set_trace()
file_locate(self.settings,["source_path","snapshot_path","distdir"],expand=0)
- # if we are using portage_confdir, check that as well
+ # If we are using portage_confdir, check that as well.
if self.settings.has_key("portage_confdir"):
file_locate(self.settings,["portage_confdir"],expand=0)
self.set_mounts()
- # configure any user specified options (either in catalyst.conf or on the cmdline)
+ # Configure any user specified options (either in catalyst.conf or on
+ # the command line).
if self.settings.has_key("PKGCACHE"):
self.set_pkgcache_path()
print "Location of the package cache is " + self.settings["pkgcache_path"]
def set_controller_file(self):
self.settings["controller_file"]=normpath(self.settings["sharedir"]+"/targets/"+self.settings["target"]+"/"+self.settings["target"]+"-controller.sh")
+
def set_iso_volume_id(self):
if self.settings.has_key(self.settings["spec_prefix"]+"/volid"):
self.settings["iso_volume_id"] = string.join(self.settings[self.settings["spec_prefix"]+"/volid"])
raise CatalystError,"Stage build aborting due to error."
def setup_environment(self):
- # modify the current environment. This is an ugly hack that should be fixed. We need this
- # to use the os.system() call since we can't specify our own environ:
+ # Modify the current environment. This is an ugly hack that should be
+ # fixed. We need this to use the os.system() call since we can't
+ # specify our own environ:
for x in self.settings.keys():
- # "/" is replaced with "_", "-" is also replaced with "_", "." is also replace with "_"
+ # "/" is replaced with "_", "-" is replaced with "_", and "." is
+ # replaced with "_"
varname="clst_"+string.replace(x,"/","_")
varname=string.replace(varname,"-","_")
varname=string.replace(varname,".","_")
# Copyright 1999-2005 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.27 2006/05/15 13:59:32 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage1_target.py,v 1.28 2006/10/02 20:25:25 wolf31o2 Exp $
"""
Builder class for LiveCD stage1.
self.required_values=["livecd/packages"]
self.valid_values=self.required_values[:]
- # Add optional livecd/type field for extra specific stuff
- self.valid_values.extend(["livecd/type","livecd/use"])
+ self.valid_values.extend(["livecd/use"])
generic_stage_target.__init__(self,spec,addlargs)
def set_action_sequence(self):
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage4_target.py,v 1.19 2006/02/17 13:34:42 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage4_target.py,v 1.20 2006/10/02 20:25:25 wolf31o2 Exp $
"""
Builder class for stage4.
class stage4_target(generic_stage_target):
def __init__(self,spec,addlargs):
- self.required_values=[]
+ self.required_values=["stage4/packages"]
self.valid_values=self.required_values[:]
- self.valid_values.extend(["stage4/use","stage4/packages","stage4/root_overlay", "stage4/fsscript", \
- "stage4/rcadd","stage4/rcdel","stage4/linuxrc","stage4/unmerge","stage4/rm","boot/kernel"])
+ self.valid_values.extend(["stage4/use","boot/kernel",\
+ "stage4/root_overlay","stage4/fsscript",\
+ "stage4/gk_mainargs","splash_theme","splash_type",\
+ "portage_overlay","stage4/rcadd","stage4/rcdel",\
+ "stage4/linuxrc","stage4/unmerge","stage4/rm","stage4/empty"])
generic_stage_target.__init__(self,spec,addlargs)
def set_cleanables(self):
self.settings["action_sequence"]=["unpack","unpack_snapshot",\
"config_profile_link","setup_confdir","portage_overlay",\
"bind","chroot_setup","setup_environment","build_packages",\
- "build_kernel","bootloader","root_overlay","fsscript",
+ "build_kernel","bootloader","root_overlay","fsscript",\
"preclean","rcupdate","unmerge","unbind","remove","empty",\
"clean","capture", "clear_autoresume"]
#!/bin/bash
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-chroot.sh,v 1.20 2005/12/16 19:08:59 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-chroot.sh,v 1.21 2006/10/02 20:25:25 wolf31o2 Exp $
. /tmp/chroot-functions.sh
setup_myfeatures
setup_myemergeopts
-
# Setup the environment
export FEATURES="${clst_myfeatures}"
#export clst_myemergeopts="${clst_myemergeopts} -O"
export USE="${clst_use}"
export DESTROOT=${clst_root_path}
export clst_root_path=/
-## START BUILD
run_emerge "${clst_myemergeopts}" -o "${clst_embedded_packages}"
export clst_root_path=${DESTROOT}
export clst_myemergeopts="${clst_myemergeopts} -1 -O"
export INSTALL_MASK="${clst_install_mask}"
+
run_emerge "${clst_embedded_packages}"
#!/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.8 2005/12/16 19:08:59 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-controller.sh,v 1.9 2006/10/02 20:25:25 wolf31o2 Exp $
. ${clst_sharedir}/targets/support/functions.sh
. ${clst_sharedir}/targets/support/filesystem-functions.sh
-case $1 in
+
+case ${1} in
enter)
;;
build_packages)
shift
export clst_packages="$*"
- exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh
+ exec_in_chroot \
+ ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh
;;
preclean)
kernel)
shift
- export clst_kname="$1"
+ export clst_kname="${1}"
# if we have our own linuxrc, copy it in
if [ -n "${clst_linuxrc}" ]
then
target_image_setup)
shift
- ${clst_sharedir}/targets/support/target_image_setup.sh $1
+ ${clst_sharedir}/targets/support/target_image_setup.sh ${1}
;;
livecd-update)
bootloader)
shift
# Here is where we poke in our identifier
- touch $1/livecd
+ touch ${1}/livecd
- ${clst_sharedir}/targets/support/bootloader-setup.sh $1
+ ${clst_sharedir}/targets/support/bootloader-setup.sh ${1}
;;
iso)
shift
- ${clst_sharedir}/targets/support/create-iso.sh $1
+ ${clst_sharedir}/targets/support/create-iso.sh ${1}
;;
clean)
# Distributed under the terms of the GNU General Public License v2
die() {
- echo "$1"
+ echo "${1}"
exit 1
}
fi
}
-case $1 in
+case ${1} in
jffs)
fs_check /usr/sbin/mkfs.jffs jffs sys-fs/mtd
mkfs.jffs -d ${root_fs_path} -o ${clst_image_path}/root.img \
${clst_embedded_fs_ops} || \
die "Could not create a squashfs filesystem"
;;
+
*)
;;
esac
+exit $?
#!/bin/bash
# Copyright 1999-2005 Gentoo Foundation
# 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.8 2006/01/17 19:30:45 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-preclean-chroot.sh,v 1.9 2006/10/02 20:25:25 wolf31o2 Exp $
. /tmp/chroot-functions.sh
update_env_settings
+
cleanup_distcc
# Copyright 1999-2005 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.22 2006/08/22 16:45:47 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/livecd-stage2-controller.sh,v 1.23 2006/10/02 20:25:25 wolf31o2 Exp $
. ${clst_sharedir}/targets/support/functions.sh
. ${clst_sharedir}/targets/support/filesystem-functions.sh
;;
livecd-update)
# Now, finalize and tweak the livecd fs (inside of the chroot)
- exec_in_chroot ${clst_sharedir}/targets/support/livecdfs-update.sh
-
-
+ exec_in_chroot ${clst_sharedir}/targets/support/livecdfs-update.sh
+
# Move over the xinitrc (if applicable)
# This is moved here, so we can override any default xinitrc
if [ -n "${clst_livecd_xinitrc}" ]
fi
;;
rc-update)
- exec_in_chroot ${clst_sharedir}/targets/support/rc-update.sh
+ exec_in_chroot ${clst_sharedir}/targets/support/rc-update.sh
;;
fsscript)
exec_in_chroot ${clst_fsscript}
#!/bin/bash
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot2/netboot2-copyfile.sh,v 1.2 2006/06/21 22:11:54 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot2/netboot2-copyfile.sh,v 1.3 2006/10/02 20:25:25 wolf31o2 Exp $
. /tmp/chroot-functions.sh
for f in ${clst_files}
do
# copy it to the merge path
- cp -af --parents ${f} ${clst_merge_path}
+ cp -pPRf --parents ${f} ${clst_merge_path}
# if the file is an ELF binary, strip unneeded stuff from it
if [ -x "${f}" ] && [ ! -L "${f}" ]; then
#!/bin/bash
# Copyright 1999-2005 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.12 2005/12/19 15:36:02 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage4/stage4-controller.sh,v 1.13 2006/10/02 20:25:25 wolf31o2 Exp $
. ${clst_sharedir}/targets/support/functions.sh
# If we have our own linuxrc, copy it in
if [ -n "${clst_linuxrc}" ]
then
- cp -a ${clst_linuxrc} ${clst_chroot_path}/tmp/linuxrc
+ cp -pPR ${clst_linuxrc} ${clst_chroot_path}/tmp/linuxrc
fi
exec_in_chroot ${clst_sharedir}/targets/support/kmerge.sh
delete_from_chroot tmp/linuxrc
extract_modules ${clst_chroot_path} ${clst_kname}
- extract_kernel ${clst_chroot_path}/boot ${clst_kname}
+ # Do we need this one?
+# extract_kernel ${clst_chroot_path}/boot ${clst_kname}
;;
build_packages)
shift
exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-preclean-chroot.sh ${clst_root_path}
;;
rc-update)
- exec_in_chroot ${clst_sharedir}/targets/support/rc-update.sh
+ exec_in_chroot ${clst_sharedir}/targets/support/rc-update.sh
;;
fsscript)
exec_in_chroot ${clst_fsscript}
;;
livecd-update)
# Now, finalize and tweak the livecd fs (inside of the chroot)
- exec_in_chroot ${clst_sharedir}/targets/support/livecdfs-update.sh
+ exec_in_chroot ${clst_sharedir}/targets/support/livecdfs-update.sh
+
+ # Move over the xinitrc (if applicable)
+ # This is moved here, so we can override any default xinitrc
+ if [ -n "${clst_livecd_xinitrc}" ]
+ then
+ cp -f ${clst_livecd_xinitrc} \
+ ${clst_chroot_path}/etc/X11/xinit/xinitrc
+ fi
;;
bootloader)
exit 0
;;
target_image_setup)
shift
- #${clst_sharedir}/targets/livecd-stage2/livecd-stage2-cdfs.sh
${clst_sharedir}/targets/support/target_image_setup.sh $1
;;
unmerge)
then
if [ "$clst_kernel_merge" != "" ]
then
- genkernel --callback="PKGDIR=${PKGDIR} emerge -kb \
+ genkernel --callback="PKGDIR=${PKGDIR} emerge -kqb \
${clst_kernel_merge}" ${GK_ARGS} || exit 1
else
genkernel ${GK_ARGS} || exit 1
else
if [ "$clst_kernel_merge" != "" ]
then
- genkernel --callback="emerge ${clst_kernel_merge}" \
+ genkernel --callback="emerge -q ${clst_kernel_merge}" \
${GK_ARGS} || exit 1
else
genkernel ${GK_ARGS} || exit 1
if [ -n "${clst_KERNCACHE}" ]
then
- ROOT=/tmp/kerncache/${clst_kname} PKGDIR=${PKGDIR} USE="${USE} symlink build" emerge --nodeps -ukb "${clst_ksource}" || exit 1
+ ROOT=/tmp/kerncache/${clst_kname} PKGDIR=${PKGDIR} USE="${USE} symlink build" emerge --nodeps -uqkb "${clst_ksource}" || exit 1
KERNELVERSION=`/usr/lib/portage/bin/portageq best_visible / "${clst_ksource}"`
if [ ! -e /etc/portage/profile/package.provided ]
then
run_emerge --oneshot genkernel
install -d /tmp/kerncache
- # Set the netboot builddate/hostname in linuxrc & copy to proper arch directory in genkernel
+ # Set the netboot builddate/hostname in linuxrc and copy to proper arch
+ # directory in genkernel
sed -e "s/@@MYDATE@@/${clst_netboot2_builddate}/g" \
-e "s/@@RELVER@@/${clst_version_stamp}/g" \
${clst_root_path}usr/share/genkernel/netboot/linuxrc.x \
> ${clst_root_path}usr/share/genkernel/${clst_mainarch}/linuxrc
echo ">>> Copying support files to ${clst_root_path} ..."
- cp -af ${clst_root_path}usr/share/genkernel/netboot/misc/* ${clst_merge_path}
+ cp -pPRf ${clst_root_path}usr/share/genkernel/netboot/misc/* \
+ ${clst_merge_path}
echo ">>> Copying busybox config ..."
cp -f ${clst_root_path}usr/share/genkernel/${clst_mainarch}/nb-busybox.cf \