Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master cauldron by Justin Boffemmyer (3c7f4e3d3ec0c238c08882c78c2a84d5a790929e)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Justin Boffemmyer <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master cauldron by Justin Boffemmyer (3c7f4e3d3ec0c238c08882c78c2a84d5a790929e)
  • Date: Sat, 2 Apr 2011 22:03:00 -0500

GIT changes to master cauldron by Justin Boffemmyer <flux AT sourcemage.org>:

HACKING | 84 ++--
cauldron/bin/cauldron | 212 ++++++++++
cauldron/cauldron | 212 ----------
cauldron/cleaners/autoconf-clean | 72 ---
cauldron/cleaners/automake-clean | 134 ------
cauldron/cleaners/bin86-clean | 10
cauldron/cleaners/binutils-clean | 140 ------
cauldron/cleaners/bison-clean | 66 ---
cauldron/cleaners/flex-clean | 32 -
cauldron/cleaners/g++-clean | 524 --------------------------
cauldron/cleaners/gcc-clean | 154 -------
cauldron/cleaners/grub-clean | 44 --
cauldron/cleaners/installwatch-clean | 5
cauldron/cleaners/libidn-clean | 1
cauldron/cleaners/lilo-clean | 52 --
cauldron/cleaners/m4-clean | 31 -
cauldron/config/arch/host_arch.conf | 15
cauldron/config/arch/ppc.conf | 5
cauldron/config/arch/x86.conf | 5
cauldron/config/arch/x86_64.conf | 5
cauldron/config/build.conf | 23 -
cauldron/config/commands.conf | 108 -----
cauldron/config/default.conf | 25 -
cauldron/config/display.conf | 5
cauldron/config/iso.conf | 34 -
cauldron/config/paths.conf | 20
cauldron/config/security.conf | 6
cauldron/config/sorcery.conf | 37 -
cauldron/config/sys.conf | 16
cauldron/data/cleaners/autoconf-clean | 72 +++
cauldron/data/cleaners/automake-clean | 134 ++++++
cauldron/data/cleaners/bin86-clean | 10
cauldron/data/cleaners/binutils-clean | 140 ++++++
cauldron/data/cleaners/bison-clean | 66 +++
cauldron/data/cleaners/flex-clean | 32 +
cauldron/data/cleaners/g++-clean | 524 ++++++++++++++++++++++++++
cauldron/data/cleaners/gcc-clean | 154 +++++++
cauldron/data/cleaners/grub-clean | 44 ++
cauldron/data/cleaners/installwatch-clean | 5
cauldron/data/cleaners/libidn-clean | 1
cauldron/data/cleaners/lilo-clean | 52 ++
cauldron/data/cleaners/m4-clean | 31 +
cauldron/data/config/arch/host_arch.conf | 15
cauldron/data/config/arch/ppc.conf | 5
cauldron/data/config/arch/x86.conf | 5
cauldron/data/config/arch/x86_64.conf | 5
cauldron/data/config/build.conf | 27 +
cauldron/data/config/commands.conf | 294 ++++++++++++++
cauldron/data/config/default.conf | 25 +
cauldron/data/config/display.conf | 5
cauldron/data/config/iso.conf | 34 +
cauldron/data/config/paths.conf | 20
cauldron/data/config/security.conf | 6
cauldron/data/config/sorcery.conf | 37 +
cauldron/data/config/sys.conf | 16
cauldron/errorcodes | 138 ------
cauldron/lib.chroot | 233 -----------
cauldron/lib.init | 305 ---------------
cauldron/lib.sorcerous | 172 --------
cauldron/lib.toolchain | 334 ----------------
cauldron/lib/errorcodes | 138 ++++++
cauldron/lib/lib.chroot | 241 +++++++++++
cauldron/lib/lib.init | 324 ++++++++++++++++
cauldron/lib/lib.sorcerous | 173 ++++++++
cauldron/lib/lib.toolchain | 345 +++++++++++++++++
cauldron/lib/libcauldron | 275 +++++++++++++
cauldron/libcauldron | 272 -------------
enchantment/errorcodes | 137 ------
enchantment/lib.chroot | 109 -----
enchantment/lib.i18n | 210 ----------
enchantment/lib.install | 165 --------
enchantment/lib.modules | 188 ---------
enchantment/lib.potion | 604
------------------------------
enchantment/lib/errorcodes | 137 ++++++
enchantment/lib/lib.chroot | 109 +++++
enchantment/lib/lib.i18n | 210 ++++++++++
enchantment/lib/lib.install | 165 ++++++++
enchantment/lib/lib.modules | 188 +++++++++
enchantment/lib/lib.potion | 604
++++++++++++++++++++++++++++++
enchantment/lib/libenchantment | 337 ++++++++++++++++
enchantment/libenchantment | 337 ----------------
ward/cauldron_sources | 12
ward/enchantment_sources | 10
ward/ward-configvars | 2
ward/ward-errorcodes | 4
ward/ward-functions | 4
86 files changed, 5275 insertions(+), 5043 deletions(-)

New commits:
commit 3c7f4e3d3ec0c238c08882c78c2a84d5a790929e
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

cauldron: convert all commands to use variables

All commands used in the cauldron sources are now externally
configurable via data/config/commands.conf, which is sourced by the
default profile config default.conf (which in turn is sourced by the
default user config file which would typically be installed to
/etc/cauldron/cauldron.conf). This makes cauldron much more configurable
for end users that would like to hack some advanced configuration,
and also makes cauldron more portable to systems that may not be using
the standard linux utilities (i.e., one of the BSDs, or a highly custom
system).

There is still some dependence in a few locations on the commands
providing certain output or expecting certain input, and there is one
instance where CAULDRON_CMD_TAR has to be used with its arguments
specified directly in the source file, making the use of tar less robust
(this is currently unavoidable, but I'll try and find a way around it if
I can). It should still be easy to find with a simple grep though, as
there is only one such instance (in lib.toolchain). There is less that
can be done about the assumptions regarding input and output without
making the configuration system useless, though. If inputs and outputs
really need to change, it would probably be better to directly edit the
sources themselves to port them.

commit c88e46b3fdf11d06934298eecad4d4962ec57092
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

ward: update for new path structure in components

Update the ward functions to reflect the new path organization in
cauldron and enchantment so the files are properly found.

commit b61742d7b4ba879969e8215402c1a076f130315b
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

enchantment: organize source directory

Push all library files into a separate lib/ subdirectory for better
organization.

commit 3f3268c835ddb8dea3b496f5f15cdf65aa124b8f
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

cauldron: organize source directory

Organize the source directory by placing files into directories by type
(i.e., lib files into the lib/ directory).

diff --git a/HACKING b/HACKING
index 88fd1f0..55d651e 100644
--- a/HACKING
+++ b/HACKING
@@ -6,32 +6,32 @@ cauldron/

Code for cauldron, the ISO generation script(s).

-************
-* cauldron *
-************
+****************
+* bin/cauldron *
+****************
This is the interface to all the different libraries. It accepts user
input, and (when later implemented) presents an interface for modifying the
cauldron config file. It will have both a command-line interface and a
menu-driven interface (via dialog), much like sorcery.

-***************
-* libcauldron *
-***************
+*******************
+* lib/libcauldron *
+*******************
This is the main cauldron library. It is responsible for managing
initialization and final cleanup and for providing functionality common to
all
the cauldron sub-libraries.

-**************
-* lib.chroot *
-**************
+******************
+* lib/lib.chroot *
+******************
The lib.chroot library is responsible for setting up, tearing down,
and
calling into chroots. The code in this module gets used many times both in
the
other modules (in particular libcauldron) and in cauldron itself
(particularly
for the brew command).

-************
-* lib.init *
-************
+****************
+* lib/lib.init *
+****************
The lib.init library handles the init system for the ISO. It provides
functions for creating an initramfs/initrd and for setting up the ISO inittab
for booting into the correct enchant setup (i.e. putting the menu installer
on
@@ -40,31 +40,31 @@ other necessary init scripts (and possibly the init
system itself, if this is
needed), though these should really be taken care of via sorcery and casting
spells with their init scripts enabled.

-*****************
-* lib.sorcerous *
-*****************
+*********************
+* lib/lib.sorcerous *
+*********************
The lib.sorcerous library provides an interface to sorcery components
and functions as they are needed within cauldron. This includes functions
which
source sorcery files in the target, as well as functions to download and
install sorcery into the target.

-*****************
-* lib.toolchain *
-*****************
+*********************
+* lib/lib.toolchain *
+*********************
The lib.toolchain library provides functions for generating the base
toolchain used to build all the components that will make up the final ISO.


-**************
-* errorcodes *
-**************
+******************
+* lib/errorcodes *
+******************
Defines the cauldron-specific error codes and corresponding messages
to
be used for error-checking via liberror functions.


-*************
-* cleaners/ *
-*************
+******************
+* data/cleaners/ *
+******************
This directory contains text files that list files to be removed from
the final ISO, one file per line (note: files, not spells!). For example, the
build toolchain is removed from the ISO before it is packaged, but it is not
@@ -75,21 +75,21 @@ Their spell caches are provided instead, and they are to
be accessed from the
installed platform.


-***********
-* config/ *
-***********
+****************
+* data/config/ *
+****************
This directory contains all the default configuration variables and
values used by cauldron.

-***********************
-* config/default.conf *
-***********************
+****************************
+* data/config/default.conf *
+****************************
This is the default configuration profile. It does nothing than to
source all the other configuration files in the correct order.

-****************
-* config/arch/ *
-****************
+*********************
+* data/config/arch/ *
+*********************
This directory contains the different architecture definitions needed
by cauldron.

@@ -165,17 +165,17 @@ enchantment/

Code for enchantment, the installer interface(s) used on the ISOs.

-******************
-* libenchantment *
-******************
+**********************
+* lib/libenchantment *
+**********************
This library provides common functions to be used across the different
ISO installers. Currently sourced by libcauldron, but likely will be sourced
by
cauldron instead of libcauldron soon. It is also sourced by the different
installers, as it provides common functionality for them.

-**************
-* lib.potion *
-**************
+******************
+* lib/lib.potion *
+******************
This library provides state tracking functionality for enchantment.
The
state tracking can be used for error-proofing installation procedures,
automating installs (or even portions of them, as it can function over ranges
@@ -184,9 +184,9 @@ history functionality provided by libenchantment. This
library is sourced by
libenchantment.


-**************
-* errorcodes *
-**************
+******************
+* lib/errorcodes *
+******************
Defines the enchantment-specific error codes and corresponding
messages to
be used for error-checking via liberror functions.

diff --git a/cauldron/bin/cauldron b/cauldron/bin/cauldron
new file mode 100755
index 0000000..aeed2ae
--- /dev/null
+++ b/cauldron/bin/cauldron
@@ -0,0 +1,212 @@
+#!/bin/bash
+#---------------------------------------------------------------------
+##
+##=head1 SYNOPSIS
+##
+## Cauldron is an iso generation and installer management utility
+##
+##=head1 DESCRIPTION
+##
+## Cauldron is a utility meant to mirror sorcery's capabilities for
+## spell management, but for ISO creation and installation method
+## management. If called without arguments, it operates in an
+## interactive menu-based TUI (like sorcery would). If called with
+## arguments, it runs as a CLI-based command, which is also
+## suitable for batch processing.
+##
+##=head1 COPYRIGHT
+##
+## Copyright 2009 by the Cauldron Team
+##
+##=head1 FUNCTIONS
+##
+##=over 4
+##
+#---------------------------------------------------------------------
+
+function help() {
+
+ cat << EOF
+
+Cauldron is the menu system used for setting options for iso building,
+and for managing installers.
+
+EOF
+
+ exit 1
+}
+
+#-------------------------------------------------------------------------------
+##
+## The brew command calls the necessary functions to generate a complete ISO
+## using the settings configured for cauldron.
+##
+#-------------------------------------------------------------------------------
+function cauldron_brew () {
+ # set up basic tool-chain needed for building everything else.
+ cauldron_base_toolchain
+ liberror_check_fatal_error
+
+ # set up chroot for building inside $CAULDRON_BUILD
+ cauldron_chroot_init
+ liberror_check_fatal_error
+
+ # build the cross-compile tool-chain targeted for the target sys
+ if [ "$CAULDRON_ARCH" != "$CAULDRON_HOST_ARCH" ]
+ then
+ cauldron_chroot cauldron_cross_toolchain
+ liberror_check_fatal_error
+ fi
+
+ # use the cross-compile tool-chain to cast all spells needed for
+ # the iso system
+ cauldron_chroot cauldron_build_iso_system "$CAULDRON_SPELLS"
+ liberror_check_fatal_error
+
+ # configure the iso init system, initrd/initramfs, etc.
+ cauldron_chroot cauldron_iso_init
+ liberror_check_fatal_error
+
+ # build/create/copy/whatever installer system/data into the iso
+ for installer in $(cat "$CAULDRON_SPELLS")
+ do
+ cauldron_chroot cauldron_add_installer "${installer##*/}"
+ done
+ liberror_check_fatal_error
+
+ # remove unnecessary files from iso and free up space
+ # this needs to have error-checking added in later
+ for cleaner in "$CAULDRON_BASE/cleaners"/* ;
+ do
+ cp "$cleaner" "$CAULDRON_BUILD/"
+ cauldron_chroot cauldron_clean_iso_system "/${cleaner##*/}"
+ cauldron_chroot rm "/${cleaner##*/}"
+ done
+ liberror_check_fatal_error
+
+ # finished with iso building, clean up from chroot setup
+ cauldron_chroot_done
+ liberror_check_fatal_error
+
+ # create the iso fs from the build dir
+ cauldron_mkisofs
+ liberror_check_fatal_error
+}
+
+function cauldron_modify_local_config() {
+}
+
+function cauldron_menu_main() {
+ local CAULDRON_B_HELP="Build directory location"
+ local CAULDRON_OK="Select"
+ local CAULDRON_CANCEL="Exit"
+
+ while
+ CAULDRON_COMMAND=$(eval ${DIALOG} ' --title "Main Menu" \
+ --item-help \
+ --ok-label \
+ "${CAULDRON_OK}" \
+ --cancel-label \
+ "${CAULDRON_CANCEL}" \
+ --menu \
+ "Cauldron Version \
+ ${CAULDRON_VERSION}" \
+ 0 0 0 \
+ "B" "Build Menu" \
+ "${CAULDRON_B_HELP}"' )
+ do
+ case ${CAULDRON_COMMAND} in
+ B) cauldron_menu_build;;
+ esac
+ done
+}
+
+function cauldron_menu_build() {
+ local CAULDRON_OK="Commit"
+ local CAULDRON_CANCEL="Cancel"
+
+ if CAULDRON_BUILD=$(eval ${DIALOG} ' --ok-label \
+ ${CAULDRON_OK} \
+ --cancel-label ${CAULDRON_CANCEL} \
+ --input-menu \
+ "Enter the path to the dir where \
+ Cauldron should build your ISOs." \
+ 0 0 \
+ ${CAULDRON_BUILD}' )
+ then
+ cauldron_modify_local_config "CAULDRON_BUILD" "${CAULDRON_BUILD}"
+ fi
+}
+
+function cauldron_main() {
+ if [[ -z "$1" ]]
+ then
+ cauldron_menu_main
+ else
+ case $1 in
+ -b|--brew|brew) cauldron_brew ;;
+ -h|--help|help) help ;;
+ *) help ;;
+ esac
+ fi
+}
+
+# load main config file - required
+. /etc/cauldron/config || exit 1
+
+# load secondary (custom config file) - required if present
+if [[ -e /etc/cauldron/local/config ]]
+then
+ . /etc/cauldron/local/config || exit 1
+fi
+
+# load the main cauldron library
+. "$CAULDRON_LIBS"/libcauldron || exit 1
+
+if [[ $UID == 0 ]]
+then
+ DIALOG='$DIALOG_PROG \
+ --backtitle \
+ "Cauldron ISO builder and installer management utility" \
+ --stdout'
+
+ CAULDRON_VERSION=$(cat /etc/cauldron/version)
+ cauldron_main "$@"
+ CAULDRON_STATUS="$?"
+ exit ${CAULDRON_STATUS}
+else
+ if [[ $1 == -h ]] || [[ $1 == --help ]] || [[ $1 == help ]]
+ then
+ cauldron_help
+ elif [[ $1 == -v ]] || [[ $1 == --version ]] || [[ $1 == version ]]
+ then
+ echo $(cat /etc/cauldron/version)
+ else
+ echo "Please enter the root password."
+ CAULDRON_PARAMS=$@
+ su -c "$0 ${CAULDRON_PARAMS}" root
+ fi
+fi
+
+#---------------------------------------------------------------------
+##=back
+##
+##=head1 LICENSE
+##
+## This software is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This software is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this software; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+#---------------------------------------------------------------------
+
+# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/cauldron/cauldron b/cauldron/cauldron
deleted file mode 100755
index aeed2ae..0000000
--- a/cauldron/cauldron
+++ /dev/null
@@ -1,212 +0,0 @@
-#!/bin/bash
-#---------------------------------------------------------------------
-##
-##=head1 SYNOPSIS
-##
-## Cauldron is an iso generation and installer management utility
-##
-##=head1 DESCRIPTION
-##
-## Cauldron is a utility meant to mirror sorcery's capabilities for
-## spell management, but for ISO creation and installation method
-## management. If called without arguments, it operates in an
-## interactive menu-based TUI (like sorcery would). If called with
-## arguments, it runs as a CLI-based command, which is also
-## suitable for batch processing.
-##
-##=head1 COPYRIGHT
-##
-## Copyright 2009 by the Cauldron Team
-##
-##=head1 FUNCTIONS
-##
-##=over 4
-##
-#---------------------------------------------------------------------
-
-function help() {
-
- cat << EOF
-
-Cauldron is the menu system used for setting options for iso building,
-and for managing installers.
-
-EOF
-
- exit 1
-}
-
-#-------------------------------------------------------------------------------
-##
-## The brew command calls the necessary functions to generate a complete ISO
-## using the settings configured for cauldron.
-##
-#-------------------------------------------------------------------------------
-function cauldron_brew () {
- # set up basic tool-chain needed for building everything else.
- cauldron_base_toolchain
- liberror_check_fatal_error
-
- # set up chroot for building inside $CAULDRON_BUILD
- cauldron_chroot_init
- liberror_check_fatal_error
-
- # build the cross-compile tool-chain targeted for the target sys
- if [ "$CAULDRON_ARCH" != "$CAULDRON_HOST_ARCH" ]
- then
- cauldron_chroot cauldron_cross_toolchain
- liberror_check_fatal_error
- fi
-
- # use the cross-compile tool-chain to cast all spells needed for
- # the iso system
- cauldron_chroot cauldron_build_iso_system "$CAULDRON_SPELLS"
- liberror_check_fatal_error
-
- # configure the iso init system, initrd/initramfs, etc.
- cauldron_chroot cauldron_iso_init
- liberror_check_fatal_error
-
- # build/create/copy/whatever installer system/data into the iso
- for installer in $(cat "$CAULDRON_SPELLS")
- do
- cauldron_chroot cauldron_add_installer "${installer##*/}"
- done
- liberror_check_fatal_error
-
- # remove unnecessary files from iso and free up space
- # this needs to have error-checking added in later
- for cleaner in "$CAULDRON_BASE/cleaners"/* ;
- do
- cp "$cleaner" "$CAULDRON_BUILD/"
- cauldron_chroot cauldron_clean_iso_system "/${cleaner##*/}"
- cauldron_chroot rm "/${cleaner##*/}"
- done
- liberror_check_fatal_error
-
- # finished with iso building, clean up from chroot setup
- cauldron_chroot_done
- liberror_check_fatal_error
-
- # create the iso fs from the build dir
- cauldron_mkisofs
- liberror_check_fatal_error
-}
-
-function cauldron_modify_local_config() {
-}
-
-function cauldron_menu_main() {
- local CAULDRON_B_HELP="Build directory location"
- local CAULDRON_OK="Select"
- local CAULDRON_CANCEL="Exit"
-
- while
- CAULDRON_COMMAND=$(eval ${DIALOG} ' --title "Main Menu" \
- --item-help \
- --ok-label \
- "${CAULDRON_OK}" \
- --cancel-label \
- "${CAULDRON_CANCEL}" \
- --menu \
- "Cauldron Version \
- ${CAULDRON_VERSION}" \
- 0 0 0 \
- "B" "Build Menu" \
- "${CAULDRON_B_HELP}"' )
- do
- case ${CAULDRON_COMMAND} in
- B) cauldron_menu_build;;
- esac
- done
-}
-
-function cauldron_menu_build() {
- local CAULDRON_OK="Commit"
- local CAULDRON_CANCEL="Cancel"
-
- if CAULDRON_BUILD=$(eval ${DIALOG} ' --ok-label \
- ${CAULDRON_OK} \
- --cancel-label ${CAULDRON_CANCEL} \
- --input-menu \
- "Enter the path to the dir where \
- Cauldron should build your ISOs." \
- 0 0 \
- ${CAULDRON_BUILD}' )
- then
- cauldron_modify_local_config "CAULDRON_BUILD" "${CAULDRON_BUILD}"
- fi
-}
-
-function cauldron_main() {
- if [[ -z "$1" ]]
- then
- cauldron_menu_main
- else
- case $1 in
- -b|--brew|brew) cauldron_brew ;;
- -h|--help|help) help ;;
- *) help ;;
- esac
- fi
-}
-
-# load main config file - required
-. /etc/cauldron/config || exit 1
-
-# load secondary (custom config file) - required if present
-if [[ -e /etc/cauldron/local/config ]]
-then
- . /etc/cauldron/local/config || exit 1
-fi
-
-# load the main cauldron library
-. "$CAULDRON_LIBS"/libcauldron || exit 1
-
-if [[ $UID == 0 ]]
-then
- DIALOG='$DIALOG_PROG \
- --backtitle \
- "Cauldron ISO builder and installer management utility" \
- --stdout'
-
- CAULDRON_VERSION=$(cat /etc/cauldron/version)
- cauldron_main "$@"
- CAULDRON_STATUS="$?"
- exit ${CAULDRON_STATUS}
-else
- if [[ $1 == -h ]] || [[ $1 == --help ]] || [[ $1 == help ]]
- then
- cauldron_help
- elif [[ $1 == -v ]] || [[ $1 == --version ]] || [[ $1 == version ]]
- then
- echo $(cat /etc/cauldron/version)
- else
- echo "Please enter the root password."
- CAULDRON_PARAMS=$@
- su -c "$0 ${CAULDRON_PARAMS}" root
- fi
-fi
-
-#---------------------------------------------------------------------
-##=back
-##
-##=head1 LICENSE
-##
-## This software is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This software is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this software; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-#---------------------------------------------------------------------
-
-# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/cauldron/cleaners/autoconf-clean
b/cauldron/cleaners/autoconf-clean
deleted file mode 100644
index 9292dfc..0000000
--- a/cauldron/cleaners/autoconf-clean
+++ /dev/null
@@ -1,72 +0,0 @@
-/usr
-/usr/bin
-/usr/bin/autoconf
-/usr/bin/autoheader
-/usr/bin/autom4te
-/usr/bin/autoreconf
-/usr/bin/autoscan
-/usr/bin/autoupdate
-/usr/bin/ifnames
-/usr/share
-/usr/share/autoconf
-/usr/share/autoconf/Autom4te
-/usr/share/autoconf/Autom4te/C4che.pm
-/usr/share/autoconf/Autom4te/ChannelDefs.pm
-/usr/share/autoconf/Autom4te/Channels.pm
-/usr/share/autoconf/Autom4te/Configure_ac.pm
-/usr/share/autoconf/Autom4te/FileUtils.pm
-/usr/share/autoconf/Autom4te/General.pm
-/usr/share/autoconf/Autom4te/Request.pm
-/usr/share/autoconf/Autom4te/Struct.pm
-/usr/share/autoconf/Autom4te/XFile.pm
-/usr/share/autoconf/INSTALL
-/usr/share/autoconf/autoconf
-/usr/share/autoconf/autoconf/autoconf.m4
-/usr/share/autoconf/autoconf/autoconf.m4f
-/usr/share/autoconf/autoconf/autoheader.m4
-/usr/share/autoconf/autoconf/autoscan.m4
-/usr/share/autoconf/autoconf/autotest.m4
-/usr/share/autoconf/autoconf/autoupdate.m4
-/usr/share/autoconf/autoconf/c.m4
-/usr/share/autoconf/autoconf/erlang.m4
-/usr/share/autoconf/autoconf/fortran.m4
-/usr/share/autoconf/autoconf/functions.m4
-/usr/share/autoconf/autoconf/general.m4
-/usr/share/autoconf/autoconf/headers.m4
-/usr/share/autoconf/autoconf/lang.m4
-/usr/share/autoconf/autoconf/libs.m4
-/usr/share/autoconf/autoconf/oldnames.m4
-/usr/share/autoconf/autoconf/programs.m4
-/usr/share/autoconf/autoconf/specific.m4
-/usr/share/autoconf/autoconf/status.m4
-/usr/share/autoconf/autoconf/types.m4
-/usr/share/autoconf/autom4te.cfg
-/usr/share/autoconf/autoscan
-/usr/share/autoconf/autoscan/autoscan.list
-/usr/share/autoconf/autotest
-/usr/share/autoconf/autotest/autotest.m4
-/usr/share/autoconf/autotest/autotest.m4f
-/usr/share/autoconf/autotest/general.m4
-/usr/share/autoconf/m4sugar
-/usr/share/autoconf/m4sugar/m4sh.m4
-/usr/share/autoconf/m4sugar/m4sh.m4f
-/usr/share/autoconf/m4sugar/m4sugar.m4
-/usr/share/autoconf/m4sugar/m4sugar.m4f
-/usr/share/autoconf/m4sugar/version.m4
-/usr/share/info
-/usr/share/info/autoconf.info
-/usr/share/info/standards.info
-/usr/share/man
-/usr/share/man/man1
-/usr/share/man/man1/autoconf.1
-/usr/share/man/man1/autoheader.1
-/usr/share/man/man1/autom4te.1
-/usr/share/man/man1/autoreconf.1
-/usr/share/man/man1/autoscan.1
-/usr/share/man/man1/autoupdate.1
-/usr/share/man/man1/config.guess.1
-/usr/share/man/man1/config.sub.1
-/usr/share/man/man1/ifnames.1
-/var/log/sorcery/compile/autoconf-2.61.bz2
-/var/log/sorcery/install/autoconf-2.61
-/var/log/sorcery/md5sum/autoconf-2.61
diff --git a/cauldron/cleaners/automake-clean
b/cauldron/cleaners/automake-clean
deleted file mode 100644
index 9ad16dc..0000000
--- a/cauldron/cleaners/automake-clean
+++ /dev/null
@@ -1,134 +0,0 @@
-/usr
-/usr/bin
-/usr/bin/aclocal
-/usr/bin/aclocal-1.10
-/usr/bin/automake
-/usr/bin/automake-1.10
-/usr/share
-/usr/share/aclocal-1.10
-/usr/share/aclocal-1.10/amversion.m4
-/usr/share/aclocal-1.10/as.m4
-/usr/share/aclocal-1.10/auxdir.m4
-/usr/share/aclocal-1.10/ccstdc.m4
-/usr/share/aclocal-1.10/cond.m4
-/usr/share/aclocal-1.10/depend.m4
-/usr/share/aclocal-1.10/depout.m4
-/usr/share/aclocal-1.10/dmalloc.m4
-/usr/share/aclocal-1.10/gcj.m4
-/usr/share/aclocal-1.10/header.m4
-/usr/share/aclocal-1.10/init.m4
-/usr/share/aclocal-1.10/install-sh.m4
-/usr/share/aclocal-1.10/lead-dot.m4
-/usr/share/aclocal-1.10/lex.m4
-/usr/share/aclocal-1.10/lispdir.m4
-/usr/share/aclocal-1.10/maintainer.m4
-/usr/share/aclocal-1.10/make.m4
-/usr/share/aclocal-1.10/minuso.m4
-/usr/share/aclocal-1.10/missing.m4
-/usr/share/aclocal-1.10/mkdirp.m4
-/usr/share/aclocal-1.10/multi.m4
-/usr/share/aclocal-1.10/obsol-gt.m4
-/usr/share/aclocal-1.10/obsol-lt.m4
-/usr/share/aclocal-1.10/obsolete.m4
-/usr/share/aclocal-1.10/options.m4
-/usr/share/aclocal-1.10/protos.m4
-/usr/share/aclocal-1.10/python.m4
-/usr/share/aclocal-1.10/regex.m4
-/usr/share/aclocal-1.10/runlog.m4
-/usr/share/aclocal-1.10/sanity.m4
-/usr/share/aclocal-1.10/strip.m4
-/usr/share/aclocal-1.10/substnot.m4
-/usr/share/aclocal-1.10/tar.m4
-/usr/share/aclocal-1.10/upc.m4
-/usr/share/automake
-/usr/share/automake-1.10
-/usr/share/automake-1.10/Automake
-/usr/share/automake-1.10/Automake/ChannelDefs.pm
-/usr/share/automake-1.10/Automake/Channels.pm
-/usr/share/automake-1.10/Automake/Condition.pm
-/usr/share/automake-1.10/Automake/Config.pm
-/usr/share/automake-1.10/Automake/Configure_ac.pm
-/usr/share/automake-1.10/Automake/DisjConditions.pm
-/usr/share/automake-1.10/Automake/FileUtils.pm
-/usr/share/automake-1.10/Automake/General.pm
-/usr/share/automake-1.10/Automake/Item.pm
-/usr/share/automake-1.10/Automake/ItemDef.pm
-/usr/share/automake-1.10/Automake/Location.pm
-/usr/share/automake-1.10/Automake/Options.pm
-/usr/share/automake-1.10/Automake/Rule.pm
-/usr/share/automake-1.10/Automake/RuleDef.pm
-/usr/share/automake-1.10/Automake/Struct.pm
-/usr/share/automake-1.10/Automake/VarDef.pm
-/usr/share/automake-1.10/Automake/Variable.pm
-/usr/share/automake-1.10/Automake/Version.pm
-/usr/share/automake-1.10/Automake/Wrap.pm
-/usr/share/automake-1.10/Automake/XFile.pm
-/usr/share/automake-1.10/COPYING
-/usr/share/automake-1.10/INSTALL
-/usr/share/automake-1.10/acinstall
-/usr/share/automake-1.10/am
-/usr/share/automake-1.10/am/ansi2knr.am
-/usr/share/automake-1.10/am/check.am
-/usr/share/automake-1.10/am/clean-hdr.am
-/usr/share/automake-1.10/am/clean.am
-/usr/share/automake-1.10/am/compile.am
-/usr/share/automake-1.10/am/configure.am
-/usr/share/automake-1.10/am/data.am
-/usr/share/automake-1.10/am/dejagnu.am
-/usr/share/automake-1.10/am/depend.am
-/usr/share/automake-1.10/am/depend2.am
-/usr/share/automake-1.10/am/distdir.am
-/usr/share/automake-1.10/am/footer.am
-/usr/share/automake-1.10/am/header-vars.am
-/usr/share/automake-1.10/am/header.am
-/usr/share/automake-1.10/am/inst-vars.am
-/usr/share/automake-1.10/am/install.am
-/usr/share/automake-1.10/am/java.am
-/usr/share/automake-1.10/am/lang-compile.am
-/usr/share/automake-1.10/am/lex.am
-/usr/share/automake-1.10/am/library.am
-/usr/share/automake-1.10/am/libs.am
-/usr/share/automake-1.10/am/libtool.am
-/usr/share/automake-1.10/am/lisp.am
-/usr/share/automake-1.10/am/ltlib.am
-/usr/share/automake-1.10/am/ltlibrary.am
-/usr/share/automake-1.10/am/mans-vars.am
-/usr/share/automake-1.10/am/mans.am
-/usr/share/automake-1.10/am/multilib.am
-/usr/share/automake-1.10/am/program.am
-/usr/share/automake-1.10/am/progs.am
-/usr/share/automake-1.10/am/python.am
-/usr/share/automake-1.10/am/remake-hdr.am
-/usr/share/automake-1.10/am/scripts.am
-/usr/share/automake-1.10/am/subdirs.am
-/usr/share/automake-1.10/am/tags.am
-/usr/share/automake-1.10/am/texi-vers.am
-/usr/share/automake-1.10/am/texibuild.am
-/usr/share/automake-1.10/am/texinfos.am
-/usr/share/automake-1.10/am/yacc.am
-/usr/share/automake-1.10/ansi2knr.1
-/usr/share/automake-1.10/ansi2knr.c
-/usr/share/automake-1.10/compile
-/usr/share/automake-1.10/config-ml.in
-/usr/share/automake-1.10/config.guess
-/usr/share/automake-1.10/config.sub
-/usr/share/automake-1.10/depcomp
-/usr/share/automake-1.10/elisp-comp
-/usr/share/automake-1.10/install-sh
-/usr/share/automake-1.10/mdate-sh
-/usr/share/automake-1.10/missing
-/usr/share/automake-1.10/mkinstalldirs
-/usr/share/automake-1.10/py-compile
-/usr/share/automake-1.10/symlink-tree
-/usr/share/automake-1.10/texinfo.tex
-/usr/share/automake-1.10/ylwrap
-/usr/share/doc
-/usr/share/doc/automake
-/usr/share/doc/automake/amhello-1.0.tar.gz
-/usr/share/info
-/usr/share/info/automake.info
-/usr/share/info/automake.info-1
-/usr/share/info/automake.info-2
-/var/log/sorcery/compile/automake-1.10.bz2
-/var/log/sorcery/install/automake-1.10
-/var/log/sorcery/md5sum/automake-1.10
diff --git a/cauldron/cleaners/bin86-clean b/cauldron/cleaners/bin86-clean
deleted file mode 100644
index e80701a..0000000
--- a/cauldron/cleaners/bin86-clean
+++ /dev/null
@@ -1,10 +0,0 @@
-/usr/bin/as86
-/usr/bin/ld86
-/usr/bin/nm86
-/usr/bin/objdump86
-/usr/bin/size86
-/usr/share/man/man1/as86.1
-/usr/share/man/man1/ld86.1
-/var/log/sorcery/compile/bin86-0.16.17.bz2
-/var/log/sorcery/install/bin86-0.16.17
-/var/log/sorcery/md5sum/bin86-0.16.17
diff --git a/cauldron/cleaners/binutils-clean
b/cauldron/cleaners/binutils-clean
deleted file mode 100644
index 38d9508..0000000
--- a/cauldron/cleaners/binutils-clean
+++ /dev/null
@@ -1,140 +0,0 @@
-/usr
-/usr/bin/addr2line
-/usr/bin/ar
-/usr/bin/as
-/usr/bin/c++filt
-/usr/bin/gprof
-/usr/bin/ld
-/usr/bin/nm
-/usr/bin/objcopy
-/usr/bin/objdump
-/usr/bin/ranlib
-/usr/bin/readelf
-/usr/bin/size
-/usr/bin/strings
-/usr/bin/strip
-/usr/i486-pc-linux-gnu
-/usr/i486-pc-linux-gnu/bin
-/usr/i486-pc-linux-gnu/bin/ar
-/usr/i486-pc-linux-gnu/bin/as
-/usr/i486-pc-linux-gnu/bin/ld
-/usr/i486-pc-linux-gnu/bin/nm
-/usr/i486-pc-linux-gnu/bin/objdump
-/usr/i486-pc-linux-gnu/bin/ranlib
-/usr/i486-pc-linux-gnu/bin/strip
-/usr/i486-pc-linux-gnu/lib
-/usr/i486-pc-linux-gnu/lib/ldscripts
-/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.x
-/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xbn
-/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xc
-/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xd
-/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xdc
-/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xdw
-/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xn
-/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xr
-/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xs
-/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xsc
-/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xsw
-/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xu
-/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xw
-/usr/i486-pc-linux-gnu/lib/ldscripts/i386linux.x
-/usr/i486-pc-linux-gnu/lib/ldscripts/i386linux.xbn
-/usr/i486-pc-linux-gnu/lib/ldscripts/i386linux.xn
-/usr/i486-pc-linux-gnu/lib/ldscripts/i386linux.xr
-/usr/i486-pc-linux-gnu/lib/ldscripts/i386linux.xu
-/usr/include/ansidecl.h
-/usr/include/bfd.h
-/usr/include/bfdlink.h
-/usr/include/dis-asm.h
-/usr/include/symcat.h
-/usr/lib/libbfd-2.17.so
-/usr/lib/libbfd.la
-/usr/lib/libbfd.so
-/usr/lib/libopcodes-2.17.so
-/usr/lib/libopcodes.la
-/usr/lib/libopcodes.so
-/usr/share/info/as.info
-/usr/share/info/bfd.info
-/usr/share/info/binutils.info
-/usr/share/info/configure.info
-/usr/share/info/gprof.info
-/usr/share/info/ld.info
-/usr/share/locale/da/LC_MESSAGES/bfd.mo
-/usr/share/locale/da/LC_MESSAGES/binutils.mo
-/usr/share/locale/da/LC_MESSAGES/gprof.mo
-/usr/share/locale/da/LC_MESSAGES/ld.mo
-/usr/share/locale/da/LC_MESSAGES/opcodes.mo
-/usr/share/locale/de/LC_MESSAGES/gprof.mo
-/usr/share/locale/de/LC_MESSAGES/opcodes.mo
-/usr/share/locale/es/LC_MESSAGES/bfd.mo
-/usr/share/locale/es/LC_MESSAGES/binutils.mo
-/usr/share/locale/es/LC_MESSAGES/gas.mo
-/usr/share/locale/es/LC_MESSAGES/gprof.mo
-/usr/share/locale/es/LC_MESSAGES/ld.mo
-/usr/share/locale/es/LC_MESSAGES/opcodes.mo
-/usr/share/locale/fi/LC_MESSAGES/binutils.mo
-/usr/share/locale/fi/LC_MESSAGES/opcodes.mo
-/usr/share/locale/fr/LC_MESSAGES/bfd.mo
-/usr/share/locale/fr/LC_MESSAGES/binutils.mo
-/usr/share/locale/fr/LC_MESSAGES/gas.mo
-/usr/share/locale/fr/LC_MESSAGES/gprof.mo
-/usr/share/locale/fr/LC_MESSAGES/ld.mo
-/usr/share/locale/fr/LC_MESSAGES/opcodes.mo
-/usr/share/locale/ga/LC_MESSAGES/gprof.mo
-/usr/share/locale/ga/LC_MESSAGES/opcodes.mo
-/usr/share/locale/id/LC_MESSAGES/gprof.mo
-/usr/share/locale/id/LC_MESSAGES/opcodes.mo
-/usr/share/locale/ja/LC_MESSAGES/bfd.mo
-/usr/share/locale/ja/LC_MESSAGES/binutils.mo
-/usr/share/locale/nl/LC_MESSAGES/opcodes.mo
-/usr/share/locale/pt_BR/LC_MESSAGES/gprof.mo
-/usr/share/locale/pt_BR/LC_MESSAGES/opcodes.mo
-/usr/share/locale/ro/LC_MESSAGES/bfd.mo
-/usr/share/locale/ro/LC_MESSAGES/binutils.mo
-/usr/share/locale/ro/LC_MESSAGES/opcodes.mo
-/usr/share/locale/ru/LC_MESSAGES/binutils.mo
-/usr/share/locale/rw/LC_MESSAGES/bfd.mo
-/usr/share/locale/rw/LC_MESSAGES/binutils.mo
-/usr/share/locale/rw/LC_MESSAGES/gas.mo
-/usr/share/locale/rw/LC_MESSAGES/gprof.mo
-/usr/share/locale/sv/LC_MESSAGES/bfd.mo
-/usr/share/locale/sv/LC_MESSAGES/binutils.mo
-/usr/share/locale/sv/LC_MESSAGES/gprof.mo
-/usr/share/locale/sv/LC_MESSAGES/ld.mo
-/usr/share/locale/sv/LC_MESSAGES/opcodes.mo
-/usr/share/locale/tr/LC_MESSAGES/bfd.mo
-/usr/share/locale/tr/LC_MESSAGES/binutils.mo
-/usr/share/locale/tr/LC_MESSAGES/gas.mo
-/usr/share/locale/tr/LC_MESSAGES/gprof.mo
-/usr/share/locale/tr/LC_MESSAGES/ld.mo
-/usr/share/locale/tr/LC_MESSAGES/opcodes.mo
-/usr/share/locale/vi/LC_MESSAGES/bfd.mo
-/usr/share/locale/vi/LC_MESSAGES/binutils.mo
-/usr/share/locale/vi/LC_MESSAGES/gprof.mo
-/usr/share/locale/vi/LC_MESSAGES/ld.mo
-/usr/share/locale/vi/LC_MESSAGES/opcodes.mo
-/usr/share/locale/zh_CN/LC_MESSAGES/bfd.mo
-/usr/share/locale/zh_CN/LC_MESSAGES/binutils.mo
-/usr/share/locale/zh_CN/LC_MESSAGES/ld.mo
-/usr/share/locale/zh_CN/LC_MESSAGES/opcodes.mo
-/usr/share/locale/zh_TW/LC_MESSAGES/binutils.mo
-/usr/share/man/man1/addr2line.1
-/usr/share/man/man1/ar.1
-/usr/share/man/man1/as.1
-/usr/share/man/man1/c++filt.1
-/usr/share/man/man1/dlltool.1
-/usr/share/man/man1/gprof.1
-/usr/share/man/man1/ld.1
-/usr/share/man/man1/nlmconv.1
-/usr/share/man/man1/nm.1
-/usr/share/man/man1/objcopy.1
-/usr/share/man/man1/objdump.1
-/usr/share/man/man1/ranlib.1
-/usr/share/man/man1/readelf.1
-/usr/share/man/man1/size.1
-/usr/share/man/man1/strings.1
-/usr/share/man/man1/strip.1
-/usr/share/man/man1/windres.1
-/var/log/sorcery/compile/binutils-2.17.bz2
-/var/log/sorcery/install/binutils-2.17
-/var/log/sorcery/md5sum/binutils-2.17
diff --git a/cauldron/cleaners/bison-clean b/cauldron/cleaners/bison-clean
deleted file mode 100644
index e8cc4ba..0000000
--- a/cauldron/cleaners/bison-clean
+++ /dev/null
@@ -1,66 +0,0 @@
-/usr
-/usr/bin/bison
-/usr/bin/yacc
-/usr/lib/liby.a
-/usr/share
-/usr/share/aclocal/bison-i18n.m4
-/usr/share/bison
-/usr/share/bison/README
-/usr/share/bison/c++.m4
-/usr/share/bison/c.m4
-/usr/share/bison/glr.c
-/usr/share/bison/glr.cc
-/usr/share/bison/lalr1.cc
-/usr/share/bison/location.cc
-/usr/share/bison/m4sugar
-/usr/share/bison/m4sugar/m4sugar.m4
-/usr/share/bison/yacc.c
-/usr/share/info/bison.info
-/usr/share/locale/da/LC_MESSAGES/bison-runtime.mo
-/usr/share/locale/da/LC_MESSAGES/bison.mo
-/usr/share/locale/de/LC_MESSAGES/bison-runtime.mo
-/usr/share/locale/de/LC_MESSAGES/bison.mo
-/usr/share/locale/es/LC_MESSAGES/bison-runtime.mo
-/usr/share/locale/es/LC_MESSAGES/bison.mo
-/usr/share/locale/et/LC_MESSAGES/bison-runtime.mo
-/usr/share/locale/et/LC_MESSAGES/bison.mo
-/usr/share/locale/fr/LC_MESSAGES/bison-runtime.mo
-/usr/share/locale/fr/LC_MESSAGES/bison.mo
-/usr/share/locale/ga/LC_MESSAGES/bison-runtime.mo
-/usr/share/locale/ga/LC_MESSAGES/bison.mo
-/usr/share/locale/hr/LC_MESSAGES/bison-runtime.mo
-/usr/share/locale/hr/LC_MESSAGES/bison.mo
-/usr/share/locale/id/LC_MESSAGES/bison-runtime.mo
-/usr/share/locale/id/LC_MESSAGES/bison.mo
-/usr/share/locale/it/LC_MESSAGES/bison-runtime.mo
-/usr/share/locale/it/LC_MESSAGES/bison.mo
-/usr/share/locale/ja/LC_MESSAGES/bison-runtime.mo
-/usr/share/locale/ja/LC_MESSAGES/bison.mo
-/usr/share/locale/ms/LC_MESSAGES/bison-runtime.mo
-/usr/share/locale/ms/LC_MESSAGES/bison.mo
-/usr/share/locale/nb/LC_MESSAGES/bison-runtime.mo
-/usr/share/locale/nb/LC_MESSAGES/bison.mo
-/usr/share/locale/nl/LC_MESSAGES/bison-runtime.mo
-/usr/share/locale/nl/LC_MESSAGES/bison.mo
-/usr/share/locale/pl/LC_MESSAGES/bison-runtime.mo
-/usr/share/locale/pl/LC_MESSAGES/bison.mo
-/usr/share/locale/pt_BR/LC_MESSAGES/bison-runtime.mo
-/usr/share/locale/pt_BR/LC_MESSAGES/bison.mo
-/usr/share/locale/ro/LC_MESSAGES/bison-runtime.mo
-/usr/share/locale/ro/LC_MESSAGES/bison.mo
-/usr/share/locale/ru/LC_MESSAGES/bison-runtime.mo
-/usr/share/locale/ru/LC_MESSAGES/bison.mo
-/usr/share/locale/rw/LC_MESSAGES/bison-runtime.mo
-/usr/share/locale/rw/LC_MESSAGES/bison.mo
-/usr/share/locale/sl/LC_MESSAGES/bison-runtime.mo
-/usr/share/locale/sv/LC_MESSAGES/bison-runtime.mo
-/usr/share/locale/sv/LC_MESSAGES/bison.mo
-/usr/share/locale/tr/LC_MESSAGES/bison-runtime.mo
-/usr/share/locale/tr/LC_MESSAGES/bison.mo
-/usr/share/locale/vi/LC_MESSAGES/bison-runtime.mo
-/usr/share/locale/vi/LC_MESSAGES/bison.mo
-/usr/share/locale/zh_TW/LC_MESSAGES/bison-runtime.mo
-/usr/share/man/man1/bison.1
-/var/log/sorcery/compile/bison-2.3.bz2
-/var/log/sorcery/install/bison-2.3
-/var/log/sorcery/md5sum/bison-2.3
diff --git a/cauldron/cleaners/flex-clean b/cauldron/cleaners/flex-clean
deleted file mode 100644
index 8448ceb..0000000
--- a/cauldron/cleaners/flex-clean
+++ /dev/null
@@ -1,32 +0,0 @@
-/usr/bin/flex
-/usr/bin/lex
-/usr/include/FlexLexer.h
-/usr/lib/libfl.a
-/usr/share/info/flex.info
-/usr/share/info/flex.info-1
-/usr/share/info/flex.info-2
-/usr/share/info/flex.info-3
-/usr/share/info/flex.info-4
-/usr/share/info/flex.info-5
-/usr/share/info/flex.info-6
-/usr/share/info/flex.info-7
-/usr/share/locale/ca/LC_MESSAGES/flex.mo
-/usr/share/locale/da/LC_MESSAGES/flex.mo
-/usr/share/locale/de/LC_MESSAGES/flex.mo
-/usr/share/locale/es/LC_MESSAGES/flex.mo
-/usr/share/locale/fr/LC_MESSAGES/flex.mo
-/usr/share/locale/ga/LC_MESSAGES/flex.mo
-/usr/share/locale/ko/LC_MESSAGES/flex.mo
-/usr/share/locale/nl/LC_MESSAGES/flex.mo
-/usr/share/locale/pl/LC_MESSAGES/flex.mo
-/usr/share/locale/pt_BR/LC_MESSAGES/flex.mo
-/usr/share/locale/ro/LC_MESSAGES/flex.mo
-/usr/share/locale/ru/LC_MESSAGES/flex.mo
-/usr/share/locale/sv/LC_MESSAGES/flex.mo
-/usr/share/locale/tr/LC_MESSAGES/flex.mo
-/usr/share/locale/vi/LC_MESSAGES/flex.mo
-/usr/share/locale/zh_CN/LC_MESSAGES/flex.mo
-/usr/share/man/man1/flex.1
-/var/log/sorcery/compile/flex-2.5.33.bz2
-/var/log/sorcery/install/flex-2.5.33
-/var/log/sorcery/md5sum/flex-2.5.33
diff --git a/cauldron/cleaners/g++-clean b/cauldron/cleaners/g++-clean
deleted file mode 100644
index 51a1de2..0000000
--- a/cauldron/cleaners/g++-clean
+++ /dev/null
@@ -1,524 +0,0 @@
-/usr
-/usr/bin/c++
-/usr/bin/g++
-/usr/bin/i486-pc-linux-gnu-c++
-/usr/bin/i486-pc-linux-gnu-g++
-/usr/include
-/usr/include/c++
-/usr/include/c++/4.1.2
-/usr/include/c++/4.1.2/algorithm
-/usr/include/c++/4.1.2/backward
-/usr/include/c++/4.1.2/backward/algo.h
-/usr/include/c++/4.1.2/backward/algobase.h
-/usr/include/c++/4.1.2/backward/alloc.h
-/usr/include/c++/4.1.2/backward/backward_warning.h
-/usr/include/c++/4.1.2/backward/bvector.h
-/usr/include/c++/4.1.2/backward/complex.h
-/usr/include/c++/4.1.2/backward/defalloc.h
-/usr/include/c++/4.1.2/backward/deque.h
-/usr/include/c++/4.1.2/backward/fstream.h
-/usr/include/c++/4.1.2/backward/function.h
-/usr/include/c++/4.1.2/backward/hash_map.h
-/usr/include/c++/4.1.2/backward/hash_set.h
-/usr/include/c++/4.1.2/backward/hashtable.h
-/usr/include/c++/4.1.2/backward/heap.h
-/usr/include/c++/4.1.2/backward/iomanip.h
-/usr/include/c++/4.1.2/backward/iostream.h
-/usr/include/c++/4.1.2/backward/istream.h
-/usr/include/c++/4.1.2/backward/iterator.h
-/usr/include/c++/4.1.2/backward/list.h
-/usr/include/c++/4.1.2/backward/map.h
-/usr/include/c++/4.1.2/backward/multimap.h
-/usr/include/c++/4.1.2/backward/multiset.h
-/usr/include/c++/4.1.2/backward/new.h
-/usr/include/c++/4.1.2/backward/ostream.h
-/usr/include/c++/4.1.2/backward/pair.h
-/usr/include/c++/4.1.2/backward/queue.h
-/usr/include/c++/4.1.2/backward/rope.h
-/usr/include/c++/4.1.2/backward/set.h
-/usr/include/c++/4.1.2/backward/slist.h
-/usr/include/c++/4.1.2/backward/stack.h
-/usr/include/c++/4.1.2/backward/stream.h
-/usr/include/c++/4.1.2/backward/streambuf.h
-/usr/include/c++/4.1.2/backward/strstream
-/usr/include/c++/4.1.2/backward/tempbuf.h
-/usr/include/c++/4.1.2/backward/tree.h
-/usr/include/c++/4.1.2/backward/vector.h
-/usr/include/c++/4.1.2/bits
-/usr/include/c++/4.1.2/bits/allocator.h
-/usr/include/c++/4.1.2/bits/atomicity.h
-/usr/include/c++/4.1.2/bits/basic_ios.h
-/usr/include/c++/4.1.2/bits/basic_ios.tcc
-/usr/include/c++/4.1.2/bits/basic_string.h
-/usr/include/c++/4.1.2/bits/basic_string.tcc
-/usr/include/c++/4.1.2/bits/boost_concept_check.h
-/usr/include/c++/4.1.2/bits/char_traits.h
-/usr/include/c++/4.1.2/bits/cmath.tcc
-/usr/include/c++/4.1.2/bits/codecvt.h
-/usr/include/c++/4.1.2/bits/concept_check.h
-/usr/include/c++/4.1.2/bits/concurrence.h
-/usr/include/c++/4.1.2/bits/cpp_type_traits.h
-/usr/include/c++/4.1.2/bits/deque.tcc
-/usr/include/c++/4.1.2/bits/fstream.tcc
-/usr/include/c++/4.1.2/bits/functexcept.h
-/usr/include/c++/4.1.2/bits/gslice.h
-/usr/include/c++/4.1.2/bits/gslice_array.h
-/usr/include/c++/4.1.2/bits/indirect_array.h
-/usr/include/c++/4.1.2/bits/ios_base.h
-/usr/include/c++/4.1.2/bits/istream.tcc
-/usr/include/c++/4.1.2/bits/list.tcc
-/usr/include/c++/4.1.2/bits/locale_classes.h
-/usr/include/c++/4.1.2/bits/locale_facets.h
-/usr/include/c++/4.1.2/bits/locale_facets.tcc
-/usr/include/c++/4.1.2/bits/localefwd.h
-/usr/include/c++/4.1.2/bits/mask_array.h
-/usr/include/c++/4.1.2/bits/ostream.tcc
-/usr/include/c++/4.1.2/bits/postypes.h
-/usr/include/c++/4.1.2/bits/slice_array.h
-/usr/include/c++/4.1.2/bits/sstream.tcc
-/usr/include/c++/4.1.2/bits/stl_algo.h
-/usr/include/c++/4.1.2/bits/stl_algobase.h
-/usr/include/c++/4.1.2/bits/stl_bvector.h
-/usr/include/c++/4.1.2/bits/stl_construct.h
-/usr/include/c++/4.1.2/bits/stl_deque.h
-/usr/include/c++/4.1.2/bits/stl_function.h
-/usr/include/c++/4.1.2/bits/stl_heap.h
-/usr/include/c++/4.1.2/bits/stl_iterator.h
-/usr/include/c++/4.1.2/bits/stl_iterator_base_funcs.h
-/usr/include/c++/4.1.2/bits/stl_iterator_base_types.h
-/usr/include/c++/4.1.2/bits/stl_list.h
-/usr/include/c++/4.1.2/bits/stl_map.h
-/usr/include/c++/4.1.2/bits/stl_multimap.h
-/usr/include/c++/4.1.2/bits/stl_multiset.h
-/usr/include/c++/4.1.2/bits/stl_numeric.h
-/usr/include/c++/4.1.2/bits/stl_pair.h
-/usr/include/c++/4.1.2/bits/stl_queue.h
-/usr/include/c++/4.1.2/bits/stl_raw_storage_iter.h
-/usr/include/c++/4.1.2/bits/stl_relops.h
-/usr/include/c++/4.1.2/bits/stl_set.h
-/usr/include/c++/4.1.2/bits/stl_stack.h
-/usr/include/c++/4.1.2/bits/stl_tempbuf.h
-/usr/include/c++/4.1.2/bits/stl_tree.h
-/usr/include/c++/4.1.2/bits/stl_uninitialized.h
-/usr/include/c++/4.1.2/bits/stl_vector.h
-/usr/include/c++/4.1.2/bits/stream_iterator.h
-/usr/include/c++/4.1.2/bits/streambuf.tcc
-/usr/include/c++/4.1.2/bits/streambuf_iterator.h
-/usr/include/c++/4.1.2/bits/stringfwd.h
-/usr/include/c++/4.1.2/bits/valarray_after.h
-/usr/include/c++/4.1.2/bits/valarray_array.h
-/usr/include/c++/4.1.2/bits/valarray_array.tcc
-/usr/include/c++/4.1.2/bits/valarray_before.h
-/usr/include/c++/4.1.2/bits/vector.tcc
-/usr/include/c++/4.1.2/bitset
-/usr/include/c++/4.1.2/cassert
-/usr/include/c++/4.1.2/cctype
-/usr/include/c++/4.1.2/cerrno
-/usr/include/c++/4.1.2/cfloat
-/usr/include/c++/4.1.2/ciso646
-/usr/include/c++/4.1.2/climits
-/usr/include/c++/4.1.2/clocale
-/usr/include/c++/4.1.2/cmath
-/usr/include/c++/4.1.2/complex
-/usr/include/c++/4.1.2/csetjmp
-/usr/include/c++/4.1.2/csignal
-/usr/include/c++/4.1.2/cstdarg
-/usr/include/c++/4.1.2/cstddef
-/usr/include/c++/4.1.2/cstdio
-/usr/include/c++/4.1.2/cstdlib
-/usr/include/c++/4.1.2/cstring
-/usr/include/c++/4.1.2/ctime
-/usr/include/c++/4.1.2/cwchar
-/usr/include/c++/4.1.2/cwctype
-/usr/include/c++/4.1.2/cxxabi.h
-/usr/include/c++/4.1.2/debug
-/usr/include/c++/4.1.2/debug/bitset
-/usr/include/c++/4.1.2/debug/debug.h
-/usr/include/c++/4.1.2/debug/deque
-/usr/include/c++/4.1.2/debug/formatter.h
-/usr/include/c++/4.1.2/debug/functions.h
-/usr/include/c++/4.1.2/debug/hash_map
-/usr/include/c++/4.1.2/debug/hash_map.h
-/usr/include/c++/4.1.2/debug/hash_multimap.h
-/usr/include/c++/4.1.2/debug/hash_multiset.h
-/usr/include/c++/4.1.2/debug/hash_set
-/usr/include/c++/4.1.2/debug/hash_set.h
-/usr/include/c++/4.1.2/debug/list
-/usr/include/c++/4.1.2/debug/macros.h
-/usr/include/c++/4.1.2/debug/map
-/usr/include/c++/4.1.2/debug/map.h
-/usr/include/c++/4.1.2/debug/multimap.h
-/usr/include/c++/4.1.2/debug/multiset.h
-/usr/include/c++/4.1.2/debug/safe_base.h
-/usr/include/c++/4.1.2/debug/safe_iterator.h
-/usr/include/c++/4.1.2/debug/safe_iterator.tcc
-/usr/include/c++/4.1.2/debug/safe_sequence.h
-/usr/include/c++/4.1.2/debug/set
-/usr/include/c++/4.1.2/debug/set.h
-/usr/include/c++/4.1.2/debug/string
-/usr/include/c++/4.1.2/debug/vector
-/usr/include/c++/4.1.2/deque
-/usr/include/c++/4.1.2/exception
-/usr/include/c++/4.1.2/exception_defines.h
-/usr/include/c++/4.1.2/ext
-/usr/include/c++/4.1.2/ext/algorithm
-/usr/include/c++/4.1.2/ext/array_allocator.h
-/usr/include/c++/4.1.2/ext/bitmap_allocator.h
-/usr/include/c++/4.1.2/ext/codecvt_specializations.h
-/usr/include/c++/4.1.2/ext/debug_allocator.h
-/usr/include/c++/4.1.2/ext/functional
-/usr/include/c++/4.1.2/ext/hash_fun.h
-/usr/include/c++/4.1.2/ext/hash_map
-/usr/include/c++/4.1.2/ext/hash_set
-/usr/include/c++/4.1.2/ext/hashtable.h
-/usr/include/c++/4.1.2/ext/iterator
-/usr/include/c++/4.1.2/ext/malloc_allocator.h
-/usr/include/c++/4.1.2/ext/memory
-/usr/include/c++/4.1.2/ext/mt_allocator.h
-/usr/include/c++/4.1.2/ext/new_allocator.h
-/usr/include/c++/4.1.2/ext/numeric
-/usr/include/c++/4.1.2/ext/pb_assoc
-/usr/include/c++/4.1.2/ext/pb_assoc/assoc_cntnr.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/data_type.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/assoc_cntnr_base.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_assoc_cntnr
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_assoc_cntnr/constructor_destructor_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_assoc_cntnr/constructors_destructor_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_assoc_cntnr/d_extract_key.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_assoc_cntnr/d_find_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_assoc_cntnr/d_insert_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_assoc_cntnr/erase_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_assoc_cntnr/extract_key.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_assoc_cntnr/info_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_assoc_cntnr/insert_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_assoc_cntnr/iterators_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_hash_assoc_cntnr
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_hash_assoc_cntnr/constructors_destructor_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_hash_assoc_cntnr/resize_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_tree_assoc_cntnr
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_tree_assoc_cntnr/constructor_destructor_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_tree_assoc_cntnr/constructors_destructor_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_tree_assoc_cntnr/erase_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_tree_assoc_cntnr/node_iteration_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_tree_assoc_cntnr/policy_access_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_tree_assoc_cntnr/r_erase_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_tree_assoc_cntnr/r_range_iteration_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_tree_assoc_cntnr/range_iteration_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_tree_assoc_cntnr/split_join_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/bin_search_tree_.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/cond_dtor_entry_dealtor.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/cond_key_dtor_entry_dealtor.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/debug_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/erase_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/find_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/find_iterators.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/info_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/insert_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/iterators_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/node_iterators.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/r_erase_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/rotate_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/split_join_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_hash_assoc_cntnr
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/cc_ht_map_.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/cmp_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/cond_key_dtor_entry_dealtor.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/constructor_destructor_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/constructor_destructor_no_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/constructor_destructor_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/debug_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/debug_no_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/debug_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/entry_list_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/erase_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/erase_no_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/erase_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/find_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/find_no_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/find_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/info_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/insert_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/insert_no_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/insert_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/iterators_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/policy_access_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/resize_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/resize_no_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/resize_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/size_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/standard_policies.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/cond_dealtor.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/constructors_destructor_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/ds_trait_imp.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/eq_fn
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/eq_fn/eq_by_less.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/eq_fn/hash_eq_fn.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_hash_assoc_cntnr
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/constructor_destructor_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/constructor_destructor_no_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/constructor_destructor_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/debug_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/debug_no_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/debug_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/erase_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/erase_no_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/erase_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/find_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/find_no_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/find_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/gp_ht_map_.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/info_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/insert_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/insert_no_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/insert_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/iterator_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/policy_access_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/resize_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/resize_no_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/resize_store_hash_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/hash_fn
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/hash_fn/direct_mask_range_hashing_imp.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/hash_fn/direct_mod_range_hashing_imp.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/hash_fn/linear_probe_fn_imp.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/hash_fn/mask_based_range_hashing.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/hash_fn/mod_based_range_hashing.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/hash_fn/probe_fn_base.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/hash_fn/quadratic_probe_fn_imp.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/hash_fn/ranged_hash_fn.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/hash_fn/ranged_probe_fn.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/hash_types_traits.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_assoc_cntnr
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_assoc_cntnr/constructor_destructor_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_assoc_cntnr/policy_access_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_map_
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_map_/constructor_destructor_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_map_/debug_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_map_/erase_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_map_/find_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_map_/info_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_map_/insert_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_map_/iterators_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_map_/lu_map_.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_map_/policy_access_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_policy
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_policy/counter_lu_metadata_imp.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_policy/counter_lu_policy_imp.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_policy/mtf_lu_policy_imp.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/map_debug_base.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/mapping_level_imp.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/ms_category_imp.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/ms_trait_imp.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/order_statistics_imp.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_/cond_dtor.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_/debug_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_/erase_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_/find_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_/info_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_/insert_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_/iterators_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_/node_iterators.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_/ov_tree_map_.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_/split_join_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/rb_tree_map_
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/rb_tree_map_/debug_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/rb_tree_map_/erase_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/rb_tree_map_/find_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/rb_tree_map_/info_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/rb_tree_map_/insert_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/rb_tree_map_/node.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/rb_tree_map_/rb_tree_.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/rb_tree_map_/split_join_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/resize_policy
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/resize_policy/cc_hash_max_collision_resize_trigger_imp.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/resize_policy/hash_exponential_size_policy_imp.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/resize_policy/hash_prime_size_policy_imp.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/resize_policy/hash_standard_resize_policy_imp.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/resize_policy/ht_prime_size_policy_imp.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/resize_policy/size_base.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/splay_tree_
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/splay_tree_/constructors_destructor_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/splay_tree_/debug_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/splay_tree_/erase_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/splay_tree_/find_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/splay_tree_/info_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/splay_tree_/insert_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/splay_tree_/node.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/splay_tree_/splay_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/splay_tree_/splay_tree_.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/splay_tree_/split_join_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/standard_policies.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/standard_sizes.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/tree_assoc_cntnr
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/tree_assoc_cntnr/constructor_destructor_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/tree_policy
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/tree_policy/null_node_updator_imp.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/tree_policy/order_statistics_imp.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/type_utils.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/typelist
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/typelist.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/typelist/typelist_append.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/typelist/typelist_apply.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/typelist/typelist_at_index.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/typelist/typelist_contains.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/typelist/typelist_filter.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/typelist/typelist_transform.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/typelist/typelist_typelist_append.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/types_traits.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/unordered_iterator
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/unordered_iterator/const_find_iterator.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/unordered_iterator/const_iterator.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/unordered_iterator/find_iterator.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/unordered_iterator/iterator.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/constructor_destructor_and_related.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/erase_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/erase_if_pred.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/find_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/info_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/insert_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/invalidation_guarantee_selector.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/it_value_type_traits.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/iterator.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/iterator_fn_imps.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/ref_pair.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/value_type_adapter.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/value_type_traits.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/ds_trait.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/exception.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/hash_policy.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/lu_policy.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/ms_trait.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/tree_policy.hpp
-/usr/include/c++/4.1.2/ext/pb_assoc/trivial_iterator_def.hpp
-/usr/include/c++/4.1.2/ext/pod_char_traits.h
-/usr/include/c++/4.1.2/ext/pool_allocator.h
-/usr/include/c++/4.1.2/ext/rb_tree
-/usr/include/c++/4.1.2/ext/rc_string_base.h
-/usr/include/c++/4.1.2/ext/rope
-/usr/include/c++/4.1.2/ext/ropeimpl.h
-/usr/include/c++/4.1.2/ext/slist
-/usr/include/c++/4.1.2/ext/sso_string_base.h
-/usr/include/c++/4.1.2/ext/stdio_filebuf.h
-/usr/include/c++/4.1.2/ext/stdio_sync_filebuf.h
-/usr/include/c++/4.1.2/ext/typelist.h
-/usr/include/c++/4.1.2/ext/vstring.h
-/usr/include/c++/4.1.2/ext/vstring.tcc
-/usr/include/c++/4.1.2/ext/vstring_fwd.h
-/usr/include/c++/4.1.2/ext/vstring_util.h
-/usr/include/c++/4.1.2/fstream
-/usr/include/c++/4.1.2/functional
-/usr/include/c++/4.1.2/i486-pc-linux-gnu
-/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits
-/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/atomic_word.h
-/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/basic_file.h
-/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/c++allocator.h
-/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/c++config.h
-/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/c++io.h
-/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/c++locale.h
-/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/cpu_defines.h
-/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/ctype_base.h
-/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/ctype_inline.h
-/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/ctype_noninline.h
-/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/cxxabi_tweaks.h
-/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/gthr-default.h
-/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/gthr-posix.h
-/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/gthr-single.h
-/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/gthr-tpf.h
-/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/gthr.h
-/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/messages_members.h
-/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/os_defines.h
-/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/stdc++.h.gch
-/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/stdc++.h.gch/O0g.gch
-/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/stdc++.h.gch/O2g.gch
-/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/time_members.h
-/usr/include/c++/4.1.2/iomanip
-/usr/include/c++/4.1.2/ios
-/usr/include/c++/4.1.2/iosfwd
-/usr/include/c++/4.1.2/iostream
-/usr/include/c++/4.1.2/istream
-/usr/include/c++/4.1.2/iterator
-/usr/include/c++/4.1.2/limits
-/usr/include/c++/4.1.2/list
-/usr/include/c++/4.1.2/locale
-/usr/include/c++/4.1.2/map
-/usr/include/c++/4.1.2/memory
-/usr/include/c++/4.1.2/new
-/usr/include/c++/4.1.2/numeric
-/usr/include/c++/4.1.2/ostream
-/usr/include/c++/4.1.2/queue
-/usr/include/c++/4.1.2/set
-/usr/include/c++/4.1.2/sstream
-/usr/include/c++/4.1.2/stack
-/usr/include/c++/4.1.2/stdexcept
-/usr/include/c++/4.1.2/streambuf
-/usr/include/c++/4.1.2/string
-/usr/include/c++/4.1.2/tr1
-/usr/include/c++/4.1.2/tr1/array
-/usr/include/c++/4.1.2/tr1/bind_iterate.h
-/usr/include/c++/4.1.2/tr1/bind_repeat.h
-/usr/include/c++/4.1.2/tr1/boost_shared_ptr.h
-/usr/include/c++/4.1.2/tr1/functional
-/usr/include/c++/4.1.2/tr1/functional_iterate.h
-/usr/include/c++/4.1.2/tr1/hashtable
-/usr/include/c++/4.1.2/tr1/memory
-/usr/include/c++/4.1.2/tr1/mu_iterate.h
-/usr/include/c++/4.1.2/tr1/ref_fwd.h
-/usr/include/c++/4.1.2/tr1/ref_wrap_iterate.h
-/usr/include/c++/4.1.2/tr1/repeat.h
-/usr/include/c++/4.1.2/tr1/tuple
-/usr/include/c++/4.1.2/tr1/tuple_iterate.h
-/usr/include/c++/4.1.2/tr1/type_traits
-/usr/include/c++/4.1.2/tr1/type_traits_fwd.h
-/usr/include/c++/4.1.2/tr1/unordered_map
-/usr/include/c++/4.1.2/tr1/unordered_set
-/usr/include/c++/4.1.2/tr1/utility
-/usr/include/c++/4.1.2/typeinfo
-/usr/include/c++/4.1.2/utility
-/usr/include/c++/4.1.2/valarray
-/usr/include/c++/4.1.2/vector
-/usr/lib
-/usr/lib/gcc
-/usr/lib/gcc/i486-pc-linux-gnu
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/specs-local
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/specs-local/specs_g++
-/usr/lib/libsupc++.a
-/usr/lib/libsupc++.la
-/usr/libexec/gcc/i486-pc-linux-gnu/4.1.2/cc1plus
-/usr/share
-/usr/share/doc
-/usr/share/doc/g++
-/usr/share/doc/g++/COPYING
-/usr/share/doc/g++/FAQ
-/usr/share/doc/g++/INSTALL
-/usr/share/doc/g++/INSTALL/README
-/usr/share/doc/g++/INSTALL/binaries.html
-/usr/share/doc/g++/INSTALL/build.html
-/usr/share/doc/g++/INSTALL/configure.html
-/usr/share/doc/g++/INSTALL/download.html
-/usr/share/doc/g++/INSTALL/finalinstall.html
-/usr/share/doc/g++/INSTALL/gfdl.html
-/usr/share/doc/g++/INSTALL/index.html
-/usr/share/doc/g++/INSTALL/old.html
-/usr/share/doc/g++/INSTALL/prerequisites.html
-/usr/share/doc/g++/INSTALL/specific.html
-/usr/share/doc/g++/INSTALL/test.html
-/usr/share/doc/g++/NEWS
-/usr/share/doc/g++/README
-/usr/share/doc/g++/README.SCO
-/usr/share/man/man1/g++.1
-/var/log/sorcery/compile/g++-4.1.2.bz2
-/var/log/sorcery/install/g++-4.1.2
-/var/log/sorcery/md5sum/g++-4.1.2
diff --git a/cauldron/cleaners/gcc-clean b/cauldron/cleaners/gcc-clean
deleted file mode 100644
index 8a9b788..0000000
--- a/cauldron/cleaners/gcc-clean
+++ /dev/null
@@ -1,154 +0,0 @@
-/lib/cpp
-/usr
-/usr/bin/cc
-/usr/bin/cpp
-/usr/bin/gcc
-/usr/bin/gccbug
-/usr/bin/gcov
-/usr/bin/i486-pc-linux-gnu-gcc
-/usr/bin/i486-pc-linux-gnu-gcc-4.1.2
-/usr/include
-/usr/include/mf-runtime.h
-/usr/lib
-/usr/lib/gcc
-/usr/lib/gcc/i486-pc-linux-gnu
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/crtbegin.o
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/crtbeginS.o
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/crtbeginT.o
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/crtend.o
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/crtendS.o
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/crtfastmath.o
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./README
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./emmintrin.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./fixed
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./float.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./iso646.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./limits.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./mm3dnow.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./mm_malloc.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./mmintrin.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./pmmintrin.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./stdarg.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./stdbool.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./stddef.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./syslimits.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./unwind.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./varargs.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./xmmintrin.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/README
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/emmintrin.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/fixed
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/float.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/iso646.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/limits.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/mm3dnow.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/mm_malloc.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/mmintrin.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/pmmintrin.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stdarg.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stdbool.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/syslimits.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/unwind.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/varargs.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/xmmintrin.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/gsyslimits.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/README
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/emmintrin.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/float.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/iso646.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/limits.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/mm3dnow.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/mm_malloc.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/mmintrin.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/pmmintrin.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/stdarg.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/stdbool.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/stddef.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/unwind.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/varargs.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/xmmintrin.h
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/macro_list
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/mkheaders.conf
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/libgcc.a
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/libgcc_eh.a
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/libgcov.a
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/specs
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/specs-local
-/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/specs-local/specs-gcc
-/usr/lib/libiberty.a
-/usr/lib/libmudflap.a
-/usr/lib/libmudflap.la
-/usr/lib/libmudflap.so
-/usr/lib/libmudflap.so.0
-/usr/lib/libmudflap.so.0.0.0
-/usr/lib/libmudflapth.a
-/usr/lib/libmudflapth.la
-/usr/lib/libmudflapth.so
-/usr/lib/libmudflapth.so.0
-/usr/lib/libmudflapth.so.0.0.0
-/usr/lib/libssp.a
-/usr/lib/libssp.la
-/usr/lib/libssp.so
-/usr/lib/libssp.so.0
-/usr/lib/libssp.so.0.0.0
-/usr/lib/libssp_nonshared.a
-/usr/lib/libssp_nonshared.la
-/usr/libexec
-/usr/libexec/gcc
-/usr/libexec/gcc/i486-pc-linux-gnu
-/usr/libexec/gcc/i486-pc-linux-gnu/4.1.2
-/usr/libexec/gcc/i486-pc-linux-gnu/4.1.2/cc1
-/usr/libexec/gcc/i486-pc-linux-gnu/4.1.2/collect2
-/usr/libexec/gcc/i486-pc-linux-gnu/4.1.2/install-tools
-/usr/libexec/gcc/i486-pc-linux-gnu/4.1.2/install-tools/fixinc.sh
-/usr/libexec/gcc/i486-pc-linux-gnu/4.1.2/install-tools/fixincl
-/usr/libexec/gcc/i486-pc-linux-gnu/4.1.2/install-tools/mkheaders
-/usr/share/info/cpp.info
-/usr/share/info/cppinternals.info
-/usr/share/info/gcc.info
-/usr/share/info/gccinstall.info
-/usr/share/info/gccint.info
-/usr/share/locale/be/LC_MESSAGES/cpplib.mo
-/usr/share/locale/be/LC_MESSAGES/gcc.mo
-/usr/share/locale/ca/LC_MESSAGES/cpplib.mo
-/usr/share/locale/ca/LC_MESSAGES/gcc.mo
-/usr/share/locale/da/LC_MESSAGES/cpplib.mo
-/usr/share/locale/da/LC_MESSAGES/gcc.mo
-/usr/share/locale/de/LC_MESSAGES/cpplib.mo
-/usr/share/locale/de/LC_MESSAGES/gcc.mo
-/usr/share/locale/el/LC_MESSAGES/cpplib.mo
-/usr/share/locale/el/LC_MESSAGES/gcc.mo
-/usr/share/locale/es/LC_MESSAGES/cpplib.mo
-/usr/share/locale/es/LC_MESSAGES/gcc.mo
-/usr/share/locale/fr/LC_MESSAGES/cpplib.mo
-/usr/share/locale/fr/LC_MESSAGES/gcc.mo
-/usr/share/locale/ja/LC_MESSAGES/cpplib.mo
-/usr/share/locale/ja/LC_MESSAGES/gcc.mo
-/usr/share/locale/nl/LC_MESSAGES/cpplib.mo
-/usr/share/locale/nl/LC_MESSAGES/gcc.mo
-/usr/share/locale/ru/LC_MESSAGES/gcc.mo
-/usr/share/locale/rw/LC_MESSAGES/cpplib.mo
-/usr/share/locale/rw/LC_MESSAGES/gcc.mo
-/usr/share/locale/sv/LC_MESSAGES/cpplib.mo
-/usr/share/locale/sv/LC_MESSAGES/gcc.mo
-/usr/share/locale/tr/LC_MESSAGES/cpplib.mo
-/usr/share/locale/tr/LC_MESSAGES/gcc.mo
-/usr/share/locale/vi/LC_MESSAGES/cpplib.mo
-/usr/share/locale/zh_CN/LC_MESSAGES/cpplib.mo
-/usr/share/locale/zh_CN/LC_MESSAGES/gcc.mo
-/usr/share/locale/zh_TW/LC_MESSAGES/cpplib.mo
-/usr/share/locale/zh_TW/LC_MESSAGES/gcc.mo
-/usr/share/man/man1/cpp.1
-/usr/share/man/man1/gcc.1
-/usr/share/man/man1/gcov.1
-/usr/share/man/man7/fsf-funding.7
-/usr/share/man/man7/gfdl.7
-/usr/share/man/man7/gpl.7
-/var/log/sorcery/compile/gcc-4.1.2.bz2
-/var/log/sorcery/install/gcc-4.1.2
-/var/log/sorcery/md5sum/gcc-4.1.2
diff --git a/cauldron/cleaners/grub-clean b/cauldron/cleaners/grub-clean
deleted file mode 100644
index 11c7c95..0000000
--- a/cauldron/cleaners/grub-clean
+++ /dev/null
@@ -1,44 +0,0 @@
-/boot
-/boot/grub
-/boot/grub/images
-/boot/grub/images/smgl-splash.xpm.gz
-/sbin
-/sbin/grub
-/sbin/grub-install
-/sbin/grub-md5-crypt
-/sbin/grub-set-default
-/sbin/grub-terminfo
-/usr
-/usr/bin
-/usr/bin/mbchk
-/usr/lib
-/usr/lib/grub
-/usr/lib/grub/i386-pc
-/usr/lib/grub/i386-pc/e2fs_stage1_5
-/usr/lib/grub/i386-pc/fat_stage1_5
-/usr/lib/grub/i386-pc/ffs_stage1_5
-/usr/lib/grub/i386-pc/iso9660_stage1_5
-/usr/lib/grub/i386-pc/jfs_stage1_5
-/usr/lib/grub/i386-pc/minix_stage1_5
-/usr/lib/grub/i386-pc/reiserfs_stage1_5
-/usr/lib/grub/i386-pc/stage1
-/usr/lib/grub/i386-pc/stage2
-/usr/lib/grub/i386-pc/stage2_eltorito
-/usr/lib/grub/i386-pc/ufs2_stage1_5
-/usr/lib/grub/i386-pc/vstafs_stage1_5
-/usr/lib/grub/i386-pc/xfs_stage1_5
-/usr/share
-/usr/share/info
-/usr/share/info/grub.info
-/usr/share/info/multiboot.info
-/usr/share/man
-/usr/share/man/man1
-/usr/share/man/man1/mbchk.1
-/usr/share/man/man8
-/usr/share/man/man8/grub-install.8
-/usr/share/man/man8/grub-md5-crypt.8
-/usr/share/man/man8/grub-terminfo.8
-/usr/share/man/man8/grub.8
-/var/log/sorcery/compile/grub-0.97.bz2
-/var/log/sorcery/install/grub-0.97
-/var/log/sorcery/md5sum/grub-0.97
diff --git a/cauldron/cleaners/installwatch-clean
b/cauldron/cleaners/installwatch-clean
deleted file mode 100644
index fb8c8aa..0000000
--- a/cauldron/cleaners/installwatch-clean
+++ /dev/null
@@ -1,5 +0,0 @@
-/usr/bin/installwatch
-/usr/lib/installwatch.so
-/var/log/sorcery/compile/installwatch-0.6.3.bz2
-/var/log/sorcery/install/installwatch-0.6.3
-/var/log/sorcery/md5sum/installwatch-0.6.3
diff --git a/cauldron/cleaners/libidn-clean b/cauldron/cleaners/libidn-clean
deleted file mode 100644
index 1208b12..0000000
--- a/cauldron/cleaners/libidn-clean
+++ /dev/null
@@ -1 +0,0 @@
-Install log for libidn does not exist
diff --git a/cauldron/cleaners/lilo-clean b/cauldron/cleaners/lilo-clean
deleted file mode 100644
index 309f7dd..0000000
--- a/cauldron/cleaners/lilo-clean
+++ /dev/null
@@ -1,52 +0,0 @@
-/boot
-/boot/boot.bmp
-/boot/diag1.img
-/etc
-/etc/lilo.raid.conf
-/etc/lilo.sample.conf
-/sbin
-/sbin/lilo
-/sbin/mkrescue
-/usr
-/usr/sbin
-/usr/sbin/keytab-lilo.pl
-/usr/share
-/usr/share/doc
-/usr/share/doc/lilo
-/usr/share/doc/lilo/CHANGES
-/usr/share/doc/lilo/COPYING
-/usr/share/doc/lilo/README
-/usr/share/doc/lilo/README.bitmaps
-/usr/share/doc/lilo/README.common.problems
-/usr/share/doc/lilo/README.disk
-/usr/share/doc/lilo/README.nokeyboard
-/usr/share/doc/lilo/README.pseudo
-/usr/share/doc/lilo/README.raid1
-/usr/share/doc/lilo/README.volumeID
-/usr/share/doc/lilo/doc
-/usr/share/doc/lilo/doc/Makefile
-/usr/share/doc/lilo/doc/README
-/usr/share/doc/lilo/doc/bootloader.fig
-/usr/share/doc/lilo/doc/bootloader.tex
-/usr/share/doc/lilo/doc/fullpage.sty
-/usr/share/doc/lilo/doc/image.fig
-/usr/share/doc/lilo/doc/image.tex
-/usr/share/doc/lilo/doc/map.fig
-/usr/share/doc/lilo/doc/map.tex
-/usr/share/doc/lilo/doc/other.fig
-/usr/share/doc/lilo/doc/other.tex
-/usr/share/doc/lilo/doc/parameter.fig
-/usr/share/doc/lilo/doc/parameter.tex
-/usr/share/doc/lilo/doc/rlatex
-/usr/share/doc/lilo/doc/t2a.pl
-/usr/share/doc/lilo/doc/tech.tex
-/usr/share/doc/lilo/doc/user.tex
-/usr/share/man
-/usr/share/man/man5
-/usr/share/man/man5/lilo.conf.5
-/usr/share/man/man8
-/usr/share/man/man8/lilo.8
-/usr/share/man/man8/mkrescue.8
-/var/log/sorcery/compile/lilo-22.8.bz2
-/var/log/sorcery/install/lilo-22.8
-/var/log/sorcery/md5sum/lilo-22.8
diff --git a/cauldron/cleaners/m4-clean b/cauldron/cleaners/m4-clean
deleted file mode 100644
index 00b4c81..0000000
--- a/cauldron/cleaners/m4-clean
+++ /dev/null
@@ -1,31 +0,0 @@
-/usr
-/usr/bin
-/usr/bin/m4
-/usr/share
-/usr/share/doc
-/usr/share/doc/m4
-/usr/share/doc/m4/COPYING
-/usr/share/doc/m4/NEWS
-/usr/share/doc/m4/README
-/usr/share/doc/m4/doc
-/usr/share/doc/m4/doc/Makefile
-/usr/share/doc/m4/doc/Makefile.am
-/usr/share/doc/m4/doc/Makefile.in
-/usr/share/doc/m4/doc/fdl.texi
-/usr/share/doc/m4/doc/gendocs_template
-/usr/share/doc/m4/doc/gpl-3.0.texi
-/usr/share/doc/m4/doc/m4.1
-/usr/share/doc/m4/doc/m4.info
-/usr/share/doc/m4/doc/m4.texinfo
-/usr/share/doc/m4/doc/mdate-sh
-/usr/share/doc/m4/doc/stamp-vti
-/usr/share/doc/m4/doc/texinfo.tex
-/usr/share/doc/m4/doc/version.texi
-/usr/share/info
-/usr/share/info/m4.info
-/usr/share/man
-/usr/share/man/man1
-/usr/share/man/man1/m4.1
-/var/log/sorcery/compile/m4-1.4.10.bz2
-/var/log/sorcery/install/m4-1.4.10
-/var/log/sorcery/md5sum/m4-1.4.10
diff --git a/cauldron/config/arch/host_arch.conf
b/cauldron/config/arch/host_arch.conf
deleted file mode 100644
index e92e843..0000000
--- a/cauldron/config/arch/host_arch.conf
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-
-# contains the arch info for the HOST
-CAULDRON_HOST_TRIPLE="${CAULDRON_HOST_TRIPLE:-}"
-
-CAULDRON_HOST_ARCH_PATH=$(grep 'ARCH_SPECS=' "$CAULDRON_HSORCERY_CONFIG" |
cut -d= -f2-)
-
-CAULDRON_HOST_CACHE_PATH="${CAULDRON_HOST_CACHE_PATH:-/var/cache/sorcery}"
-
-eval CAULDRON_HOST_ARCH=$(grep 'ARCHITECTURE=' "$CAULDRON_HSORCERY_CONFIG" |
cut -d= -f2-)
-
-eval CAULDRON_CACHE_EXTENSION=$(grep 'EXTENSION='
"$CAULDRON_HSORCERY_CONFIG" | cut -d= -f2-)
-
-
-# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/cauldron/config/arch/ppc.conf b/cauldron/config/arch/ppc.conf
deleted file mode 100644
index a30f03e..0000000
--- a/cauldron/config/arch/ppc.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-
-# the arch to generate the .iso for
-CAULDRON_ARCH="${CAULDRON_ARCH:-ppc}"
-
diff --git a/cauldron/config/arch/x86.conf b/cauldron/config/arch/x86.conf
deleted file mode 100644
index 0b4d32d..0000000
--- a/cauldron/config/arch/x86.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-
-# the arch to generate the .iso for
-CAULDRON_ARCH="${CAULDRON_ARCH:-x86}"
-
diff --git a/cauldron/config/arch/x86_64.conf
b/cauldron/config/arch/x86_64.conf
deleted file mode 100644
index 5134a8f..0000000
--- a/cauldron/config/arch/x86_64.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-
-# the arch to generate the .iso for
-CAULDRON_ARCH="${CAULDRON_ARCH:-x86_64}"
-
diff --git a/cauldron/config/build.conf b/cauldron/config/build.conf
deleted file mode 100644
index 0973385..0000000
--- a/cauldron/config/build.conf
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-
-# path to the ISO build chroots
-CAULDRON_BUILD="${CAULDRON_BUILD:-$CAULDRON_TMP/build}"
-
-# file listing all the spells needed for the build toolchain
-CAULDRON_TOOLCHAIN="${CAULDRON_TOOLCHAIN:-$CAULDRON_DATA/$CAULDRON_ARCH/toolchain}"
-
-# name of the local on-disk basesystem chroot image to use for the
-# baseroot method (i.e. cauldron_toolchain_baseroot)
-CAULDRON_BASEROOT="${CAULDRON_BASEROOT:-smgl-stable-0.47-basesytem-$CAULDRON_ARCH.tar.bz2}"
-# URL to a basesystem chroot for use with cauldron_toolchain_baseroot
-# only used when generating CAULDRON_BUILD from the baseroot method
-CAULDRON_BASEROOT_URL="${CAULDRON_BASEROOT_URL:-http://download.sourcemage.org/image/official/$CAULDRON_BASEROOT}";
-
-# whether CAULDRON_BUILD should be rm'ed after cauldron has finished
-CAULDRON_CLEAN="${CAULDRON_CLEAN:-no}"
-
-# whether cauldron should try it's hardest to generate needed spell
-# caches, even if that means casting and dispelling extra spells in a
-# chroot (only used when generating the base toolchain)
-CAULDRON_AGGRESSIVE="${CAULDRON_AGGRESSIVE:-yes}"
-
diff --git a/cauldron/config/commands.conf b/cauldron/config/commands.conf
deleted file mode 100644
index bf094b5..0000000
--- a/cauldron/config/commands.conf
+++ /dev/null
@@ -1,108 +0,0 @@
-#!/bin/bash
-
-# command to enter a chroot
-[[ -n "${CAULDRON_CMD_CHROOT[@]}" ]] ||
- CAULDRON_CMD_CHROOT=(
- chroot
- )
-
-# command to download a url from the internet
-[[ -n "${CAULDRON_CMD_URL_DL[@]}" ]] ||
- CAULDRON_CMD_URL_DL=(
- wget
- )
-
-# command used to generate the final iso media
-[[ -n "${CAULDRON_CMD_MKISOFS[@]}" ]] ||
- CAULDRON_CMD_MKISOFS=(
- mkisofs
- -R
- -b isolinux/isolinux.bin
- -c isolinux/boot.cat
- -no-emul-boot
- -boot-load-size 4
- -boot-info-table
- -o "$CAULDRON_ISO_NAME"
- "$CAULDRON_BUILD"
- )
-
-# command to archive the iso and sys packages (e.g., tar, cpio, etc.)
-[[ -n "${CAULDRON_CMD_ARCHIVE[@]}" ]] ||
- CAULDRON_CMD_ARCHIVE=(
- tar
- cf "$CAULDRON_BUILD"/"${CAULDRON_SYS_NAME%.*}"
- -C "$CAULDRON_SYS"
- )
-
-# command to compress files
-[[ -n "${CAULDRON_CMD_COMPRESS[@]}" ]] ||
- CAULDRON_CMD_COMPRESS=(
- bzip2
- "${CAULDRON_SYS_NAME%.*}"
- )
-
-# command to make a directory
-[[ -n "${CAULDRON_CMD_MKDIR[@]}" ]] ||
- CAULDRON_CMD_MKDIR=(
- mkdir
- -p
- )
-
-# command to remove a directory
-[[ -n "${CAULDRON_CMD_RMDIR[@]}" ]] ||
- CAULDRON_CMD_RMDIR=(
- rmdir
- )
-
-# command to copy a file/directory
-[[ -n "${CAULDRON_CMD_CP[@]}" ]] ||
- CAULDRON_CMD_CP=(
- cp
- )
-
-# command to move a file/directory
-[[ -n "${CAULDRON_CMD_RM[@]}" ]] ||
- CAULDRON_CMD_RM=(
- rm
- )
-
-# command to remove a file
-[[ -n "${CAULDRON_CMD_RM[@]}" ]] ||
- CAULDRON_CMD_RM=(
- rm
- )
-
-# command to grep a file/stream
-[[ -n "${CAULDRON_CMD_GREP[@]}" ]] ||
- CAULDRON_CMD_GREP=(
- grep
- )
-
-# command to awk a file/stream
-[[ -n "${CAULDRON_CMD_AWK[@]}" ]] ||
- CAULDRON_CMD_AWK=(
- gawk
- )
-
-# command to sed a file/stream
-[[ -n "${CAULDRON_CMD_SED[@]}" ]] ||
- CAULDRON_CMD_SED=(
- sed
- )
-
-# sorcery cast/dispel/rebuild commands
-[[ -n "${CAULDRON_CMD_CAST[@]}" ]] ||
- CAULDRON_CMD_CAST=(
- "$CAULDRON_HSORCERY_PATH/cast"
- )
-[[ -n "${CAULDRON_CMD_DISPEL[@]}" ]] ||
- CAULDRON_CMD_DISPEL=(
- "$CAULDRON_HSORCERY_PATH/dispel"
- )
-[[ -n "${CAULDRON_CMD_REBUILD[@]}" ]] ||
- CAULDRON_CMD_REBUILD=(
- "$CAULDRON_HSORCERY_PATH/sorcery"
- rebuild
- )
-
-# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/cauldron/config/default.conf b/cauldron/config/default.conf
deleted file mode 100644
index 9225ffe..0000000
--- a/cauldron/config/default.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-
-# base configuration values
-source "$CAULDRON_CONF/paths.conf"
-source "$CAULDRON_CONF/security.conf"
-source "$CAULDRON_CONF/display.conf"
-
-# output product configuration values
-source "$CAULDRON_CONF/iso.conf"
-source "$CAULDRON_CONF/sys.conf"
-
-# interaction with sorcery
-source "$CAULDRON_CONF/sorcery.conf"
-
-# build configurations (toolchain, product builds)
-source "$CAULDRON_CONF/build.conf"
-
-# host architecture (i.e., the arch of the system running cauldron, not the
-# arch of the media to be generated)
-source "$CAULDRON_CONF/arch/host_arch.conf"
-
-# should be sourced last, since some of the command definitions depend on
other
-# config variable definitions
-source "$CAULDRON_CONF/commands.conf"
-
diff --git a/cauldron/config/display.conf b/cauldron/config/display.conf
deleted file mode 100644
index f850ac1..0000000
--- a/cauldron/config/display.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-
-# whether to use color for displaying messages
-CAULDRON_COLOR="${CAULDRON_COLOR:-yes}"
-
diff --git a/cauldron/config/iso.conf b/cauldron/config/iso.conf
deleted file mode 100644
index 18bf91c..0000000
--- a/cauldron/config/iso.conf
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-# path where the final ISO product is generated
-CAULDRON_ISO="${CAULDRON_ISO:-$CAULDRON_TMP/iso}"
-
-# kernel config used to build the kernel for the ISO
-CAULDRON_KERN_CONF="${CAULDRON_KERN_CONF:-$CAULDRON_DATA/$CAULDRON_ARCH/kernel}"
-
-# the version of the kernel to be used in the .iso
-# if empty, then it will default to the version in cauldron
-CAULDRON_KVERS="${CAULDRON_KVERS:-}"
-
-# busybox config used to build busybox for the initrd/initramfs in the ISO
-CAULDRON_BBOX_CONF="${CAULDRON_BBOX_CONF:-$CAULDRON_DATA/$CAULDRON_ARCH/initfs/busybox}"
-
-# file listing all the spells to compose the ISO runtime
-CAULDRON_ISO_SPELLS="${CAULDRON_ISO_SPELLS:-$CAULDRON_DATA/$CAULDRON_ARCH/iso.spells}"
-# file listing all the sources to supply in the ISO runtime
-CAULDRON_ISO_SOURCES="${CAULDRON_ISO_SOURCES:-$CAULDRON_DATA/$CAULDRON_ARCH/iso.sources}"
-# file listing all the spell caches to supply in the ISO runtime
-CAULDRON_ISO_CACHES="${CAULDRON_ISO_CACHES:-$CAULDRON_DATA/$CAULDRON_ARCH/iso.caches}"
-
-# list of installers to include in the ISO
-CAULDRON_INSTALLERS=(
- "shell"
- # "menu"
- )
-
-# filename of the produced .iso (should follow Cauldron naming conventions)
-CAULDRON_ISO_NAME="${CAULDRON_ISO_NAME:-smgl-devel-$(date
+%Y%m%d).$CAULDRON_ARCH}"
-
-# do we keep the uncompressed .iso file in addition to the compressed one?
-CAULDRON_KEEPISO="${CAULDRON_KEEPISO:-yes}"
-
diff --git a/cauldron/config/paths.conf b/cauldron/config/paths.conf
deleted file mode 100644
index 0fea1b6..0000000
--- a/cauldron/config/paths.conf
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-
-# path to the host system (null for normal use)
-CAULDRON_HOST="${CAULDRON_HOST:-}"
-
-# path to the host base library modules
-CAULDRON_BASE="${CAULDRON_BASE:-$CAULDRON_HOST/usr/share/smgl}"
-
-# path to the host cauldron library modules
-CAULDRON_LIBS="${CAULDRON_LIBS:-$CAULDRON_BASE/cauldron}"
-
-# path to Source Mage common library modules
-CAULDRON_COMMON="${CAULDRON_COMMON:-$CAULDRON_BASE/common}"
-
-# path to the host cauldron configs
-CAULDRON_DATA="${CAULDRON_DATA:-$CAULDRON_HOST/etc/cauldron}"
-
-# temporary files generated while cauldron does its work
-CAULDRON_TMP="${CAULDRON_TMP:-$CAULDRON_HOST/tmp/cauldron}"
-
diff --git a/cauldron/config/security.conf b/cauldron/config/security.conf
deleted file mode 100644
index fa9254c..0000000
--- a/cauldron/config/security.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-
-# the user cauldron should run as make sure the user you choose has proper
-# permissions (especially for chrooting)
-CAULDRON_USER="${CAULDRON_USER:-root}"
-
diff --git a/cauldron/config/sorcery.conf b/cauldron/config/sorcery.conf
deleted file mode 100644
index ea2f7bd..0000000
--- a/cauldron/config/sorcery.conf
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-
-# branch of sorcery to use in the ISO
-CAULDRON_SORCERY_BRANCH="${CAULDRON_SORCERY_BRANCH:-stable}"
-
-# whether to always download sorcery anew or use an already downloaded file
-# if found
-CAULDRON_FORCE_DOWNLOAD="${CAULDRON_FORCE_DOWNLOAD:-yes}"
-
-# branch of sorcery to use in the ISO
-CAULDRON_SORCERY_PKG="${CAULDRON_SORCERY_PACKAGE:-sorcery-${CAULDRON_SORCERY_BRANCH}.tar.bz2}"
-
-# URL to download sorcery from
-CAULDRON_SORCERY_URL="${CAULDRON_SORCERY_URL:-http://download.sourcemage.org/sorcery/$CAULDRON_SORCERY_PKG}";
-
-# sorcery modules location in the ISO
-CAULDRON_ISORCERY_LIBS="${CAULDRON_ISORCERY_LIBS:-$CAULDRON_BUILD/var/lib/sorcery/modules}"
-# sorcery config location in the ISO
-CAULDRON_ISORCERY_CONFIG="${CAULDRON_ISORCERY_CONFIG:-$CAULDRON_BUILD/etc/sorcery/config}"
-# sorcery local config location in the ISO
-CAULDRON_ISORCERY_LCONFIG="${CAULDRON_ISORCERY_LCONFIG:-$CAULDRON_BUILD/etc/sorcery/local/config}"
-
-# host system sorcery libraries/modules
-CAULDRON_HSORCERY_LIBS="${CAULDRON_HSORCERY_LIBS:-$CAULDRON_HOST/var/lib/sorcery/modules}"
-# host system sorcery config
-CAULDRON_HSORCERY_CONFIG="${CAULDRON_HSORCERY_CONFIG:-$CAULDRON_HOST/etc/sorcery/config}"
-# host system sorcery local config
-CAULDRON_HSORCERY_LCONFIG="${CAULDRON_HSORCERY_LCONFIG:-$CAULDRON_HOST/etc/sorcery/local/config}"
-# host system sorcery packages file (lists installed packages)
-CAULDRON_HSORCERY_PACKAGES="${CAULDRON_HSORCERY_PACKAGES:-$CAULDRON_HOST/var/state/sorcery/packages}"
-# host system sorcery spool location (where spell sources are kept)
-CAULDRON_HSORCERY_SPOOL="${CAULDRON_HSORCERY_SPOOL:-$CAULDRON_HOST/var/spool/sorcery}"
-
-# path where sorcery binaries are located
-CAULDRON_HSORCERY_PATH="${CAULDRON_SORCERY_PATH:-$CAULDRON_HOST/usr/sbin}"
-
-# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/cauldron/config/sys.conf b/cauldron/config/sys.conf
deleted file mode 100644
index 16fcb90..0000000
--- a/cauldron/config/sys.conf
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-# path where the installable system chroot is generated
-CAULDRON_SYS="${CAULDRON_SYS:-$CAULDRON_TMP/sys}"
-
-# file listing all the spells to compose the SYS runtime
-CAULDRON_SYS_SPELLS="${CAULDRON_SYS_SPELLS:-$CAULDRON_DATA/$CAULDRON_ARCH/sys.spells}"
-# file listing all the sources to supply in the SYS runtime
-CAULDRON_SYS_SOURCES="${CAULDRON_SYS_SOURCES:-$CAULDRON_DATA/$CAULDRON_ARCH/sys.sources}"
-# file listing all the spell caches to supply in the SYS runtime
-CAULDRON_SYS_CACHES="${CAULDRON_SYS_CACHES:-$CAULDRON_DATA/$CAULDRON_ARCH/sys.caches}"
-
-# filename of the compressed system archive that goes into the base of
-# the iso filesystem for base installation
-CAULDRON_SYS_NAME="${CAULDRON_SYS_NAME:-system.tar.bz2}"
-
diff --git a/cauldron/data/cleaners/autoconf-clean
b/cauldron/data/cleaners/autoconf-clean
new file mode 100644
index 0000000..9292dfc
--- /dev/null
+++ b/cauldron/data/cleaners/autoconf-clean
@@ -0,0 +1,72 @@
+/usr
+/usr/bin
+/usr/bin/autoconf
+/usr/bin/autoheader
+/usr/bin/autom4te
+/usr/bin/autoreconf
+/usr/bin/autoscan
+/usr/bin/autoupdate
+/usr/bin/ifnames
+/usr/share
+/usr/share/autoconf
+/usr/share/autoconf/Autom4te
+/usr/share/autoconf/Autom4te/C4che.pm
+/usr/share/autoconf/Autom4te/ChannelDefs.pm
+/usr/share/autoconf/Autom4te/Channels.pm
+/usr/share/autoconf/Autom4te/Configure_ac.pm
+/usr/share/autoconf/Autom4te/FileUtils.pm
+/usr/share/autoconf/Autom4te/General.pm
+/usr/share/autoconf/Autom4te/Request.pm
+/usr/share/autoconf/Autom4te/Struct.pm
+/usr/share/autoconf/Autom4te/XFile.pm
+/usr/share/autoconf/INSTALL
+/usr/share/autoconf/autoconf
+/usr/share/autoconf/autoconf/autoconf.m4
+/usr/share/autoconf/autoconf/autoconf.m4f
+/usr/share/autoconf/autoconf/autoheader.m4
+/usr/share/autoconf/autoconf/autoscan.m4
+/usr/share/autoconf/autoconf/autotest.m4
+/usr/share/autoconf/autoconf/autoupdate.m4
+/usr/share/autoconf/autoconf/c.m4
+/usr/share/autoconf/autoconf/erlang.m4
+/usr/share/autoconf/autoconf/fortran.m4
+/usr/share/autoconf/autoconf/functions.m4
+/usr/share/autoconf/autoconf/general.m4
+/usr/share/autoconf/autoconf/headers.m4
+/usr/share/autoconf/autoconf/lang.m4
+/usr/share/autoconf/autoconf/libs.m4
+/usr/share/autoconf/autoconf/oldnames.m4
+/usr/share/autoconf/autoconf/programs.m4
+/usr/share/autoconf/autoconf/specific.m4
+/usr/share/autoconf/autoconf/status.m4
+/usr/share/autoconf/autoconf/types.m4
+/usr/share/autoconf/autom4te.cfg
+/usr/share/autoconf/autoscan
+/usr/share/autoconf/autoscan/autoscan.list
+/usr/share/autoconf/autotest
+/usr/share/autoconf/autotest/autotest.m4
+/usr/share/autoconf/autotest/autotest.m4f
+/usr/share/autoconf/autotest/general.m4
+/usr/share/autoconf/m4sugar
+/usr/share/autoconf/m4sugar/m4sh.m4
+/usr/share/autoconf/m4sugar/m4sh.m4f
+/usr/share/autoconf/m4sugar/m4sugar.m4
+/usr/share/autoconf/m4sugar/m4sugar.m4f
+/usr/share/autoconf/m4sugar/version.m4
+/usr/share/info
+/usr/share/info/autoconf.info
+/usr/share/info/standards.info
+/usr/share/man
+/usr/share/man/man1
+/usr/share/man/man1/autoconf.1
+/usr/share/man/man1/autoheader.1
+/usr/share/man/man1/autom4te.1
+/usr/share/man/man1/autoreconf.1
+/usr/share/man/man1/autoscan.1
+/usr/share/man/man1/autoupdate.1
+/usr/share/man/man1/config.guess.1
+/usr/share/man/man1/config.sub.1
+/usr/share/man/man1/ifnames.1
+/var/log/sorcery/compile/autoconf-2.61.bz2
+/var/log/sorcery/install/autoconf-2.61
+/var/log/sorcery/md5sum/autoconf-2.61
diff --git a/cauldron/data/cleaners/automake-clean
b/cauldron/data/cleaners/automake-clean
new file mode 100644
index 0000000..9ad16dc
--- /dev/null
+++ b/cauldron/data/cleaners/automake-clean
@@ -0,0 +1,134 @@
+/usr
+/usr/bin
+/usr/bin/aclocal
+/usr/bin/aclocal-1.10
+/usr/bin/automake
+/usr/bin/automake-1.10
+/usr/share
+/usr/share/aclocal-1.10
+/usr/share/aclocal-1.10/amversion.m4
+/usr/share/aclocal-1.10/as.m4
+/usr/share/aclocal-1.10/auxdir.m4
+/usr/share/aclocal-1.10/ccstdc.m4
+/usr/share/aclocal-1.10/cond.m4
+/usr/share/aclocal-1.10/depend.m4
+/usr/share/aclocal-1.10/depout.m4
+/usr/share/aclocal-1.10/dmalloc.m4
+/usr/share/aclocal-1.10/gcj.m4
+/usr/share/aclocal-1.10/header.m4
+/usr/share/aclocal-1.10/init.m4
+/usr/share/aclocal-1.10/install-sh.m4
+/usr/share/aclocal-1.10/lead-dot.m4
+/usr/share/aclocal-1.10/lex.m4
+/usr/share/aclocal-1.10/lispdir.m4
+/usr/share/aclocal-1.10/maintainer.m4
+/usr/share/aclocal-1.10/make.m4
+/usr/share/aclocal-1.10/minuso.m4
+/usr/share/aclocal-1.10/missing.m4
+/usr/share/aclocal-1.10/mkdirp.m4
+/usr/share/aclocal-1.10/multi.m4
+/usr/share/aclocal-1.10/obsol-gt.m4
+/usr/share/aclocal-1.10/obsol-lt.m4
+/usr/share/aclocal-1.10/obsolete.m4
+/usr/share/aclocal-1.10/options.m4
+/usr/share/aclocal-1.10/protos.m4
+/usr/share/aclocal-1.10/python.m4
+/usr/share/aclocal-1.10/regex.m4
+/usr/share/aclocal-1.10/runlog.m4
+/usr/share/aclocal-1.10/sanity.m4
+/usr/share/aclocal-1.10/strip.m4
+/usr/share/aclocal-1.10/substnot.m4
+/usr/share/aclocal-1.10/tar.m4
+/usr/share/aclocal-1.10/upc.m4
+/usr/share/automake
+/usr/share/automake-1.10
+/usr/share/automake-1.10/Automake
+/usr/share/automake-1.10/Automake/ChannelDefs.pm
+/usr/share/automake-1.10/Automake/Channels.pm
+/usr/share/automake-1.10/Automake/Condition.pm
+/usr/share/automake-1.10/Automake/Config.pm
+/usr/share/automake-1.10/Automake/Configure_ac.pm
+/usr/share/automake-1.10/Automake/DisjConditions.pm
+/usr/share/automake-1.10/Automake/FileUtils.pm
+/usr/share/automake-1.10/Automake/General.pm
+/usr/share/automake-1.10/Automake/Item.pm
+/usr/share/automake-1.10/Automake/ItemDef.pm
+/usr/share/automake-1.10/Automake/Location.pm
+/usr/share/automake-1.10/Automake/Options.pm
+/usr/share/automake-1.10/Automake/Rule.pm
+/usr/share/automake-1.10/Automake/RuleDef.pm
+/usr/share/automake-1.10/Automake/Struct.pm
+/usr/share/automake-1.10/Automake/VarDef.pm
+/usr/share/automake-1.10/Automake/Variable.pm
+/usr/share/automake-1.10/Automake/Version.pm
+/usr/share/automake-1.10/Automake/Wrap.pm
+/usr/share/automake-1.10/Automake/XFile.pm
+/usr/share/automake-1.10/COPYING
+/usr/share/automake-1.10/INSTALL
+/usr/share/automake-1.10/acinstall
+/usr/share/automake-1.10/am
+/usr/share/automake-1.10/am/ansi2knr.am
+/usr/share/automake-1.10/am/check.am
+/usr/share/automake-1.10/am/clean-hdr.am
+/usr/share/automake-1.10/am/clean.am
+/usr/share/automake-1.10/am/compile.am
+/usr/share/automake-1.10/am/configure.am
+/usr/share/automake-1.10/am/data.am
+/usr/share/automake-1.10/am/dejagnu.am
+/usr/share/automake-1.10/am/depend.am
+/usr/share/automake-1.10/am/depend2.am
+/usr/share/automake-1.10/am/distdir.am
+/usr/share/automake-1.10/am/footer.am
+/usr/share/automake-1.10/am/header-vars.am
+/usr/share/automake-1.10/am/header.am
+/usr/share/automake-1.10/am/inst-vars.am
+/usr/share/automake-1.10/am/install.am
+/usr/share/automake-1.10/am/java.am
+/usr/share/automake-1.10/am/lang-compile.am
+/usr/share/automake-1.10/am/lex.am
+/usr/share/automake-1.10/am/library.am
+/usr/share/automake-1.10/am/libs.am
+/usr/share/automake-1.10/am/libtool.am
+/usr/share/automake-1.10/am/lisp.am
+/usr/share/automake-1.10/am/ltlib.am
+/usr/share/automake-1.10/am/ltlibrary.am
+/usr/share/automake-1.10/am/mans-vars.am
+/usr/share/automake-1.10/am/mans.am
+/usr/share/automake-1.10/am/multilib.am
+/usr/share/automake-1.10/am/program.am
+/usr/share/automake-1.10/am/progs.am
+/usr/share/automake-1.10/am/python.am
+/usr/share/automake-1.10/am/remake-hdr.am
+/usr/share/automake-1.10/am/scripts.am
+/usr/share/automake-1.10/am/subdirs.am
+/usr/share/automake-1.10/am/tags.am
+/usr/share/automake-1.10/am/texi-vers.am
+/usr/share/automake-1.10/am/texibuild.am
+/usr/share/automake-1.10/am/texinfos.am
+/usr/share/automake-1.10/am/yacc.am
+/usr/share/automake-1.10/ansi2knr.1
+/usr/share/automake-1.10/ansi2knr.c
+/usr/share/automake-1.10/compile
+/usr/share/automake-1.10/config-ml.in
+/usr/share/automake-1.10/config.guess
+/usr/share/automake-1.10/config.sub
+/usr/share/automake-1.10/depcomp
+/usr/share/automake-1.10/elisp-comp
+/usr/share/automake-1.10/install-sh
+/usr/share/automake-1.10/mdate-sh
+/usr/share/automake-1.10/missing
+/usr/share/automake-1.10/mkinstalldirs
+/usr/share/automake-1.10/py-compile
+/usr/share/automake-1.10/symlink-tree
+/usr/share/automake-1.10/texinfo.tex
+/usr/share/automake-1.10/ylwrap
+/usr/share/doc
+/usr/share/doc/automake
+/usr/share/doc/automake/amhello-1.0.tar.gz
+/usr/share/info
+/usr/share/info/automake.info
+/usr/share/info/automake.info-1
+/usr/share/info/automake.info-2
+/var/log/sorcery/compile/automake-1.10.bz2
+/var/log/sorcery/install/automake-1.10
+/var/log/sorcery/md5sum/automake-1.10
diff --git a/cauldron/data/cleaners/bin86-clean
b/cauldron/data/cleaners/bin86-clean
new file mode 100644
index 0000000..e80701a
--- /dev/null
+++ b/cauldron/data/cleaners/bin86-clean
@@ -0,0 +1,10 @@
+/usr/bin/as86
+/usr/bin/ld86
+/usr/bin/nm86
+/usr/bin/objdump86
+/usr/bin/size86
+/usr/share/man/man1/as86.1
+/usr/share/man/man1/ld86.1
+/var/log/sorcery/compile/bin86-0.16.17.bz2
+/var/log/sorcery/install/bin86-0.16.17
+/var/log/sorcery/md5sum/bin86-0.16.17
diff --git a/cauldron/data/cleaners/binutils-clean
b/cauldron/data/cleaners/binutils-clean
new file mode 100644
index 0000000..38d9508
--- /dev/null
+++ b/cauldron/data/cleaners/binutils-clean
@@ -0,0 +1,140 @@
+/usr
+/usr/bin/addr2line
+/usr/bin/ar
+/usr/bin/as
+/usr/bin/c++filt
+/usr/bin/gprof
+/usr/bin/ld
+/usr/bin/nm
+/usr/bin/objcopy
+/usr/bin/objdump
+/usr/bin/ranlib
+/usr/bin/readelf
+/usr/bin/size
+/usr/bin/strings
+/usr/bin/strip
+/usr/i486-pc-linux-gnu
+/usr/i486-pc-linux-gnu/bin
+/usr/i486-pc-linux-gnu/bin/ar
+/usr/i486-pc-linux-gnu/bin/as
+/usr/i486-pc-linux-gnu/bin/ld
+/usr/i486-pc-linux-gnu/bin/nm
+/usr/i486-pc-linux-gnu/bin/objdump
+/usr/i486-pc-linux-gnu/bin/ranlib
+/usr/i486-pc-linux-gnu/bin/strip
+/usr/i486-pc-linux-gnu/lib
+/usr/i486-pc-linux-gnu/lib/ldscripts
+/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.x
+/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xbn
+/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xc
+/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xd
+/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xdc
+/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xdw
+/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xn
+/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xr
+/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xs
+/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xsc
+/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xsw
+/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xu
+/usr/i486-pc-linux-gnu/lib/ldscripts/elf_i386.xw
+/usr/i486-pc-linux-gnu/lib/ldscripts/i386linux.x
+/usr/i486-pc-linux-gnu/lib/ldscripts/i386linux.xbn
+/usr/i486-pc-linux-gnu/lib/ldscripts/i386linux.xn
+/usr/i486-pc-linux-gnu/lib/ldscripts/i386linux.xr
+/usr/i486-pc-linux-gnu/lib/ldscripts/i386linux.xu
+/usr/include/ansidecl.h
+/usr/include/bfd.h
+/usr/include/bfdlink.h
+/usr/include/dis-asm.h
+/usr/include/symcat.h
+/usr/lib/libbfd-2.17.so
+/usr/lib/libbfd.la
+/usr/lib/libbfd.so
+/usr/lib/libopcodes-2.17.so
+/usr/lib/libopcodes.la
+/usr/lib/libopcodes.so
+/usr/share/info/as.info
+/usr/share/info/bfd.info
+/usr/share/info/binutils.info
+/usr/share/info/configure.info
+/usr/share/info/gprof.info
+/usr/share/info/ld.info
+/usr/share/locale/da/LC_MESSAGES/bfd.mo
+/usr/share/locale/da/LC_MESSAGES/binutils.mo
+/usr/share/locale/da/LC_MESSAGES/gprof.mo
+/usr/share/locale/da/LC_MESSAGES/ld.mo
+/usr/share/locale/da/LC_MESSAGES/opcodes.mo
+/usr/share/locale/de/LC_MESSAGES/gprof.mo
+/usr/share/locale/de/LC_MESSAGES/opcodes.mo
+/usr/share/locale/es/LC_MESSAGES/bfd.mo
+/usr/share/locale/es/LC_MESSAGES/binutils.mo
+/usr/share/locale/es/LC_MESSAGES/gas.mo
+/usr/share/locale/es/LC_MESSAGES/gprof.mo
+/usr/share/locale/es/LC_MESSAGES/ld.mo
+/usr/share/locale/es/LC_MESSAGES/opcodes.mo
+/usr/share/locale/fi/LC_MESSAGES/binutils.mo
+/usr/share/locale/fi/LC_MESSAGES/opcodes.mo
+/usr/share/locale/fr/LC_MESSAGES/bfd.mo
+/usr/share/locale/fr/LC_MESSAGES/binutils.mo
+/usr/share/locale/fr/LC_MESSAGES/gas.mo
+/usr/share/locale/fr/LC_MESSAGES/gprof.mo
+/usr/share/locale/fr/LC_MESSAGES/ld.mo
+/usr/share/locale/fr/LC_MESSAGES/opcodes.mo
+/usr/share/locale/ga/LC_MESSAGES/gprof.mo
+/usr/share/locale/ga/LC_MESSAGES/opcodes.mo
+/usr/share/locale/id/LC_MESSAGES/gprof.mo
+/usr/share/locale/id/LC_MESSAGES/opcodes.mo
+/usr/share/locale/ja/LC_MESSAGES/bfd.mo
+/usr/share/locale/ja/LC_MESSAGES/binutils.mo
+/usr/share/locale/nl/LC_MESSAGES/opcodes.mo
+/usr/share/locale/pt_BR/LC_MESSAGES/gprof.mo
+/usr/share/locale/pt_BR/LC_MESSAGES/opcodes.mo
+/usr/share/locale/ro/LC_MESSAGES/bfd.mo
+/usr/share/locale/ro/LC_MESSAGES/binutils.mo
+/usr/share/locale/ro/LC_MESSAGES/opcodes.mo
+/usr/share/locale/ru/LC_MESSAGES/binutils.mo
+/usr/share/locale/rw/LC_MESSAGES/bfd.mo
+/usr/share/locale/rw/LC_MESSAGES/binutils.mo
+/usr/share/locale/rw/LC_MESSAGES/gas.mo
+/usr/share/locale/rw/LC_MESSAGES/gprof.mo
+/usr/share/locale/sv/LC_MESSAGES/bfd.mo
+/usr/share/locale/sv/LC_MESSAGES/binutils.mo
+/usr/share/locale/sv/LC_MESSAGES/gprof.mo
+/usr/share/locale/sv/LC_MESSAGES/ld.mo
+/usr/share/locale/sv/LC_MESSAGES/opcodes.mo
+/usr/share/locale/tr/LC_MESSAGES/bfd.mo
+/usr/share/locale/tr/LC_MESSAGES/binutils.mo
+/usr/share/locale/tr/LC_MESSAGES/gas.mo
+/usr/share/locale/tr/LC_MESSAGES/gprof.mo
+/usr/share/locale/tr/LC_MESSAGES/ld.mo
+/usr/share/locale/tr/LC_MESSAGES/opcodes.mo
+/usr/share/locale/vi/LC_MESSAGES/bfd.mo
+/usr/share/locale/vi/LC_MESSAGES/binutils.mo
+/usr/share/locale/vi/LC_MESSAGES/gprof.mo
+/usr/share/locale/vi/LC_MESSAGES/ld.mo
+/usr/share/locale/vi/LC_MESSAGES/opcodes.mo
+/usr/share/locale/zh_CN/LC_MESSAGES/bfd.mo
+/usr/share/locale/zh_CN/LC_MESSAGES/binutils.mo
+/usr/share/locale/zh_CN/LC_MESSAGES/ld.mo
+/usr/share/locale/zh_CN/LC_MESSAGES/opcodes.mo
+/usr/share/locale/zh_TW/LC_MESSAGES/binutils.mo
+/usr/share/man/man1/addr2line.1
+/usr/share/man/man1/ar.1
+/usr/share/man/man1/as.1
+/usr/share/man/man1/c++filt.1
+/usr/share/man/man1/dlltool.1
+/usr/share/man/man1/gprof.1
+/usr/share/man/man1/ld.1
+/usr/share/man/man1/nlmconv.1
+/usr/share/man/man1/nm.1
+/usr/share/man/man1/objcopy.1
+/usr/share/man/man1/objdump.1
+/usr/share/man/man1/ranlib.1
+/usr/share/man/man1/readelf.1
+/usr/share/man/man1/size.1
+/usr/share/man/man1/strings.1
+/usr/share/man/man1/strip.1
+/usr/share/man/man1/windres.1
+/var/log/sorcery/compile/binutils-2.17.bz2
+/var/log/sorcery/install/binutils-2.17
+/var/log/sorcery/md5sum/binutils-2.17
diff --git a/cauldron/data/cleaners/bison-clean
b/cauldron/data/cleaners/bison-clean
new file mode 100644
index 0000000..e8cc4ba
--- /dev/null
+++ b/cauldron/data/cleaners/bison-clean
@@ -0,0 +1,66 @@
+/usr
+/usr/bin/bison
+/usr/bin/yacc
+/usr/lib/liby.a
+/usr/share
+/usr/share/aclocal/bison-i18n.m4
+/usr/share/bison
+/usr/share/bison/README
+/usr/share/bison/c++.m4
+/usr/share/bison/c.m4
+/usr/share/bison/glr.c
+/usr/share/bison/glr.cc
+/usr/share/bison/lalr1.cc
+/usr/share/bison/location.cc
+/usr/share/bison/m4sugar
+/usr/share/bison/m4sugar/m4sugar.m4
+/usr/share/bison/yacc.c
+/usr/share/info/bison.info
+/usr/share/locale/da/LC_MESSAGES/bison-runtime.mo
+/usr/share/locale/da/LC_MESSAGES/bison.mo
+/usr/share/locale/de/LC_MESSAGES/bison-runtime.mo
+/usr/share/locale/de/LC_MESSAGES/bison.mo
+/usr/share/locale/es/LC_MESSAGES/bison-runtime.mo
+/usr/share/locale/es/LC_MESSAGES/bison.mo
+/usr/share/locale/et/LC_MESSAGES/bison-runtime.mo
+/usr/share/locale/et/LC_MESSAGES/bison.mo
+/usr/share/locale/fr/LC_MESSAGES/bison-runtime.mo
+/usr/share/locale/fr/LC_MESSAGES/bison.mo
+/usr/share/locale/ga/LC_MESSAGES/bison-runtime.mo
+/usr/share/locale/ga/LC_MESSAGES/bison.mo
+/usr/share/locale/hr/LC_MESSAGES/bison-runtime.mo
+/usr/share/locale/hr/LC_MESSAGES/bison.mo
+/usr/share/locale/id/LC_MESSAGES/bison-runtime.mo
+/usr/share/locale/id/LC_MESSAGES/bison.mo
+/usr/share/locale/it/LC_MESSAGES/bison-runtime.mo
+/usr/share/locale/it/LC_MESSAGES/bison.mo
+/usr/share/locale/ja/LC_MESSAGES/bison-runtime.mo
+/usr/share/locale/ja/LC_MESSAGES/bison.mo
+/usr/share/locale/ms/LC_MESSAGES/bison-runtime.mo
+/usr/share/locale/ms/LC_MESSAGES/bison.mo
+/usr/share/locale/nb/LC_MESSAGES/bison-runtime.mo
+/usr/share/locale/nb/LC_MESSAGES/bison.mo
+/usr/share/locale/nl/LC_MESSAGES/bison-runtime.mo
+/usr/share/locale/nl/LC_MESSAGES/bison.mo
+/usr/share/locale/pl/LC_MESSAGES/bison-runtime.mo
+/usr/share/locale/pl/LC_MESSAGES/bison.mo
+/usr/share/locale/pt_BR/LC_MESSAGES/bison-runtime.mo
+/usr/share/locale/pt_BR/LC_MESSAGES/bison.mo
+/usr/share/locale/ro/LC_MESSAGES/bison-runtime.mo
+/usr/share/locale/ro/LC_MESSAGES/bison.mo
+/usr/share/locale/ru/LC_MESSAGES/bison-runtime.mo
+/usr/share/locale/ru/LC_MESSAGES/bison.mo
+/usr/share/locale/rw/LC_MESSAGES/bison-runtime.mo
+/usr/share/locale/rw/LC_MESSAGES/bison.mo
+/usr/share/locale/sl/LC_MESSAGES/bison-runtime.mo
+/usr/share/locale/sv/LC_MESSAGES/bison-runtime.mo
+/usr/share/locale/sv/LC_MESSAGES/bison.mo
+/usr/share/locale/tr/LC_MESSAGES/bison-runtime.mo
+/usr/share/locale/tr/LC_MESSAGES/bison.mo
+/usr/share/locale/vi/LC_MESSAGES/bison-runtime.mo
+/usr/share/locale/vi/LC_MESSAGES/bison.mo
+/usr/share/locale/zh_TW/LC_MESSAGES/bison-runtime.mo
+/usr/share/man/man1/bison.1
+/var/log/sorcery/compile/bison-2.3.bz2
+/var/log/sorcery/install/bison-2.3
+/var/log/sorcery/md5sum/bison-2.3
diff --git a/cauldron/data/cleaners/flex-clean
b/cauldron/data/cleaners/flex-clean
new file mode 100644
index 0000000..8448ceb
--- /dev/null
+++ b/cauldron/data/cleaners/flex-clean
@@ -0,0 +1,32 @@
+/usr/bin/flex
+/usr/bin/lex
+/usr/include/FlexLexer.h
+/usr/lib/libfl.a
+/usr/share/info/flex.info
+/usr/share/info/flex.info-1
+/usr/share/info/flex.info-2
+/usr/share/info/flex.info-3
+/usr/share/info/flex.info-4
+/usr/share/info/flex.info-5
+/usr/share/info/flex.info-6
+/usr/share/info/flex.info-7
+/usr/share/locale/ca/LC_MESSAGES/flex.mo
+/usr/share/locale/da/LC_MESSAGES/flex.mo
+/usr/share/locale/de/LC_MESSAGES/flex.mo
+/usr/share/locale/es/LC_MESSAGES/flex.mo
+/usr/share/locale/fr/LC_MESSAGES/flex.mo
+/usr/share/locale/ga/LC_MESSAGES/flex.mo
+/usr/share/locale/ko/LC_MESSAGES/flex.mo
+/usr/share/locale/nl/LC_MESSAGES/flex.mo
+/usr/share/locale/pl/LC_MESSAGES/flex.mo
+/usr/share/locale/pt_BR/LC_MESSAGES/flex.mo
+/usr/share/locale/ro/LC_MESSAGES/flex.mo
+/usr/share/locale/ru/LC_MESSAGES/flex.mo
+/usr/share/locale/sv/LC_MESSAGES/flex.mo
+/usr/share/locale/tr/LC_MESSAGES/flex.mo
+/usr/share/locale/vi/LC_MESSAGES/flex.mo
+/usr/share/locale/zh_CN/LC_MESSAGES/flex.mo
+/usr/share/man/man1/flex.1
+/var/log/sorcery/compile/flex-2.5.33.bz2
+/var/log/sorcery/install/flex-2.5.33
+/var/log/sorcery/md5sum/flex-2.5.33
diff --git a/cauldron/data/cleaners/g++-clean
b/cauldron/data/cleaners/g++-clean
new file mode 100644
index 0000000..51a1de2
--- /dev/null
+++ b/cauldron/data/cleaners/g++-clean
@@ -0,0 +1,524 @@
+/usr
+/usr/bin/c++
+/usr/bin/g++
+/usr/bin/i486-pc-linux-gnu-c++
+/usr/bin/i486-pc-linux-gnu-g++
+/usr/include
+/usr/include/c++
+/usr/include/c++/4.1.2
+/usr/include/c++/4.1.2/algorithm
+/usr/include/c++/4.1.2/backward
+/usr/include/c++/4.1.2/backward/algo.h
+/usr/include/c++/4.1.2/backward/algobase.h
+/usr/include/c++/4.1.2/backward/alloc.h
+/usr/include/c++/4.1.2/backward/backward_warning.h
+/usr/include/c++/4.1.2/backward/bvector.h
+/usr/include/c++/4.1.2/backward/complex.h
+/usr/include/c++/4.1.2/backward/defalloc.h
+/usr/include/c++/4.1.2/backward/deque.h
+/usr/include/c++/4.1.2/backward/fstream.h
+/usr/include/c++/4.1.2/backward/function.h
+/usr/include/c++/4.1.2/backward/hash_map.h
+/usr/include/c++/4.1.2/backward/hash_set.h
+/usr/include/c++/4.1.2/backward/hashtable.h
+/usr/include/c++/4.1.2/backward/heap.h
+/usr/include/c++/4.1.2/backward/iomanip.h
+/usr/include/c++/4.1.2/backward/iostream.h
+/usr/include/c++/4.1.2/backward/istream.h
+/usr/include/c++/4.1.2/backward/iterator.h
+/usr/include/c++/4.1.2/backward/list.h
+/usr/include/c++/4.1.2/backward/map.h
+/usr/include/c++/4.1.2/backward/multimap.h
+/usr/include/c++/4.1.2/backward/multiset.h
+/usr/include/c++/4.1.2/backward/new.h
+/usr/include/c++/4.1.2/backward/ostream.h
+/usr/include/c++/4.1.2/backward/pair.h
+/usr/include/c++/4.1.2/backward/queue.h
+/usr/include/c++/4.1.2/backward/rope.h
+/usr/include/c++/4.1.2/backward/set.h
+/usr/include/c++/4.1.2/backward/slist.h
+/usr/include/c++/4.1.2/backward/stack.h
+/usr/include/c++/4.1.2/backward/stream.h
+/usr/include/c++/4.1.2/backward/streambuf.h
+/usr/include/c++/4.1.2/backward/strstream
+/usr/include/c++/4.1.2/backward/tempbuf.h
+/usr/include/c++/4.1.2/backward/tree.h
+/usr/include/c++/4.1.2/backward/vector.h
+/usr/include/c++/4.1.2/bits
+/usr/include/c++/4.1.2/bits/allocator.h
+/usr/include/c++/4.1.2/bits/atomicity.h
+/usr/include/c++/4.1.2/bits/basic_ios.h
+/usr/include/c++/4.1.2/bits/basic_ios.tcc
+/usr/include/c++/4.1.2/bits/basic_string.h
+/usr/include/c++/4.1.2/bits/basic_string.tcc
+/usr/include/c++/4.1.2/bits/boost_concept_check.h
+/usr/include/c++/4.1.2/bits/char_traits.h
+/usr/include/c++/4.1.2/bits/cmath.tcc
+/usr/include/c++/4.1.2/bits/codecvt.h
+/usr/include/c++/4.1.2/bits/concept_check.h
+/usr/include/c++/4.1.2/bits/concurrence.h
+/usr/include/c++/4.1.2/bits/cpp_type_traits.h
+/usr/include/c++/4.1.2/bits/deque.tcc
+/usr/include/c++/4.1.2/bits/fstream.tcc
+/usr/include/c++/4.1.2/bits/functexcept.h
+/usr/include/c++/4.1.2/bits/gslice.h
+/usr/include/c++/4.1.2/bits/gslice_array.h
+/usr/include/c++/4.1.2/bits/indirect_array.h
+/usr/include/c++/4.1.2/bits/ios_base.h
+/usr/include/c++/4.1.2/bits/istream.tcc
+/usr/include/c++/4.1.2/bits/list.tcc
+/usr/include/c++/4.1.2/bits/locale_classes.h
+/usr/include/c++/4.1.2/bits/locale_facets.h
+/usr/include/c++/4.1.2/bits/locale_facets.tcc
+/usr/include/c++/4.1.2/bits/localefwd.h
+/usr/include/c++/4.1.2/bits/mask_array.h
+/usr/include/c++/4.1.2/bits/ostream.tcc
+/usr/include/c++/4.1.2/bits/postypes.h
+/usr/include/c++/4.1.2/bits/slice_array.h
+/usr/include/c++/4.1.2/bits/sstream.tcc
+/usr/include/c++/4.1.2/bits/stl_algo.h
+/usr/include/c++/4.1.2/bits/stl_algobase.h
+/usr/include/c++/4.1.2/bits/stl_bvector.h
+/usr/include/c++/4.1.2/bits/stl_construct.h
+/usr/include/c++/4.1.2/bits/stl_deque.h
+/usr/include/c++/4.1.2/bits/stl_function.h
+/usr/include/c++/4.1.2/bits/stl_heap.h
+/usr/include/c++/4.1.2/bits/stl_iterator.h
+/usr/include/c++/4.1.2/bits/stl_iterator_base_funcs.h
+/usr/include/c++/4.1.2/bits/stl_iterator_base_types.h
+/usr/include/c++/4.1.2/bits/stl_list.h
+/usr/include/c++/4.1.2/bits/stl_map.h
+/usr/include/c++/4.1.2/bits/stl_multimap.h
+/usr/include/c++/4.1.2/bits/stl_multiset.h
+/usr/include/c++/4.1.2/bits/stl_numeric.h
+/usr/include/c++/4.1.2/bits/stl_pair.h
+/usr/include/c++/4.1.2/bits/stl_queue.h
+/usr/include/c++/4.1.2/bits/stl_raw_storage_iter.h
+/usr/include/c++/4.1.2/bits/stl_relops.h
+/usr/include/c++/4.1.2/bits/stl_set.h
+/usr/include/c++/4.1.2/bits/stl_stack.h
+/usr/include/c++/4.1.2/bits/stl_tempbuf.h
+/usr/include/c++/4.1.2/bits/stl_tree.h
+/usr/include/c++/4.1.2/bits/stl_uninitialized.h
+/usr/include/c++/4.1.2/bits/stl_vector.h
+/usr/include/c++/4.1.2/bits/stream_iterator.h
+/usr/include/c++/4.1.2/bits/streambuf.tcc
+/usr/include/c++/4.1.2/bits/streambuf_iterator.h
+/usr/include/c++/4.1.2/bits/stringfwd.h
+/usr/include/c++/4.1.2/bits/valarray_after.h
+/usr/include/c++/4.1.2/bits/valarray_array.h
+/usr/include/c++/4.1.2/bits/valarray_array.tcc
+/usr/include/c++/4.1.2/bits/valarray_before.h
+/usr/include/c++/4.1.2/bits/vector.tcc
+/usr/include/c++/4.1.2/bitset
+/usr/include/c++/4.1.2/cassert
+/usr/include/c++/4.1.2/cctype
+/usr/include/c++/4.1.2/cerrno
+/usr/include/c++/4.1.2/cfloat
+/usr/include/c++/4.1.2/ciso646
+/usr/include/c++/4.1.2/climits
+/usr/include/c++/4.1.2/clocale
+/usr/include/c++/4.1.2/cmath
+/usr/include/c++/4.1.2/complex
+/usr/include/c++/4.1.2/csetjmp
+/usr/include/c++/4.1.2/csignal
+/usr/include/c++/4.1.2/cstdarg
+/usr/include/c++/4.1.2/cstddef
+/usr/include/c++/4.1.2/cstdio
+/usr/include/c++/4.1.2/cstdlib
+/usr/include/c++/4.1.2/cstring
+/usr/include/c++/4.1.2/ctime
+/usr/include/c++/4.1.2/cwchar
+/usr/include/c++/4.1.2/cwctype
+/usr/include/c++/4.1.2/cxxabi.h
+/usr/include/c++/4.1.2/debug
+/usr/include/c++/4.1.2/debug/bitset
+/usr/include/c++/4.1.2/debug/debug.h
+/usr/include/c++/4.1.2/debug/deque
+/usr/include/c++/4.1.2/debug/formatter.h
+/usr/include/c++/4.1.2/debug/functions.h
+/usr/include/c++/4.1.2/debug/hash_map
+/usr/include/c++/4.1.2/debug/hash_map.h
+/usr/include/c++/4.1.2/debug/hash_multimap.h
+/usr/include/c++/4.1.2/debug/hash_multiset.h
+/usr/include/c++/4.1.2/debug/hash_set
+/usr/include/c++/4.1.2/debug/hash_set.h
+/usr/include/c++/4.1.2/debug/list
+/usr/include/c++/4.1.2/debug/macros.h
+/usr/include/c++/4.1.2/debug/map
+/usr/include/c++/4.1.2/debug/map.h
+/usr/include/c++/4.1.2/debug/multimap.h
+/usr/include/c++/4.1.2/debug/multiset.h
+/usr/include/c++/4.1.2/debug/safe_base.h
+/usr/include/c++/4.1.2/debug/safe_iterator.h
+/usr/include/c++/4.1.2/debug/safe_iterator.tcc
+/usr/include/c++/4.1.2/debug/safe_sequence.h
+/usr/include/c++/4.1.2/debug/set
+/usr/include/c++/4.1.2/debug/set.h
+/usr/include/c++/4.1.2/debug/string
+/usr/include/c++/4.1.2/debug/vector
+/usr/include/c++/4.1.2/deque
+/usr/include/c++/4.1.2/exception
+/usr/include/c++/4.1.2/exception_defines.h
+/usr/include/c++/4.1.2/ext
+/usr/include/c++/4.1.2/ext/algorithm
+/usr/include/c++/4.1.2/ext/array_allocator.h
+/usr/include/c++/4.1.2/ext/bitmap_allocator.h
+/usr/include/c++/4.1.2/ext/codecvt_specializations.h
+/usr/include/c++/4.1.2/ext/debug_allocator.h
+/usr/include/c++/4.1.2/ext/functional
+/usr/include/c++/4.1.2/ext/hash_fun.h
+/usr/include/c++/4.1.2/ext/hash_map
+/usr/include/c++/4.1.2/ext/hash_set
+/usr/include/c++/4.1.2/ext/hashtable.h
+/usr/include/c++/4.1.2/ext/iterator
+/usr/include/c++/4.1.2/ext/malloc_allocator.h
+/usr/include/c++/4.1.2/ext/memory
+/usr/include/c++/4.1.2/ext/mt_allocator.h
+/usr/include/c++/4.1.2/ext/new_allocator.h
+/usr/include/c++/4.1.2/ext/numeric
+/usr/include/c++/4.1.2/ext/pb_assoc
+/usr/include/c++/4.1.2/ext/pb_assoc/assoc_cntnr.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/data_type.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/assoc_cntnr_base.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_assoc_cntnr
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_assoc_cntnr/constructor_destructor_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_assoc_cntnr/constructors_destructor_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_assoc_cntnr/d_extract_key.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_assoc_cntnr/d_find_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_assoc_cntnr/d_insert_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_assoc_cntnr/erase_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_assoc_cntnr/extract_key.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_assoc_cntnr/info_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_assoc_cntnr/insert_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_assoc_cntnr/iterators_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_hash_assoc_cntnr
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_hash_assoc_cntnr/constructors_destructor_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_hash_assoc_cntnr/resize_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_tree_assoc_cntnr
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_tree_assoc_cntnr/constructor_destructor_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_tree_assoc_cntnr/constructors_destructor_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_tree_assoc_cntnr/erase_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_tree_assoc_cntnr/node_iteration_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_tree_assoc_cntnr/policy_access_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_tree_assoc_cntnr/r_erase_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_tree_assoc_cntnr/r_range_iteration_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_tree_assoc_cntnr/range_iteration_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/basic_tree_assoc_cntnr/split_join_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/bin_search_tree_.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/cond_dtor_entry_dealtor.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/cond_key_dtor_entry_dealtor.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/debug_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/erase_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/find_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/find_iterators.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/info_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/insert_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/iterators_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/node_iterators.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/r_erase_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/rotate_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/bin_search_tree_/split_join_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_hash_assoc_cntnr
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/cc_ht_map_.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/cmp_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/cond_key_dtor_entry_dealtor.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/constructor_destructor_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/constructor_destructor_no_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/constructor_destructor_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/debug_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/debug_no_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/debug_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/entry_list_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/erase_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/erase_no_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/erase_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/find_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/find_no_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/find_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/info_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/insert_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/insert_no_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/insert_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/iterators_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/policy_access_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/resize_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/resize_no_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/resize_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/size_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cc_ht_map_/standard_policies.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/cond_dealtor.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/constructors_destructor_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/ds_trait_imp.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/eq_fn
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/eq_fn/eq_by_less.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/eq_fn/hash_eq_fn.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_hash_assoc_cntnr
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_hash_assoc_cntnr/constructor_destructor_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/constructor_destructor_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/constructor_destructor_no_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/constructor_destructor_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/debug_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/debug_no_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/debug_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/erase_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/erase_no_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/erase_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/find_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/find_no_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/find_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/gp_ht_map_.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/info_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/insert_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/insert_no_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/insert_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/iterator_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/policy_access_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/resize_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/resize_no_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/gp_ht_map_/resize_store_hash_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/hash_fn
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/hash_fn/direct_mask_range_hashing_imp.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/hash_fn/direct_mod_range_hashing_imp.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/hash_fn/linear_probe_fn_imp.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/hash_fn/mask_based_range_hashing.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/hash_fn/mod_based_range_hashing.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/hash_fn/probe_fn_base.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/hash_fn/quadratic_probe_fn_imp.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/hash_fn/ranged_hash_fn.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/hash_fn/ranged_probe_fn.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/hash_types_traits.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_assoc_cntnr
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_assoc_cntnr/constructor_destructor_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_assoc_cntnr/policy_access_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_map_
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_map_/constructor_destructor_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_map_/debug_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_map_/erase_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_map_/find_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_map_/info_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_map_/insert_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_map_/iterators_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_map_/lu_map_.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_map_/policy_access_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_policy
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_policy/counter_lu_metadata_imp.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_policy/counter_lu_policy_imp.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/lu_policy/mtf_lu_policy_imp.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/map_debug_base.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/mapping_level_imp.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/ms_category_imp.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/ms_trait_imp.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/order_statistics_imp.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_/cond_dtor.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_/debug_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_/erase_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_/find_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_/info_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_/insert_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_/iterators_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_/node_iterators.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_/ov_tree_map_.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/ov_tree_map_/split_join_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/rb_tree_map_
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/rb_tree_map_/debug_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/rb_tree_map_/erase_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/rb_tree_map_/find_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/rb_tree_map_/info_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/rb_tree_map_/insert_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/rb_tree_map_/node.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/rb_tree_map_/rb_tree_.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/rb_tree_map_/split_join_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/resize_policy
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/resize_policy/cc_hash_max_collision_resize_trigger_imp.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/resize_policy/hash_exponential_size_policy_imp.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/resize_policy/hash_prime_size_policy_imp.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/resize_policy/hash_standard_resize_policy_imp.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/resize_policy/ht_prime_size_policy_imp.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/resize_policy/size_base.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/splay_tree_
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/splay_tree_/constructors_destructor_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/splay_tree_/debug_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/splay_tree_/erase_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/splay_tree_/find_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/splay_tree_/info_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/splay_tree_/insert_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/splay_tree_/node.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/splay_tree_/splay_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/splay_tree_/splay_tree_.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/splay_tree_/split_join_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/standard_policies.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/standard_sizes.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/tree_assoc_cntnr
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/tree_assoc_cntnr/constructor_destructor_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/tree_policy
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/tree_policy/null_node_updator_imp.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/tree_policy/order_statistics_imp.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/type_utils.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/typelist
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/typelist.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/typelist/typelist_append.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/typelist/typelist_apply.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/typelist/typelist_at_index.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/typelist/typelist_contains.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/typelist/typelist_filter.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/typelist/typelist_transform.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/typelist/typelist_typelist_append.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/types_traits.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/unordered_iterator
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/unordered_iterator/const_find_iterator.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/unordered_iterator/const_iterator.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/unordered_iterator/find_iterator.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/unordered_iterator/iterator.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/constructor_destructor_and_related.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/erase_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/erase_if_pred.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/find_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/info_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/insert_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/invalidation_guarantee_selector.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/it_value_type_traits.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/iterator.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/iterator_fn_imps.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/ref_pair.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/value_type_adapter.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/detail/value_type_adapter/value_type_traits.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/ds_trait.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/exception.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/hash_policy.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/lu_policy.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/ms_trait.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/tree_policy.hpp
+/usr/include/c++/4.1.2/ext/pb_assoc/trivial_iterator_def.hpp
+/usr/include/c++/4.1.2/ext/pod_char_traits.h
+/usr/include/c++/4.1.2/ext/pool_allocator.h
+/usr/include/c++/4.1.2/ext/rb_tree
+/usr/include/c++/4.1.2/ext/rc_string_base.h
+/usr/include/c++/4.1.2/ext/rope
+/usr/include/c++/4.1.2/ext/ropeimpl.h
+/usr/include/c++/4.1.2/ext/slist
+/usr/include/c++/4.1.2/ext/sso_string_base.h
+/usr/include/c++/4.1.2/ext/stdio_filebuf.h
+/usr/include/c++/4.1.2/ext/stdio_sync_filebuf.h
+/usr/include/c++/4.1.2/ext/typelist.h
+/usr/include/c++/4.1.2/ext/vstring.h
+/usr/include/c++/4.1.2/ext/vstring.tcc
+/usr/include/c++/4.1.2/ext/vstring_fwd.h
+/usr/include/c++/4.1.2/ext/vstring_util.h
+/usr/include/c++/4.1.2/fstream
+/usr/include/c++/4.1.2/functional
+/usr/include/c++/4.1.2/i486-pc-linux-gnu
+/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits
+/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/atomic_word.h
+/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/basic_file.h
+/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/c++allocator.h
+/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/c++config.h
+/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/c++io.h
+/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/c++locale.h
+/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/cpu_defines.h
+/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/ctype_base.h
+/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/ctype_inline.h
+/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/ctype_noninline.h
+/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/cxxabi_tweaks.h
+/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/gthr-default.h
+/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/gthr-posix.h
+/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/gthr-single.h
+/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/gthr-tpf.h
+/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/gthr.h
+/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/messages_members.h
+/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/os_defines.h
+/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/stdc++.h.gch
+/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/stdc++.h.gch/O0g.gch
+/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/stdc++.h.gch/O2g.gch
+/usr/include/c++/4.1.2/i486-pc-linux-gnu/bits/time_members.h
+/usr/include/c++/4.1.2/iomanip
+/usr/include/c++/4.1.2/ios
+/usr/include/c++/4.1.2/iosfwd
+/usr/include/c++/4.1.2/iostream
+/usr/include/c++/4.1.2/istream
+/usr/include/c++/4.1.2/iterator
+/usr/include/c++/4.1.2/limits
+/usr/include/c++/4.1.2/list
+/usr/include/c++/4.1.2/locale
+/usr/include/c++/4.1.2/map
+/usr/include/c++/4.1.2/memory
+/usr/include/c++/4.1.2/new
+/usr/include/c++/4.1.2/numeric
+/usr/include/c++/4.1.2/ostream
+/usr/include/c++/4.1.2/queue
+/usr/include/c++/4.1.2/set
+/usr/include/c++/4.1.2/sstream
+/usr/include/c++/4.1.2/stack
+/usr/include/c++/4.1.2/stdexcept
+/usr/include/c++/4.1.2/streambuf
+/usr/include/c++/4.1.2/string
+/usr/include/c++/4.1.2/tr1
+/usr/include/c++/4.1.2/tr1/array
+/usr/include/c++/4.1.2/tr1/bind_iterate.h
+/usr/include/c++/4.1.2/tr1/bind_repeat.h
+/usr/include/c++/4.1.2/tr1/boost_shared_ptr.h
+/usr/include/c++/4.1.2/tr1/functional
+/usr/include/c++/4.1.2/tr1/functional_iterate.h
+/usr/include/c++/4.1.2/tr1/hashtable
+/usr/include/c++/4.1.2/tr1/memory
+/usr/include/c++/4.1.2/tr1/mu_iterate.h
+/usr/include/c++/4.1.2/tr1/ref_fwd.h
+/usr/include/c++/4.1.2/tr1/ref_wrap_iterate.h
+/usr/include/c++/4.1.2/tr1/repeat.h
+/usr/include/c++/4.1.2/tr1/tuple
+/usr/include/c++/4.1.2/tr1/tuple_iterate.h
+/usr/include/c++/4.1.2/tr1/type_traits
+/usr/include/c++/4.1.2/tr1/type_traits_fwd.h
+/usr/include/c++/4.1.2/tr1/unordered_map
+/usr/include/c++/4.1.2/tr1/unordered_set
+/usr/include/c++/4.1.2/tr1/utility
+/usr/include/c++/4.1.2/typeinfo
+/usr/include/c++/4.1.2/utility
+/usr/include/c++/4.1.2/valarray
+/usr/include/c++/4.1.2/vector
+/usr/lib
+/usr/lib/gcc
+/usr/lib/gcc/i486-pc-linux-gnu
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/specs-local
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/specs-local/specs_g++
+/usr/lib/libsupc++.a
+/usr/lib/libsupc++.la
+/usr/libexec/gcc/i486-pc-linux-gnu/4.1.2/cc1plus
+/usr/share
+/usr/share/doc
+/usr/share/doc/g++
+/usr/share/doc/g++/COPYING
+/usr/share/doc/g++/FAQ
+/usr/share/doc/g++/INSTALL
+/usr/share/doc/g++/INSTALL/README
+/usr/share/doc/g++/INSTALL/binaries.html
+/usr/share/doc/g++/INSTALL/build.html
+/usr/share/doc/g++/INSTALL/configure.html
+/usr/share/doc/g++/INSTALL/download.html
+/usr/share/doc/g++/INSTALL/finalinstall.html
+/usr/share/doc/g++/INSTALL/gfdl.html
+/usr/share/doc/g++/INSTALL/index.html
+/usr/share/doc/g++/INSTALL/old.html
+/usr/share/doc/g++/INSTALL/prerequisites.html
+/usr/share/doc/g++/INSTALL/specific.html
+/usr/share/doc/g++/INSTALL/test.html
+/usr/share/doc/g++/NEWS
+/usr/share/doc/g++/README
+/usr/share/doc/g++/README.SCO
+/usr/share/man/man1/g++.1
+/var/log/sorcery/compile/g++-4.1.2.bz2
+/var/log/sorcery/install/g++-4.1.2
+/var/log/sorcery/md5sum/g++-4.1.2
diff --git a/cauldron/data/cleaners/gcc-clean
b/cauldron/data/cleaners/gcc-clean
new file mode 100644
index 0000000..8a9b788
--- /dev/null
+++ b/cauldron/data/cleaners/gcc-clean
@@ -0,0 +1,154 @@
+/lib/cpp
+/usr
+/usr/bin/cc
+/usr/bin/cpp
+/usr/bin/gcc
+/usr/bin/gccbug
+/usr/bin/gcov
+/usr/bin/i486-pc-linux-gnu-gcc
+/usr/bin/i486-pc-linux-gnu-gcc-4.1.2
+/usr/include
+/usr/include/mf-runtime.h
+/usr/lib
+/usr/lib/gcc
+/usr/lib/gcc/i486-pc-linux-gnu
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/crtbegin.o
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/crtbeginS.o
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/crtbeginT.o
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/crtend.o
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/crtendS.o
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/crtfastmath.o
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./README
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./emmintrin.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./fixed
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./float.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./iso646.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./limits.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./mm3dnow.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./mm_malloc.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./mmintrin.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./pmmintrin.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./stdarg.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./stdbool.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./stddef.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./syslimits.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./unwind.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./varargs.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/./xmmintrin.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/README
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/emmintrin.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/fixed
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/float.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/iso646.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/limits.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/mm3dnow.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/mm_malloc.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/mmintrin.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/pmmintrin.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stdarg.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stdbool.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/syslimits.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/unwind.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/varargs.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/xmmintrin.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/gsyslimits.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/README
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/emmintrin.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/float.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/iso646.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/limits.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/mm3dnow.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/mm_malloc.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/mmintrin.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/pmmintrin.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/stdarg.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/stdbool.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/stddef.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/unwind.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/varargs.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/include/xmmintrin.h
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/macro_list
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/install-tools/mkheaders.conf
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/libgcc.a
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/libgcc_eh.a
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/libgcov.a
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/specs
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/specs-local
+/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/specs-local/specs-gcc
+/usr/lib/libiberty.a
+/usr/lib/libmudflap.a
+/usr/lib/libmudflap.la
+/usr/lib/libmudflap.so
+/usr/lib/libmudflap.so.0
+/usr/lib/libmudflap.so.0.0.0
+/usr/lib/libmudflapth.a
+/usr/lib/libmudflapth.la
+/usr/lib/libmudflapth.so
+/usr/lib/libmudflapth.so.0
+/usr/lib/libmudflapth.so.0.0.0
+/usr/lib/libssp.a
+/usr/lib/libssp.la
+/usr/lib/libssp.so
+/usr/lib/libssp.so.0
+/usr/lib/libssp.so.0.0.0
+/usr/lib/libssp_nonshared.a
+/usr/lib/libssp_nonshared.la
+/usr/libexec
+/usr/libexec/gcc
+/usr/libexec/gcc/i486-pc-linux-gnu
+/usr/libexec/gcc/i486-pc-linux-gnu/4.1.2
+/usr/libexec/gcc/i486-pc-linux-gnu/4.1.2/cc1
+/usr/libexec/gcc/i486-pc-linux-gnu/4.1.2/collect2
+/usr/libexec/gcc/i486-pc-linux-gnu/4.1.2/install-tools
+/usr/libexec/gcc/i486-pc-linux-gnu/4.1.2/install-tools/fixinc.sh
+/usr/libexec/gcc/i486-pc-linux-gnu/4.1.2/install-tools/fixincl
+/usr/libexec/gcc/i486-pc-linux-gnu/4.1.2/install-tools/mkheaders
+/usr/share/info/cpp.info
+/usr/share/info/cppinternals.info
+/usr/share/info/gcc.info
+/usr/share/info/gccinstall.info
+/usr/share/info/gccint.info
+/usr/share/locale/be/LC_MESSAGES/cpplib.mo
+/usr/share/locale/be/LC_MESSAGES/gcc.mo
+/usr/share/locale/ca/LC_MESSAGES/cpplib.mo
+/usr/share/locale/ca/LC_MESSAGES/gcc.mo
+/usr/share/locale/da/LC_MESSAGES/cpplib.mo
+/usr/share/locale/da/LC_MESSAGES/gcc.mo
+/usr/share/locale/de/LC_MESSAGES/cpplib.mo
+/usr/share/locale/de/LC_MESSAGES/gcc.mo
+/usr/share/locale/el/LC_MESSAGES/cpplib.mo
+/usr/share/locale/el/LC_MESSAGES/gcc.mo
+/usr/share/locale/es/LC_MESSAGES/cpplib.mo
+/usr/share/locale/es/LC_MESSAGES/gcc.mo
+/usr/share/locale/fr/LC_MESSAGES/cpplib.mo
+/usr/share/locale/fr/LC_MESSAGES/gcc.mo
+/usr/share/locale/ja/LC_MESSAGES/cpplib.mo
+/usr/share/locale/ja/LC_MESSAGES/gcc.mo
+/usr/share/locale/nl/LC_MESSAGES/cpplib.mo
+/usr/share/locale/nl/LC_MESSAGES/gcc.mo
+/usr/share/locale/ru/LC_MESSAGES/gcc.mo
+/usr/share/locale/rw/LC_MESSAGES/cpplib.mo
+/usr/share/locale/rw/LC_MESSAGES/gcc.mo
+/usr/share/locale/sv/LC_MESSAGES/cpplib.mo
+/usr/share/locale/sv/LC_MESSAGES/gcc.mo
+/usr/share/locale/tr/LC_MESSAGES/cpplib.mo
+/usr/share/locale/tr/LC_MESSAGES/gcc.mo
+/usr/share/locale/vi/LC_MESSAGES/cpplib.mo
+/usr/share/locale/zh_CN/LC_MESSAGES/cpplib.mo
+/usr/share/locale/zh_CN/LC_MESSAGES/gcc.mo
+/usr/share/locale/zh_TW/LC_MESSAGES/cpplib.mo
+/usr/share/locale/zh_TW/LC_MESSAGES/gcc.mo
+/usr/share/man/man1/cpp.1
+/usr/share/man/man1/gcc.1
+/usr/share/man/man1/gcov.1
+/usr/share/man/man7/fsf-funding.7
+/usr/share/man/man7/gfdl.7
+/usr/share/man/man7/gpl.7
+/var/log/sorcery/compile/gcc-4.1.2.bz2
+/var/log/sorcery/install/gcc-4.1.2
+/var/log/sorcery/md5sum/gcc-4.1.2
diff --git a/cauldron/data/cleaners/grub-clean
b/cauldron/data/cleaners/grub-clean
new file mode 100644
index 0000000..11c7c95
--- /dev/null
+++ b/cauldron/data/cleaners/grub-clean
@@ -0,0 +1,44 @@
+/boot
+/boot/grub
+/boot/grub/images
+/boot/grub/images/smgl-splash.xpm.gz
+/sbin
+/sbin/grub
+/sbin/grub-install
+/sbin/grub-md5-crypt
+/sbin/grub-set-default
+/sbin/grub-terminfo
+/usr
+/usr/bin
+/usr/bin/mbchk
+/usr/lib
+/usr/lib/grub
+/usr/lib/grub/i386-pc
+/usr/lib/grub/i386-pc/e2fs_stage1_5
+/usr/lib/grub/i386-pc/fat_stage1_5
+/usr/lib/grub/i386-pc/ffs_stage1_5
+/usr/lib/grub/i386-pc/iso9660_stage1_5
+/usr/lib/grub/i386-pc/jfs_stage1_5
+/usr/lib/grub/i386-pc/minix_stage1_5
+/usr/lib/grub/i386-pc/reiserfs_stage1_5
+/usr/lib/grub/i386-pc/stage1
+/usr/lib/grub/i386-pc/stage2
+/usr/lib/grub/i386-pc/stage2_eltorito
+/usr/lib/grub/i386-pc/ufs2_stage1_5
+/usr/lib/grub/i386-pc/vstafs_stage1_5
+/usr/lib/grub/i386-pc/xfs_stage1_5
+/usr/share
+/usr/share/info
+/usr/share/info/grub.info
+/usr/share/info/multiboot.info
+/usr/share/man
+/usr/share/man/man1
+/usr/share/man/man1/mbchk.1
+/usr/share/man/man8
+/usr/share/man/man8/grub-install.8
+/usr/share/man/man8/grub-md5-crypt.8
+/usr/share/man/man8/grub-terminfo.8
+/usr/share/man/man8/grub.8
+/var/log/sorcery/compile/grub-0.97.bz2
+/var/log/sorcery/install/grub-0.97
+/var/log/sorcery/md5sum/grub-0.97
diff --git a/cauldron/data/cleaners/installwatch-clean
b/cauldron/data/cleaners/installwatch-clean
new file mode 100644
index 0000000..fb8c8aa
--- /dev/null
+++ b/cauldron/data/cleaners/installwatch-clean
@@ -0,0 +1,5 @@
+/usr/bin/installwatch
+/usr/lib/installwatch.so
+/var/log/sorcery/compile/installwatch-0.6.3.bz2
+/var/log/sorcery/install/installwatch-0.6.3
+/var/log/sorcery/md5sum/installwatch-0.6.3
diff --git a/cauldron/data/cleaners/libidn-clean
b/cauldron/data/cleaners/libidn-clean
new file mode 100644
index 0000000..1208b12
--- /dev/null
+++ b/cauldron/data/cleaners/libidn-clean
@@ -0,0 +1 @@
+Install log for libidn does not exist
diff --git a/cauldron/data/cleaners/lilo-clean
b/cauldron/data/cleaners/lilo-clean
new file mode 100644
index 0000000..309f7dd
--- /dev/null
+++ b/cauldron/data/cleaners/lilo-clean
@@ -0,0 +1,52 @@
+/boot
+/boot/boot.bmp
+/boot/diag1.img
+/etc
+/etc/lilo.raid.conf
+/etc/lilo.sample.conf
+/sbin
+/sbin/lilo
+/sbin/mkrescue
+/usr
+/usr/sbin
+/usr/sbin/keytab-lilo.pl
+/usr/share
+/usr/share/doc
+/usr/share/doc/lilo
+/usr/share/doc/lilo/CHANGES
+/usr/share/doc/lilo/COPYING
+/usr/share/doc/lilo/README
+/usr/share/doc/lilo/README.bitmaps
+/usr/share/doc/lilo/README.common.problems
+/usr/share/doc/lilo/README.disk
+/usr/share/doc/lilo/README.nokeyboard
+/usr/share/doc/lilo/README.pseudo
+/usr/share/doc/lilo/README.raid1
+/usr/share/doc/lilo/README.volumeID
+/usr/share/doc/lilo/doc
+/usr/share/doc/lilo/doc/Makefile
+/usr/share/doc/lilo/doc/README
+/usr/share/doc/lilo/doc/bootloader.fig
+/usr/share/doc/lilo/doc/bootloader.tex
+/usr/share/doc/lilo/doc/fullpage.sty
+/usr/share/doc/lilo/doc/image.fig
+/usr/share/doc/lilo/doc/image.tex
+/usr/share/doc/lilo/doc/map.fig
+/usr/share/doc/lilo/doc/map.tex
+/usr/share/doc/lilo/doc/other.fig
+/usr/share/doc/lilo/doc/other.tex
+/usr/share/doc/lilo/doc/parameter.fig
+/usr/share/doc/lilo/doc/parameter.tex
+/usr/share/doc/lilo/doc/rlatex
+/usr/share/doc/lilo/doc/t2a.pl
+/usr/share/doc/lilo/doc/tech.tex
+/usr/share/doc/lilo/doc/user.tex
+/usr/share/man
+/usr/share/man/man5
+/usr/share/man/man5/lilo.conf.5
+/usr/share/man/man8
+/usr/share/man/man8/lilo.8
+/usr/share/man/man8/mkrescue.8
+/var/log/sorcery/compile/lilo-22.8.bz2
+/var/log/sorcery/install/lilo-22.8
+/var/log/sorcery/md5sum/lilo-22.8
diff --git a/cauldron/data/cleaners/m4-clean b/cauldron/data/cleaners/m4-clean
new file mode 100644
index 0000000..00b4c81
--- /dev/null
+++ b/cauldron/data/cleaners/m4-clean
@@ -0,0 +1,31 @@
+/usr
+/usr/bin
+/usr/bin/m4
+/usr/share
+/usr/share/doc
+/usr/share/doc/m4
+/usr/share/doc/m4/COPYING
+/usr/share/doc/m4/NEWS
+/usr/share/doc/m4/README
+/usr/share/doc/m4/doc
+/usr/share/doc/m4/doc/Makefile
+/usr/share/doc/m4/doc/Makefile.am
+/usr/share/doc/m4/doc/Makefile.in
+/usr/share/doc/m4/doc/fdl.texi
+/usr/share/doc/m4/doc/gendocs_template
+/usr/share/doc/m4/doc/gpl-3.0.texi
+/usr/share/doc/m4/doc/m4.1
+/usr/share/doc/m4/doc/m4.info
+/usr/share/doc/m4/doc/m4.texinfo
+/usr/share/doc/m4/doc/mdate-sh
+/usr/share/doc/m4/doc/stamp-vti
+/usr/share/doc/m4/doc/texinfo.tex
+/usr/share/doc/m4/doc/version.texi
+/usr/share/info
+/usr/share/info/m4.info
+/usr/share/man
+/usr/share/man/man1
+/usr/share/man/man1/m4.1
+/var/log/sorcery/compile/m4-1.4.10.bz2
+/var/log/sorcery/install/m4-1.4.10
+/var/log/sorcery/md5sum/m4-1.4.10
diff --git a/cauldron/data/config/arch/host_arch.conf
b/cauldron/data/config/arch/host_arch.conf
new file mode 100644
index 0000000..e92e843
--- /dev/null
+++ b/cauldron/data/config/arch/host_arch.conf
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# contains the arch info for the HOST
+CAULDRON_HOST_TRIPLE="${CAULDRON_HOST_TRIPLE:-}"
+
+CAULDRON_HOST_ARCH_PATH=$(grep 'ARCH_SPECS=' "$CAULDRON_HSORCERY_CONFIG" |
cut -d= -f2-)
+
+CAULDRON_HOST_CACHE_PATH="${CAULDRON_HOST_CACHE_PATH:-/var/cache/sorcery}"
+
+eval CAULDRON_HOST_ARCH=$(grep 'ARCHITECTURE=' "$CAULDRON_HSORCERY_CONFIG" |
cut -d= -f2-)
+
+eval CAULDRON_CACHE_EXTENSION=$(grep 'EXTENSION='
"$CAULDRON_HSORCERY_CONFIG" | cut -d= -f2-)
+
+
+# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/cauldron/data/config/arch/ppc.conf
b/cauldron/data/config/arch/ppc.conf
new file mode 100644
index 0000000..a30f03e
--- /dev/null
+++ b/cauldron/data/config/arch/ppc.conf
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+# the arch to generate the .iso for
+CAULDRON_ARCH="${CAULDRON_ARCH:-ppc}"
+
diff --git a/cauldron/data/config/arch/x86.conf
b/cauldron/data/config/arch/x86.conf
new file mode 100644
index 0000000..0b4d32d
--- /dev/null
+++ b/cauldron/data/config/arch/x86.conf
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+# the arch to generate the .iso for
+CAULDRON_ARCH="${CAULDRON_ARCH:-x86}"
+
diff --git a/cauldron/data/config/arch/x86_64.conf
b/cauldron/data/config/arch/x86_64.conf
new file mode 100644
index 0000000..5134a8f
--- /dev/null
+++ b/cauldron/data/config/arch/x86_64.conf
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+# the arch to generate the .iso for
+CAULDRON_ARCH="${CAULDRON_ARCH:-x86_64}"
+
diff --git a/cauldron/data/config/build.conf b/cauldron/data/config/build.conf
new file mode 100644
index 0000000..2f1b8cb
--- /dev/null
+++ b/cauldron/data/config/build.conf
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+# path to the build chroots
+CAULDRON_BUILD="${CAULDRON_BUILD:-$CAULDRON_TMP/build}"
+
+# path to working resolv.conf that can be used to resolv hostnames and
download
+# necessary source files
+CAULDRON_RESOLV="${CAULDRON_RESOLV:-$CAULDRON_HOST/etc/resolv.conf}"
+
+# file listing all the spells needed for the build toolchain
+CAULDRON_TOOLCHAIN="${CAULDRON_TOOLCHAIN:-$CAULDRON_DATA/$CAULDRON_ARCH/toolchain}"
+
+# name of the local on-disk basesystem chroot image to use for the
+# baseroot method (i.e. cauldron_toolchain_baseroot)
+CAULDRON_BASEROOT="${CAULDRON_BASEROOT:-smgl-stable-0.47-basesytem-$CAULDRON_ARCH.tar.bz2}"
+# URL to a basesystem chroot for use with cauldron_toolchain_baseroot
+# only used when generating CAULDRON_BUILD from the baseroot method
+CAULDRON_BASEROOT_URL="${CAULDRON_BASEROOT_URL:-http://download.sourcemage.org/image/official/$CAULDRON_BASEROOT}";
+
+# whether CAULDRON_BUILD should be rm'ed after cauldron has finished
+CAULDRON_CLEAN="${CAULDRON_CLEAN:-no}"
+
+# whether cauldron should try it's hardest to generate needed spell
+# caches, even if that means casting and dispelling extra spells in a
+# chroot (only used when generating the base toolchain)
+CAULDRON_AGGRESSIVE="${CAULDRON_AGGRESSIVE:-yes}"
+
diff --git a/cauldron/data/config/commands.conf
b/cauldron/data/config/commands.conf
new file mode 100644
index 0000000..9a269b9
--- /dev/null
+++ b/cauldron/data/config/commands.conf
@@ -0,0 +1,294 @@
+#!/bin/bash
+
+# command to output text strings (typically echo, output to STDOUT
+[[ -n "${CAULDRON_CMD_OUTPUT[@]}" ]] ||
+ CAULDRON_CMD_OUTPUT=(
+ echo
+ )
+
+# command to enter a chroot
+[[ -n "${CAULDRON_CMD_CHROOT[@]}" ]] ||
+ CAULDRON_CMD_CHROOT=(
+ chroot
+ )
+
+# command to download a url from the internet
+[[ -n "${CAULDRON_CMD_URL_DL[@]}" ]] ||
+ CAULDRON_CMD_URL_DL=(
+ wget
+ )
+
+# command used to generate the final iso media
+[[ -n "${CAULDRON_CMD_MKISOFS[@]}" ]] ||
+ CAULDRON_CMD_MKISOFS=(
+ mkisofs
+ -R
+ -b isolinux/isolinux.bin
+ -c isolinux/boot.cat
+ -no-emul-boot
+ -boot-load-size 4
+ -boot-info-table
+ -o "$CAULDRON_ISO_NAME"
+ "$CAULDRON_BUILD"
+ )
+
+# command to archive the sys package (e.g., tar, cpio, etc.)
+[[ -n "${CAULDRON_CMD_ARCHIVE_SYS[@]}" ]] ||
+ CAULDRON_CMD_ARCHIVE_SYS=(
+ tar
+ cf "$CAULDRON_BUILD"/"${CAULDRON_SYS_NAME}.tar"
+ -C "$CAULDRON_SYS"
+ )
+
+# command used for compressing files
+[[ -n "${CAULDRON_CMD_COMPRESS[@]}" ]] ||
+ CAULDRON_CMD_COMPRESS=(
+ bzip2
+ )
+
+# command to unpack a baseroot archive into the cauldron build
+[[ -n "${CAULDRON_CMD_TAR[@]}" ]] ||
+ CAULDRON_CMD_TAR=(
+ tar
+ )
+
+# command to unpack a sorcery archive into the cauldron build
+[[ -n "${CAULDRON_CMD_UNPACK_SORCERY[@]}" ]] ||
+ CAULDRON_CMD_UNPACK_SORCERY=(
+ "${CAULDRON_CMD_TAR[@]}"
+ -C "$CAULDRON_BUILD/usr/src"
+ xf
+ )
+
+# command to unpack a baseroot archive into the cauldron build
+[[ -n "${CAULDRON_CMD_UNPACK_BASEROOT[@]}" ]] ||
+ CAULDRON_CMD_UNPACK_BASEROOT=(
+ "${CAULDRON_CMD_TAR[@]}"
+ -C "$CAULDRON_BUILD/baseroot"
+ xf "$CAULDRON_BASEROOT"
+ )
+
+# command to unpack a baseroot archive into the cauldron build
+[[ -n "${CAULDRON_CMD_UNPACK_BUILD[@]}" ]] ||
+ CAULDRON_CMD_UNPACK_BUILD=(
+ "${CAULDRON_CMD_TAR[@]}"
+ -C "$CAULDRON_BUILD/"
+ xf
+ )
+
+# command to chmod files
+[[ -n "${CAULDRON_CMD_CHMOD[@]}" ]] ||
+ CAULDRON_CMD_CHMOD=(
+ chmod
+ )
+
+# command to make directories
+[[ -n "${CAULDRON_CMD_MKDIR[@]}" ]] ||
+ CAULDRON_CMD_MKDIR=(
+ mkdir
+ -p
+ )
+
+# command to remove directories
+[[ -n "${CAULDRON_CMD_RMDIR[@]}" ]] ||
+ CAULDRON_CMD_RMDIR=(
+ rmdir
+ )
+
+# command to copy
+[[ -n "${CAULDRON_CMD_CP[@]}" ]] ||
+ CAULDRON_CMD_CP=(
+ cp
+ )
+
+# command to copy forcefully
+[[ -n "${CAULDRON_CMD_CP_FORCE[@]}" ]] ||
+ CAULDRON_CMD_CP_FORCE=(
+ "${CAULDRON_CMD_CP[@]}"
+ -f
+ )
+
+# command to copy recursively
+[[ -n "${CAULDRON_CMD_CP_RECURSE[@]}" ]] ||
+ CAULDRON_CMD_CP_RECURSE=(
+ "${CAULDRON_CMD_CP[@]}"
+ -r
+ )
+
+# command to copy recursively forcefully
+[[ -n "${CAULDRON_CMD_CP_RECURSE_FORCE[@]}" ]] ||
+ CAULDRON_CMD_CP_RECURSE_FORCE=(
+ "${CAULDRON_CMD_CP_RECURSE[@]}"
+ -f
+ )
+
+# command to copy recursively, preserving as much information as possible
+[[ -n "${CAULDRON_CMD_CP_EXACT[@]}" ]] ||
+ CAULDRON_CMD_CP_EXACT=(
+ "${CAULDRON_CMD_CP[@]}"
+ -a --parents
+ )
+
+# command to remove files
+[[ -n "${CAULDRON_CMD_RM[@]}" ]] ||
+ CAULDRON_CMD_RM=(
+ rm
+ )
+
+# command to remove files forcefully
+[[ -n "${CAULDRON_CMD_RM_FORCE[@]}" ]] ||
+ CAULDRON_CMD_RM_FORCE=(
+ "${CAULDRON_CMD_RM_[@]}"
+ -f
+ )
+
+# command to remove files recursively
+[[ -n "${CAULDRON_CMD_RM_RECURSE[@]}" ]] ||
+ CAULDRON_CMD_RM_RECURSE=(
+ "${CAULDRON_CMD_RM[@]}"
+ -r
+ )
+
+# command to remove files recursively forcefully
+[[ -n "${CAULDRON_CMD_RM_RECURSE_FORCE[@]}" ]] ||
+ CAULDRON_CMD_RM_RECURSE_FORCE=(
+ "${CAULDRON_CMD_RM_RECURSE[@]}"
+ -f
+ )
+
+[[ -n "${CAULDRON_CMD_SYMLINK[@]}" ]] ||
+ CAULDRON_CMD_SYMLINK=(
+ ln
+ -s
+ )
+
+[[ -n "${CAULDRON_CMD_SYMLINK_FORCE[@]}" ]] ||
+ CAULDRON_CMD_SYMLINK_FORCE=(
+ "${CAULDRON_CMD_SYMLINK[@]}"
+ -f
+ )
+
+[[ -n "${CAULDRON_CMD_HARDLINK[@]}" ]] ||
+ CAULDRON_CMD_HARDLINK=(
+ ln
+ )
+
+[[ -n "${CAULDRON_CMD_HARDLINK_FORCE[@]}" ]] ||
+ CAULDRON_CMD_HARDLINK_FORCE=(
+ "${CAULDRON_CMD_HARDLINK[@]}"
+ -f
+ )
+
+# command to mount a filesystem
+[[ -n "${CAULDRON_CMD_MOUNT[@]}" ]] ||
+ CAULDRON_CMD_MOUNT=(
+ mount
+ )
+
+# command to bind-mount a filesystem
+[[ -n "${CAULDRON_CMD_MOUNT_BIND[@]}" ]] ||
+ CAULDRON_CMD_MOUNT_BIND=(
+ "${CAULDRON_CMD_MOUNT[@]}"
+ --bind
+ )
+
+# command to loop-mount a filesystem
+[[ -n "${CAULDRON_CMD_MOUNT_LOOP[@]}" ]] ||
+ CAULDRON_CMD_MOUNT_LOOP=(
+ "${CAULDRON_CMD_MOUNT[@]}"
+ -o loop
+ )
+
+# command to unmount a filesystem
+[[ -n "${CAULDRON_CMD_UNMOUNT[@]}" ]] ||
+ CAULDRON_CMD_UNMOUNT=(
+ umount
+ )
+
+# command to create the ramdisk filesystem (typically ext2)
+[[ -n "${CAULDRON_CMD_MKRDFS[@]}" ]] ||
+ CAULDRON_CMD_MKRDFS=(
+ mke2fs
+ )
+
+# command to compress the iso ramdisk
+[[ -n "${CAULDRON_CMD_COMPRESS_RAMDISK[@]}" ]] ||
+ CAULDRON_CMD_COMPRESS_RAMDISK=(
+ gzip
+ -9
+ )
+
+# command to dump data
+[[ -n "${CAULDRON_CMD_DD[@]}" ]] ||
+ CAULDRON_CMD_DD=(
+ dd
+ )
+
+# command to concatenate a file
+[[ -n "${CAULDRON_CMD_CAT[@]}" ]] ||
+ CAULDRON_CMD_CAT=(
+ cat
+ )
+
+# command to package the iso initramfs
+[[ -n "${CAULDRON_CMD_MKRAMFS[@]}" ]] ||
+ CAULDRON_CMD_MKRAMFS=(
+ find * -depth -print | cpio -H newc -o | gzip -9c
+ )
+
+# command to find files
+[[ -n "${CAULDRON_CMD_FIND[@]}" ]] ||
+ CAULDRON_CMD_FIND=(
+ find
+ )
+
+# command to grep a file/stream
+[[ -n "${CAULDRON_CMD_GREP[@]}" ]] ||
+ CAULDRON_CMD_GREP=(
+ grep
+ )
+
+# command to grep a file/stream
+[[ -n "${CAULDRON_CMD_GREP_QUIET[@]}" ]] ||
+ CAULDRON_CMD_GREP_QUIET=(
+ grep
+ -q
+ )
+
+# command to split a text stream by delimiters
+[[ -n "${CAULDRON_CMD_CUT[@]}" ]] ||
+ CAULDRON_CMD_CUT=(
+ cut
+ )
+
+# command to awk a file/stream
+[[ -n "${CAULDRON_CMD_AWK[@]}" ]] ||
+ CAULDRON_CMD_AWK=(
+ gawk
+ )
+
+# command to sed a file/stream
+[[ -n "${CAULDRON_CMD_SED[@]}" ]] ||
+ CAULDRON_CMD_SED=(
+ sed
+ )
+
+# sorcery cast/dispel/rebuild commands
+[[ -n "${CAULDRON_CMD_CAST[@]}" ]] ||
+ CAULDRON_CMD_CAST=(
+ "$CAULDRON_HSORCERY_PATH/cast"
+ )
+[[ -n "${CAULDRON_CMD_DISPEL[@]}" ]] ||
+ CAULDRON_CMD_DISPEL=(
+ "$CAULDRON_HSORCERY_PATH/dispel"
+ )
+[[ -n "${CAULDRON_CMD_REBUILD[@]}" ]] ||
+ CAULDRON_CMD_REBUILD=(
+ "$CAULDRON_HSORCERY_PATH/sorcery"
+ rebuild
+ )
+[[ -n "${CAULDRON_CMD_GAZE_INSTALLED[@]}" ]] ||
+ CAULDRON_CMD_GAZE_INSTALLED=(
+ gaze -q installed
+ )
+# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/cauldron/data/config/default.conf
b/cauldron/data/config/default.conf
new file mode 100644
index 0000000..9225ffe
--- /dev/null
+++ b/cauldron/data/config/default.conf
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# base configuration values
+source "$CAULDRON_CONF/paths.conf"
+source "$CAULDRON_CONF/security.conf"
+source "$CAULDRON_CONF/display.conf"
+
+# output product configuration values
+source "$CAULDRON_CONF/iso.conf"
+source "$CAULDRON_CONF/sys.conf"
+
+# interaction with sorcery
+source "$CAULDRON_CONF/sorcery.conf"
+
+# build configurations (toolchain, product builds)
+source "$CAULDRON_CONF/build.conf"
+
+# host architecture (i.e., the arch of the system running cauldron, not the
+# arch of the media to be generated)
+source "$CAULDRON_CONF/arch/host_arch.conf"
+
+# should be sourced last, since some of the command definitions depend on
other
+# config variable definitions
+source "$CAULDRON_CONF/commands.conf"
+
diff --git a/cauldron/data/config/display.conf
b/cauldron/data/config/display.conf
new file mode 100644
index 0000000..f850ac1
--- /dev/null
+++ b/cauldron/data/config/display.conf
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+# whether to use color for displaying messages
+CAULDRON_COLOR="${CAULDRON_COLOR:-yes}"
+
diff --git a/cauldron/data/config/iso.conf b/cauldron/data/config/iso.conf
new file mode 100644
index 0000000..18bf91c
--- /dev/null
+++ b/cauldron/data/config/iso.conf
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# path where the final ISO product is generated
+CAULDRON_ISO="${CAULDRON_ISO:-$CAULDRON_TMP/iso}"
+
+# kernel config used to build the kernel for the ISO
+CAULDRON_KERN_CONF="${CAULDRON_KERN_CONF:-$CAULDRON_DATA/$CAULDRON_ARCH/kernel}"
+
+# the version of the kernel to be used in the .iso
+# if empty, then it will default to the version in cauldron
+CAULDRON_KVERS="${CAULDRON_KVERS:-}"
+
+# busybox config used to build busybox for the initrd/initramfs in the ISO
+CAULDRON_BBOX_CONF="${CAULDRON_BBOX_CONF:-$CAULDRON_DATA/$CAULDRON_ARCH/initfs/busybox}"
+
+# file listing all the spells to compose the ISO runtime
+CAULDRON_ISO_SPELLS="${CAULDRON_ISO_SPELLS:-$CAULDRON_DATA/$CAULDRON_ARCH/iso.spells}"
+# file listing all the sources to supply in the ISO runtime
+CAULDRON_ISO_SOURCES="${CAULDRON_ISO_SOURCES:-$CAULDRON_DATA/$CAULDRON_ARCH/iso.sources}"
+# file listing all the spell caches to supply in the ISO runtime
+CAULDRON_ISO_CACHES="${CAULDRON_ISO_CACHES:-$CAULDRON_DATA/$CAULDRON_ARCH/iso.caches}"
+
+# list of installers to include in the ISO
+CAULDRON_INSTALLERS=(
+ "shell"
+ # "menu"
+ )
+
+# filename of the produced .iso (should follow Cauldron naming conventions)
+CAULDRON_ISO_NAME="${CAULDRON_ISO_NAME:-smgl-devel-$(date
+%Y%m%d).$CAULDRON_ARCH}"
+
+# do we keep the uncompressed .iso file in addition to the compressed one?
+CAULDRON_KEEPISO="${CAULDRON_KEEPISO:-yes}"
+
diff --git a/cauldron/data/config/paths.conf b/cauldron/data/config/paths.conf
new file mode 100644
index 0000000..0fea1b6
--- /dev/null
+++ b/cauldron/data/config/paths.conf
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# path to the host system (null for normal use)
+CAULDRON_HOST="${CAULDRON_HOST:-}"
+
+# path to the host base library modules
+CAULDRON_BASE="${CAULDRON_BASE:-$CAULDRON_HOST/usr/share/smgl}"
+
+# path to the host cauldron library modules
+CAULDRON_LIBS="${CAULDRON_LIBS:-$CAULDRON_BASE/cauldron}"
+
+# path to Source Mage common library modules
+CAULDRON_COMMON="${CAULDRON_COMMON:-$CAULDRON_BASE/common}"
+
+# path to the host cauldron configs
+CAULDRON_DATA="${CAULDRON_DATA:-$CAULDRON_HOST/etc/cauldron}"
+
+# temporary files generated while cauldron does its work
+CAULDRON_TMP="${CAULDRON_TMP:-$CAULDRON_HOST/tmp/cauldron}"
+
diff --git a/cauldron/data/config/security.conf
b/cauldron/data/config/security.conf
new file mode 100644
index 0000000..fa9254c
--- /dev/null
+++ b/cauldron/data/config/security.conf
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+# the user cauldron should run as make sure the user you choose has proper
+# permissions (especially for chrooting)
+CAULDRON_USER="${CAULDRON_USER:-root}"
+
diff --git a/cauldron/data/config/sorcery.conf
b/cauldron/data/config/sorcery.conf
new file mode 100644
index 0000000..ea2f7bd
--- /dev/null
+++ b/cauldron/data/config/sorcery.conf
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+# branch of sorcery to use in the ISO
+CAULDRON_SORCERY_BRANCH="${CAULDRON_SORCERY_BRANCH:-stable}"
+
+# whether to always download sorcery anew or use an already downloaded file
+# if found
+CAULDRON_FORCE_DOWNLOAD="${CAULDRON_FORCE_DOWNLOAD:-yes}"
+
+# branch of sorcery to use in the ISO
+CAULDRON_SORCERY_PKG="${CAULDRON_SORCERY_PACKAGE:-sorcery-${CAULDRON_SORCERY_BRANCH}.tar.bz2}"
+
+# URL to download sorcery from
+CAULDRON_SORCERY_URL="${CAULDRON_SORCERY_URL:-http://download.sourcemage.org/sorcery/$CAULDRON_SORCERY_PKG}";
+
+# sorcery modules location in the ISO
+CAULDRON_ISORCERY_LIBS="${CAULDRON_ISORCERY_LIBS:-$CAULDRON_BUILD/var/lib/sorcery/modules}"
+# sorcery config location in the ISO
+CAULDRON_ISORCERY_CONFIG="${CAULDRON_ISORCERY_CONFIG:-$CAULDRON_BUILD/etc/sorcery/config}"
+# sorcery local config location in the ISO
+CAULDRON_ISORCERY_LCONFIG="${CAULDRON_ISORCERY_LCONFIG:-$CAULDRON_BUILD/etc/sorcery/local/config}"
+
+# host system sorcery libraries/modules
+CAULDRON_HSORCERY_LIBS="${CAULDRON_HSORCERY_LIBS:-$CAULDRON_HOST/var/lib/sorcery/modules}"
+# host system sorcery config
+CAULDRON_HSORCERY_CONFIG="${CAULDRON_HSORCERY_CONFIG:-$CAULDRON_HOST/etc/sorcery/config}"
+# host system sorcery local config
+CAULDRON_HSORCERY_LCONFIG="${CAULDRON_HSORCERY_LCONFIG:-$CAULDRON_HOST/etc/sorcery/local/config}"
+# host system sorcery packages file (lists installed packages)
+CAULDRON_HSORCERY_PACKAGES="${CAULDRON_HSORCERY_PACKAGES:-$CAULDRON_HOST/var/state/sorcery/packages}"
+# host system sorcery spool location (where spell sources are kept)
+CAULDRON_HSORCERY_SPOOL="${CAULDRON_HSORCERY_SPOOL:-$CAULDRON_HOST/var/spool/sorcery}"
+
+# path where sorcery binaries are located
+CAULDRON_HSORCERY_PATH="${CAULDRON_SORCERY_PATH:-$CAULDRON_HOST/usr/sbin}"
+
+# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/cauldron/data/config/sys.conf b/cauldron/data/config/sys.conf
new file mode 100644
index 0000000..29b583f
--- /dev/null
+++ b/cauldron/data/config/sys.conf
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# path where the installable system chroot is generated
+CAULDRON_SYS="${CAULDRON_SYS:-$CAULDRON_TMP/sys}"
+
+# file listing all the spells to compose the SYS runtime
+CAULDRON_SYS_SPELLS="${CAULDRON_SYS_SPELLS:-$CAULDRON_DATA/$CAULDRON_ARCH/sys.spells}"
+# file listing all the sources to supply in the SYS runtime
+CAULDRON_SYS_SOURCES="${CAULDRON_SYS_SOURCES:-$CAULDRON_DATA/$CAULDRON_ARCH/sys.sources}"
+# file listing all the spell caches to supply in the SYS runtime
+CAULDRON_SYS_CACHES="${CAULDRON_SYS_CACHES:-$CAULDRON_DATA/$CAULDRON_ARCH/sys.caches}"
+
+# base filename (i.e., without any suffixes) of the compressed system archive
+# that goes into the base of the iso filesystem for base installation
+CAULDRON_SYS_NAME="${CAULDRON_SYS_NAME:-system}"
+
diff --git a/cauldron/errorcodes b/cauldron/errorcodes
deleted file mode 100644
index 8bee67e..0000000
--- a/cauldron/errorcodes
+++ /dev/null
@@ -1,138 +0,0 @@
-#!/bin/bash
-#-------------------------------------------------------------------------------
-##
-##=head1 SYNOPSIS
-##
-## These are the cauldron-specific error definitions.
-##
-##=head1 COPYRIGHT
-##
-## Copyright 2009 by the Cauldron Team
-##
-##=head1 FUNCTIONS
-##
-##=over 4
-##
-#-------------------------------------------------------------------------------
-
-#-------------------------------------------------------------------------------
-# ERROR definitions
-#-------------------------------------------------------------------------------
-
-# base error codes
-liberror_add_error ERR_MK_DIR "could not make directory"
-liberror_add_error ERR_DIR_EXISTS "directory already exists"
-liberror_add_error ERR_FILE_NOT_FOUND "requested file not found"
-liberror_add_error ERR_DIR_NOT_FOUND "requested directory not found"
-liberror_add_error ERR_CP_FILE "could not copy file"
-liberror_add_error ERR_CHMOD_FILE "could not chmod file"
-liberror_add_error ERR_RM_FILES "could not remove files"
-
-# libcauldron base
-liberror_add_error ERR_LOAD_LIBRARY "problem loading library"
-liberror_add_error ERR_CLEANUP_BUILD "could not clean up build directory"
-liberror_add_error ERR_CLEANUP_TMP "could not clean up temporary directory"
-
-# libcauldron build
-liberror_add_error ERR_UNPACK_CACHE \
- "could not unpack spell cache inside build directory"
-liberror_add_error ERR_RM_CACHE \
- "could not remove spell cache after unpacking in build"
-liberror_add_error ERR_HOST_TRIPLE "could not get host triple for builds"
-liberror_add_error ERR_BUILD_SPOOL "build directory sorcery spool does not
exist"
-liberror_add_error ERR_RESOLV "resolv.conf missing in the build directory"
-
-# libcauldron cleaner files
-liberror_add_error ERR_CLEAN_CLEANER "cleaner files could not be found"
-liberror_add_error ERR_CLEAN_DIR "failed to clean directory from iso"
-liberror_add_error ERR_CLEAN_FILE "failed to clean file from iso"
-
-# libcauldron enchantment
-liberror_add_error ERR_ENCHANT_CONFIG "could not source enchant config"
-liberror_add_error ERR_INSTALLER_DIR \
- "could not create the iso installer directory"
-liberror_add_error ERR_COPY_INSTALLER "could not copy installer to iso"
-liberror_add_error ERR_LINK_INSTALLER "could not link installer in iso"
-
-# libcauldron final product
-liberror_add_error ERR_ISO_PACKAGE "could not create final iso file"
-liberror_add_error ERR_ISO_COMPRESS "could not compress final iso file"
-liberror_add_error ERR_SYS_PACKAGE "could not package final sys file"
-liberror_add_error ERR_SYS_COMPRESS "could not compress final sys archive"
-
-# lib.chroot
-liberror_add_error ERR_CHROOT_UNDEF "chroot target is undefined"
-liberror_add_error ERR_CHROOT_INIT "could not init chroot"
-liberror_add_error ERR_CHROOT_DONE "could not close chroot"
-liberror_add_error ERR_CHROOT_NOT_INIT "chroot not initialized"
-liberror_add_error ERR_CHROOT_EXEC "could not execute chroot command"
-liberror_add_error ERR_CHROOT_CAST "chroot cast failed"
-liberror_add_error ERR_CHROOT_DISPEL "chroot dispel failed"
-liberror_add_error ERR_CHROOT_REBUILD "chroot rebuild failed"
-liberror_add_error ERR_CHROOT_NEST "chroot already defined"
-
-# lib.init
-liberror_add_error ERR_INIT_INSTALL_RAMFS \
- "problem installing built initramfs into iso"
-liberror_add_error ERR_INIT_INSTALL_RD \
- "problem installing built initramdisk into iso"
-liberror_add_error ERR_INIT_MAKE_RAMFS "could not build initramfs"
-liberror_add_error ERR_INIT_MAKE_RD "could not build initramdisk"
-liberror_add_error ERR_INIT_MAKE_FS \
- "could not make filesystem for initramfs/ramdisk"
-
-# lib.sorcerous
-liberror_add_error ERR_SORCEROUS_ARCHIVE \
- "target sorcery not set to archive casts"
-liberror_add_error ERR_SORCEROUS_TARGET "target sorcery files not found"
-liberror_add_error ERR_SORCEROUS_HOST "host sorcery not found"
-liberror_add_error ERR_SORCEROUS_CREATE_CACHE "could not create spell cache"
-liberror_add_error ERR_SORCEROUS_ISO_SORCERY_CONFIG \
- "could not create local sorcery config directory in iso"
-liberror_add_error ERR_SORCEROUS_DOWNLOAD "could not download sorcery"
-liberror_add_error ERR_SORCEROUS_UNPACK \
- "could not unpack a valid sorcery install"
-liberror_add_error ERR_SORCEROUS_INSTALL \
- "could not install sorcery into build directory"
-
-# lib.toolchain
-liberror_add_error ERR_TOOLCHAIN_CP_CACHE \
- "could not copy toolchain spell cache from host system into build
directory"
-liberror_add_error ERR_TOOLCHAIN_BUILD_CACHE \
- "could not build toolchain cache file from spell install info"
-liberror_add_error ERR_TOOLCHAIN_STAGE1 \
- "cross-toolchain stage 1 failed"
-liberror_add_error ERR_TOOLCHAIN_STAGE2 \
- "cross-toolchain stage 2 failed"
-liberror_add_error ERR_TOOLCHAIN_STAGE3 \
- "cross-toolchain stage 3 failed"
-liberror_add_error ERR_TOOLCHAIN_CAST \
- "could not cast toolchain spell cache"
-liberror_add_error ERR_TOOLCHAIN_DISPEL \
- "could not dispel toolchain spell cache"
-liberror_add_error ERR_TOOLCHAIN_GATHER \
- "could not generate toolchain spell cache"
-liberror_add_error ERR_TOOLCHAIN_SORCERY \
- "sorcery not found in toolchain root"
-liberror_add_error ERR_TOOLCHAIN_RESURRECT \
- "could not resurrect spell using sorcery"
-
-#-------------------------------------------------------------------------------
-##
-## This software is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This software is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this software; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-#-------------------------------------------------------------------------------
-
-# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/cauldron/lib.chroot b/cauldron/lib.chroot
deleted file mode 100644
index 9050ad4..0000000
--- a/cauldron/lib.chroot
+++ /dev/null
@@ -1,233 +0,0 @@
-#!/bin/bash
-#-------------------------------------------------------------------------------
-##
-##=head1 SYNOPSIS
-##
-## libcauldron is a set of functions used internally by the cauldron script
-##
-##=head1 COPYRIGHT
-##
-## Copyright 2009 by the Cauldron Team
-##
-##=head1 FUNCTIONS
-##
-##=over 4
-##
-#-------------------------------------------------------------------------------
-
-#-------------------------------------------------------------------------------
-## @param target dir to chroot into (optional)
-##
-## Prepares a chroot environment and exports necessary variables. For every
-## target dir to chroot into, there should be one
-## [cauldron_chroot_init ... cauldron_chroot_done] pair.
-##
-#-------------------------------------------------------------------------------
-function cauldron_chroot_init() {
- local target="${1:-$CAULDRON_BUILD}"
-
- [[ "$CAULDRON_CHROOTINIT" -eq 1 ]] && return $ERR_CHROOT_NEST
-
- # if target is somehow null, return an error
- if [[ -z "$target" ]]
- then
- return $ERR_CHROOT_UNDEF
- fi
-
- # bind the needed mounts
- mount --bind "$CAULDRON_HOST/dev" "$target/dev" ||
- return $ERR_CHROOT_INIT
- mount --bind "$CAULDRON_HOST/dev/pts" "$target/dev/pts" ||
- return $ERR_CHROOT_INIT
- mount --bind "$CAULDRON_HOST/proc" "$target/proc" ||
- return $ERR_CHROOT_INIT
-
- # make sure the sorcerous library is loaded
- # which provides cauldron_source_sorcery
- if [[ -z cauldron_source_sorcery ]]
- then
- cauldron_load_library lib.sorcerous
- fi
- # source the target sorcery, so we have access to its functions
- cauldron_sorcerous_load "$target" || return $ERR_SORCEROUS_TARGET
-
- # everything went OK, so export the chroot definitions
- export CAULDRON_CHROOTINIT=1
- export CAULDRON_CHROOT=( "${CAULDRON_CHROOT_CMD[@]}" "$target" )
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param target dir to chroot into
-##
-## Cleans up the chroot environment after it is no longer needed.
-##
-#-------------------------------------------------------------------------------
-function cauldron_chroot_done() {
- if [[ "$CAULDRON_CHROOTINIT" -eq 1 ]]
- then
- local target="${1:-$CAULDRON_BUILD}"
-
- # if target is somehow null, return an error
- if [[ -z "$target" ]]
- then
- return $ERR_CHROOT_UNDEF
- fi
-
- # unmount the bind mounts
- umount "$target/proc" || return $ERR_CHROOT_DONE
- umount "$target/dev/pts" || return $ERR_CHROOT_DONE
- umount "$target/dev" || return $ERR_CHROOT_DONE
-
- # clear the chroot definitions
- unset CAULDRON_CHROOTINIT
- unset CAULDRON_CHROOT
- fi
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param command plus args to execute inside the chroot
-##
-## Executes the command given as the first parameter and any args that follow
-## inside the cauldron chroot defined by cauldron_chroot_init.
-##
-#-------------------------------------------------------------------------------
-function cauldron_chroot() {
- if [[ "$CAULDRON_CHROOTINIT" -eq 1 ]]
- then
- "${CAULDRON_CHROOT[@]}" $* || return $ERR_CHROOT_EXEC
- else
- return $ERR_CHROOT_NOT_INIT
- fi
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param target_spells
-##
-## Performs cast on the list of spells needed for installation to the target
-## system. "target_spells" can either be a list of spells passed as
arguments or
-## a file which contains such a list. The members of the spell list can be
-## separated by anything IFS will recognize (typically any whitespace).
-##
-#-------------------------------------------------------------------------------
-function cauldron_chroot_cast() {
- local target_spells=( "$@" )
- local spell=""
-
- # if a file that lists spells to cast is passed in, get the list of spells
- # from the file
- [[ -f "$target_spells" ]] && target_spells=( $(< "$target_spells") )
-
- # make sure we have a valid chroot of where we will cast
- [[ -z "$CAULDRON_CHROOT" ]] && return $ERR_CHROOT_INIT
-
- # cast all the spells in the list in one shot for better efficiency
- cauldron_chroot "$CAULDRON_CAST" "${target_spells[@]}" ||
- return $ERR_CHROOT_CAST
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param target_spells
-##
-## Performs dispel on the list of spells needed for installation to the
target
-## system. "target_spells" can either be a list of spells passed as
arguments or
-## a file which contains such a list. The members of the spell list can be
-## separated by anything IFS will recognize (typically any whitespace).
-##
-#-------------------------------------------------------------------------------
-function cauldron_chroot_dispel() {
- local target_spells=( "$@" )
- local spell=""
-
- # if a file that lists spells to cast is passed in, get the list of spells
- # from the file
- [[ -f "$target_spells" ]] && target_spells=( $(< "$target_spells") )
-
- # make sure we have a valid chroot of where we will cast
- [[ -z "$CAULDRON_CHROOT" ]] && return $ERR_CHROOT_INIT
-
- # dispel all the spells in the list in one shot for better efficiency
- cauldron_chroot "$CAULDRON_DISPEL" "${target_spells[@]}" ||
- return $ERR_CHROOT_DISPEL
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param target_spells
-##
-## Performs cast and immediate dispel on the each spell in the list of spells
-## to ensure that each spell is cast "cleanly" (meaning that no idle
-## dependencies are laying about in the build tree to get inadvertently
picked
-## up by arguably broken spell builds). "target_spells" can either be a list
of
-## spells passed as arguments or a file which contains such a list. The
members
-## of the spell list can be separated by anything IFS will recognize
(typically
-## any whitespace).
-##
-#-------------------------------------------------------------------------------
-function cauldron_chroot_cast_clean() {
- local target_spells=( "$@" )
- local spell=""
-
- # if a file that lists spells to cast is passed in, get the list of spells
- # from the file
- [[ -f "$target_spells" ]] && target_spells=( $(< "$target_spells") )
-
- # Since we will be installing from the running ISO system instead of a
giant
- # tarball, for each spell we only need to make sure that the cache file is
- # available. This will require that the ISO sorcery has caching enabled.
The
- # caching should really be turned on from the very beginning though...
- if [[ -z "$ARCHIVE" ]]
- then
- cauldron_sorcerous_load || return $ERR_SORCEROUS_TARGET
- fi
- [[ "$ARCHIVE" == "off" ]] && return $ERR_SORCEROUS_ARCHIVE
-
- # make sure we have a valid chroot of where we will cast
- [[ -z "$CAULDRON_CHROOT" ]] && return $ERR_CHROOT_INIT
-
- for spell in "${target_spells[@]}"
- do
- # cast the spell to generate the cache, and then dispel it from the
system
- # so that it isn't wasting space in the build filesystem (and so it
doesn't
- # interfere with later casts for spells that, wrongly, pull in
dependencies
- # that are present but not wanted)
- #
- # TODO: to be able to ensure that dependencies that get pulled in are
also
- # dispelled we'll have to get the list of everything that was cast during
- # the cast round from sorcery, which at present will require modifying
cast
- # itself to export the list (otherwise we'll have to trap the output and
- # parse it, which is far less machine-readable)
- cauldron_chroot "$CAULDRON_CAST" "$spell" || return $ERR_CHROOT_CAST
- cauldron_chroot "$CAULDRON_DISPEL" "$spell" || return $ERR_CHROOT_DISPEL
- done
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## This software is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This software is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this software; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-#-------------------------------------------------------------------------------
-
-# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/cauldron/lib.init b/cauldron/lib.init
deleted file mode 100755
index 68a0612..0000000
--- a/cauldron/lib.init
+++ /dev/null
@@ -1,305 +0,0 @@
-#!/bin/bash
-#-------------------------------------------------------------------------------
-##
-##=head1 SYNOPSIS
-##
-## libinit is a set of functions used internally by the cauldron scripts
-## responsible for handling the init setup, including initrd and initramfs,
on
-## the ISOs.
-##
-##=head1 COPYRIGHT
-##
-## Copyright 2009 by the Cauldron Team
-##
-##=head1 FUNCTIONS
-##
-##=over 4
-##
-#-------------------------------------------------------------------------------
-
-#-------------------------------------------------------------------------------
-##
-## Handles setting up the init process on the ISO. The ISO init is
-## responsible for detecting hardware, loading device drivers, setting
-## console fonts, etc.
-##
-#-------------------------------------------------------------------------------
-function cauldron_init_setup() {
- mkdir -p "$CAULDRON_ISO/etc" || return $ERR_MK_DIR
-
- cp "$CAULDRON_DATA/$CAULDRON_ARCH/inittab" "$CAULDRON_ISO/etc/inittab" ||
- return $ERR_CP_FILE
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param init ramdisk/ramfs image (required)
-##
-## Copies the image passed as first parameter into the ISO run-time
filesystem
-## for use during the ISO boot process.
-##
-#-------------------------------------------------------------------------------
-function cauldron_init_img_install() {
- local img="$1"
-
- mkdir -p "$CAULDRON_ISO/boot" || return $ERR_MK_DIR
-
- cp "$img" "$CAULDRON_ISO/boot/$img" || return $ERR_CP_FILE
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Makes the initrd to be used by the ISO on booting.
-##
-#-------------------------------------------------------------------------------
-function cauldron_init_make_ramdisk() {
- local initrd="$CAULDRON_TMP/initrd"
- local initmnt="$CAULDRON_TMP/initrd_mount"
-
- mkdir -p "$initmnt" || return $ERR_MK_DIR
-
- dd '-if' /dev/null '-of' "$initrd" || return $ERR_INIT_MAKE_RD
- mke2fs "$initrd" || return $ERR_INIT_MAKE_RD
- mount -o loop "$initrd" "$initmnt" || return $ERR_INIT_MAKE_RD
- cauldron_init_fs_make "$initmnt" || return $ERR_INIT_MAKE_RD
- umount "$initmnt" || return $ERR_INIT_MAKE_RD
- gzip -9 "$initrd" || return $ERR_INIT_MAKE_RD
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Installs the init ramdisk to be used by the ISO on booting.
-##
-#-------------------------------------------------------------------------------
-function cauldron_init_install_ramdisk() {
- local ramdisk="$CAULDRON_TMP/initrd.gz"
-
- cauldron_init_img_install "$ramdisk" || return $ERR_INIT_INSTALL_RD
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Makes the initramfs be used by the ISO on booting.
-##
-#-------------------------------------------------------------------------------
-function cauldron_init_make_ramfs() {
- local ramdir="$CAULDRON_TMP/initram"
- local ramfs="$CAULDRON_TMP/initram.cpio.gz"
-
- mkdir -p "$ramdir" || return $ERR_MK_DIR
-
- cauldron_init_fs_make "$ramdir" || return $ERR_INIT_MAKE_FS
-
- (
- cd "$ramdir"
- find * -depth -print | cpio -H newc -o | gzip -9c > "$ramfs"
- ) ||
- return $ERR_INIT_MAKE_RAMFS
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Installs the init ramfs to be used by the ISO on booting.
-##
-#-------------------------------------------------------------------------------
-function cauldron_init_install_ramfs() {
- local ramfs="$CAULDRON_TMP/initram.cpio.gz"
-
- cauldron_init_img_install "$ramfs" || return $ERR_INIT_INSTALL_RAMFS
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param path_to_initfs (required)
-##
-## Sets up the basic directories that will be needed on the initfs
-##
-#-------------------------------------------------------------------------------
-function cauldron_init_fs_dirs() {
- local initfs="$1"
- local list="$CAULDRON_DATA/$CAULDRON_ARCH/initfs/dirs"
-
- if [[ -f "$list" ]]
- for dir in $(cat "$list")
- do
- mkdir -p "$initfs/$dir" || return $ERR_MK_DIR
- done
- fi
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param path_to_initfs (required)
-##
-## Gathers and copies the necessary binaries into the initfs
-##
-#-------------------------------------------------------------------------------
-function cauldron_init_fs_bins() {
- local initfs="$1"
- local list="$CAULDRON_DATA/$CAULDRON_ARCH/initfs/binaries"
-
- if [[ -f "$list" ]]
- for bin in $(cat "$CAULDRON_DATA/$CAULDRON_ARCH/initfs/binaries")
- do
- cp "$bin" "$initfs/bin" || return $ERR_CP_FILE
- done
- fi
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param path_to_initfs (required)
-##
-## Gathers and copies the necessary libraries into the initfs
-##
-#-------------------------------------------------------------------------------
-function cauldron_init_fs_libs() {
- local initfs="$1"
- local list="$CAULDRON_DATA/$CAULDRON_ARCH/initfs/libs"
-
- if [[ -f "$list" ]]
- for lib in $(cat "$CAULDRON_DATA/$CAULDRON_ARCH/initfs/libs")
- do
- cp "$lib" "$initfs/lib/" || return $ERR_CP_FILE
- done
- fi
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param path_to_initfs (required)
-##
-## Copies over any required kernel modules into the initfs
-##
-#-------------------------------------------------------------------------------
-function cauldron_init_fs_mods() {
- local initfs="$1"
- local list="$CAULDRON_DATA/$CAULDRON_ARCH/initfs/modules"
-
- if [[ -f "$list" ]]
- for module in $(cat "$CAULDRON_DATA/$CAULDRON_ARCH/initfs/modules")
- do
- cp "$module" "$initfs/lib/modules/$CAULDRON_KVERS" || return
$ERR_CP_FILE
- done
- fi
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param path_to_initfs (required)
-##
-## Sets up the "init" in the initfs (AKA linuxrc in ramdisks)
-##
-#-------------------------------------------------------------------------------
-function cauldron_init_fs_init() {
- local initfs="$1"
- local init_script="$CAULDRON_DATA/$CAULDRON_ARCH/initfs/init"
-
- # copy the init script to /init in the init filesystem, because /init is
- # *requried* by init ramfs and an init ramdisk can be configured to use
- # anything we want via the init= boot parameter, and we can also symlink
for
- # ramdisks if we want to.
- cp "$init_script" "$initfs/init" || return $ERR_CP_FILE
-
- # make sure the init script is executable
- chmod 0755 "$initfs/init" || return $ERR_CHMOD_FILE
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param path_to_initfs (required)
-## @param path to build directory (optional)
-##
-## Builds busybox for use in the initramfs using a preconfigured config file
for
-## the build. It builds by casting in the build chroot, copies the resulting
-## busybox binary, and then dispels the busybox spell in the chroot to clean
up.
-##
-#-------------------------------------------------------------------------------
-function cauldron_init_fs_busybox() {
- local initfs="$1"
- local build="${2:-$CAULDRON_BUILD}"
- local bbconf="$CAULDRON_DATA/$CAULDRON_ARCH/initfs/busybox.config"
-
- if [[ ! -d "$build" ]]
- then
- mkdir -p "$build" || return $ERR_MK_DIR
- fi
-
- mkdir -p "$build/etc/sorcery/local" || return $ERR_MK_DIR
-
- cp -f "$bbconf" "$build/etc/sorcery/local/busybox.config" ||
- return $ERR_CP_FILE
-
- cauldron_chroot_init "$build"
- [[ $? -eq 0 || $? -eq $ERR_CHROOT_NEST ]] || return $ERR_CHROOT_INIT
-
- cauldron_chroot_cast "busybox" || return $ERR_CHROOT_CAST
-
- cp "$build/sbin/busybox" "$initfs/sbin/busybox" ||
- return $ERR_CP_FILE
-
- cauldron_chroot_dispel "busybox" || return $ERR_CHROOT_DISPEL
-
- cauldorn_chroot_done "$build" || return $ERR_CHROOT_DONE
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param path_to_initfs (required)
-##
-## Higher-level function that builds a "filesystem" to be used in an initrd
or
-## initramfs by calling the appropriate low-level functions in turn.
-##
-#-------------------------------------------------------------------------------
-function cauldron_init_fs_make() {
- local initfs="$1"
-
- [[ -d "$initfs" ]] || return $ERR_DIR_NOT_FOUND
-
- cauldron_init_fs_busybox "$initfs" &&
- cauldron_init_fs_dirs "$initfs" &&
- cauldron_init_fs_bins "$initfs" &&
- cauldron_init_fs_libs "$initfs" &&
- cauldron_init_fs_mods "$initfs" &&
- cauldron_init_fs_init "$initfs"
-
- [[ "$?" -gt 0 ]] && return $ERR_INIT_MAKE_FS
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## This software is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This software is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this software; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-#-------------------------------------------------------------------------------
-
-# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/cauldron/lib.sorcerous b/cauldron/lib.sorcerous
deleted file mode 100644
index 71233a8..0000000
--- a/cauldron/lib.sorcerous
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/bin/bash
-#-------------------------------------------------------------------------------
-##
-##=head1 SYNOPSIS
-##
-## libcauldron is a set of functions used internally by the cauldron script
-##
-##=head1 COPYRIGHT
-##
-## Copyright 2009 by the Cauldron Team
-##
-##=head1 FUNCTIONS
-##
-##=over 4
-##
-#-------------------------------------------------------------------------------
-
-#-------------------------------------------------------------------------------
-## @param path to the sorcery config to load
-##
-## Sources the sorcery config files. Mainly called by cauldron_chroot_init.
-##
-## TODO:
-## this needs to be fixed, since sorcery uses some absolute paths and has
some
-## hard-coded into itself, therefore it will source parts from the target but
-## other parts will actually be sourced from the HOST
-##
-## the solution may involve having a modified sorcery config for the build
-## chroot, which will need a lot of modified paths
-##
-#-------------------------------------------------------------------------------
-function cauldron_sorcerous_load() {
- local config="${1:-$CAULDRON_ISORCERY_CONFIG}"
- local local_config="${2:-$CAULDRON_ISORCERY_LCONFIG}"
-
- # source the main config file
- source "$config" || return $ERR_SORCEROUS_TARGET
-
- # if the local config exists, source it
- if [[ -f "$local_config" ]]
- then
- source "$local_config" || return $ERR_SORCEROUS_TARGET
- fi
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param stage
-##
-## Configures the toolchain for building on the TARGET system. In other
-## words, this sets the options/variables necessary to build a
-## cross-compiler system to generate binaries for the target system. The
-## parameter "stage" is an int and sets the variables for stage1 and stage2
of
-## the cross-compile. Stage1 is the building of the initial tools. Stage2 is
for
-## the building of glibc, because it's a little bit special. Stage3 is
-## the cross-compilation of the basesystem via sorcery rebuild using the
-## cross-compiler.
-##
-#-------------------------------------------------------------------------------
-function cauldron_sorcerous_cross_configure() {
- local stage="$1"
- local hostarch="$CAULDRON_HOST_ARCH"
- local arch="$CAULDRON_ARCH"
-
- if [[ -z modify_config ]]
- then
- . "$CAULDRON_HSORCERY_LIBS/libtrack" 2> $CAULDRON_NULL ||
- liberror_die $ERR_SORCEROUS_HOST
- fi
-
- # make sure the sorcery local config dir exists on the ISO
- mkdir -p "$CAULDRON_ISORCERY_LCONFIG" || return
$ERR_SORCEROUS_ISO_SORCERY_CONFIG
-
- case "$stage" in
- 1)
- modify_config "$CAULDRON_ISORCERY_LCONFIG" CUSTOM_CFLAGS \
- "--host=$hostarch --target=$arch"
- ;;
- 2)
- modify_config "$CAULDRON_ISORCERY_LCONFIG" CUSTOM_CFLAGS \
- "--build=$hostarch --host=$arch"
- ;;
- 3)
- modify_config "$CAULDRON_ISORCERY_LCONFIG" CUSTOM_CFLAGS \
- "--build=$hostarch --host=$arch --target=$arch"
- ;;
- esac
-}
-
-#-------------------------------------------------------------------------------
-## @param spool_path
-##
-## Downloads a sorcery source tarball from the net if we don't already have
one
-## or are forcing a download, and places it in spool_path (optional), or in
-## the CAULDRON_BUILD/var/spool/sorcery directory.
-##
-#-------------------------------------------------------------------------------
-function cauldron_sorcerous_download() {
- local spool="${1:-$CAULDRON_BUILD/var/spool/sorcery}"
- local sorcery_url="${CAULDRON_SORCERY_URL}"
- local url_get=( "${CAULDRON_URL_DL_CMD[@]}" )
-
- # ensure the spool dir exists for getting spell sources
- mkdir -p "$spool" || return $ERR_BUILD_SPOOL
-
- # check to see if we will copy or download the sorcery source tarball
- # then get the source tarball and place it in CAULDRON_BUILD
- if [[ ! -e "$spool/$sorcery" || "$CAULDRON_FORCE_DOWNLOAD" == "yes" ]]
- then
- # run in a subshell as an easy way of not messing with the working
directory
- (
- cd "$spool"
- "${url_get[@]}" "$sorcery_url" ||
- return $ERR_SORCEROUS_DOWNLOAD
- )
- fi &&
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param spool_path
-##
-## Installs sorcery into the build directory. The download_path parameter
-## (optional) indicates where the sorcery source tarball to install from is
-## stored. If spool_path is not supplied, the tarball is assumed to be in
-## the CAULDRON_BUILD/var/spool/sorcery directory.
-##
-#-------------------------------------------------------------------------------
-function cauldron_sorcerous_install() {
- local spool="${1:-$CAULDRON_BUILD/var/spool/sorcery}"
- local sorcery="$CAULDRON_SORCERY_PKG"
-
- # unpack the source tarball
- tar -C "$CAULDRON_BUILD/usr/src" -jxf "$spool/$sorcery" ||
- return $ERR_SORCEROUS_UNPACK
-
- [[ -x "$CAULDRON_BUILD/usr/src/sorcery/install" ]] ||
- return $ERR_SORCEROUS_UNPACK
-
- # make sure the chroot library is loaded so cauldron_chroot is available
- if [[ -z cauldron_chroot ]]
- then
- cauldron_load_library lib.chroot
- fi
- # install the source tarball, relative to CAULDRON_BUILD
- "$CAULDRON_BUILD/usr/src/sorcery/install" "$CAULDRON_BUILD" ||
- return $ERR_SORCEROUS_INSTALL
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## This software is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This software is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this software; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-#-------------------------------------------------------------------------------
-
-# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/cauldron/lib.toolchain b/cauldron/lib.toolchain
deleted file mode 100644
index 7a29778..0000000
--- a/cauldron/lib.toolchain
+++ /dev/null
@@ -1,334 +0,0 @@
-#!/bin/bash
-#-------------------------------------------------------------------------------
-##
-##=head1 SYNOPSIS
-##
-## lib.hostcache provides functions for generating spell caches from what's
-## available on the HOST system - only to be used for the
initial
-## build toolchain
-##
-##=head1 COPYRIGHT
-##
-## Copyright 2009 by the Cauldron Team
-##
-##=head1 FUNCTIONS
-##
-##=over 4
-##
-#-------------------------------------------------------------------------------
-
-#-------------------------------------------------------------------------------
-##
-## Scans the sorcery archspec files to find the host triplet.
-##
-## Later, this will be used to set the value of HOST_TRIPLE in
-## /etc/cauldron/config after the code to write the config file is in place.
-##
-#-------------------------------------------------------------------------------
-function cauldron_toolchain_host_get() {
- local specs="${CAULDRON_HOST_ARCH_PATH//\"/}"
- local search="-perm 400 -type f -name $CAULDRON_HOST_ARCH"
- local arch_spec=
- local host_triple=
-
- # get the value for the HOST triplet from sorcery archspecs
-
- if [[ "$(find --version | grep -q 'version 4\.1\(\.\|$\)')" ]]
- then
- arch_spec="$(find $spec $search -print 2>$CAULDRON_NULL)"
- else
- arch_spec="$(find -L $spec $search -print 2>$CAULDRON_NULL)"
- fi
-
- # no matching arch spec found
- [[ -z "$arch_spec" ]] && return $ERR_HOST_TRIPLE
-
- host_triple="$(grep 'HOST=' $arch_spec | cut -d = -f 2)"
-
- # no matching host definition
- [[ -z "$host_triple" ]] && return $ERR_HOST_TRIPLE
-
- echo "$host_triple"
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param spell
-## @param install_log_path
-##
-## Builds a cache file from the information provided by the install log for
the
-## spell passed as an argument using sorcery's create_cache_archive. It
expects
-## the provided spell to include the version as a suffix (i.e. bash-3.2).
-##
-#-------------------------------------------------------------------------------
-function cauldron_toolchain_cache_resurrect() {
- local spell="$1"
- local install_logs="${2:-$CAULDRON_HOST/var/log/sorcery/install}"
- local cache="$CAULDRON_HOST_CACHE_PATH/$spell.tar"
-
- if [[ -z create_cache_archive ]]
- then
- . "$CAULDRON_HSORCERY_LIBS/libstate" 2>$CAULDRON_NULL ||
- liberror_die $ERR_SORCEROUS_HOST
- fi
-
- # generate the missing cache file using sorcery
- create_cache_archive "$install_logs/$spell" "$cache"
"${cache}${EXTENSION}" ||
- return $ERR_TOOLCHAIN_RESURRECT
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param spell_name
-## @param spell_version
-## @param install_log_path
-##
-## Generates a spell cache by manually copying files from the spell's install
-## log and packaging them. Assumes that the spell's install log exists and is
-## intact.
-##
-#-------------------------------------------------------------------------------
-function cauldron_toolchain_cache_gather() {
- local spell="$1"
- local version="$2"
- local install_logs="${3:-$CAULDRON_HOST/var/log/sorcery/install}"
- local gather="$CAULDRON_TMP/gather"
-
- [[ -d "$install_logs" ]] || return $ERR_TOOLCHAIN_GATHER
-
- [[ -z "$spell" ]] && return $ERR_TOOLCHAIN_GATHER
- [[ -z "$version" ]] && return $ERR_TOOLCHAIN_GATHER
-
- # make sure the gather path is clean
- # completely wipe it out and recreate it
- rm -fr "$gather" || return $ERR_RM_FILES
- mkdir -p "$gather" || return $ERR_MK_DIR
-
- # find all the files installed by the given spell
- for file in "$install_logs/${spell}-${version}"/*
- do
- # copy all files from the sorcery install log
- cp -a --parents "$file" "$gather/" || return $ERR_TOOLCHAIN_GATHER
- done
-
- # package the collection of files from the install log as a cache file
- tar jcf "${spell}-${version}.tar.bz2" \
- --transform "s#$gather/##" \
- "$gather"/* ||
- return $ERR_TOOLCHAIN_GATHER
-
- # if the packaging was successful, wipe out the gather dir
- rm -fr "$gather"
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param spell
-##
-## Generates a spell cache by casting the spell and then dispelling it. This
-## assumes that ARCHIVE is already set to "yes" in the chroot's sorcery
config.
-##
-#-------------------------------------------------------------------------------
-function cauldron_toolchain_cache_cast() {
- local spells="$CAULDRON_SYS_SPELLS"
-
- [[ -f "$spells" ]] || return $ERR_TOOLCHAIN_CAST
-
- # make sure we have a chroot accessible
- # default to $CAULDRON_BUILD, unless one is already defined
- cauldron_chroot_init
- [[ $? -eq $ERR_OK || $? -eq $ERR_CHROOT_NEST ]] || return $ERR_CHROOT_INIT
-
- # generate the caches for the needed spells
- cauldron_chroot_cast_clean "$spells" || return $ERR_TOOLCHAIN_CAST
-
- # clean up the chroot
- cauldron_chroot_done || return $ERR_CHROOT_DONE
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param spell
-##
-## Generates a cache file for the given spell. It will try to use information
-## from an already installed/cast spell (in the case of the host system
having
-## sorcery configured to not generate the caches), and, failing that, will
cast
-## the spell and then dispel it (the second step only being performed if
-## aggressive is true).
-##
-#-------------------------------------------------------------------------------
-function cauldron_toolchain_cache_make() {
- local spell="$1"
- local config="$CAULDRON_ISORCERY_CONFIG"
- local lconfig="$CAULDRON_ISORCERY_LCONFIG"
- local install_logs="$CAULDRON_HOST/var/log/sorcery/install"
- local version=""
-
- # First check to see if the spell was installed, but no cache exists.
- if gaze -q installed "$spell" > $CAULDRON_NULL
- then
- # use sorcery to generate a cache file using the install log
- # this is the least intensive of the three options
- version="$(grep ^$spell $CAULDRON_HSORCERY_PACKAGES | cut -d: -f4)"
-
- if ! cauldron_toolchain_cache_resurrect "${spell}-${version}"
- then
- # Only do this part if the caller wants us to be aggressive in
building the
- # cache.
- if [[ "$CAULDRON_AGGRESSIVE" == yes ]]
- then
- if [[ -e "$install_logs/${spell}-${version}" ]]
- then
- # try making a cache from the install logs manually
- cauldron_toolchain_cache_gather "$install_logs" "$spell" "$version"
- fi
- fi
- fi
-
- # otherwise, there's no install logs so we will need to cast the spell
- elif [[ "$CAULDRON_AGGRESSIVE" == "yes" ]]
- then
- # make sure sorcery is in the build chroot
- [[ -f "$config" ]] || return $ERR_TOOLCHAIN_SORCERY
-
- # sorcery defaults to archiving, but can be overridden in a local config
- # check for the local config
- if [[ -f "$lconfig" ]]
- then
- archive=$(grep '[^#]*ARCHIVE=' "$config" | cut -d= -f2)
-
- # if archiving is off in the local config, turn it on
- if [[ "$archive" != "on" ]]
- then
- sed -i 's/ARCHIVE=.*/ARCHIVE="on"/' "$config" ||
- return $ERR_SORCEROUS_ARCHIVE
- fi
- fi
-
- # get the cache by manually casting/dispelling
- # this is the most resource intensive of the three options
- cauldron_toolchain_cache_cast "$spell" || return $ERR_TOOLCHAIN_CAST
- fi
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Generates the base toolchain using the HOST information. This is
-## done by unpacking the cache file for each spell required for the
-## toolchain if it exists. If it does not exist, this may be because
-## caching is disabled on the host machine, or perhaps the cache file
-## was deleted by accident. Otherwise the spell must be cast within
-## a chroot environment in the CAULDRON_BUILD directory.
-##
-#-------------------------------------------------------------------------------
-function cauldron_toolchain_build_host() {
- local spell=""
- local version=""
- local spell_cache=""
- local host_triple=""
- local ext="$CAULDRON_CACHE_EXTENSION"
-
- # get the value for HOST_TRIPLE
- host_triple="$(cauldron_toolchain_host_get)"
-
- [[ -z "$host_triple" ]] && return $ERR_HOST_TRIPLE
-
- # grab the list of spells needed as the base tool-chain which will be
- # used to create the cross-compile tool-chain
- for spell in "$CAULDRON_TOOLCHAIN"
- do
- # grab the version for the spell from sorcery's state info
- # on what's installed
- version="$(grep \"^$spell\" $CAULDRON_HSORCERY_PACKAGES | cut -d: -f4)"
-
- # check if spell found on the system
- if [[ -n "$version" ]]
- then
- # set SPELL_CACHE as shorthand for SPELL-VERSION-HOST_TRIPLE.tar.bz2
- spell_cache="${spell}-${version}-${host_triple}.tar${ext}"
-
- # unpack the cache file, effectively installing
- # the spell into the BUILD dir
- # the unpacking is done against the BUILD dir as the root dir, so
- # this should not touch the HOST filesystem at all
- tar xjf "$CAULDRON_BUILD/$spell_cache" -C "$CAULDRON_BUILD/" ||
- return $ERR_UNPACK_CACHE
-
- # if the tar was successful, then remove the temporary file
- rm "$CAULDRON_BUILD/$spell_cache" ||
- return $ERR_RM_CACHE
- fi
- done
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## This builds the cross-compiler to produce the TARGET binaries.
-##
-#-------------------------------------------------------------------------------
-function cauldron_toolchain_build_cross() {
- local chroot=0
-
- # make sure we have a chroot accessible
- # default to $CAULDRON_BUILD, unless one is already defined
- if [[ "$CAULDRON_CHROOTINIT" -ne 1 ]]
- then
- chroot=1
- cauldron_chroot_init
- [[ $? -eq 0 || $? -eq $ERR_CHROOT_NEST ]] || return $ERR_CHROOT_INIT
- fi
-
- # build the stage 1 tools
- cauldron_sorcerous_configure 1 || return $ERR_TOOLCHAIN_STAGE1
- cauldron_chroot "$CAULDRON_CAST" "binutils" || return $ERR_CHROOT_CAST
- cauldron_chroot "$CAULDRON_CAST" "gcc" || return $ERR_CHROOT_CAST
-
- # build glibc (stage 2)
- cauldron_sorcerous_configure 2 || return $ERR_TOOLCHAIN_STAGE2
- cauldron_chroot "$CAULDRON_CAST" "glibc" || return $ERR_CHROOT_CAST
-
- # rebuild gcc (still stage 1, but this time linked against the
- # cross-glibc
- cauldron_sorcerous_configure 1 || return $ERR_TOOLCHAIN_STAGE1
- cauldron_chroot "$CAULDRON_CAST" "gcc" || return $ERR_CHROOT_CAST
-
- # do a sorcery rebuild inside the BUILD dir to
- # generate the cross-compile tool-chain (stage 3)
- cauldron_sorcerous_configure 3 || return $ERR_TOOLCHAIN_STAGE3
- cauldron_chroot "$CAULDRON_REBUILD" || return $ERR_CHROOT_REBUILD
-
- # if we had to initialize a default chroot
- # clean up by shutting it down
- if [[ "$chroot" -eq 1 ]]
- then
- cauldron_chroot_done || return $ERR_CHROOT_DONE
- fi
-}
-
-#-------------------------------------------------------------------------------
-##
-## This software is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This software is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this software; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-#-------------------------------------------------------------------------------
-
-# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/cauldron/lib/errorcodes b/cauldron/lib/errorcodes
new file mode 100644
index 0000000..8bee67e
--- /dev/null
+++ b/cauldron/lib/errorcodes
@@ -0,0 +1,138 @@
+#!/bin/bash
+#-------------------------------------------------------------------------------
+##
+##=head1 SYNOPSIS
+##
+## These are the cauldron-specific error definitions.
+##
+##=head1 COPYRIGHT
+##
+## Copyright 2009 by the Cauldron Team
+##
+##=head1 FUNCTIONS
+##
+##=over 4
+##
+#-------------------------------------------------------------------------------
+
+#-------------------------------------------------------------------------------
+# ERROR definitions
+#-------------------------------------------------------------------------------
+
+# base error codes
+liberror_add_error ERR_MK_DIR "could not make directory"
+liberror_add_error ERR_DIR_EXISTS "directory already exists"
+liberror_add_error ERR_FILE_NOT_FOUND "requested file not found"
+liberror_add_error ERR_DIR_NOT_FOUND "requested directory not found"
+liberror_add_error ERR_CP_FILE "could not copy file"
+liberror_add_error ERR_CHMOD_FILE "could not chmod file"
+liberror_add_error ERR_RM_FILES "could not remove files"
+
+# libcauldron base
+liberror_add_error ERR_LOAD_LIBRARY "problem loading library"
+liberror_add_error ERR_CLEANUP_BUILD "could not clean up build directory"
+liberror_add_error ERR_CLEANUP_TMP "could not clean up temporary directory"
+
+# libcauldron build
+liberror_add_error ERR_UNPACK_CACHE \
+ "could not unpack spell cache inside build directory"
+liberror_add_error ERR_RM_CACHE \
+ "could not remove spell cache after unpacking in build"
+liberror_add_error ERR_HOST_TRIPLE "could not get host triple for builds"
+liberror_add_error ERR_BUILD_SPOOL "build directory sorcery spool does not
exist"
+liberror_add_error ERR_RESOLV "resolv.conf missing in the build directory"
+
+# libcauldron cleaner files
+liberror_add_error ERR_CLEAN_CLEANER "cleaner files could not be found"
+liberror_add_error ERR_CLEAN_DIR "failed to clean directory from iso"
+liberror_add_error ERR_CLEAN_FILE "failed to clean file from iso"
+
+# libcauldron enchantment
+liberror_add_error ERR_ENCHANT_CONFIG "could not source enchant config"
+liberror_add_error ERR_INSTALLER_DIR \
+ "could not create the iso installer directory"
+liberror_add_error ERR_COPY_INSTALLER "could not copy installer to iso"
+liberror_add_error ERR_LINK_INSTALLER "could not link installer in iso"
+
+# libcauldron final product
+liberror_add_error ERR_ISO_PACKAGE "could not create final iso file"
+liberror_add_error ERR_ISO_COMPRESS "could not compress final iso file"
+liberror_add_error ERR_SYS_PACKAGE "could not package final sys file"
+liberror_add_error ERR_SYS_COMPRESS "could not compress final sys archive"
+
+# lib.chroot
+liberror_add_error ERR_CHROOT_UNDEF "chroot target is undefined"
+liberror_add_error ERR_CHROOT_INIT "could not init chroot"
+liberror_add_error ERR_CHROOT_DONE "could not close chroot"
+liberror_add_error ERR_CHROOT_NOT_INIT "chroot not initialized"
+liberror_add_error ERR_CHROOT_EXEC "could not execute chroot command"
+liberror_add_error ERR_CHROOT_CAST "chroot cast failed"
+liberror_add_error ERR_CHROOT_DISPEL "chroot dispel failed"
+liberror_add_error ERR_CHROOT_REBUILD "chroot rebuild failed"
+liberror_add_error ERR_CHROOT_NEST "chroot already defined"
+
+# lib.init
+liberror_add_error ERR_INIT_INSTALL_RAMFS \
+ "problem installing built initramfs into iso"
+liberror_add_error ERR_INIT_INSTALL_RD \
+ "problem installing built initramdisk into iso"
+liberror_add_error ERR_INIT_MAKE_RAMFS "could not build initramfs"
+liberror_add_error ERR_INIT_MAKE_RD "could not build initramdisk"
+liberror_add_error ERR_INIT_MAKE_FS \
+ "could not make filesystem for initramfs/ramdisk"
+
+# lib.sorcerous
+liberror_add_error ERR_SORCEROUS_ARCHIVE \
+ "target sorcery not set to archive casts"
+liberror_add_error ERR_SORCEROUS_TARGET "target sorcery files not found"
+liberror_add_error ERR_SORCEROUS_HOST "host sorcery not found"
+liberror_add_error ERR_SORCEROUS_CREATE_CACHE "could not create spell cache"
+liberror_add_error ERR_SORCEROUS_ISO_SORCERY_CONFIG \
+ "could not create local sorcery config directory in iso"
+liberror_add_error ERR_SORCEROUS_DOWNLOAD "could not download sorcery"
+liberror_add_error ERR_SORCEROUS_UNPACK \
+ "could not unpack a valid sorcery install"
+liberror_add_error ERR_SORCEROUS_INSTALL \
+ "could not install sorcery into build directory"
+
+# lib.toolchain
+liberror_add_error ERR_TOOLCHAIN_CP_CACHE \
+ "could not copy toolchain spell cache from host system into build
directory"
+liberror_add_error ERR_TOOLCHAIN_BUILD_CACHE \
+ "could not build toolchain cache file from spell install info"
+liberror_add_error ERR_TOOLCHAIN_STAGE1 \
+ "cross-toolchain stage 1 failed"
+liberror_add_error ERR_TOOLCHAIN_STAGE2 \
+ "cross-toolchain stage 2 failed"
+liberror_add_error ERR_TOOLCHAIN_STAGE3 \
+ "cross-toolchain stage 3 failed"
+liberror_add_error ERR_TOOLCHAIN_CAST \
+ "could not cast toolchain spell cache"
+liberror_add_error ERR_TOOLCHAIN_DISPEL \
+ "could not dispel toolchain spell cache"
+liberror_add_error ERR_TOOLCHAIN_GATHER \
+ "could not generate toolchain spell cache"
+liberror_add_error ERR_TOOLCHAIN_SORCERY \
+ "sorcery not found in toolchain root"
+liberror_add_error ERR_TOOLCHAIN_RESURRECT \
+ "could not resurrect spell using sorcery"
+
+#-------------------------------------------------------------------------------
+##
+## This software is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This software is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this software; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+#-------------------------------------------------------------------------------
+
+# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/cauldron/lib/lib.chroot b/cauldron/lib/lib.chroot
new file mode 100644
index 0000000..b3487e2
--- /dev/null
+++ b/cauldron/lib/lib.chroot
@@ -0,0 +1,241 @@
+#!/bin/bash
+#-------------------------------------------------------------------------------
+##
+##=head1 SYNOPSIS
+##
+## libcauldron is a set of functions used internally by the cauldron script
+##
+##=head1 COPYRIGHT
+##
+## Copyright 2009 by the Cauldron Team
+##
+##=head1 FUNCTIONS
+##
+##=over 4
+##
+#-------------------------------------------------------------------------------
+
+#-------------------------------------------------------------------------------
+## @param target dir to chroot into (optional)
+##
+## Prepares a chroot environment and exports necessary variables. For every
+## target dir to chroot into, there should be one
+## [cauldron_chroot_init ... cauldron_chroot_done] pair.
+##
+#-------------------------------------------------------------------------------
+function cauldron_chroot_init() {
+ local target="${1:-$CAULDRON_BUILD}"
+
+ [[ "$CAULDRON_CHROOTINIT" -eq 1 ]] && return $ERR_CHROOT_NEST
+
+ # if target is somehow null, return an error
+ if [[ -z "$target" ]]
+ then
+ return $ERR_CHROOT_UNDEF
+ fi
+
+ # bind the needed mounts
+ "${CAULDRON_CMD_MOUNT_BIND[@]}" \
+ "$CAULDRON_HOST/dev" \
+ "$target/dev" ||
+ return $ERR_CHROOT_INIT
+ "${CAULDRON_CMD_MOUNT_BIND[@]}" \
+ "$CAULDRON_HOST/dev/pts" \
+ "$target/dev/pts" ||
+ return $ERR_CHROOT_INIT
+ "${CAULDRON_CMD_MOUNT_BIND[@]}" \
+ "$CAULDRON_HOST/proc" \
+ "$target/proc" ||
+ return $ERR_CHROOT_INIT
+
+ # make sure the sorcerous library is loaded
+ # which provides cauldron_source_sorcery
+ if [[ -z cauldron_source_sorcery ]]
+ then
+ cauldron_load_library lib.sorcerous
+ fi
+ # source the target sorcery, so we have access to its functions
+ cauldron_sorcerous_load "$target" || return $ERR_SORCEROUS_TARGET
+
+ # everything went OK, so export the chroot definitions
+ export CAULDRON_CHROOTINIT=1
+ export CAULDRON_CHROOT=( "${CAULDRON_CMD_CHROOT[@]}" "$target" )
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param target dir to chroot into
+##
+## Cleans up the chroot environment after it is no longer needed.
+##
+#-------------------------------------------------------------------------------
+function cauldron_chroot_done() {
+ if [[ "$CAULDRON_CHROOTINIT" -eq 1 ]]
+ then
+ local target="${1:-$CAULDRON_BUILD}"
+
+ # if target is somehow null, return an error
+ if [[ -z "$target" ]]
+ then
+ return $ERR_CHROOT_UNDEF
+ fi
+
+ # unmount the bind mounts
+ "${CAULDRON_CMD_UNMOUNT[@]}" "$target/proc" || return $ERR_CHROOT_DONE
+ "${CAULDRON_CMD_UNMOUNT[@]}" "$target/dev/pts" || return $ERR_CHROOT_DONE
+ "${CAULDRON_CMD_UNMOUNT[@]}" "$target/dev" || return $ERR_CHROOT_DONE
+
+ # clear the chroot definitions
+ unset CAULDRON_CHROOTINIT
+ unset CAULDRON_CHROOT
+ fi
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param command plus args to execute inside the chroot
+##
+## Executes the command given as the first parameter and any args that follow
+## inside the cauldron chroot defined by cauldron_chroot_init.
+##
+#-------------------------------------------------------------------------------
+function cauldron_chroot() {
+ if [[ "$CAULDRON_CHROOTINIT" -eq 1 ]]
+ then
+ "${CAULDRON_CHROOT[@]}" $* || return $ERR_CHROOT_EXEC
+ else
+ return $ERR_CHROOT_NOT_INIT
+ fi
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param target_spells
+##
+## Performs cast on the list of spells needed for installation to the target
+## system. "target_spells" can either be a list of spells passed as
arguments or
+## a file which contains such a list. The members of the spell list can be
+## separated by anything IFS will recognize (typically any whitespace).
+##
+#-------------------------------------------------------------------------------
+function cauldron_chroot_cast() {
+ local target_spells=( "$@" )
+ local spell=""
+
+ # if a file that lists spells to cast is passed in, get the list of spells
+ # from the file
+ [[ -f "$target_spells" ]] && target_spells=( $(< "$target_spells") )
+
+ # make sure we have a valid chroot of where we will cast
+ [[ -z "$CAULDRON_CHROOT" ]] && return $ERR_CHROOT_INIT
+
+ # cast all the spells in the list in one shot for better efficiency
+ cauldron_chroot "${CAULDRON_CMD_CAST[@]}" "${target_spells[@]}" ||
+ return $ERR_CHROOT_CAST
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param target_spells
+##
+## Performs dispel on the list of spells needed for installation to the
target
+## system. "target_spells" can either be a list of spells passed as
arguments or
+## a file which contains such a list. The members of the spell list can be
+## separated by anything IFS will recognize (typically any whitespace).
+##
+#-------------------------------------------------------------------------------
+function cauldron_chroot_dispel() {
+ local target_spells=( "$@" )
+ local spell=""
+
+ # if a file that lists spells to cast is passed in, get the list of spells
+ # from the file
+ [[ -f "$target_spells" ]] && target_spells=( $(< "$target_spells") )
+
+ # make sure we have a valid chroot of where we will cast
+ [[ -z "$CAULDRON_CHROOT" ]] && return $ERR_CHROOT_INIT
+
+ # dispel all the spells in the list in one shot for better efficiency
+ cauldron_chroot "${CAULDRON_CMD_DISPEL[@]}" "${target_spells[@]}" ||
+ return $ERR_CHROOT_DISPEL
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param target_spells
+##
+## Performs cast and immediate dispel on the each spell in the list of spells
+## to ensure that each spell is cast "cleanly" (meaning that no idle
+## dependencies are laying about in the build tree to get inadvertently
picked
+## up by arguably broken spell builds). "target_spells" can either be a list
of
+## spells passed as arguments or a file which contains such a list. The
members
+## of the spell list can be separated by anything IFS will recognize
(typically
+## any whitespace).
+##
+#-------------------------------------------------------------------------------
+function cauldron_chroot_cast_clean() {
+ local target_spells=( "$@" )
+ local spell=""
+
+ # if a file that lists spells to cast is passed in, get the list of spells
+ # from the file
+ [[ -f "$target_spells" ]] && target_spells=( $(< "$target_spells") )
+
+ # Since we will be installing from the running ISO system instead of a
giant
+ # tarball, for each spell we only need to make sure that the cache file is
+ # available. This will require that the ISO sorcery has caching enabled.
The
+ # caching should really be turned on from the very beginning though...
+ if [[ -z "$ARCHIVE" ]]
+ then
+ cauldron_sorcerous_load || return $ERR_SORCEROUS_TARGET
+ fi
+ [[ "$ARCHIVE" == "off" ]] && return $ERR_SORCEROUS_ARCHIVE
+
+ # make sure we have a valid chroot of where we will cast
+ [[ -z "$CAULDRON_CHROOT" ]] && return $ERR_CHROOT_INIT
+
+ for spell in "${target_spells[@]}"
+ do
+ # cast the spell to generate the cache, and then dispel it from the
system
+ # so that it isn't wasting space in the build filesystem (and so it
doesn't
+ # interfere with later casts for spells that, wrongly, pull in
dependencies
+ # that are present but not wanted)
+ #
+ # TODO: to be able to ensure that dependencies that get pulled in are
also
+ # dispelled we'll have to get the list of everything that was cast during
+ # the cast round from sorcery, which at present will require modifying
cast
+ # itself to export the list (otherwise we'll have to trap the output and
+ # parse it, which is far less machine-readable)
+ cauldron_chroot "${CAULDRON_CMD_CAST[@]}" "$spell" ||
+ return $ERR_CHROOT_CAST
+ cauldron_chroot "${CAULDRON_CMD_DISPEL[@]}" "$spell" ||
+ return $ERR_CHROOT_DISPEL
+ done
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## This software is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This software is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this software; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+#-------------------------------------------------------------------------------
+
+# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/cauldron/lib/lib.init b/cauldron/lib/lib.init
new file mode 100755
index 0000000..6240458
--- /dev/null
+++ b/cauldron/lib/lib.init
@@ -0,0 +1,324 @@
+#!/bin/bash
+#-------------------------------------------------------------------------------
+##
+##=head1 SYNOPSIS
+##
+## libinit is a set of functions used internally by the cauldron scripts
+## responsible for handling the init setup, including initrd and initramfs,
on
+## the ISOs.
+##
+##=head1 COPYRIGHT
+##
+## Copyright 2009 by the Cauldron Team
+##
+##=head1 FUNCTIONS
+##
+##=over 4
+##
+#-------------------------------------------------------------------------------
+
+#-------------------------------------------------------------------------------
+##
+## Handles setting up the init process on the ISO. The ISO init is
+## responsible for detecting hardware, loading device drivers, setting
+## console fonts, etc.
+##
+#-------------------------------------------------------------------------------
+function cauldron_init_setup() {
+ mkdir -p "$CAULDRON_ISO/etc" || return $ERR_MK_DIR
+
+ "${CAULDRON_CMD_CP[@]}" \
+ "$CAULDRON_DATA/$CAULDRON_ARCH/inittab" \
+ "$CAULDRON_ISO/etc/inittab" ||
+ return $ERR_CP_FILE
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param init ramdisk/ramfs image (required)
+##
+## Copies the image passed as first parameter into the ISO run-time
filesystem
+## for use during the ISO boot process.
+##
+#-------------------------------------------------------------------------------
+function cauldron_init_img_install() {
+ local img="$1"
+
+ "${CAULDRON_CMD_MKDIR[@]}" "$CAULDRON_ISO/boot" || return $ERR_MK_DIR
+
+ "${CAULDRON_CMD_CP[@]}" "$img" "$CAULDRON_ISO/boot/$img" ||
+ return $ERR_CP_FILE
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Makes the initrd to be used by the ISO on booting.
+##
+#-------------------------------------------------------------------------------
+function cauldron_init_make_ramdisk() {
+ local initrd="$CAULDRON_TMP/initrd"
+ local initmnt="$CAULDRON_TMP/initrd_mount"
+
+ "${CAULDRON_CMD_MKDIR[@]}" "$initmnt" || return $ERR_MK_DIR
+
+ "${CAULDRON_CMD_DD[@]}" \
+ '-if' /dev/null \
+ '-of' "$initrd" ||
+ return $ERR_INIT_MAKE_RD
+
+ "${CAULDRON_CMD_MKRDFS[@]}" "$initrd" || return $ERR_INIT_MAKE_RD
+
+ "${CAULDRON_CMD_MOUNT_LOOP[@]}" \
+ "$initrd" \
+ "$initmnt" ||
+ return $ERR_INIT_MAKE_RD
+
+ cauldron_init_fs_make "$initmnt" || return $ERR_INIT_MAKE_RD
+
+ "${CAULDRON_CMD_UNMOUNT[@]}" "$initmnt" || return $ERR_INIT_MAKE_RD
+
+ "${CAULDRON_CMD_COMPRESS_RAMDISK[@]}" "$initrd" || return $ERR_INIT_MAKE_RD
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Installs the init ramdisk to be used by the ISO on booting.
+##
+#-------------------------------------------------------------------------------
+function cauldron_init_install_ramdisk() {
+ local ramdisk="$CAULDRON_TMP/initrd.gz"
+
+ cauldron_init_img_install "$ramdisk" || return $ERR_INIT_INSTALL_RD
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Makes the initramfs be used by the ISO on booting.
+##
+#-------------------------------------------------------------------------------
+function cauldron_init_make_ramfs() {
+ local ramdir="$CAULDRON_TMP/initram"
+ local ramfs="$CAULDRON_TMP/initram.cpio.gz"
+
+ "${CAULDRON_CMD_MKDIR[@]}" "$ramdir" || return $ERR_MK_DIR
+
+ cauldron_init_fs_make "$ramdir" || return $ERR_INIT_MAKE_FS
+
+ (
+ cd "$ramdir"
+ "${CAULDRON_CMD_MKRAMFS[@]}" > "$ramfs"
+ ) ||
+ return $ERR_INIT_MAKE_RAMFS
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Installs the init ramfs to be used by the ISO on booting.
+##
+#-------------------------------------------------------------------------------
+function cauldron_init_install_ramfs() {
+ local ramfs="$CAULDRON_TMP/initram.cpio.gz"
+
+ cauldron_init_img_install "$ramfs" || return $ERR_INIT_INSTALL_RAMFS
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param path_to_initfs (required)
+##
+## Sets up the basic directories that will be needed on the initfs
+##
+#-------------------------------------------------------------------------------
+function cauldron_init_fs_dirs() {
+ local initfs="$1"
+ local list="$CAULDRON_DATA/$CAULDRON_ARCH/initfs/dirs"
+
+ if [[ -f "$list" ]]
+ for dir in $("${CAULDRON_CMD_CAT[@]}" "$list")
+ do
+ "${CAULDRON_CMD_MKDIR[@]}" "$initfs/$dir" || return $ERR_MK_DIR
+ done
+ fi
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param path_to_initfs (required)
+##
+## Gathers and copies the necessary binaries into the initfs
+##
+#-------------------------------------------------------------------------------
+function cauldron_init_fs_bins() {
+ local initfs="$1"
+ local list="$CAULDRON_DATA/$CAULDRON_ARCH/initfs/binaries"
+
+ if [[ -f "$list" ]]
+ for bin in $("${CAULDRON_CMD_CAT[@]}" "$list")
+ do
+ "${CAULDRON_CMD_CP[@]}" "$bin" "$initfs/bin" || return $ERR_CP_FILE
+ done
+ fi
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param path_to_initfs (required)
+##
+## Gathers and copies the necessary libraries into the initfs
+##
+#-------------------------------------------------------------------------------
+function cauldron_init_fs_libs() {
+ local initfs="$1"
+ local list="$CAULDRON_DATA/$CAULDRON_ARCH/initfs/libs"
+
+ if [[ -f "$list" ]]
+ for lib in $("${CAULDRON_CMD_CAT[@]}" "$list")
+ do
+ "${CAULDRON_CMD_CP[@]}" "$lib" "$initfs/lib/" || return $ERR_CP_FILE
+ done
+ fi
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param path_to_initfs (required)
+##
+## Copies over any required kernel modules into the initfs
+##
+#-------------------------------------------------------------------------------
+function cauldron_init_fs_mods() {
+ local initfs="$1"
+ local list="$CAULDRON_DATA/$CAULDRON_ARCH/initfs/modules"
+
+ if [[ -f "$list" ]]
+ for module in $("${CAULDRON_CMD_CAT[@]}" "$list")
+ do
+ "${CAULDRON_CMD_CP[@]}" \
+ "$module" \
+ "$initfs/lib/modules/$CAULDRON_KVERS" ||
+ return $ERR_CP_FILE
+ done
+ fi
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param path_to_initfs (required)
+##
+## Sets up the "init" in the initfs (AKA linuxrc in ramdisks)
+##
+#-------------------------------------------------------------------------------
+function cauldron_init_fs_init() {
+ local initfs="$1"
+ local init_script="$CAULDRON_DATA/$CAULDRON_ARCH/initfs/init"
+
+ # copy the init script to /init in the init filesystem, because /init is
+ # *requried* by init ramfs and an init ramdisk can be configured to use
+ # anything we want via the init= boot parameter, and we can also symlink
for
+ # ramdisks if we want to.
+ "${CAULDRON_CMD_CP[@]}" "$init_script" "$initfs/init" || return
$ERR_CP_FILE
+
+ # make sure the init script is executable
+ "${CAULDRON_CMD_CHMOD}" 0755 "$initfs/init" || return $ERR_CHMOD_FILE
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param path_to_initfs (required)
+## @param path to build directory (optional)
+##
+## Builds busybox for use in the initramfs using a preconfigured config file
for
+## the build. It builds by casting in the build chroot, copies the resulting
+## busybox binary, and then dispels the busybox spell in the chroot to clean
up.
+##
+#-------------------------------------------------------------------------------
+function cauldron_init_fs_busybox() {
+ local initfs="$1"
+ local build="${2:-$CAULDRON_BUILD}"
+ local bbconf="$CAULDRON_DATA/$CAULDRON_ARCH/initfs/busybox.config"
+
+ if [[ ! -d "$build" ]]
+ then
+ mkdir -p "$build" || return $ERR_MK_DIR
+ fi
+
+ "${CAULDRON_CMD_MKDIR[@]}" "$build/etc/sorcery/local" || return $ERR_MK_DIR
+
+ "${CAULDRON_CMD_CP_FORCE[@]}" \
+ "$bbconf" \
+ "$build/etc/sorcery/local/busybox.config" ||
+ return $ERR_CP_FILE
+
+ cauldron_chroot_init "$build"
+ [[ $? -eq 0 || $? -eq $ERR_CHROOT_NEST ]] || return $ERR_CHROOT_INIT
+
+ cauldron_chroot_cast "busybox" || return $ERR_CHROOT_CAST
+
+ "${CAULDRON_CMD_CP[@]}" "$build/sbin/busybox" "$initfs/sbin/busybox" ||
+ return $ERR_CP_FILE
+
+ cauldron_chroot_dispel "busybox" || return $ERR_CHROOT_DISPEL
+
+ cauldorn_chroot_done "$build" || return $ERR_CHROOT_DONE
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param path_to_initfs (required)
+##
+## Higher-level function that builds a "filesystem" to be used in an initrd
or
+## initramfs by calling the appropriate low-level functions in turn.
+##
+#-------------------------------------------------------------------------------
+function cauldron_init_fs_make() {
+ local initfs="$1"
+
+ [[ -d "$initfs" ]] || return $ERR_DIR_NOT_FOUND
+
+ cauldron_init_fs_busybox "$initfs" &&
+ cauldron_init_fs_dirs "$initfs" &&
+ cauldron_init_fs_bins "$initfs" &&
+ cauldron_init_fs_libs "$initfs" &&
+ cauldron_init_fs_mods "$initfs" &&
+ cauldron_init_fs_init "$initfs"
+
+ [[ "$?" -gt 0 ]] && return $ERR_INIT_MAKE_FS
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## This software is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This software is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this software; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+#-------------------------------------------------------------------------------
+
+# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/cauldron/lib/lib.sorcerous b/cauldron/lib/lib.sorcerous
new file mode 100644
index 0000000..7e36e4f
--- /dev/null
+++ b/cauldron/lib/lib.sorcerous
@@ -0,0 +1,173 @@
+#!/bin/bash
+#-------------------------------------------------------------------------------
+##
+##=head1 SYNOPSIS
+##
+## libcauldron is a set of functions used internally by the cauldron script
+##
+##=head1 COPYRIGHT
+##
+## Copyright 2009 by the Cauldron Team
+##
+##=head1 FUNCTIONS
+##
+##=over 4
+##
+#-------------------------------------------------------------------------------
+
+#-------------------------------------------------------------------------------
+## @param path to the sorcery config to load
+##
+## Sources the sorcery config files. Mainly called by cauldron_chroot_init.
+##
+## TODO:
+## this needs to be fixed, since sorcery uses some absolute paths and has
some
+## hard-coded into itself, therefore it will source parts from the target but
+## other parts will actually be sourced from the HOST
+##
+## the solution may involve having a modified sorcery config for the build
+## chroot, which will need a lot of modified paths
+##
+#-------------------------------------------------------------------------------
+function cauldron_sorcerous_load() {
+ local config="${1:-$CAULDRON_ISORCERY_CONFIG}"
+ local local_config="${2:-$CAULDRON_ISORCERY_LCONFIG}"
+
+ # source the main config file
+ source "$config" || return $ERR_SORCEROUS_TARGET
+
+ # if the local config exists, source it
+ if [[ -f "$local_config" ]]
+ then
+ source "$local_config" || return $ERR_SORCEROUS_TARGET
+ fi
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param stage
+##
+## Configures the toolchain for building on the TARGET system. In other
+## words, this sets the options/variables necessary to build a
+## cross-compiler system to generate binaries for the target system. The
+## parameter "stage" is an int and sets the variables for stage1 and stage2
of
+## the cross-compile. Stage1 is the building of the initial tools. Stage2 is
for
+## the building of glibc, because it's a little bit special. Stage3 is
+## the cross-compilation of the basesystem via sorcery rebuild using the
+## cross-compiler.
+##
+#-------------------------------------------------------------------------------
+function cauldron_sorcerous_cross_configure() {
+ local stage="$1"
+ local hostarch="$CAULDRON_HOST_ARCH"
+ local arch="$CAULDRON_ARCH"
+
+ if [[ -z modify_config ]]
+ then
+ . "$CAULDRON_HSORCERY_LIBS/libtrack" 2> $CAULDRON_NULL ||
+ liberror_die $ERR_SORCEROUS_HOST
+ fi
+
+ # make sure the sorcery local config dir exists on the ISO
+ "${CAULDRON_CMD_MKDIR[@]}" "$CAULDRON_ISORCERY_LCONFIG" ||
+ return $ERR_SORCEROUS_ISO_SORCERY_CONFIG
+
+ case "$stage" in
+ 1)
+ modify_config "$CAULDRON_ISORCERY_LCONFIG" CUSTOM_CFLAGS \
+ "--host=$hostarch --target=$arch"
+ ;;
+ 2)
+ modify_config "$CAULDRON_ISORCERY_LCONFIG" CUSTOM_CFLAGS \
+ "--build=$hostarch --host=$arch"
+ ;;
+ 3)
+ modify_config "$CAULDRON_ISORCERY_LCONFIG" CUSTOM_CFLAGS \
+ "--build=$hostarch --host=$arch --target=$arch"
+ ;;
+ esac
+}
+
+#-------------------------------------------------------------------------------
+## @param spool_path
+##
+## Downloads a sorcery source tarball from the net if we don't already have
one
+## or are forcing a download, and places it in spool_path (optional), or in
+## the CAULDRON_BUILD/var/spool/sorcery directory.
+##
+#-------------------------------------------------------------------------------
+function cauldron_sorcerous_download() {
+ local spool="${1:-$CAULDRON_BUILD/var/spool/sorcery}"
+ local sorcery_url="${CAULDRON_SORCERY_URL}"
+ local url_get=( "${CAULDRON_CMD_URL_DL[@]}" )
+
+ # ensure the spool dir exists for getting spell sources
+ "${CAULDRON_CMD_MKDIR[@]}" "$spool" || return $ERR_BUILD_SPOOL
+
+ # check to see if we will copy or download the sorcery source tarball
+ # then get the source tarball and place it in CAULDRON_BUILD
+ if [[ ! -e "$spool/$sorcery" || "$CAULDRON_FORCE_DOWNLOAD" == "yes" ]]
+ then
+ # run in a subshell as an easy way of not messing with the working
directory
+ (
+ cd "$spool"
+ "${url_get[@]}" "$sorcery_url" ||
+ return $ERR_SORCEROUS_DOWNLOAD
+ )
+ fi &&
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param spool_path
+##
+## Installs sorcery into the build directory. The download_path parameter
+## (optional) indicates where the sorcery source tarball to install from is
+## stored. If spool_path is not supplied, the tarball is assumed to be in
+## the CAULDRON_BUILD/var/spool/sorcery directory.
+##
+#-------------------------------------------------------------------------------
+function cauldron_sorcerous_install() {
+ local spool="${1:-$CAULDRON_BUILD/var/spool/sorcery}"
+ local sorcery="$CAULDRON_SORCERY_PKG"
+
+ # unpack the source tarball
+ "${CAULDRON_CMD_UNPACK_SORCERY[@]}" "$spool/$sorcery" ||
+ return $ERR_SORCEROUS_UNPACK
+
+ [[ -x "$CAULDRON_BUILD/usr/src/sorcery/install" ]] ||
+ return $ERR_SORCEROUS_UNPACK
+
+ # make sure the chroot library is loaded so cauldron_chroot is available
+ if [[ -z cauldron_chroot ]]
+ then
+ cauldron_load_library lib.chroot
+ fi
+ # install the source tarball, relative to CAULDRON_BUILD
+ "$CAULDRON_BUILD/usr/src/sorcery/install" "$CAULDRON_BUILD" ||
+ return $ERR_SORCEROUS_INSTALL
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## This software is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This software is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this software; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+#-------------------------------------------------------------------------------
+
+# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/cauldron/lib/lib.toolchain b/cauldron/lib/lib.toolchain
new file mode 100644
index 0000000..0359788
--- /dev/null
+++ b/cauldron/lib/lib.toolchain
@@ -0,0 +1,345 @@
+#!/bin/bash
+#-------------------------------------------------------------------------------
+##
+##=head1 SYNOPSIS
+##
+## lib.hostcache provides functions for generating spell caches from what's
+## available on the HOST system - only to be used for the
initial
+## build toolchain
+##
+##=head1 COPYRIGHT
+##
+## Copyright 2009 by the Cauldron Team
+##
+##=head1 FUNCTIONS
+##
+##=over 4
+##
+#-------------------------------------------------------------------------------
+
+#-------------------------------------------------------------------------------
+##
+## Scans the sorcery archspec files to find the host triplet.
+##
+## Later, this will be used to set the value of HOST_TRIPLE in
+## /etc/cauldron/config after the code to write the config file is in place.
+##
+#-------------------------------------------------------------------------------
+function cauldron_toolchain_host_get() {
+ local specs="${CAULDRON_HOST_ARCH_PATH//\"/}"
+ local search="-perm 400 -type f -name $CAULDRON_HOST_ARCH"
+ local cmd_grep="${CAULDRON_CMD_GREP[@]}"
+ local cmd_grep_quiet="${CAULDRON_CMD_GREP_QUIET[@]}"
+ local cmd_find="${CAULDRON_CMD_FIND[@]}"
+ local cmd_cut="${CAULDRON_CMD_CUT[@]}"
+ local arch_spec=
+ local host_triple=
+
+ # get the value for the HOST triplet from sorcery archspecs
+
+ if $("$cmd_find" --version | "$cmd_grep" 'version 4\.1\(\.\|$\)')
+ then
+ arch_spec="$($cmd_find $spec $search -print 2>$CAULDRON_NULL)"
+ else
+ arch_spec="$($cmd_find -L $spec $search -print 2>$CAULDRON_NULL)"
+ fi
+
+ # no matching arch spec found
+ [[ -z "$arch_spec" ]] && return $ERR_HOST_TRIPLE
+
+ host_triple="$($cmd_grep 'HOST=' $arch_spec | $cmd_cut -d = -f 2)"
+
+ # no matching host definition
+ [[ -z "$host_triple" ]] && return $ERR_HOST_TRIPLE
+
+ "${CAULDRON_CMD_OUTPUT[@]}" "$host_triple"
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param spell
+## @param install_log_path
+##
+## Builds a cache file from the information provided by the install log for
the
+## spell passed as an argument using sorcery's create_cache_archive. It
expects
+## the provided spell to include the version as a suffix (i.e. bash-3.2).
+##
+#-------------------------------------------------------------------------------
+function cauldron_toolchain_cache_resurrect() {
+ local spell="$1"
+ local install_logs="${2:-$CAULDRON_HOST/var/log/sorcery/install}"
+ local cache="$CAULDRON_HOST_CACHE_PATH/$spell.tar"
+
+ if [[ -z create_cache_archive ]]
+ then
+ . "$CAULDRON_HSORCERY_LIBS/libstate" 2>$CAULDRON_NULL ||
+ liberror_die $ERR_SORCEROUS_HOST
+ fi
+
+ # generate the missing cache file using sorcery
+ create_cache_archive "$install_logs/$spell" "$cache"
"${cache}${EXTENSION}" ||
+ return $ERR_TOOLCHAIN_RESURRECT
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param spell_name
+## @param spell_version
+## @param install_log_path
+##
+## Generates a spell cache by manually copying files from the spell's install
+## log and packaging them. Assumes that the spell's install log exists and is
+## intact.
+##
+#-------------------------------------------------------------------------------
+function cauldron_toolchain_cache_gather() {
+ local spell="$1"
+ local version="$2"
+ local install_logs="${3:-$CAULDRON_HOST/var/log/sorcery/install}"
+ local gather="$CAULDRON_TMP/gather"
+
+ [[ -d "$install_logs" ]] || return $ERR_TOOLCHAIN_GATHER
+
+ [[ -z "$spell" ]] && return $ERR_TOOLCHAIN_GATHER
+ [[ -z "$version" ]] && return $ERR_TOOLCHAIN_GATHER
+
+ # make sure the gather path is clean
+ # completely wipe it out and recreate it
+ "${CAULDRON_CMD_RM_RECURSE_FORCE[@]}" "$gather" || return $ERR_RM_FILES
+ "${CAULDRON_CMD_MKDIR[@]}" "$gather" || return $ERR_MK_DIR
+
+ # find all the files installed by the given spell
+ for file in "$install_logs/${spell}-${version}"/*
+ do
+ # copy all files from the sorcery install log
+ "${CAULDRON_CMD_CP_EXACT[@]}" "$file" "$gather/" ||
+ return $ERR_TOOLCHAIN_GATHER
+ done
+
+ # package the collection of files from the install log as a cache file
+ "${CAULDRON_CMD_TAR[@]}" jcf "${spell}-${version}.tar.bz2" \
+ --transform "s#$gather/##" \
+ "$gather"/* ||
+ return $ERR_TOOLCHAIN_GATHER
+
+ # if the packaging was successful, wipe out the gather dir
+ "${CAULDRON_CMD_RM_RECURSE_FORCE[@]}" "$gather"
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param spell
+##
+## Generates a spell cache by casting the spell and then dispelling it. This
+## assumes that ARCHIVE is already set to "yes" in the chroot's sorcery
config.
+##
+#-------------------------------------------------------------------------------
+function cauldron_toolchain_cache_cast() {
+ local spells="$CAULDRON_SYS_SPELLS"
+
+ [[ -f "$spells" ]] || return $ERR_TOOLCHAIN_CAST
+
+ # make sure we have a chroot accessible
+ # default to $CAULDRON_BUILD, unless one is already defined
+ cauldron_chroot_init
+ [[ $? -eq $ERR_OK || $? -eq $ERR_CHROOT_NEST ]] || return $ERR_CHROOT_INIT
+
+ # generate the caches for the needed spells
+ cauldron_chroot_cast_clean "$spells" || return $ERR_TOOLCHAIN_CAST
+
+ # clean up the chroot
+ cauldron_chroot_done || return $ERR_CHROOT_DONE
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param spell
+##
+## Generates a cache file for the given spell. It will try to use information
+## from an already installed/cast spell (in the case of the host system
having
+## sorcery configured to not generate the caches), and, failing that, will
cast
+## the spell and then dispel it (the second step only being performed if
+## aggressive is true).
+##
+#-------------------------------------------------------------------------------
+function cauldron_toolchain_cache_make() {
+ local spell="$1"
+ local config="$CAULDRON_ISORCERY_CONFIG"
+ local lconfig="$CAULDRON_ISORCERY_LCONFIG"
+ local install_logs="$CAULDRON_HOST/var/log/sorcery/install"
+ local version=""
+ local packages="$CAULDRON_HSORCERY_PACKAGES"
+ local cmd_grep="${CAULDRON_CMD_GREP[@]}"
+ local cmd_cut="${CAULDRON_CMD_CUT[@]}"
+
+ # First check to see if the spell was installed, but no cache exists.
+ if "${CAULDRON_CMD_GAZE_INSTALLED}" "$spell" > $CAULDRON_NULL
+ then
+ # use sorcery to generate a cache file using the install log
+ # this is the least intensive of the three options
+ version="$($cmd_grep ^$spell $packages | $cmd_cut -d: -f4)"
+
+ if ! cauldron_toolchain_cache_resurrect "${spell}-${version}"
+ then
+ # Only do this part if the caller wants us to be aggressive in
building the
+ # cache.
+ if [[ "$CAULDRON_AGGRESSIVE" == yes ]]
+ then
+ if [[ -e "$install_logs/${spell}-${version}" ]]
+ then
+ # try making a cache from the install logs manually
+ cauldron_toolchain_cache_gather "$install_logs" "$spell" "$version"
+ fi
+ fi
+ fi
+
+ # otherwise, there's no install logs so we will need to cast the spell
+ elif [[ "$CAULDRON_AGGRESSIVE" == "yes" ]]
+ then
+ # make sure sorcery is in the build chroot
+ [[ -f "$config" ]] || return $ERR_TOOLCHAIN_SORCERY
+
+ # sorcery defaults to archiving, but can be overridden in a local config
+ # check for the local config
+ if [[ -f "$lconfig" ]]
+ then
+ archive=$($cmd_grep '[^#]*ARCHIVE=' "$config" | $cmd_cut -d= -f2)
+
+ # if archiving is off in the local config, turn it on
+ if [[ "$archive" != "on" ]]
+ then
+ sed -i 's/ARCHIVE=.*/ARCHIVE="on"/' "$config" ||
+ return $ERR_SORCEROUS_ARCHIVE
+ fi
+ fi
+
+ # get the cache by manually casting/dispelling
+ # this is the most resource intensive of the three options
+ cauldron_toolchain_cache_cast "$spell" || return $ERR_TOOLCHAIN_CAST
+ fi
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Generates the base toolchain using the HOST information. This is
+## done by unpacking the cache file for each spell required for the
+## toolchain if it exists. If it does not exist, this may be because
+## caching is disabled on the host machine, or perhaps the cache file
+## was deleted by accident. Otherwise the spell must be cast within
+## a chroot environment in the CAULDRON_BUILD directory.
+##
+#-------------------------------------------------------------------------------
+function cauldron_toolchain_build_host() {
+ local spell=""
+ local version=""
+ local spell_cache=""
+ local host_triple=""
+ local ext="$CAULDRON_CACHE_EXTENSION"
+ local packages="$CAULDRON_HSORCERY_PACKAGES"
+ local cmd_grep="${CAULDRON_CMD_GREP[@]}"
+ local cmd_cut="${CAULDRON_CMD_CUT[@]}"
+
+ # get the value for HOST_TRIPLE
+ host_triple="$(cauldron_toolchain_host_get)"
+
+ [[ -z "$host_triple" ]] && return $ERR_HOST_TRIPLE
+
+ # grab the list of spells needed as the base tool-chain which will be
+ # used to create the cross-compile tool-chain
+ for spell in "$CAULDRON_TOOLCHAIN"
+ do
+ # grab the version for the spell from sorcery's state info
+ # on what's installed
+ version="$($cmd_grep \"^$spell\" $packages | $cmd_cut -d: -f4)"
+
+ # check if spell found on the system
+ if [[ -n "$version" ]]
+ then
+ # set SPELL_CACHE as shorthand for SPELL-VERSION-HOST_TRIPLE.tar.bz2
+ spell_cache="${spell}-${version}-${host_triple}.tar${ext}"
+
+ # unpack the cache file, effectively installing
+ # the spell into the BUILD dir
+ # the unpacking is done against the BUILD dir as the root dir, so
+ # this should not touch the HOST filesystem at all
+ "${CAULDRON_CMD_UNPACK_BUILD[@]}" "$CAULDRON_BUILD/$spell_cache"
+ return $ERR_UNPACK_CACHE
+
+ # if the tar was successful, then remove the temporary file
+ "${CAULDRON_CMD_RM[@]}" "$CAULDRON_BUILD/$spell_cache" ||
+ return $ERR_RM_CACHE
+ fi
+ done
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## This builds the cross-compiler to produce the TARGET binaries.
+##
+#-------------------------------------------------------------------------------
+function cauldron_toolchain_build_cross() {
+ local chroot=0
+
+ # make sure we have a chroot accessible
+ # default to $CAULDRON_BUILD, unless one is already defined
+ if [[ "$CAULDRON_CHROOTINIT" -ne 1 ]]
+ then
+ chroot=1
+ cauldron_chroot_init
+ [[ $? -eq 0 || $? -eq $ERR_CHROOT_NEST ]] || return $ERR_CHROOT_INIT
+ fi
+
+ # build the stage 1 tools
+ cauldron_sorcerous_configure 1 || return $ERR_TOOLCHAIN_STAGE1
+ cauldron_chroot "$CAULDRON_CMD_CAST" "binutils" || return $ERR_CHROOT_CAST
+ cauldron_chroot "$CAULDRON_CMD_CAST" "gcc" || return $ERR_CHROOT_CAST
+
+ # build glibc (stage 2)
+ cauldron_sorcerous_configure 2 || return $ERR_TOOLCHAIN_STAGE2
+ cauldron_chroot "$CAULDRON_CMD_CAST" "glibc" || return $ERR_CHROOT_CAST
+
+ # rebuild gcc (still stage 1, but this time linked against the
+ # cross-glibc
+ cauldron_sorcerous_configure 1 || return $ERR_TOOLCHAIN_STAGE1
+ cauldron_chroot "$CAULDRON_CMD_CAST" "gcc" || return $ERR_CHROOT_CAST
+
+ # do a sorcery rebuild inside the BUILD dir to
+ # generate the cross-compile tool-chain (stage 3)
+ cauldron_sorcerous_configure 3 || return $ERR_TOOLCHAIN_STAGE3
+ cauldron_chroot "$CAULDRON_CMD_REBUILD" || return $ERR_CHROOT_REBUILD
+
+ # if we had to initialize a default chroot
+ # clean up by shutting it down
+ if [[ "$chroot" -eq 1 ]]
+ then
+ cauldron_chroot_done || return $ERR_CHROOT_DONE
+ fi
+}
+
+#-------------------------------------------------------------------------------
+##
+## This software is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This software is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this software; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+#-------------------------------------------------------------------------------
+
+# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/cauldron/lib/libcauldron b/cauldron/lib/libcauldron
new file mode 100755
index 0000000..d55813b
--- /dev/null
+++ b/cauldron/lib/libcauldron
@@ -0,0 +1,275 @@
+#!/bin/bash
+#-------------------------------------------------------------------------------
+##
+##=head1 SYNOPSIS
+##
+## libcauldron is a set of functions used internally by the cauldron script
+##
+##=head1 COPYRIGHT
+##
+## Copyright 2009 by the Cauldron Team
+##
+##=head1 FUNCTIONS
+##
+##=over 4
+##
+#-------------------------------------------------------------------------------
+
+# shorthand and non-hardcoded /dev/null for output dumping
+CAULDRON_NULL="/dev/null"
+
+#-------------------------------------------------------------------------------
+##
+## Used only when checking initialization of the library and a fatal error
+## occurs. Afterwards, functions from liberror are used instead.
+##
+#-------------------------------------------------------------------------------
+function cauldron_fatal_error() {
+ echo "$1"
+ exit 1
+}
+
+#-------------------------------------------------------------------------------
+##
+## error handling library includes - load these first!
+##
+#-------------------------------------------------------------------------------
+. "$CAULDRON_COMMON/liberror" 2>$CAULDRON_NULL ||
+ cauldron_fatal_error "error: cannot load base library liberror"
+
+# load cauldron error code and message defines
+. "$CAULDRON_LIBS/errorcodes" 2>$CAULDRON_NULL ||
+ cauldron_fatal_error "error: cannot load cauldron error codes"
+
+. "$CAULDRON_COMMON/libcolor" 2>$CAULDRON_NULL ||
+ cauldron_fatal_error "error: cannot load base library libcolor"
+
+# test/set whether color output should be enabled
+[[ $CAULDRON_COLOR != "yes" ]] && LIBCOLOR_NOCOLOR="yes"
+
+# drop cauldron_fatal_error if liberror was successfully loaded
+unset cauldron_fatal_error
+
+#-------------------------------------------------------------------------------
+## @param library name to load (no path, just basename)
+##
+## Loads the library given as the first argument. liberror_check_fatal_error
is
+## called to check if there was a problem loading the library, and if there
was
+## it will print a corresponding error message and then exit with the error
+## $ERR_LOAD_LIBRARY.
+##
+#-------------------------------------------------------------------------------
+function cauldron_load_library() {
+ local lib="$1"
+
+ . "$CAULDRON_LIBS/$lib" 2>$CAULDRON_NULL
+ liberror_check_fatal_error
+}
+
+#-------------------------------------------------------------------------------
+# cauldron includes
+#-------------------------------------------------------------------------------
+cauldron_load_library "lib.sorcerous"
+cauldron_load_library "lib.chroot"
+cauldron_load_library "lib.init"
+cauldron_load_library "lib.toolchain"
+
+#-------------------------------------------------------------------------------
+## @param cleanfile
+##
+## Cleans out unneeded files that were used to generate the ISO, but should
+## not be present on the final ISO system. cleanfile is a file that lists
paths
+## to remove (absolute paths, relative to a chroot of the iso), one file/path
+## per line.
+##
+#-------------------------------------------------------------------------------
+function cauldron_clean_iso_system() {
+ local cleanfile="$1"
+
+ [[ -z "$cleanfile" ]] && return $ERR_CLEAN_FILE
+
+ for i in $(sort -r $cleanfile)
+ do
+ if [[ -d "$i" ]]
+ then
+ "$CAULDRON_CMD_OUTPUT[@]}" "Attempting to remove directory $i..."
+ cauldron_chroot rmdir "$i" || return $ERR_CLEAN_DIR
+ else
+ "$CAULDRON_CMD_OUTPUT[@]}" "Deleting $i"
+ cauldron_chroot rm "$i" || return $ERR_CLEAN_FILE
+ fi
+ done
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Packages the sys directory into a compressed tarball to be placed in the
iso
+## filesystem as system.tar.bz2. Relies on the fact that
+## CAULDRON_CMD_ARCHIVE_SYS will add a file suffix to the CAULDRON_SYS_NAME
+## base filename.
+##
+#-------------------------------------------------------------------------------
+function cauldron_package_sys() {
+ "${CAULDRON_CMD_ARCHIVE_SYS[@]}" || return $ERR_SYS_PACKAGE
+
+ "${CAULDRON_CMD_COMPRESS[@]}" "$CAULDRON_BUILD/$CAULDRON_SYS_NAME".* ||
+ return $ERR_SYS_COMPRESS
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Builds the ISO filesystem using the generated ISO data and the filename
+## set in the cauldron config file.
+##
+#-------------------------------------------------------------------------------
+function cauldron_package_iso() {
+ "${CAULDRON_CMD_MKISO[@]}" || return $ERR_ISO_PACKAGE
+
+ "${CAULDRON_CMD_COMPRESS[@]}" "$CAULDRON_ISO_NAME" || return
$ERR_ISO_COMPRESS
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Sources the enchantment config files in the build chroot so that we can
+## obtain (and modify if the user so wishes) the paths where we will store
the
+## enchantment files (libraries, installers, install modules, etc.) on the
ISO.
+##
+#-------------------------------------------------------------------------------
+function cauldron_source_enchantment() {
+ local host_enchant_config="$CAULDRON_HOST/etc/cauldron/enchantment/config"
+ local enchant_config="$CAULDRON_BUILD/etc/enchantment/config"
+ local enchant_lconfig="$CAULDRON_BUILD/etc/enchantment/local/config"
+
+ # make sure the ISO has the enchantment configs first
+ # if, we need to copy them (they are required for the ISO)
+ if [[ ! -f "$enchant_config" ]]
+ then
+ "${CAULDRON_CMD_CP_FORCE[@]}" "$host_enchant_config" "$enchant_config" ||
+ liberror_die $ERR_ENCHANT_CONFIG
+ fi
+
+ # set ENCHANT_ISO_PATH before sourcing the enchantment configs so all the
+ # enchantment variables used by cauldron will be relative to the cauldron
+ # build chroot
+ ENCHANT_ISO_PATH="$CAULDRON_BUILD"
+
+ # source the enchantment config to make sure we get the paths correct
+ . "$enchant_config" 2>$CAULDRON_NULL ||
+ liberror_die $ERR_ENCHANT_CONFIG
+ # try to source the local config, but don't die if it doesn't exist
+ . "$enchant_lconfig" 2>$CAULDRON_NULL
+}
+
+#-------------------------------------------------------------------------------
+##
+## Adds the given installer(s) listed in $CAULDRON_INSTALLERS to the ISO
system.
+## The user can then choose the installer either at boot-time or run-time.
+##
+## The installer(s) can currently be shell or menu (future: X?). In theory it
+## should support any installer, as long as it's packaged in its own
directory
+## and the name of that dir is included in CAULDRON_INSTALLERS, and the
binary
+## to execute for that installer is named enchantment* (i.e., enchantment
+## (shell) or enchantment-menu). This behavior may change in the future
though.
+##
+#-------------------------------------------------------------------------------
+function cauldron_add_installers() {
+ local installer=""
+
+ # no need to return error if cauldron_source_enchantment fails, because it
+ # runs liberror_die itself on error, which causes an exit
+ [[ -z $ENCHANT_DATA ]] && cauldron_source_enchantment
+
+ # make sure CAULDRON_BUILD/ENCHANT_DATA exists
+ "${CAULDRON_CMD_MKDIR[@]}" "$ENCHANT_DATA" || return $ERR_INSTALLER_DIR
+
+ for installer in $CAULDRON_INSTALLERS
+ do
+ "${CAULDRON_CMD_CP_RECURSE[@]}" \
+ "$CAULDRON_LIBS/enchantment/$installer" \
+ "$ENCHANT_DATA/" ||
+ return $ERR_COPY_INSTALLER
+ "$CAULDRON_CMD_SYMLINK_FORCE[@]}" \
+ "$ENCHANT_DATA/$installer"/bin/enchantment* \
+ "$CAULDRON_BUILD/usr/sbin/" ||
+ return $ERR_LINK_INSTALLER
+ done
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## This creates the CAULDRON_BUILD directory, and copies sorcery and
+## cauldron files into it. It also configures the CAULDRON_BUILD
+## sorcery as necessary (i.e. ensures that CLEAN_SOURCE="off") for
+## sanity purposes
+##
+#-------------------------------------------------------------------------------
+function cauldron_prepare() {
+ # ensure that the build dir exists
+ "${CAULDRON_CMD_MKDIR[@]}" "$CAULDRON_BUILD"
+
+ # copy the host's resolv.conf in order to dl sources from the net
+ "${CAULDRON_CMD_CP[@]}" \
+ "$CAULDRON_RESOLV" \
+ "$CAULDRON_BUILD/etc/resolv.conf" ||
+ return $ERR_RESOLV
+
+ # install sorcery into the build dir
+ if [[ -z cauldron_sorcerous_install ]]
+ then
+ cauldron_load_library lib.sorcerous
+ fi
+ cauldron_sorcerous_install "$CAULDRON_BUILD" || return
$ERR_SORCEROUS_INSTALL
+
+ # cauldron is a spell
+ # there is a spoon
+ cauldron_chroot "${CAULDRON_CMD_CAST[@]}" cauldron || return
$ERR_CHROOT_CAST
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Cleans up the tmp directories and such forth
+##
+#-------------------------------------------------------------------------------
+function cauldron_cleanup() {
+ # if the user wants everything cleaned, kill the build directory
+ if [[ "$CAULDRON_CLEAN" == "yes" ]]
+ then
+ "${CAULDRON_CMD_RM_RECURSE_FORCE[@]}" "$CAULDRON_BUILD" ||
+ return $ERR_CLEANUP_BUILD
+ fi
+
+ # kill the temp directory
+ "${CAULDRON_CMD_RM_RECURSE_FORCE[@]}" "$CAULDRON_TMP" || return
$ERR_CLEANUP_TMP
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## This software is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This software is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this software; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+#-------------------------------------------------------------------------------
+
+# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/cauldron/libcauldron b/cauldron/libcauldron
deleted file mode 100755
index e341bd2..0000000
--- a/cauldron/libcauldron
+++ /dev/null
@@ -1,272 +0,0 @@
-#!/bin/bash
-#-------------------------------------------------------------------------------
-##
-##=head1 SYNOPSIS
-##
-## libcauldron is a set of functions used internally by the cauldron script
-##
-##=head1 COPYRIGHT
-##
-## Copyright 2009 by the Cauldron Team
-##
-##=head1 FUNCTIONS
-##
-##=over 4
-##
-#-------------------------------------------------------------------------------
-
-# shorthand and non-hardcoded /dev/null for output dumping
-CAULDRON_NULL="/dev/null"
-
-#-------------------------------------------------------------------------------
-##
-## Used only when checking initialization of the library and a fatal error
-## occurs. Afterwards, functions from liberror are used instead.
-##
-#-------------------------------------------------------------------------------
-function cauldron_fatal_error() {
- echo "$1"
- exit 1
-}
-
-#-------------------------------------------------------------------------------
-##
-## error handling library includes - load these first!
-##
-#-------------------------------------------------------------------------------
-. "$CAULDRON_COMMON/liberror" 2>$CAULDRON_NULL ||
- cauldron_fatal_error "error: cannot load base library liberror"
-
-# load cauldron error code and message defines
-. "$CAULDRON_LIBS/errorcodes" 2>$CAULDRON_NULL ||
- cauldron_fatal_error "error: cannot load cauldron error codes"
-
-. "$CAULDRON_COMMON/libcolor" 2>$CAULDRON_NULL ||
- cauldron_fatal_error "error: cannot load base library libcolor"
-
-# test/set whether color output should be enabled
-[[ $CAULDRON_COLOR != "yes" ]] && LIBCOLOR_NOCOLOR="yes"
-
-# drop cauldron_fatal_error if liberror was successfully loaded
-unset cauldron_fatal_error
-
-#-------------------------------------------------------------------------------
-## @param library name to load (no path, just basename)
-##
-## Loads the library given as the first argument. liberror_check_fatal_error
is
-## called to check if there was a problem loading the library, and if there
was
-## it will print a corresponding error message and then exit with the error
-## $ERR_LOAD_LIBRARY.
-##
-#-------------------------------------------------------------------------------
-function cauldron_load_library() {
- local lib="$1"
-
- . "$CAULDRON_LIBS/$lib" 2>$CAULDRON_NULL
- liberror_check_fatal_error
-}
-
-#-------------------------------------------------------------------------------
-# cauldron includes
-#-------------------------------------------------------------------------------
-cauldron_load_library "lib.sorcerous"
-cauldron_load_library "lib.chroot"
-cauldron_load_library "lib.init"
-cauldron_load_library "lib.toolchain"
-
-#-------------------------------------------------------------------------------
-## @param cleanfile
-##
-## Cleans out unneeded files that were used to generate the ISO, but should
-## not be present on the final ISO system. cleanfile is a file that lists
paths
-## to remove (absolute paths, relative to a chroot of the iso), one file/path
-## per line.
-##
-#-------------------------------------------------------------------------------
-function cauldron_clean_iso_system() {
- local cleanfile="$1"
-
- [[ -z "$cleanfile" ]] && return $ERR_CLEAN_FILE
-
- for i in $(sort -r $cleanfile)
- do
- if [[ -d "$i" ]]
- then
- echo "Attempting to remove directory $i..."
- rmdir "$i" || return $ERR_CLEAN_DIR
- else
- echo "Deleting $i"
- rm "$i" || return $ERR_CLEAN_FILE
- fi
- done
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Packages the sys directory into a compressed tarball to be placed in the
iso
-## filesystem as system.tar.bz2.
-##
-#-------------------------------------------------------------------------------
-function cauldron_package_sys() {
- "${CAULDRON_ARCHIVE_CMD[@]}" || return $ERR_SYS_PACKAGE
-
- "${CAULDRON_COMPRESS_CMD[@]}" "$CAULDRON_BUILD/$CAULDRON_SYS_NAME" ||
- return $ERR_SYS_COMPRESS
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Builds the ISO filesystem using the generated ISO data and the filename
-## set in the cauldron config file.
-##
-#-------------------------------------------------------------------------------
-function cauldron_package_iso() {
- "${CAULDRON_MKISO_CMD[@]}" || return $ERR_ISO_PACKAGE
-
- if [[ "$CAULDRON_KEEPISO" == "yes" ]] ;
- then
- bzip2 -k "$CAULDRON_ISO_NAME" || return $ERR_ISO_COMPRESS
- else
- bzip2 "$CAULDRON_ISO_NAME" || return $ERR_ISO_COMPRESS
- fi
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Sources the enchantment config files in the build chroot so that we can
-## obtain (and modify if the user so wishes) the paths where we will store
the
-## enchantment files (libraries, installers, install modules, etc.) on the
ISO.
-##
-#-------------------------------------------------------------------------------
-function cauldron_source_enchantment() {
- local host_enchant_config="$CAULDRON_HOST/etc/cauldron/enchantment/config"
- local enchant_config="$CAULDRON_BUILD/etc/enchantment/config"
- local enchant_lconfig="$CAULDRON_BUILD/etc/enchantment/local/config"
-
- # make sure the ISO has the enchantment configs first
- # if, we need to copy them (they are required for the ISO)
- if [[ ! -f "$enchant_config" ]]
- then
- cp -f "$host_enchant_config" "$enchant_config" ||
- liberror_die $ERR_ENCHANT_CONFIG
- fi
-
- # set ENCHANT_ISO_PATH before sourcing the enchantment configs so all the
- # enchantment variables used by cauldron will be relative to the cauldron
- # build chroot
- ENCHANT_ISO_PATH="$CAULDRON_BUILD"
-
- # source the enchantment config to make sure we get the paths correct
- . "$enchant_config" 2>$CAULDRON_NULL ||
- liberror_die $ERR_ENCHANT_CONFIG
- # try to source the local config, but don't die if it doesn't exist
- . "$enchant_lconfig" 2>$CAULDRON_NULL
-}
-
-#-------------------------------------------------------------------------------
-##
-## Adds the given installer(s) listed in $CAULDRON_INSTALLERS to the ISO
system.
-## The user can then choose the installer either at boot-time or run-time.
-##
-## The installer(s) can currently be shell or menu (future: X?). In theory it
-## should support any installer, as long as it's packaged in its own
directory
-## and the name of that dir is included in CAULDRON_INSTALLERS, and the
binary
-## to execute for that installer is named enchantment* (i.e., enchantment
-## (shell) or enchantment-menu). This behavior may change in the future
though.
-##
-#-------------------------------------------------------------------------------
-function cauldron_add_installers() {
- local installer=""
-
- # no need to return error if cauldron_source_enchantment fails, because it
- # runs liberror_die itself on error, which causes an exit
- [[ -z $ENCHANT_DATA ]] && cauldron_source_enchantment
-
- # make sure CAULDRON_BUILD/ENCHANT_DATA exists
- mkdir -p "$ENCHANT_DATA" || return $ERR_INSTALLER_DIR
-
- for installer in $CAULDRON_INSTALLERS
- do
- cp -r "$CAULDRON_LIBS/enchantment/$installer" "$ENCHANT_DATA/" ||
- return $ERR_COPY_INSTALLER
- ln -sf "$ENCHANT_DATA/$installer"/bin/enchantment* \
- "$CAULDRON_BUILD/usr/sbin/" ||
- return $ERR_LINK_INSTALLER
- done
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## This creates the CAULDRON_BUILD directory, and copies sorcery and
-## cauldron files into it. It also configures the CAULDRON_BUILD
-## sorcery as necessary (i.e. ensures that CLEAN_SOURCE="off") for
-## sanity purposes
-##
-#-------------------------------------------------------------------------------
-function cauldron_prepare() {
- # ensure that the build dir exists
- mkdir -p "$CAULDRON_BUILD"
-
- # copy the host's resolv.conf in order to dl sources from the net
- cp -L /etc/resolv.conf "$CAULDRON_BUILD"/etc/resolv.conf ||
- return $ERR_RESOLV
-
- # install sorcery into the build dir
- if [[ -z cauldron_sorcerous_install ]]
- then
- cauldron_load_library lib.sorcerous
- fi
- cauldron_sorcerous_install "$CAULDRON_BUILD" || return
$ERR_SORCEROUS_INSTALL
-
- # cauldron is a spell
- # there is a spoon
- cauldron_chroot "$CAULDRON_CAST" cauldron || return $ERR_CHROOT_CAST
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Cleans up the tmp directories and such forth
-##
-#-------------------------------------------------------------------------------
-function cauldron_cleanup() {
- # if the user wants everything cleaned, kill the build directory
- if [[ "$CAULDRON_CLEAN" == "yes" ]]
- then
- rm -fr "$CAULDRON_BUILD" || return $ERR_CLEANUP_BUILD
- fi
-
- # kill the temp directory
- rm -fr "$CAULDRON_TMP" || return $ERR_CLEANUP_TMP
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## This software is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This software is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this software; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-#-------------------------------------------------------------------------------
-
-# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/enchantment/errorcodes b/enchantment/errorcodes
deleted file mode 100644
index 1ab9dd5..0000000
--- a/enchantment/errorcodes
+++ /dev/null
@@ -1,137 +0,0 @@
-#!/bin/bash
-#-------------------------------------------------------------------------------
-##
-##=head1 SYNOPSIS
-##
-## These are the enchantment-specific error definitions.
-##
-##=head1 COPYRIGHT
-##
-## Copyright 2009 by the Cauldron Team
-##
-##=head1 FUNCTIONS
-##
-##=over 4
-##
-#-------------------------------------------------------------------------------
-
-#-------------------------------------------------------------------------------
-# ERROR definitions
-#-------------------------------------------------------------------------------
-# base error codes
-liberror_add_error ERR_MK_DIR "could not make directory"
-liberror_add_error ERR_DIR_EXISTS "directory already exists"
-liberror_add_error ERR_FILE_NOT_FOUND "requested file not found"
-liberror_add_error ERR_DIR_NOT_FOUND "requested directory not found"
-
-# libenchantment base
-liberror_add_error ERR_LOAD_LIBRARY "could not load enchantment library"
-liberror_add_error ERR_PREPARE "could not initialize enchantment"
-liberror_add_error ERR_CLEANUP "could not clean up after finishing"
-
-# libenchantment module processing
-liberror_add_error ERR_GET_CURRENT "could not get current module"
-liberror_add_error ERR_GET_NEXT "could not get next module"
-liberror_add_error ERR_GET_PREV "could not get previous module"
-liberror_add_error ERR_SET_CURRENT "could not set current module"
-liberror_add_error ERR_SET_NEXT "could not set next module"
-liberror_add_error ERR_SET_PREV "could not set previous module"
-
-# history
-liberror_add_error ERR_HISTORY_BACK "could not go back in install history"
-liberror_add_error ERR_HISTORY_FORWARD "could not go forward in install
history"
-
-# lib.chroot
-liberror_add_error ERR_CHROOT_INIT "could not initialized chroot"
-liberror_add_error ERR_CHROOT_NOT_INIT "chroot not initialized"
-liberror_add_error ERR_CHROOT_UNDEF "chroot command undefined"
-liberror_add_error ERR_CHROOT_EXEC "could not execute chroot command"
-liberror_add_error ERR_CHROOT_DONE "could not properly clean up chroot"
-
-# lib.i18n keymap
-liberror_add_error ERR_KEYMAP_EXIT "keymap processing finished"
-liberror_add_error ERR_KEYMAP_PREFIX "invalid keymap prefix"
-liberror_add_error ERR_KEYMAP_LIST "keymap list empty or not provided"
-liberror_add_error ERR_KEYMAP_LIST_SIZE "invalid list size provided"
-liberror_add_error ERR_KEYMAP_INPUT "invalid user input"
-liberror_add_error ERR_KEYMAP_LOAD "could not load selected keymap"
-liberror_add_error ERR_KEYMAP_GET "could not get selected keymap"
-liberror_add_error ERR_KEYMAP_SET "could not set selected keymap"
-
-# lib.install
-liberror_add_error ERR_INSTALL_DIR "could not install directory"
-liberror_add_error ERR_INSTALL_FILE "could not install file"
-liberror_add_error ERR_INSTALL_CACHES "could not install spell caches"
-liberror_add_error ERR_INSTALL_SOURCES "could not install spell sources"
-liberror_add_error ERR_INSTALL_KERNEL "could not install kernel image"
-liberror_add_error ERR_INSTALL_KMODS "could not install kernel modules"
-liberror_add_error ERR_INSTALL_DEPMOD "could not perform depmod in install"
-
-# lib.module
-liberror_add_error ERR_MODULE_NONE "no modules found"
-liberror_add_error ERR_MODULE_SCRIPT "could not process module script"
-liberror_add_error ERR_MODULE_ENTER "could not process module entry"
-liberror_add_error ERR_MODULE_EXIT "could not process module exit"
-liberror_add_error ERR_MODULE_GET_NUM "could not get number of current
module"
-
-# lib.potion
-liberror_add_error ERR_POTION_DIR "potion directory not found"
-liberror_add_error ERR_POTION_GET_HASHSUM "could not read hashsum of file"
-liberror_add_error ERR_POTION_SET_HASHSUM "could not store hashsum of file"
-liberror_add_error ERR_POTION_CACHE_FILE \
- "could not copy file into potion directory"
-liberror_add_error ERR_POTION_ARCHIVE_FORMAT "unknown archive format"
-liberror_add_error ERR_POTION_ARCHIVE "could not make potion archive"
-liberror_add_error ERR_POTION_COMPRESS "could not compress potion archive"
-
-# lib.potion gets
-liberror_add_error ERR_POTION_GET_BOOTLOADER "could not read bootloader
config"
-liberror_add_error ERR_POTION_GET_CONFS "could not read target system
configs"
-liberror_add_error ERR_POTION_GET_FILESYSTEMS "could not read filesystems"
-liberror_add_error ERR_POTION_GET_KERNEL "could not read kernel config"
-liberror_add_error ERR_POTION_GET_MOUNT_POINTS "could not read mount points"
-liberror_add_error ERR_POTION_GET_OPT_SPELLS \
- "could not read optional spell selection"
-liberror_add_error ERR_POTION_GET_PARTITIONS "could not read partitions"
-liberror_add_error ERR_POTION_GET_USERS "could not read user/group config"
-
-# lib.potion updates
-liberror_add_error ERR_POTION_UPDATE_BOOTLOADER \
- "could not update bootloader config"
-liberror_add_error ERR_POTION_UPDATE_CONFS \
- "could not update target system configs"
-liberror_add_error ERR_POTION_UPDATE_FILESYSTEMS "could not update
filesystems"
-liberror_add_error ERR_POTION_UPDATE_KERNEL "could not update kernel config"
-liberror_add_error ERR_POTION_UPDATE_MOUNT_POINTS "could not update mount
points"
-liberror_add_error ERR_POTION_UPDATE_SOURCES \
- "could not update spell sources selection"
-liberror_add_error ERR_POTION_UPDATE_CACHES \
- "could not update spell caches selection"
-liberror_add_error ERR_POTION_UPDATE_PARTITIONS "could not update partitions"
-liberror_add_error ERR_POTION_UPDATE_USERS "could not update user/group
config"
-
-# installer
-liberror_add_error ERR_INSTALLER_FUNCS "could not load \$ENCHANT_INSTALLER
functions file"
-liberror_add_error ERR_INSTALLER_CMD "incorrect usage or unrecognized
command"
-liberror_add_error ERR_INSTALLER_KEYMAP "could not process keymap list"
-liberror_add_error ERR_INSTALLER_MODULES "could not process module list"
-
-#-------------------------------------------------------------------------------
-##
-## This software is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This software is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this software; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-#-------------------------------------------------------------------------------
-
-# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/enchantment/lib.chroot b/enchantment/lib.chroot
deleted file mode 100644
index e0c90d9..0000000
--- a/enchantment/lib.chroot
+++ /dev/null
@@ -1,109 +0,0 @@
-#!/bin/bash
-#-------------------------------------------------------------------------------
-##
-##=head1 SYNOPSIS
-##
-## Chroot construction and destruction functions for use in the installers.
-##
-##=head1 COPYRIGHT
-##
-## Copyright 2010 by the Cauldron Team
-##
-##=head1 FUNCTIONS
-##
-##=over 4
-##
-#-------------------------------------------------------------------------------
-
-#-------------------------------------------------------------------------------
-## @param target dir to chroot into
-##
-## Prepares a chroot environment and exports necessary variables. For every
-## target dir to chroot into, there should be one
-## [cauldron_chroot_init ... cauldron_chroot_done] pair.
-##
-#-------------------------------------------------------------------------------
-function enchant_chroot_init() {
- if [[ "$ENCHANT_CHROOT_INIT" -ne 1 ]]
- then
- # if target is somehow null, return an error
- [[ -z "$ENCHANT_TARGET" ]] && return $ERR_CHROOT_UNDEF
-
- # bind the needed mounts
- mount --bind "$ENCHANT_ISO_PATH/dev" "$ENCHANT_TARGET/dev" ||
- return $ERR_CHROOT_INIT
- mount --bind "$ENCHANT_ISO_PATH/dev/pts" "$ENCHANT_TARGET/dev/pts" ||
- return $ERR_CHROOT_INIT
- mount --bind "$ENCHANT_ISO_PATH/proc" "$ENCHANT_TARGET/proc" ||
- return $ERR_CHROOT_INIT
-
- # export that the chroot is successfully constructed
- export ENCHANT_CHROOT_INIT=1
- fi
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Cleans up the chroot environment after it is no longer needed
-##
-#-------------------------------------------------------------------------------
-function enchant_chroot_done() {
- if [[ "$ENCHANT_CHROOT_INIT" -eq 1 ]]
- then
- # if target is somehow null, return an error
- [[ -z "$ENCHANT_TARGET" ]] && return $ERR_CHROOT_UNDEF
-
- # unmount the bind mounts
- umount "$ENCHANT_TARGET/proc" || return $ERR_CHROOT_DONE
- umount "$ENCHANT_TARGET/dev/pts" || return $ERR_CHROOT_DONE
- umount "$ENCHANT_TARGET/dev" || return $ERR_CHROOT_DONE
-
- # clear the chroot definitions
- unset ENCHANT_CHROOTINIT
- fi
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param command plus args to execute inside the chroot
-##
-## Executes the command given as the first parameter and any args that follow
-## inside the chroot constructed by enchant_chroot_init.
-##
-#-------------------------------------------------------------------------------
-function enchant_chroot() {
- if [[ "$ENCHANT_CHROOT_INIT" -eq 1 ]]
- then
- # if target is somehow null, return an error
- [[ -z "$ENCHANT_TARGET" ]] && return $ERR_CHROOT_UNDEF
-
- "$ENCHANT_CHROOT" "$ENCHANT_TARGET" "$@" || return $ERR_CHROOT_EXEC
- else
- return $ERR_CHROOT_NOT_INIT
- fi
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## This software is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This software is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this software; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-#-------------------------------------------------------------------------------
-
-# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/enchantment/lib.i18n b/enchantment/lib.i18n
deleted file mode 100644
index d3a1349..0000000
--- a/enchantment/lib.i18n
+++ /dev/null
@@ -1,210 +0,0 @@
-#!/bin/bash
-#-------------------------------------------------------------------------------
-##
-##=head1 SYNOPSIS
-##
-## These are the functions used for i18n, including setting keymaps, setting
-## the current language the installer is running under, etc.
-##
-## For the keymap functions, only numbers are to be used as input, since
they
-## are more likely to be consistent across different keymaps/keyboards,
whereas
-## letters and punctuation get moved around much more.
-##
-##=head1 COPYRIGHT
-##
-## Copyright 2010 by the Cauldron Team
-##
-##=head1 FUNCTIONS
-##
-##=over 4
-##
-#-------------------------------------------------------------------------------
-
-#-------------------------------------------------------------------------------
-## @param size of choices list (highest numbered entry to choose from)
-##
-## Reads input from the user, and ensures that it is either '*' or a number
in
-## the range of 0-highest_entry. Echoes the input if it is a number that fits
-## the range. If the input is '*', then ERR_KEYMAP_EXIT is returned so that
the
-## caller can do any cleanup needed and then exit.
-##
-#-------------------------------------------------------------------------------
-function enchant_i18n_keymap_input_get() {
- local max="$1"
- local input=""
-
- [[ -z "$max" ]] && return $ERR_KEYMAP_LIST_SIZE
-
- # grab the input, allowing readline editing
- read -re input || return $ERR_KEYMAP_INPUT
-
- if [[ -n "$input" ]]
- then
- # if the user entered '*', then we exit without finishing
- if [[ "$input" == "*" ]]
- then
- return $ERR_KEYMAP_EXIT
- fi
-
- # if we got a number outside the range of what we can accept,
- # tell the user before returning an error
- if [[ "$input" -lt 0 || "$input" -gt "$max" ]]
- then
- return $ERR_KEYMAP_INPUT
- fi
- fi
-
- echo "$input"
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param prefix -> path to populate the list of choices from
-##
-## Creates a list of choices consisting of directory entries from the
prefix. If
-## prefix is not explicitly provided, it defaults to /usr/share/keymaps (the
base
-## of the keymap file hierarchy) relative to the ENCHANT_ISO_PATH.
-##
-#-------------------------------------------------------------------------------
-function enchant_i18n_keymap_make_list {
- local prefix="${1:-$ENCHANT_ISO_PATH/usr/share/keymaps}"
- local list=()
- local result=()
- local i=""
-
- [[ -d "$prefix" ]] || return $ERR_DIR_NOT_FOUND
-
- list=( $(find "$prefix"/* -maxdepth 0 -type d -not -name include) )
-
- if [[ "${#list[*]}" -eq 0 ]]
- then
- list=( $(find "$prefix"/* -type f -name *.map.gz) )
- fi
-
- [[ "${#list[*]}" -eq 0 ]] && return $ERR_KEYMAP_LIST
-
- for ((i=0; i < "${#list[*]}"; i++))
- do
- result=( "$result" "${list[i]##*/}" )
- done
-
- echo "${result[*]}"
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Get the current keymap setting from the enchantment temporary directory.
-##
-#-------------------------------------------------------------------------------
-function enchant_i18n_keymap_get() {
- cat "$ENCHANT_KEYMAP" || return $ERR_KEYMAP_GET
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param keymap to load
-##
-## Load the keymap passed as the first argument and store it into the
-## enchantment temporary directory for later use.
-##
-#-------------------------------------------------------------------------------
-function enchant_i18n_keymap_set() {
- local keymap="$1"
-
- [[ -f "$keymap" ]] || return $ERR_FILE_NOT_FOUND
-
- loadkeys "$keymap" || return $ERR_KEYMAP_LOAD
-
- # store the selected keymap for later use by enchantment (e.g., for
potions)
- echo "${keymap%.*map.*}" > "$ENCHANT_KEYMAP" ||
- return $ERR_KEYMAP_SET
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param prefix -> current path to populate the menu from
-## @param size of choices list (highest numbered entry to choose from)
-##
-## Gets the user input and then processes it, possibly calling
-## enchant_i18n_keymap_set to actually set the keymap if that's what was
input.
-##
-#-------------------------------------------------------------------------------
-function enchant_i18n_keymap_input_handler() {
- local prefix="${1:-$ENCHANT_ISO_PATH/usr/share/keymaps}"
- local max="$2"
- local input=""
- local rc=""
-
- [[ ! -e "$prefix" ]] && return $ERR_KEYMAP_PREFIX
-
- [[ -z "$max" ]] && return $ERR_KEYMAP_LIST_SIZE
-
- # get the user's menu choice
- input="$(enchant_i18n_keymap_input_get $max)"
- rc="$?"
-
- # if the user entered '*', exit the keymap routines
- [[ "$rc" -eq "$ERR_KEYMAP_EXIT" ]] && return $ERR_KEYMAP_EXIT
-
- # if there was an error in getting the input, report it to the caller
- [[ "$rc" -eq "$ERR_KEYMAP_INPUT" ]] && return $ERR_KEYMAP_INPUT
-
- # if the user entered '0', go "back" (up a dir/level)
- if [[ "$input" -eq "0" ]]
- then
- # only go up a level if we aren't at the beginning
- # (don't go lower than the floor)
- [[ "$prefix" != "$ENCHANT_ISO_PATH/usr/share/keymaps" ]] &&
- prefix="${prefix%/[^/]*}"
- else
- # get the menu item, adjusting for array indexed from 0
- input="${choices[((input-1))]}"
-
- # if the input corresponds to a keymap file, attempt to switch to that
- # keymap, otherwise set the prefix to the new path and loop again
- if [[ "$input" == *.map.gz ]]
- then
- prefix="$prefix/$input"
-
- # if a keymap is successfully set, return ERR_KEYMAP_EXIT to the
caller,
- # so they know that the keymap was successfully chosen and loaded
- enchant_i18n_keymap_set "$prefix" && return $ERR_KEYMAP_EXIT
-
- # return any errors from enchant_i18n_keymap_set if it didn't load a
- # keymap successfully
- return "$?"
- else
- prefix="$prefix/$input"
-
- # echo (return) the new prefix back to the caller
- echo "$prefix"
- fi
- fi
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## This software is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This software is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this software; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-#-------------------------------------------------------------------------------
-
-# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/enchantment/lib.install b/enchantment/lib.install
deleted file mode 100644
index 92f701b..0000000
--- a/enchantment/lib.install
+++ /dev/null
@@ -1,165 +0,0 @@
-#!/bin/bash
-#-------------------------------------------------------------------------------
-##
-##=head1 SYNOPSIS
-##
-## Common functions and variables for different installers related to
-## installing content
-##
-##=head1 DESCRIPTION
-##
-## This is all the functions needed for actually installing content (spell
-## sources, spell caches, kernels and modules, etc.) into a target system.
-##
-##=head1 COPYRIGHT
-##
-## Copyright 2009 The Cauldron Team
-##
-##=head1 FUNCTIONS
-##
-##=over 4
-##
-#-------------------------------------------------------------------------------
-
-#-------------------------------------------------------------------------------
-##
-## @param source
-## @param destination
-##
-## Installs the source file to the destination.
-##
-#-------------------------------------------------------------------------------
-function enchant_install_file() {
- local $src="$1"
- local $dst="$2"
-
- [[ -z "$src" ]] && return $ERR_INSTALL_FILE
- [[ -z "$dst" ]] && return $ERR_INSTALL_FILE
-
- cp -dfp "$src" "$dst" || return $ERR_INSTALL_FILE
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## @param source
-## @param destination
-##
-## Installs the source directory (including all subdirectories and their
-## contents) to the destination.
-##
-#-------------------------------------------------------------------------------
-function enchant_install_dir() {
- local $src="$1"
- local $dst="$2"
-
- [[ -z "$src" ]] && return $ERR_INSTALL_FILE
- [[ -z "$dst" ]] && return $ERR_INSTALL_FILE
-
- cp --parents -dfpr "$src" "$dst" || return $ERR_INSTALL_DIR
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## @param sources_list
-##
-## Copies the selected spell sources into the target. If sources_list is
empty
-## (no sources were passed as arguments), it reads the list of sources to
-## install from $ENCHANT_SOURCES_LIST.
-##
-#-------------------------------------------------------------------------------
-function enchant_install_sources() {
- local sources=( "${@:-$(cat $ENCHANT_SOURCES_LIST)}" )
- local dst="$ENCHANT_TARGET_SOURCES"
-
- for spell in $sources
- do
- enchant_install_file "$ENCHANT_SPELL_SOURCES/$spell" "$dst/" ||
- return $ERR_INSTALL_SOURCES
- done
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## @param caches_list
-##
-## Copies the selected spell caches into the target. If caches_list is empty
-## (no caches were passed as arguments), it reads the list of caches to
-## install from $ENCHANT_SOURCES_LIST.
-##
-#-------------------------------------------------------------------------------
-function enchant_install_caches() {
- local caches=( "${@:-$(cat $ENCHANT_CACHES_LIST)}" )
- local dst="$ENCHANT_TARGET_CACHES"
-
- for spell in $caches
- do
- enchant_install_file "$ENCHANT_SPELL_SOURCES/spell" "$dst/" ||
- return $ERR_INSTALL_CACHES
- done
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## @param kernel_image (absolute path - e.g. $ENCHANT_ISO_PATH/boot/vmlinux)
-## @param modules_path (absolute path - e.g. $ENCHANT_ISO_PATH/lib/modules)
-## @param kernel_version (e.g. 2.6.32.8)
-##
-## Copies the kernel and it's associated modules from the ISO to the TARGET
-## system. Requires that / and /boot on the TARGET system are mounted (unless
-## ENCHANT_TARGET_KERNEL and ENCHANT_TARGET_KMODS are modified). The second
-## parameter (modules_path) *must* include the kernel version as the last
-## directory in the path (i.e., /path/to/kernel/modules/version/).
-##
-#-------------------------------------------------------------------------------
-function enchant_install_kernel() {
- local target="$ENCHANT_TARGET"
- local target_kernel="$ENCHANT_TARGET_KERNEL"
- local target_kmods="$ENCHANT_TARGET_KMODS"
- local kernel="${1:-$ENCHANT_ISO_KERNEL}"
- local kmods="${2:-$ENCHANT_ISO_KMODS}"
- local kvers="${3:-$ENCHANT_ISO_KVERS}"
-
- # copy the kernel over
- enchant_install_file "$kernel" "$target_kernel" || return
$ERR_INSTALL_KERNEL
-
- # copy the modules over
- enchant_install_dir "$kmods/$kvers" "$target_kmods/$(basename $kmods)" ||
- return $ERR_INSTALL_KMODS
-
- # make sure that the proper dep info is generated on the target system
- depmod -a -b "$target_kmods/$kvers" "$kvers" ||
- return $ERR_INSTALL_DEPMOD
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##=back
-##
-##=head1 LICENSE
-##
-## This software is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This software is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this software; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-#-------------------------------------------------------------------------------
-
-# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/enchantment/lib.modules b/enchantment/lib.modules
deleted file mode 100644
index 90c2cb7..0000000
--- a/enchantment/lib.modules
+++ /dev/null
@@ -1,188 +0,0 @@
-#!/bin/bash
-#-------------------------------------------------------------------------------
-##
-##=head1 SYNOPSIS
-##
-## Module (install step) processing functions
-##
-##=head1 DESCRIPTION
-##
-## Provides the functions responsible for listing modules and processing
-## module scripts.
-##
-##=head1 COPYRIGHT
-##
-## Copyright 2010 The Cauldron Team
-##
-##=head1 FUNCTIONS
-##
-##=over 4
-##
-#-------------------------------------------------------------------------------
-
-#-------------------------------------------------------------------------------
-##
-## Returns a list of all modules recognized for the current installation,
pruned
-## of duplicates and the special "error" module. Expects $ENCHANT_INSTALLER
to
-## be set by the installer which is calling this function, and for that
-## installer to have a 'modules' file (see the implementation of the shell
-## installer for an example).
-##
-#-------------------------------------------------------------------------------
-function enchant_modules_list() {
- local output=()
- local module=""
-
- # make sure the installer's modules file exists
- [[ -f "$ENCHANT_DATA/$INSTALLER/modules" ]] || return $ERR_MODULE_FILE
-
- # for all modules, if the module isn't "error" and it isn't already in the
- # output list, append it to the output list
- for module in $(cut -d: -f1 "$ENCHANT_DATA/$INSTALLER/modules")
- do
- if [[ "$module" != "error" ]]
- then
- if ! $(echo "${output[@]}" | grep -q "$module")
- then
- output=( "${output[@]}" "$module" )
- fi
- fi
- done
-
- echo "${output[@]}"
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Returns the number of the current module to perform during the
installation.
-## Expects $ENCHANT_INSTALLER to be set by the installer which is calling
this
-## function, and for that installer to have a 'modules' file (see the
-## implementation of the shell installer for an example).
-##
-#-------------------------------------------------------------------------------
-function enchant_modules_number() {
- local num="$(grep -n -m1 \"^$(enchant_get_current):\"
$ENCHANT_INSTALLER/modules)"
-
- if [[ -z "$num" ]]
- then
- return $ERR_MODULE_GET_NUM
- fi
-
- echo "$num" | cut -d: -f1 || return $ERR_MODULE_GET_NUM
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Returns the total number of modules to perform during the installation
-##
-#-------------------------------------------------------------------------------
-function enchant_modules_total() {
- local total="$(enchant_modules_list | wc -l)"
-
- if [[ "$total" -eq 0 || -z "$total" ]]
- then
- return $ERR_MODULE_NONE
- fi
-
- echo "$total"
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Processes the module entry functions. This is used to provide extra
-## functionality upon entering a module (usually preparatory work, like
creating
-## module-specific temp files, etc.)
-##
-#-------------------------------------------------------------------------------
-function enchant_modules_enter() {
- local module="$(cat $ENCHANT_STATUS)"
- local script=""
-
- for script in "$ENCHANT_MODULES/$module/enter"/*
- do
- if [[ -f "$script" ]]
- then
- /bin/bash "$script" || return $ERR_MODULE_SCRIPT
- fi
- done
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Processes the module exit functions. This is used to provide extra
-## functionality upon exiting a module, usually things like writing data to
the
-## module's temp files, etc.
-##
-#-------------------------------------------------------------------------------
-function enchant_modules_exit() {
- local module="$(cat $ENCHANT_STATUS)"
- local script=""
-
- for script in "$ENCHANT_MODULES/$module/exit"/*
- do
- if [[ -f "$script" ]]
- then
- /bin/bash "$script" || return $ERR_MODULE_SCRIPT
- fi
- done
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param potion to process for
-##
-## Processes the module potion functions. This is used to do automated
installs
-## using pre-made potions (from previous installs or composed ahead of
time). It
-## runs scripted versions of what the user would have done manually in each
-## module.
-##
-#-------------------------------------------------------------------------------
-function enchant_modules_potion() {
- local module="$(cat $ENCHANT_STATUS)"
- local potion="$1"
- local script=""
-
- [[ -d "$potion" ]] || $ERR_DIR_NOT_FOUND
-
- for script in "$ENCHANT_MODULES/$module/potion"/*
- do
- if [[ -f "$script" ]]
- then
- /bin/bash "$script" "$potion" || return $ERR_MODULE_SCRIPT
- fi
- done
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##=back
-##
-##=head1 LICENSE
-##
-## This software is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This software is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this software; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-#-------------------------------------------------------------------------------
-
-# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/enchantment/lib.potion b/enchantment/lib.potion
deleted file mode 100644
index 11f365b..0000000
--- a/enchantment/lib.potion
+++ /dev/null
@@ -1,604 +0,0 @@
-#!/bin/bash
-#-------------------------------------------------------------------------------
-##
-##=head1 SYNOPSIS
-##
-## Common functions and variables for different installers
-##
-##=head1 DESCRIPTION
-##
-## This file provides common function and variable definitions for
-## the different types of installers that can be included on an ISO.
-## This file is meant to be sourced by the different installers,
-## so this file should not be run directly. This file, as well as
-## the installer which sources this file, is meant to be called from
-## inside the ISO during the actual install onto the target system.
-##
-##=head1 COPYRIGHT
-##
-## Copyright 2009 The Cauldron Team
-##
-##=head1 FUNCTIONS
-##
-##=over 4
-##
-#-------------------------------------------------------------------------------
-
-#-------------------------------------------------------------------------------
-# global variables
-#-------------------------------------------------------------------------------
-# current potion dir - used with the enchant history functions to keep
separate
-# state for each level of history
-ENCHANT_POTION_CURRENT=""
-
-# list of config files (e.g., /etc) for which to keep state information on
-# do not include a preceding '/' as the list will be relative to the target
-# system directory (by default /mnt/root)
-ENCHANT_POTION_CONFS=(
- etc/timezone
- etc/hostname
- etc/sysconfig/*
- )
-
-# list of ISO mounts to exclude from partition/filesystem/mount_point
listings
-# each match is exact, so subdirectories need to be explicitly listed
separately
-ENCHANT_POTION_MOUNT_EXCLUDES=(
- /
- /dev
- /dev/pts
- /dev/shm
- /proc
- /sys
- /tmp
- /var
- /var/tmp
- )
-
-#-------------------------------------------------------------------------------
-# function definitions
-#-------------------------------------------------------------------------------
-#-------------------------------------------------------------------------------
-## @param name
-##
-## Generates a temporary directory for storing state information, relative to
-## ENCHANT_POTION/.
-##
-#-------------------------------------------------------------------------------
-function enchant_potion_make_dir() {
- local potion="$1"
-
- [[ -d "$potion" ]] && return $ERR_DIR_EXISTS
-
- mkdir -p "$ENCHANT_POTION/$potion" || return $ERR_MK_DIR
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Gets the current potion name (temporary directory tied to the history
level)
-##
-#-------------------------------------------------------------------------------
-function enchant_potion_get_current() {
- echo -n "$ENCHANT_POTION_CURRENT"
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param potion directory name (relative to $ENCHANT_POTION/)
-##
-## Sets the current potion name (temporary directory tied to the history
level)
-##
-#-------------------------------------------------------------------------------
-function enchant_potion_set_current() {
- local potion="$1"
-
- [[ -d "$potion" ]] || return $ERR_DIR_NOT_FOUND
-
- $ENCHANT_POTION_CURRENT="$potion"
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param file to get the hash for (relative to the current potion dir)
-## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
-##
-## Gets the stored hashsum of the given file
-##
-#-------------------------------------------------------------------------------
-function enchant_potion_get_hashsum() {
- local hashfunc="$ENCHANT_HASHFUNC"
- local file="$1"
- local potion="${2:-$ENCHANT_POTION_CURRENT}"
-
- [[ -f "$file" ]] || return $ERR_FILE_NOT_FOUND
-
- cut -d' ' -f1 "$ENCHANT_POTION/$potion/${file##*/}.${hashfunc##*/}" ||
- return $ERR_POTION_GET_HASHSUM
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param file to hash (absolute path)
-## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
-##
-## Checksums a file so that the file can be checked for changes later. Stores
-## the checksum in the potion directory as file.hash_function, where
-## hash_function is defined by ENCHANT_HASHFUNC in the enchantment config
file.
-##
-#-------------------------------------------------------------------------------
-function enchant_potion_set_hashsum() {
- local hashfunc="$ENCHANT_HASHFUNC"
- local file="$1"
- local potion="${2:-$ENCHANT_POTION_CURRENT}"
-
- [[ -f "$file" ]] || return $ERR_FILE_NOT_FOUND
-
- "$hashfunc" "$file" >
"$ENCHANT_POTION/$potion/${file##*/}.${hashfunc##*/}" ||
- return $ERR_POTION_SET_HASHSUM
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param file to check/cache (absolute path)
-## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
-##
-## Includes a file into the state cache for later archival if the stored
-## checksum doesn't match or there is not stored checksum.
-##
-#-------------------------------------------------------------------------------
-function enchant_potion_cache_file() {
- local file="$1"
- local potion="${2:-$ENCHANT_POTION_CURRENT}"
- local sum=""
-
- [[ -f "$file" ]] || return $ERR_FILE_NOT_FOUND
-
- sum="$($ENCHANT_HASHFUNC $file | cut -d' ' -f1)"
-
- # only update if the checksums differ or we don't already have the hashsum
- if [[ "$sum" != "$(enchant_potion_get_hashsum $file $potion)" ]]
- then
- # generate and store the (new) hashsum of the file
- enchant_potion_set_hashsum "$file" "$potion" || return
$ERR_POTION_SET_HASHSUM
- fi
-
- # store the file itself
- cp -f "$file" "$ENCHANT_POTION/$potion/${file##*/}" || return
$ERR_POTION_CACHE_FILE
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
-##
-## Parses /proc/mounts to determine which partitions are mounted, excluding
the
-## list of ISO mounts.
-##
-#-------------------------------------------------------------------------------
-function enchant_potion_get_partitions() {
- local mounts="/proc/mounts"
- local potion="${1:-$ENCHANT_POTION_CURRENT}"
-
- # list of ISO mounts to exclude
- # each match is exact
- local excl="$ENCHANT_POTION_MOUNT_EXCLUDES"
-
- [[ -d "$ENCHANT_POTION" ]] || return $ERR_POTION_DIR
-
- # for every line, if the 2nd field exactly matches one of excl, skip it
- # otherwise, store the filesystem (field 3) to the temp file
- gawk -v i="$excl" '{if(match(i,$2)) next; else print $1}' $mounts > \
- $ENCHANT_POTION/partitions || return $ERR_POTION_GET_PARTITIONS
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
-##
-## Checks to see if the list of partitions has changed, and updates the state
-## cache if they were changed.
-##
-#-------------------------------------------------------------------------------
-function enchant_potion_update_partitions() {
- local potion_parts="$ENCHANT_POTION/$1/filesystems"
- local parts="$ENCHANT_POTION/filesystems"
- local potion="${1:-$ENCHANT_POTION_CURRENT}"
-
- enchant_potion_get_filesystems || return $ERR_POTION_GET_PARTITIONS
-
- # if there isn't a stored copy of the mount points, or if the stored copy
- # differs from what we currently have, then store the current set
- if [[ ! -f "$potion_parts" || "$(cat $potion_parts)" != "$(cat $parts)" ]]
- then
- cp -f "$parts" > "$potion_parts" || return $ERR_POTION_CHK_PARTITIONS
- fi
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
-##
-## Parses /proc/mounts to determine which filesystems are mounted, excluding
the
-## list of ISO mounts.
-##
-#-------------------------------------------------------------------------------
-function enchant_potion_get_filesystems() {
- local mounts="/proc/mounts"
- local potion="${1:-$ENCHANT_POTION_CURRENT}"
-
- # list of ISO mounts to exclude
- # each match is exact
- local excl="$ENCHANT_POTION_MOUNT_EXCLUDES"
-
- [[ -d "$ENCHANT_POTION" ]] || return $ERR_POTION_DIR
-
- # for every line, if the 2nd field exactly matches one of excl, skip it
- # otherwise, store the filesystem (field 3) to the temp file
- gawk -v i="$excl" '{if(match(i,$2)) next; else print $3}' $mounts > \
- $ENCHANT_POTION/filesystems || return $ERR_POTION_GET_FILESYSTEMS
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
-##
-## Checks to see if the list of filesystems corresponding to partitions has
-## changed, and updates the state cache if they were changed.
-##
-#-------------------------------------------------------------------------------
-function enchant_potion_update_filesystems() {
- local potion_fs="$ENCHANT_POTION/$1/filesystems"
- local fs="$ENCHANT_POTION/filesystems"
- local potion="${1:-$ENCHANT_POTION_CURRENT}"
-
- enchant_potion_get_filesystems || return $ERR_POTION_GET_FILESYSTEMS
-
- # if there isn't a stored copy of the mount points, or if the stored copy
- # differs from what we currently have, then store the current set
- if [[ ! -f "$potion_fs" || "$(cat $potion_fs)" != "$(cat $fs)" ]]
- then
- cp -f "$fs" > "$potion_fs" || return $ERR_POTION_CHK_FILESYSTEMS
- fi
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
-##
-## Parses /proc/mounts to determine which devices are mounted where,
excluding
-## the list of ISO mounts.
-##
-#-------------------------------------------------------------------------------
-function enchant_potion_get_mount_points() {
- local mounts="/proc/mounts"
- local potion="${1:-$ENCHANT_POTION_CURRENT}"
-
- # list of ISO mounts to exclude
- # each match is exact
- local excl="$ENCHANT_POTION_MOUNT_EXCLUDES"
-
- [[ -d "$ENCHANT_POTION" ]] || return $ERR_POTION_DIR
-
- # for every line, if the 2nd field exactly matches one of excl, skip it
- # otherwise, store the mount point (field 2) to the temp file
- gawk -v i="$excl" '{if(match(i,$2)) next; else print $2}' $mounts > \
- $ENCHANT_POTION/mount_points || return $ERR_POTION_GET_MOUNT_POINTS
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
-##
-## Checks to see if the list of mount points (/, /usr, etc.) corresponding to
-## partitions/filesystems has changed, and updates the state cache if they
were
-## changed.
-##
-#-------------------------------------------------------------------------------
-function enchant_potion_update_mount_points() {
- local potion_mounts="$ENCHANT_POTION/$1/mount_points"
- local mounts="$ENCHANT_POTION/mount_points"
- local potion="${1:-$ENCHANT_POTION_CURRENT}"
-
- enchant_potion_get_mount_points || return $ERR_POTION_GET_MOUNT_POINTS
-
- # if there isn't a stored copy of the mount points, or if the stored copy
- # differs from what we currently have, then store the current set
- if [[ ! -f "$potion_mounts" || "$(cat $potion_mounts)" != "$(cat $mounts)"
]]
- then
- cp -f "$mounts" > "$potion_mounts" || return $ERR_POTION_CHK_MOUNT_POINTS
- fi
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
-##
-## If a user chose to install a custom kernel, this checks for the config
being
-## used. Updates the state cache if the kernel config changed.
-##
-#-------------------------------------------------------------------------------
-function enchant_potion_update_kernel_config() {
- local potion="${1:-$ENCHANT_POTION_CURRENT}"
- local kernel_config="$ENCHANT_TARGET/usr/src/linux/.config"
-
- [[ -f "$kernel_config" ]] || return $ERR_FILE_NOT_FOUND
-
- enchant_potion_cache_file "$kernel_config" "$potion" || return
$ERR_POTION_CACHE_FILE
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
-##
-## Checks which kernel(s) the user has opted to install (ISO, custom, etc.).
-## Updates the state cache if the kernel choice changed.
-##
-#-------------------------------------------------------------------------------
-function enchant_potion_update_kernel() {
- local potion="${1:-$ENCHANT_POTION_CURRENT}"
- local kernels="$ENCHANT_TMP/kernels"
-
- [[ -f "$kernels" ]] || return $ERR_FILE_NOT_FOUND
-
- enchant_potion_cache_file "$kernels" "$potion" || return
$ERR_POTION_CACHE_FILE
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
-##
-## Checks which optional spell sources the user has chosen to install, and
-## updates the state cache if the list changed.
-##
-#-------------------------------------------------------------------------------
-function enchant_potion_update_spell_sources() {
- local potion="${1:-$ENCHANT_POTION_CURRENT}"
- local spells="$ENCHANT_TMP/spells"
-
- [[ -f "$spells" ]] || return $ERR_FILE_NOT_FOUND
-
- enchant_potion_cache_file "$spells" "$potion" || return
$ERR_POTION_CACHE_FILE
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
-##
-## Checks which bootloader the user chose, and updates the state cache if the
-## choice changed.
-##
-#-------------------------------------------------------------------------------
-function enchant_potion_update_bootloader() {
- local potion="${1:-$ENCHANT_POTION_CURRENT}"
- local bootloaders="$ENCHANT_TMP/bootloaders"
-
- [[ -f "$bootloaders" ]] || return $ERR_FILE_NOT_FOUND
-
- enchant_potion_cache_file "$bootloaders" "$potion" || return
$ERR_POTION_CACHE_FILE
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
-##
-## Checks for updates to the config files in the target system, and updates
the
-## state cache if there were any changes.
-##
-#-------------------------------------------------------------------------------
-function enchant_potion_update_confs() {
- local potion="${1:-$ENCHANT_POTION_CURRENT}"
- local conf=""
-
- for conf in $ENCHANT_POTION_CONFS
- do
- conf="$ENCHANT_TARGET/$conf"
- [[ -f "$file" ]] || return $ERR_FILE_NOT_FOUND
-
- enchant_potion_cache_file "$conf" "$potion" || return
$ERR_POTION_CACHE_FILE
- done
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
-##
-## Checks for updates to /etc/passwd, /etc/group, etc. and updates the state
-## cache if there were any changes.
-##
-#-------------------------------------------------------------------------------
-function enchant_potion_update_users() {
- local potion="${1:-$ENCHANT_POTION_CURRENT}"
- local file=""
-
- for file in etc/passwd etc/group etc/shadow etc/gshadow
- do
- file="$ENCHANT_TARGET/$file"
- [[ -f "$file" ]] || return $ERR_FILE_NOT_FOUND
-
- enchant_potion_cache_file "$file" "$potion" || return
$ERR_POTION_CACHE_FILE
- done
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
-##
-## Checks various state data and performs any needed updates during the
install.
-##
-#-------------------------------------------------------------------------------
-function enchant_potion_update() {
- local potion="${1:-$ENCHANT_POTION_CURRENT}"
-
- enchant_potion_update_partitions "$potion" || return
$ERR_POTION_CHK_PARTITIONS
- enchant_potion_update_filesystems "$potion" || return
$ERR_POTION_CHK_FILESYSTEMS
- enchant_potion_update_mount_points "$potion" || return
$ERR_POTION_CHK_MOUNT_POINTS
- enchant_potion_update_opt_spells "$potion" || return
$ERR_POTION_CHK_OPT_SPELLS
- enchant_potion_update_kernel "$potion" || return $ERR_POTION_CHK_KERNEL
- enchant_potion_update_bootloader "$potion" || return
$ERR_POTION_CHK_BOOTLOADER
- enchant_potion_update_confs "$potion" || return $ERR_POTION_CHK_CONFS
- enchant_potion_update_users "$potion" || return $ERR_POTION_CHK_USERS
-
- return $ERR_OK
-}
-
-
-#-------------------------------------------------------------------------------
-## @param potion
-##
-## Packages a potion (state) directory into an archive that can later be
used to
-## load (seed) an automated install.
-##
-#-------------------------------------------------------------------------------
-function enchant_potion_bottle() {
- local potion="${1:-$ENCHANT_POTION_CURRENT}"
- local output="$ENCHANT_POTION/potion"
-
- [[ -d "$potion" ]] || return $ERR_DIR_NOT_FOUND
-
- # package the potion into a compressed archive
- case "$ENCHANT_ARCHIVE" in
- "tar" )
- tar cf "${output}.tar" "$ENCHANT_POTION/$potion"/* || return
$ERR_POTION_ARCHIVE
- [[ -n "$ENCHANT_COMPRESS" ]] && "$ENCHANT_COMPRESS" "${output}.tar" ||
- return $ERR_POTION_COMPRESS
- ;;
- "cpio" )
- (
- cd "$potion"
- find * | cpio -H newc -o > "${output}.io" || return
$ERR_POTION_ARCHIVE
- [[ -n "$ENCHANT_COMPRESS" ]] && "$ENCHANT_COMPRESS" "${output}.io" ||
- return $ERR_POTION_COMPRESS
- )
- ;;
- * )
- return $ERR_POTION_ARCHIVE_FORMAT
- esac
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-## @param -s start (optional)
-## @param -e end (optional)
-## @param potion (required)
-##
-## If potion is an archive, it unpacks the archive and performs an automated
-## install. If potion is a directory, it assumes it is a proper state
directory
-## (what an unpacked potion archive is) and does the same as for an archive,
but
-## skipping the unpacking step.
-##
-## If the start argument is given, it determines at which module to begin the
-## automation (defaults to the first). If the end ## argument is given, it
-## determines at which module to end the automation and at which module to
end
-## the automation (defaults to the last). Both start and end can be specified
-## either as module names or (positional) module numbers. If '--' is passed
as
-## an argument, it forces the function to stop scanning for flag parameters
so that
-## one can pass in filenames beginning with a '-' and not experience an
error.
-##
-## Once the potion is unpacked and ready, each module from start to end is
-## processed in turn by calling enchant_modules_potion, which runs any
-## module-specific scripts (in the module's directory) for processing potion
-## actions.
-##
-#-------------------------------------------------------------------------------
-function enchant_potion_quaff() {
- local potion="$1"
- local current=""
- local end=""
- local list=""
-
- # process any optional parameters
- while [[ "${1:0:1}" == "-" ]]
- do
- case "$1" in
- # starting module
- "-s")
- current="${2}"
- shift 2
- ;;
- # ending module
- "-e")
- end="${2}"
- shift 2
- ;;
- # stop processing optional parameters if passed '--'
- "--")
- shift
- break
- ;;
- *)
- ;;
- esac
- done
-
- # if the start module was given as a module name, get it's positional
number
- if [[ -z "$current" ]]
- then
- current="0"
- elif [[ "$current" = [a-z]* ]]
- current="$(grep -n $current $ENCHANT_DATA/modules | cut -d: -f1)"
- fi
-
- # if the end module wasn't explicitly specified, set it to the last
possible
- # (non-error) module
- if [[ -z "$end" ]]
- then
- endmod="${#list}"
- # if the end module was specified as a module name, get it's positional
number
- elif [[ "$end" = [a-z]* ]]
- then
- end="$(grep -n $end $ENCHANT_DATA/modules | cut -d: -f1)"
- fi
-
-
- # get the list of modules to operate on
- list=($(enchant_modules_list))
-
- # process each module's potion scripts from start module to end module
- for ((current < end; current++))
- do
- enchant_modules_potion "${list[current]}" "$potion"
- done
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##=back
-##
-##=head1 LICENSE
-##
-## This software is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This software is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this software; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-#-------------------------------------------------------------------------------
-
-# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/enchantment/lib/errorcodes b/enchantment/lib/errorcodes
new file mode 100644
index 0000000..1ab9dd5
--- /dev/null
+++ b/enchantment/lib/errorcodes
@@ -0,0 +1,137 @@
+#!/bin/bash
+#-------------------------------------------------------------------------------
+##
+##=head1 SYNOPSIS
+##
+## These are the enchantment-specific error definitions.
+##
+##=head1 COPYRIGHT
+##
+## Copyright 2009 by the Cauldron Team
+##
+##=head1 FUNCTIONS
+##
+##=over 4
+##
+#-------------------------------------------------------------------------------
+
+#-------------------------------------------------------------------------------
+# ERROR definitions
+#-------------------------------------------------------------------------------
+# base error codes
+liberror_add_error ERR_MK_DIR "could not make directory"
+liberror_add_error ERR_DIR_EXISTS "directory already exists"
+liberror_add_error ERR_FILE_NOT_FOUND "requested file not found"
+liberror_add_error ERR_DIR_NOT_FOUND "requested directory not found"
+
+# libenchantment base
+liberror_add_error ERR_LOAD_LIBRARY "could not load enchantment library"
+liberror_add_error ERR_PREPARE "could not initialize enchantment"
+liberror_add_error ERR_CLEANUP "could not clean up after finishing"
+
+# libenchantment module processing
+liberror_add_error ERR_GET_CURRENT "could not get current module"
+liberror_add_error ERR_GET_NEXT "could not get next module"
+liberror_add_error ERR_GET_PREV "could not get previous module"
+liberror_add_error ERR_SET_CURRENT "could not set current module"
+liberror_add_error ERR_SET_NEXT "could not set next module"
+liberror_add_error ERR_SET_PREV "could not set previous module"
+
+# history
+liberror_add_error ERR_HISTORY_BACK "could not go back in install history"
+liberror_add_error ERR_HISTORY_FORWARD "could not go forward in install
history"
+
+# lib.chroot
+liberror_add_error ERR_CHROOT_INIT "could not initialized chroot"
+liberror_add_error ERR_CHROOT_NOT_INIT "chroot not initialized"
+liberror_add_error ERR_CHROOT_UNDEF "chroot command undefined"
+liberror_add_error ERR_CHROOT_EXEC "could not execute chroot command"
+liberror_add_error ERR_CHROOT_DONE "could not properly clean up chroot"
+
+# lib.i18n keymap
+liberror_add_error ERR_KEYMAP_EXIT "keymap processing finished"
+liberror_add_error ERR_KEYMAP_PREFIX "invalid keymap prefix"
+liberror_add_error ERR_KEYMAP_LIST "keymap list empty or not provided"
+liberror_add_error ERR_KEYMAP_LIST_SIZE "invalid list size provided"
+liberror_add_error ERR_KEYMAP_INPUT "invalid user input"
+liberror_add_error ERR_KEYMAP_LOAD "could not load selected keymap"
+liberror_add_error ERR_KEYMAP_GET "could not get selected keymap"
+liberror_add_error ERR_KEYMAP_SET "could not set selected keymap"
+
+# lib.install
+liberror_add_error ERR_INSTALL_DIR "could not install directory"
+liberror_add_error ERR_INSTALL_FILE "could not install file"
+liberror_add_error ERR_INSTALL_CACHES "could not install spell caches"
+liberror_add_error ERR_INSTALL_SOURCES "could not install spell sources"
+liberror_add_error ERR_INSTALL_KERNEL "could not install kernel image"
+liberror_add_error ERR_INSTALL_KMODS "could not install kernel modules"
+liberror_add_error ERR_INSTALL_DEPMOD "could not perform depmod in install"
+
+# lib.module
+liberror_add_error ERR_MODULE_NONE "no modules found"
+liberror_add_error ERR_MODULE_SCRIPT "could not process module script"
+liberror_add_error ERR_MODULE_ENTER "could not process module entry"
+liberror_add_error ERR_MODULE_EXIT "could not process module exit"
+liberror_add_error ERR_MODULE_GET_NUM "could not get number of current
module"
+
+# lib.potion
+liberror_add_error ERR_POTION_DIR "potion directory not found"
+liberror_add_error ERR_POTION_GET_HASHSUM "could not read hashsum of file"
+liberror_add_error ERR_POTION_SET_HASHSUM "could not store hashsum of file"
+liberror_add_error ERR_POTION_CACHE_FILE \
+ "could not copy file into potion directory"
+liberror_add_error ERR_POTION_ARCHIVE_FORMAT "unknown archive format"
+liberror_add_error ERR_POTION_ARCHIVE "could not make potion archive"
+liberror_add_error ERR_POTION_COMPRESS "could not compress potion archive"
+
+# lib.potion gets
+liberror_add_error ERR_POTION_GET_BOOTLOADER "could not read bootloader
config"
+liberror_add_error ERR_POTION_GET_CONFS "could not read target system
configs"
+liberror_add_error ERR_POTION_GET_FILESYSTEMS "could not read filesystems"
+liberror_add_error ERR_POTION_GET_KERNEL "could not read kernel config"
+liberror_add_error ERR_POTION_GET_MOUNT_POINTS "could not read mount points"
+liberror_add_error ERR_POTION_GET_OPT_SPELLS \
+ "could not read optional spell selection"
+liberror_add_error ERR_POTION_GET_PARTITIONS "could not read partitions"
+liberror_add_error ERR_POTION_GET_USERS "could not read user/group config"
+
+# lib.potion updates
+liberror_add_error ERR_POTION_UPDATE_BOOTLOADER \
+ "could not update bootloader config"
+liberror_add_error ERR_POTION_UPDATE_CONFS \
+ "could not update target system configs"
+liberror_add_error ERR_POTION_UPDATE_FILESYSTEMS "could not update
filesystems"
+liberror_add_error ERR_POTION_UPDATE_KERNEL "could not update kernel config"
+liberror_add_error ERR_POTION_UPDATE_MOUNT_POINTS "could not update mount
points"
+liberror_add_error ERR_POTION_UPDATE_SOURCES \
+ "could not update spell sources selection"
+liberror_add_error ERR_POTION_UPDATE_CACHES \
+ "could not update spell caches selection"
+liberror_add_error ERR_POTION_UPDATE_PARTITIONS "could not update partitions"
+liberror_add_error ERR_POTION_UPDATE_USERS "could not update user/group
config"
+
+# installer
+liberror_add_error ERR_INSTALLER_FUNCS "could not load \$ENCHANT_INSTALLER
functions file"
+liberror_add_error ERR_INSTALLER_CMD "incorrect usage or unrecognized
command"
+liberror_add_error ERR_INSTALLER_KEYMAP "could not process keymap list"
+liberror_add_error ERR_INSTALLER_MODULES "could not process module list"
+
+#-------------------------------------------------------------------------------
+##
+## This software is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This software is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this software; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+#-------------------------------------------------------------------------------
+
+# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/enchantment/lib/lib.chroot b/enchantment/lib/lib.chroot
new file mode 100644
index 0000000..e0c90d9
--- /dev/null
+++ b/enchantment/lib/lib.chroot
@@ -0,0 +1,109 @@
+#!/bin/bash
+#-------------------------------------------------------------------------------
+##
+##=head1 SYNOPSIS
+##
+## Chroot construction and destruction functions for use in the installers.
+##
+##=head1 COPYRIGHT
+##
+## Copyright 2010 by the Cauldron Team
+##
+##=head1 FUNCTIONS
+##
+##=over 4
+##
+#-------------------------------------------------------------------------------
+
+#-------------------------------------------------------------------------------
+## @param target dir to chroot into
+##
+## Prepares a chroot environment and exports necessary variables. For every
+## target dir to chroot into, there should be one
+## [cauldron_chroot_init ... cauldron_chroot_done] pair.
+##
+#-------------------------------------------------------------------------------
+function enchant_chroot_init() {
+ if [[ "$ENCHANT_CHROOT_INIT" -ne 1 ]]
+ then
+ # if target is somehow null, return an error
+ [[ -z "$ENCHANT_TARGET" ]] && return $ERR_CHROOT_UNDEF
+
+ # bind the needed mounts
+ mount --bind "$ENCHANT_ISO_PATH/dev" "$ENCHANT_TARGET/dev" ||
+ return $ERR_CHROOT_INIT
+ mount --bind "$ENCHANT_ISO_PATH/dev/pts" "$ENCHANT_TARGET/dev/pts" ||
+ return $ERR_CHROOT_INIT
+ mount --bind "$ENCHANT_ISO_PATH/proc" "$ENCHANT_TARGET/proc" ||
+ return $ERR_CHROOT_INIT
+
+ # export that the chroot is successfully constructed
+ export ENCHANT_CHROOT_INIT=1
+ fi
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Cleans up the chroot environment after it is no longer needed
+##
+#-------------------------------------------------------------------------------
+function enchant_chroot_done() {
+ if [[ "$ENCHANT_CHROOT_INIT" -eq 1 ]]
+ then
+ # if target is somehow null, return an error
+ [[ -z "$ENCHANT_TARGET" ]] && return $ERR_CHROOT_UNDEF
+
+ # unmount the bind mounts
+ umount "$ENCHANT_TARGET/proc" || return $ERR_CHROOT_DONE
+ umount "$ENCHANT_TARGET/dev/pts" || return $ERR_CHROOT_DONE
+ umount "$ENCHANT_TARGET/dev" || return $ERR_CHROOT_DONE
+
+ # clear the chroot definitions
+ unset ENCHANT_CHROOTINIT
+ fi
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param command plus args to execute inside the chroot
+##
+## Executes the command given as the first parameter and any args that follow
+## inside the chroot constructed by enchant_chroot_init.
+##
+#-------------------------------------------------------------------------------
+function enchant_chroot() {
+ if [[ "$ENCHANT_CHROOT_INIT" -eq 1 ]]
+ then
+ # if target is somehow null, return an error
+ [[ -z "$ENCHANT_TARGET" ]] && return $ERR_CHROOT_UNDEF
+
+ "$ENCHANT_CHROOT" "$ENCHANT_TARGET" "$@" || return $ERR_CHROOT_EXEC
+ else
+ return $ERR_CHROOT_NOT_INIT
+ fi
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## This software is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This software is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this software; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+#-------------------------------------------------------------------------------
+
+# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/enchantment/lib/lib.i18n b/enchantment/lib/lib.i18n
new file mode 100644
index 0000000..d3a1349
--- /dev/null
+++ b/enchantment/lib/lib.i18n
@@ -0,0 +1,210 @@
+#!/bin/bash
+#-------------------------------------------------------------------------------
+##
+##=head1 SYNOPSIS
+##
+## These are the functions used for i18n, including setting keymaps, setting
+## the current language the installer is running under, etc.
+##
+## For the keymap functions, only numbers are to be used as input, since
they
+## are more likely to be consistent across different keymaps/keyboards,
whereas
+## letters and punctuation get moved around much more.
+##
+##=head1 COPYRIGHT
+##
+## Copyright 2010 by the Cauldron Team
+##
+##=head1 FUNCTIONS
+##
+##=over 4
+##
+#-------------------------------------------------------------------------------
+
+#-------------------------------------------------------------------------------
+## @param size of choices list (highest numbered entry to choose from)
+##
+## Reads input from the user, and ensures that it is either '*' or a number
in
+## the range of 0-highest_entry. Echoes the input if it is a number that fits
+## the range. If the input is '*', then ERR_KEYMAP_EXIT is returned so that
the
+## caller can do any cleanup needed and then exit.
+##
+#-------------------------------------------------------------------------------
+function enchant_i18n_keymap_input_get() {
+ local max="$1"
+ local input=""
+
+ [[ -z "$max" ]] && return $ERR_KEYMAP_LIST_SIZE
+
+ # grab the input, allowing readline editing
+ read -re input || return $ERR_KEYMAP_INPUT
+
+ if [[ -n "$input" ]]
+ then
+ # if the user entered '*', then we exit without finishing
+ if [[ "$input" == "*" ]]
+ then
+ return $ERR_KEYMAP_EXIT
+ fi
+
+ # if we got a number outside the range of what we can accept,
+ # tell the user before returning an error
+ if [[ "$input" -lt 0 || "$input" -gt "$max" ]]
+ then
+ return $ERR_KEYMAP_INPUT
+ fi
+ fi
+
+ echo "$input"
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param prefix -> path to populate the list of choices from
+##
+## Creates a list of choices consisting of directory entries from the
prefix. If
+## prefix is not explicitly provided, it defaults to /usr/share/keymaps (the
base
+## of the keymap file hierarchy) relative to the ENCHANT_ISO_PATH.
+##
+#-------------------------------------------------------------------------------
+function enchant_i18n_keymap_make_list {
+ local prefix="${1:-$ENCHANT_ISO_PATH/usr/share/keymaps}"
+ local list=()
+ local result=()
+ local i=""
+
+ [[ -d "$prefix" ]] || return $ERR_DIR_NOT_FOUND
+
+ list=( $(find "$prefix"/* -maxdepth 0 -type d -not -name include) )
+
+ if [[ "${#list[*]}" -eq 0 ]]
+ then
+ list=( $(find "$prefix"/* -type f -name *.map.gz) )
+ fi
+
+ [[ "${#list[*]}" -eq 0 ]] && return $ERR_KEYMAP_LIST
+
+ for ((i=0; i < "${#list[*]}"; i++))
+ do
+ result=( "$result" "${list[i]##*/}" )
+ done
+
+ echo "${result[*]}"
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Get the current keymap setting from the enchantment temporary directory.
+##
+#-------------------------------------------------------------------------------
+function enchant_i18n_keymap_get() {
+ cat "$ENCHANT_KEYMAP" || return $ERR_KEYMAP_GET
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param keymap to load
+##
+## Load the keymap passed as the first argument and store it into the
+## enchantment temporary directory for later use.
+##
+#-------------------------------------------------------------------------------
+function enchant_i18n_keymap_set() {
+ local keymap="$1"
+
+ [[ -f "$keymap" ]] || return $ERR_FILE_NOT_FOUND
+
+ loadkeys "$keymap" || return $ERR_KEYMAP_LOAD
+
+ # store the selected keymap for later use by enchantment (e.g., for
potions)
+ echo "${keymap%.*map.*}" > "$ENCHANT_KEYMAP" ||
+ return $ERR_KEYMAP_SET
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param prefix -> current path to populate the menu from
+## @param size of choices list (highest numbered entry to choose from)
+##
+## Gets the user input and then processes it, possibly calling
+## enchant_i18n_keymap_set to actually set the keymap if that's what was
input.
+##
+#-------------------------------------------------------------------------------
+function enchant_i18n_keymap_input_handler() {
+ local prefix="${1:-$ENCHANT_ISO_PATH/usr/share/keymaps}"
+ local max="$2"
+ local input=""
+ local rc=""
+
+ [[ ! -e "$prefix" ]] && return $ERR_KEYMAP_PREFIX
+
+ [[ -z "$max" ]] && return $ERR_KEYMAP_LIST_SIZE
+
+ # get the user's menu choice
+ input="$(enchant_i18n_keymap_input_get $max)"
+ rc="$?"
+
+ # if the user entered '*', exit the keymap routines
+ [[ "$rc" -eq "$ERR_KEYMAP_EXIT" ]] && return $ERR_KEYMAP_EXIT
+
+ # if there was an error in getting the input, report it to the caller
+ [[ "$rc" -eq "$ERR_KEYMAP_INPUT" ]] && return $ERR_KEYMAP_INPUT
+
+ # if the user entered '0', go "back" (up a dir/level)
+ if [[ "$input" -eq "0" ]]
+ then
+ # only go up a level if we aren't at the beginning
+ # (don't go lower than the floor)
+ [[ "$prefix" != "$ENCHANT_ISO_PATH/usr/share/keymaps" ]] &&
+ prefix="${prefix%/[^/]*}"
+ else
+ # get the menu item, adjusting for array indexed from 0
+ input="${choices[((input-1))]}"
+
+ # if the input corresponds to a keymap file, attempt to switch to that
+ # keymap, otherwise set the prefix to the new path and loop again
+ if [[ "$input" == *.map.gz ]]
+ then
+ prefix="$prefix/$input"
+
+ # if a keymap is successfully set, return ERR_KEYMAP_EXIT to the
caller,
+ # so they know that the keymap was successfully chosen and loaded
+ enchant_i18n_keymap_set "$prefix" && return $ERR_KEYMAP_EXIT
+
+ # return any errors from enchant_i18n_keymap_set if it didn't load a
+ # keymap successfully
+ return "$?"
+ else
+ prefix="$prefix/$input"
+
+ # echo (return) the new prefix back to the caller
+ echo "$prefix"
+ fi
+ fi
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## This software is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This software is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this software; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+#-------------------------------------------------------------------------------
+
+# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/enchantment/lib/lib.install b/enchantment/lib/lib.install
new file mode 100644
index 0000000..92f701b
--- /dev/null
+++ b/enchantment/lib/lib.install
@@ -0,0 +1,165 @@
+#!/bin/bash
+#-------------------------------------------------------------------------------
+##
+##=head1 SYNOPSIS
+##
+## Common functions and variables for different installers related to
+## installing content
+##
+##=head1 DESCRIPTION
+##
+## This is all the functions needed for actually installing content (spell
+## sources, spell caches, kernels and modules, etc.) into a target system.
+##
+##=head1 COPYRIGHT
+##
+## Copyright 2009 The Cauldron Team
+##
+##=head1 FUNCTIONS
+##
+##=over 4
+##
+#-------------------------------------------------------------------------------
+
+#-------------------------------------------------------------------------------
+##
+## @param source
+## @param destination
+##
+## Installs the source file to the destination.
+##
+#-------------------------------------------------------------------------------
+function enchant_install_file() {
+ local $src="$1"
+ local $dst="$2"
+
+ [[ -z "$src" ]] && return $ERR_INSTALL_FILE
+ [[ -z "$dst" ]] && return $ERR_INSTALL_FILE
+
+ cp -dfp "$src" "$dst" || return $ERR_INSTALL_FILE
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## @param source
+## @param destination
+##
+## Installs the source directory (including all subdirectories and their
+## contents) to the destination.
+##
+#-------------------------------------------------------------------------------
+function enchant_install_dir() {
+ local $src="$1"
+ local $dst="$2"
+
+ [[ -z "$src" ]] && return $ERR_INSTALL_FILE
+ [[ -z "$dst" ]] && return $ERR_INSTALL_FILE
+
+ cp --parents -dfpr "$src" "$dst" || return $ERR_INSTALL_DIR
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## @param sources_list
+##
+## Copies the selected spell sources into the target. If sources_list is
empty
+## (no sources were passed as arguments), it reads the list of sources to
+## install from $ENCHANT_SOURCES_LIST.
+##
+#-------------------------------------------------------------------------------
+function enchant_install_sources() {
+ local sources=( "${@:-$(cat $ENCHANT_SOURCES_LIST)}" )
+ local dst="$ENCHANT_TARGET_SOURCES"
+
+ for spell in $sources
+ do
+ enchant_install_file "$ENCHANT_SPELL_SOURCES/$spell" "$dst/" ||
+ return $ERR_INSTALL_SOURCES
+ done
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## @param caches_list
+##
+## Copies the selected spell caches into the target. If caches_list is empty
+## (no caches were passed as arguments), it reads the list of caches to
+## install from $ENCHANT_SOURCES_LIST.
+##
+#-------------------------------------------------------------------------------
+function enchant_install_caches() {
+ local caches=( "${@:-$(cat $ENCHANT_CACHES_LIST)}" )
+ local dst="$ENCHANT_TARGET_CACHES"
+
+ for spell in $caches
+ do
+ enchant_install_file "$ENCHANT_SPELL_SOURCES/spell" "$dst/" ||
+ return $ERR_INSTALL_CACHES
+ done
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## @param kernel_image (absolute path - e.g. $ENCHANT_ISO_PATH/boot/vmlinux)
+## @param modules_path (absolute path - e.g. $ENCHANT_ISO_PATH/lib/modules)
+## @param kernel_version (e.g. 2.6.32.8)
+##
+## Copies the kernel and it's associated modules from the ISO to the TARGET
+## system. Requires that / and /boot on the TARGET system are mounted (unless
+## ENCHANT_TARGET_KERNEL and ENCHANT_TARGET_KMODS are modified). The second
+## parameter (modules_path) *must* include the kernel version as the last
+## directory in the path (i.e., /path/to/kernel/modules/version/).
+##
+#-------------------------------------------------------------------------------
+function enchant_install_kernel() {
+ local target="$ENCHANT_TARGET"
+ local target_kernel="$ENCHANT_TARGET_KERNEL"
+ local target_kmods="$ENCHANT_TARGET_KMODS"
+ local kernel="${1:-$ENCHANT_ISO_KERNEL}"
+ local kmods="${2:-$ENCHANT_ISO_KMODS}"
+ local kvers="${3:-$ENCHANT_ISO_KVERS}"
+
+ # copy the kernel over
+ enchant_install_file "$kernel" "$target_kernel" || return
$ERR_INSTALL_KERNEL
+
+ # copy the modules over
+ enchant_install_dir "$kmods/$kvers" "$target_kmods/$(basename $kmods)" ||
+ return $ERR_INSTALL_KMODS
+
+ # make sure that the proper dep info is generated on the target system
+ depmod -a -b "$target_kmods/$kvers" "$kvers" ||
+ return $ERR_INSTALL_DEPMOD
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##=back
+##
+##=head1 LICENSE
+##
+## This software is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This software is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this software; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+#-------------------------------------------------------------------------------
+
+# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/enchantment/lib/lib.modules b/enchantment/lib/lib.modules
new file mode 100644
index 0000000..90c2cb7
--- /dev/null
+++ b/enchantment/lib/lib.modules
@@ -0,0 +1,188 @@
+#!/bin/bash
+#-------------------------------------------------------------------------------
+##
+##=head1 SYNOPSIS
+##
+## Module (install step) processing functions
+##
+##=head1 DESCRIPTION
+##
+## Provides the functions responsible for listing modules and processing
+## module scripts.
+##
+##=head1 COPYRIGHT
+##
+## Copyright 2010 The Cauldron Team
+##
+##=head1 FUNCTIONS
+##
+##=over 4
+##
+#-------------------------------------------------------------------------------
+
+#-------------------------------------------------------------------------------
+##
+## Returns a list of all modules recognized for the current installation,
pruned
+## of duplicates and the special "error" module. Expects $ENCHANT_INSTALLER
to
+## be set by the installer which is calling this function, and for that
+## installer to have a 'modules' file (see the implementation of the shell
+## installer for an example).
+##
+#-------------------------------------------------------------------------------
+function enchant_modules_list() {
+ local output=()
+ local module=""
+
+ # make sure the installer's modules file exists
+ [[ -f "$ENCHANT_DATA/$INSTALLER/modules" ]] || return $ERR_MODULE_FILE
+
+ # for all modules, if the module isn't "error" and it isn't already in the
+ # output list, append it to the output list
+ for module in $(cut -d: -f1 "$ENCHANT_DATA/$INSTALLER/modules")
+ do
+ if [[ "$module" != "error" ]]
+ then
+ if ! $(echo "${output[@]}" | grep -q "$module")
+ then
+ output=( "${output[@]}" "$module" )
+ fi
+ fi
+ done
+
+ echo "${output[@]}"
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Returns the number of the current module to perform during the
installation.
+## Expects $ENCHANT_INSTALLER to be set by the installer which is calling
this
+## function, and for that installer to have a 'modules' file (see the
+## implementation of the shell installer for an example).
+##
+#-------------------------------------------------------------------------------
+function enchant_modules_number() {
+ local num="$(grep -n -m1 \"^$(enchant_get_current):\"
$ENCHANT_INSTALLER/modules)"
+
+ if [[ -z "$num" ]]
+ then
+ return $ERR_MODULE_GET_NUM
+ fi
+
+ echo "$num" | cut -d: -f1 || return $ERR_MODULE_GET_NUM
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Returns the total number of modules to perform during the installation
+##
+#-------------------------------------------------------------------------------
+function enchant_modules_total() {
+ local total="$(enchant_modules_list | wc -l)"
+
+ if [[ "$total" -eq 0 || -z "$total" ]]
+ then
+ return $ERR_MODULE_NONE
+ fi
+
+ echo "$total"
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Processes the module entry functions. This is used to provide extra
+## functionality upon entering a module (usually preparatory work, like
creating
+## module-specific temp files, etc.)
+##
+#-------------------------------------------------------------------------------
+function enchant_modules_enter() {
+ local module="$(cat $ENCHANT_STATUS)"
+ local script=""
+
+ for script in "$ENCHANT_MODULES/$module/enter"/*
+ do
+ if [[ -f "$script" ]]
+ then
+ /bin/bash "$script" || return $ERR_MODULE_SCRIPT
+ fi
+ done
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Processes the module exit functions. This is used to provide extra
+## functionality upon exiting a module, usually things like writing data to
the
+## module's temp files, etc.
+##
+#-------------------------------------------------------------------------------
+function enchant_modules_exit() {
+ local module="$(cat $ENCHANT_STATUS)"
+ local script=""
+
+ for script in "$ENCHANT_MODULES/$module/exit"/*
+ do
+ if [[ -f "$script" ]]
+ then
+ /bin/bash "$script" || return $ERR_MODULE_SCRIPT
+ fi
+ done
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param potion to process for
+##
+## Processes the module potion functions. This is used to do automated
installs
+## using pre-made potions (from previous installs or composed ahead of
time). It
+## runs scripted versions of what the user would have done manually in each
+## module.
+##
+#-------------------------------------------------------------------------------
+function enchant_modules_potion() {
+ local module="$(cat $ENCHANT_STATUS)"
+ local potion="$1"
+ local script=""
+
+ [[ -d "$potion" ]] || $ERR_DIR_NOT_FOUND
+
+ for script in "$ENCHANT_MODULES/$module/potion"/*
+ do
+ if [[ -f "$script" ]]
+ then
+ /bin/bash "$script" "$potion" || return $ERR_MODULE_SCRIPT
+ fi
+ done
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##=back
+##
+##=head1 LICENSE
+##
+## This software is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This software is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this software; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+#-------------------------------------------------------------------------------
+
+# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/enchantment/lib/lib.potion b/enchantment/lib/lib.potion
new file mode 100644
index 0000000..11f365b
--- /dev/null
+++ b/enchantment/lib/lib.potion
@@ -0,0 +1,604 @@
+#!/bin/bash
+#-------------------------------------------------------------------------------
+##
+##=head1 SYNOPSIS
+##
+## Common functions and variables for different installers
+##
+##=head1 DESCRIPTION
+##
+## This file provides common function and variable definitions for
+## the different types of installers that can be included on an ISO.
+## This file is meant to be sourced by the different installers,
+## so this file should not be run directly. This file, as well as
+## the installer which sources this file, is meant to be called from
+## inside the ISO during the actual install onto the target system.
+##
+##=head1 COPYRIGHT
+##
+## Copyright 2009 The Cauldron Team
+##
+##=head1 FUNCTIONS
+##
+##=over 4
+##
+#-------------------------------------------------------------------------------
+
+#-------------------------------------------------------------------------------
+# global variables
+#-------------------------------------------------------------------------------
+# current potion dir - used with the enchant history functions to keep
separate
+# state for each level of history
+ENCHANT_POTION_CURRENT=""
+
+# list of config files (e.g., /etc) for which to keep state information on
+# do not include a preceding '/' as the list will be relative to the target
+# system directory (by default /mnt/root)
+ENCHANT_POTION_CONFS=(
+ etc/timezone
+ etc/hostname
+ etc/sysconfig/*
+ )
+
+# list of ISO mounts to exclude from partition/filesystem/mount_point
listings
+# each match is exact, so subdirectories need to be explicitly listed
separately
+ENCHANT_POTION_MOUNT_EXCLUDES=(
+ /
+ /dev
+ /dev/pts
+ /dev/shm
+ /proc
+ /sys
+ /tmp
+ /var
+ /var/tmp
+ )
+
+#-------------------------------------------------------------------------------
+# function definitions
+#-------------------------------------------------------------------------------
+#-------------------------------------------------------------------------------
+## @param name
+##
+## Generates a temporary directory for storing state information, relative to
+## ENCHANT_POTION/.
+##
+#-------------------------------------------------------------------------------
+function enchant_potion_make_dir() {
+ local potion="$1"
+
+ [[ -d "$potion" ]] && return $ERR_DIR_EXISTS
+
+ mkdir -p "$ENCHANT_POTION/$potion" || return $ERR_MK_DIR
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Gets the current potion name (temporary directory tied to the history
level)
+##
+#-------------------------------------------------------------------------------
+function enchant_potion_get_current() {
+ echo -n "$ENCHANT_POTION_CURRENT"
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param potion directory name (relative to $ENCHANT_POTION/)
+##
+## Sets the current potion name (temporary directory tied to the history
level)
+##
+#-------------------------------------------------------------------------------
+function enchant_potion_set_current() {
+ local potion="$1"
+
+ [[ -d "$potion" ]] || return $ERR_DIR_NOT_FOUND
+
+ $ENCHANT_POTION_CURRENT="$potion"
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param file to get the hash for (relative to the current potion dir)
+## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
+##
+## Gets the stored hashsum of the given file
+##
+#-------------------------------------------------------------------------------
+function enchant_potion_get_hashsum() {
+ local hashfunc="$ENCHANT_HASHFUNC"
+ local file="$1"
+ local potion="${2:-$ENCHANT_POTION_CURRENT}"
+
+ [[ -f "$file" ]] || return $ERR_FILE_NOT_FOUND
+
+ cut -d' ' -f1 "$ENCHANT_POTION/$potion/${file##*/}.${hashfunc##*/}" ||
+ return $ERR_POTION_GET_HASHSUM
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param file to hash (absolute path)
+## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
+##
+## Checksums a file so that the file can be checked for changes later. Stores
+## the checksum in the potion directory as file.hash_function, where
+## hash_function is defined by ENCHANT_HASHFUNC in the enchantment config
file.
+##
+#-------------------------------------------------------------------------------
+function enchant_potion_set_hashsum() {
+ local hashfunc="$ENCHANT_HASHFUNC"
+ local file="$1"
+ local potion="${2:-$ENCHANT_POTION_CURRENT}"
+
+ [[ -f "$file" ]] || return $ERR_FILE_NOT_FOUND
+
+ "$hashfunc" "$file" >
"$ENCHANT_POTION/$potion/${file##*/}.${hashfunc##*/}" ||
+ return $ERR_POTION_SET_HASHSUM
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param file to check/cache (absolute path)
+## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
+##
+## Includes a file into the state cache for later archival if the stored
+## checksum doesn't match or there is not stored checksum.
+##
+#-------------------------------------------------------------------------------
+function enchant_potion_cache_file() {
+ local file="$1"
+ local potion="${2:-$ENCHANT_POTION_CURRENT}"
+ local sum=""
+
+ [[ -f "$file" ]] || return $ERR_FILE_NOT_FOUND
+
+ sum="$($ENCHANT_HASHFUNC $file | cut -d' ' -f1)"
+
+ # only update if the checksums differ or we don't already have the hashsum
+ if [[ "$sum" != "$(enchant_potion_get_hashsum $file $potion)" ]]
+ then
+ # generate and store the (new) hashsum of the file
+ enchant_potion_set_hashsum "$file" "$potion" || return
$ERR_POTION_SET_HASHSUM
+ fi
+
+ # store the file itself
+ cp -f "$file" "$ENCHANT_POTION/$potion/${file##*/}" || return
$ERR_POTION_CACHE_FILE
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
+##
+## Parses /proc/mounts to determine which partitions are mounted, excluding
the
+## list of ISO mounts.
+##
+#-------------------------------------------------------------------------------
+function enchant_potion_get_partitions() {
+ local mounts="/proc/mounts"
+ local potion="${1:-$ENCHANT_POTION_CURRENT}"
+
+ # list of ISO mounts to exclude
+ # each match is exact
+ local excl="$ENCHANT_POTION_MOUNT_EXCLUDES"
+
+ [[ -d "$ENCHANT_POTION" ]] || return $ERR_POTION_DIR
+
+ # for every line, if the 2nd field exactly matches one of excl, skip it
+ # otherwise, store the filesystem (field 3) to the temp file
+ gawk -v i="$excl" '{if(match(i,$2)) next; else print $1}' $mounts > \
+ $ENCHANT_POTION/partitions || return $ERR_POTION_GET_PARTITIONS
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
+##
+## Checks to see if the list of partitions has changed, and updates the state
+## cache if they were changed.
+##
+#-------------------------------------------------------------------------------
+function enchant_potion_update_partitions() {
+ local potion_parts="$ENCHANT_POTION/$1/filesystems"
+ local parts="$ENCHANT_POTION/filesystems"
+ local potion="${1:-$ENCHANT_POTION_CURRENT}"
+
+ enchant_potion_get_filesystems || return $ERR_POTION_GET_PARTITIONS
+
+ # if there isn't a stored copy of the mount points, or if the stored copy
+ # differs from what we currently have, then store the current set
+ if [[ ! -f "$potion_parts" || "$(cat $potion_parts)" != "$(cat $parts)" ]]
+ then
+ cp -f "$parts" > "$potion_parts" || return $ERR_POTION_CHK_PARTITIONS
+ fi
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
+##
+## Parses /proc/mounts to determine which filesystems are mounted, excluding
the
+## list of ISO mounts.
+##
+#-------------------------------------------------------------------------------
+function enchant_potion_get_filesystems() {
+ local mounts="/proc/mounts"
+ local potion="${1:-$ENCHANT_POTION_CURRENT}"
+
+ # list of ISO mounts to exclude
+ # each match is exact
+ local excl="$ENCHANT_POTION_MOUNT_EXCLUDES"
+
+ [[ -d "$ENCHANT_POTION" ]] || return $ERR_POTION_DIR
+
+ # for every line, if the 2nd field exactly matches one of excl, skip it
+ # otherwise, store the filesystem (field 3) to the temp file
+ gawk -v i="$excl" '{if(match(i,$2)) next; else print $3}' $mounts > \
+ $ENCHANT_POTION/filesystems || return $ERR_POTION_GET_FILESYSTEMS
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
+##
+## Checks to see if the list of filesystems corresponding to partitions has
+## changed, and updates the state cache if they were changed.
+##
+#-------------------------------------------------------------------------------
+function enchant_potion_update_filesystems() {
+ local potion_fs="$ENCHANT_POTION/$1/filesystems"
+ local fs="$ENCHANT_POTION/filesystems"
+ local potion="${1:-$ENCHANT_POTION_CURRENT}"
+
+ enchant_potion_get_filesystems || return $ERR_POTION_GET_FILESYSTEMS
+
+ # if there isn't a stored copy of the mount points, or if the stored copy
+ # differs from what we currently have, then store the current set
+ if [[ ! -f "$potion_fs" || "$(cat $potion_fs)" != "$(cat $fs)" ]]
+ then
+ cp -f "$fs" > "$potion_fs" || return $ERR_POTION_CHK_FILESYSTEMS
+ fi
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
+##
+## Parses /proc/mounts to determine which devices are mounted where,
excluding
+## the list of ISO mounts.
+##
+#-------------------------------------------------------------------------------
+function enchant_potion_get_mount_points() {
+ local mounts="/proc/mounts"
+ local potion="${1:-$ENCHANT_POTION_CURRENT}"
+
+ # list of ISO mounts to exclude
+ # each match is exact
+ local excl="$ENCHANT_POTION_MOUNT_EXCLUDES"
+
+ [[ -d "$ENCHANT_POTION" ]] || return $ERR_POTION_DIR
+
+ # for every line, if the 2nd field exactly matches one of excl, skip it
+ # otherwise, store the mount point (field 2) to the temp file
+ gawk -v i="$excl" '{if(match(i,$2)) next; else print $2}' $mounts > \
+ $ENCHANT_POTION/mount_points || return $ERR_POTION_GET_MOUNT_POINTS
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
+##
+## Checks to see if the list of mount points (/, /usr, etc.) corresponding to
+## partitions/filesystems has changed, and updates the state cache if they
were
+## changed.
+##
+#-------------------------------------------------------------------------------
+function enchant_potion_update_mount_points() {
+ local potion_mounts="$ENCHANT_POTION/$1/mount_points"
+ local mounts="$ENCHANT_POTION/mount_points"
+ local potion="${1:-$ENCHANT_POTION_CURRENT}"
+
+ enchant_potion_get_mount_points || return $ERR_POTION_GET_MOUNT_POINTS
+
+ # if there isn't a stored copy of the mount points, or if the stored copy
+ # differs from what we currently have, then store the current set
+ if [[ ! -f "$potion_mounts" || "$(cat $potion_mounts)" != "$(cat $mounts)"
]]
+ then
+ cp -f "$mounts" > "$potion_mounts" || return $ERR_POTION_CHK_MOUNT_POINTS
+ fi
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
+##
+## If a user chose to install a custom kernel, this checks for the config
being
+## used. Updates the state cache if the kernel config changed.
+##
+#-------------------------------------------------------------------------------
+function enchant_potion_update_kernel_config() {
+ local potion="${1:-$ENCHANT_POTION_CURRENT}"
+ local kernel_config="$ENCHANT_TARGET/usr/src/linux/.config"
+
+ [[ -f "$kernel_config" ]] || return $ERR_FILE_NOT_FOUND
+
+ enchant_potion_cache_file "$kernel_config" "$potion" || return
$ERR_POTION_CACHE_FILE
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
+##
+## Checks which kernel(s) the user has opted to install (ISO, custom, etc.).
+## Updates the state cache if the kernel choice changed.
+##
+#-------------------------------------------------------------------------------
+function enchant_potion_update_kernel() {
+ local potion="${1:-$ENCHANT_POTION_CURRENT}"
+ local kernels="$ENCHANT_TMP/kernels"
+
+ [[ -f "$kernels" ]] || return $ERR_FILE_NOT_FOUND
+
+ enchant_potion_cache_file "$kernels" "$potion" || return
$ERR_POTION_CACHE_FILE
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
+##
+## Checks which optional spell sources the user has chosen to install, and
+## updates the state cache if the list changed.
+##
+#-------------------------------------------------------------------------------
+function enchant_potion_update_spell_sources() {
+ local potion="${1:-$ENCHANT_POTION_CURRENT}"
+ local spells="$ENCHANT_TMP/spells"
+
+ [[ -f "$spells" ]] || return $ERR_FILE_NOT_FOUND
+
+ enchant_potion_cache_file "$spells" "$potion" || return
$ERR_POTION_CACHE_FILE
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
+##
+## Checks which bootloader the user chose, and updates the state cache if the
+## choice changed.
+##
+#-------------------------------------------------------------------------------
+function enchant_potion_update_bootloader() {
+ local potion="${1:-$ENCHANT_POTION_CURRENT}"
+ local bootloaders="$ENCHANT_TMP/bootloaders"
+
+ [[ -f "$bootloaders" ]] || return $ERR_FILE_NOT_FOUND
+
+ enchant_potion_cache_file "$bootloaders" "$potion" || return
$ERR_POTION_CACHE_FILE
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
+##
+## Checks for updates to the config files in the target system, and updates
the
+## state cache if there were any changes.
+##
+#-------------------------------------------------------------------------------
+function enchant_potion_update_confs() {
+ local potion="${1:-$ENCHANT_POTION_CURRENT}"
+ local conf=""
+
+ for conf in $ENCHANT_POTION_CONFS
+ do
+ conf="$ENCHANT_TARGET/$conf"
+ [[ -f "$file" ]] || return $ERR_FILE_NOT_FOUND
+
+ enchant_potion_cache_file "$conf" "$potion" || return
$ERR_POTION_CACHE_FILE
+ done
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
+##
+## Checks for updates to /etc/passwd, /etc/group, etc. and updates the state
+## cache if there were any changes.
+##
+#-------------------------------------------------------------------------------
+function enchant_potion_update_users() {
+ local potion="${1:-$ENCHANT_POTION_CURRENT}"
+ local file=""
+
+ for file in etc/passwd etc/group etc/shadow etc/gshadow
+ do
+ file="$ENCHANT_TARGET/$file"
+ [[ -f "$file" ]] || return $ERR_FILE_NOT_FOUND
+
+ enchant_potion_cache_file "$file" "$potion" || return
$ERR_POTION_CACHE_FILE
+ done
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param potion directory name (relative to $ENCHANT_POTION/) [optional]
+##
+## Checks various state data and performs any needed updates during the
install.
+##
+#-------------------------------------------------------------------------------
+function enchant_potion_update() {
+ local potion="${1:-$ENCHANT_POTION_CURRENT}"
+
+ enchant_potion_update_partitions "$potion" || return
$ERR_POTION_CHK_PARTITIONS
+ enchant_potion_update_filesystems "$potion" || return
$ERR_POTION_CHK_FILESYSTEMS
+ enchant_potion_update_mount_points "$potion" || return
$ERR_POTION_CHK_MOUNT_POINTS
+ enchant_potion_update_opt_spells "$potion" || return
$ERR_POTION_CHK_OPT_SPELLS
+ enchant_potion_update_kernel "$potion" || return $ERR_POTION_CHK_KERNEL
+ enchant_potion_update_bootloader "$potion" || return
$ERR_POTION_CHK_BOOTLOADER
+ enchant_potion_update_confs "$potion" || return $ERR_POTION_CHK_CONFS
+ enchant_potion_update_users "$potion" || return $ERR_POTION_CHK_USERS
+
+ return $ERR_OK
+}
+
+
+#-------------------------------------------------------------------------------
+## @param potion
+##
+## Packages a potion (state) directory into an archive that can later be
used to
+## load (seed) an automated install.
+##
+#-------------------------------------------------------------------------------
+function enchant_potion_bottle() {
+ local potion="${1:-$ENCHANT_POTION_CURRENT}"
+ local output="$ENCHANT_POTION/potion"
+
+ [[ -d "$potion" ]] || return $ERR_DIR_NOT_FOUND
+
+ # package the potion into a compressed archive
+ case "$ENCHANT_ARCHIVE" in
+ "tar" )
+ tar cf "${output}.tar" "$ENCHANT_POTION/$potion"/* || return
$ERR_POTION_ARCHIVE
+ [[ -n "$ENCHANT_COMPRESS" ]] && "$ENCHANT_COMPRESS" "${output}.tar" ||
+ return $ERR_POTION_COMPRESS
+ ;;
+ "cpio" )
+ (
+ cd "$potion"
+ find * | cpio -H newc -o > "${output}.io" || return
$ERR_POTION_ARCHIVE
+ [[ -n "$ENCHANT_COMPRESS" ]] && "$ENCHANT_COMPRESS" "${output}.io" ||
+ return $ERR_POTION_COMPRESS
+ )
+ ;;
+ * )
+ return $ERR_POTION_ARCHIVE_FORMAT
+ esac
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+## @param -s start (optional)
+## @param -e end (optional)
+## @param potion (required)
+##
+## If potion is an archive, it unpacks the archive and performs an automated
+## install. If potion is a directory, it assumes it is a proper state
directory
+## (what an unpacked potion archive is) and does the same as for an archive,
but
+## skipping the unpacking step.
+##
+## If the start argument is given, it determines at which module to begin the
+## automation (defaults to the first). If the end ## argument is given, it
+## determines at which module to end the automation and at which module to
end
+## the automation (defaults to the last). Both start and end can be specified
+## either as module names or (positional) module numbers. If '--' is passed
as
+## an argument, it forces the function to stop scanning for flag parameters
so that
+## one can pass in filenames beginning with a '-' and not experience an
error.
+##
+## Once the potion is unpacked and ready, each module from start to end is
+## processed in turn by calling enchant_modules_potion, which runs any
+## module-specific scripts (in the module's directory) for processing potion
+## actions.
+##
+#-------------------------------------------------------------------------------
+function enchant_potion_quaff() {
+ local potion="$1"
+ local current=""
+ local end=""
+ local list=""
+
+ # process any optional parameters
+ while [[ "${1:0:1}" == "-" ]]
+ do
+ case "$1" in
+ # starting module
+ "-s")
+ current="${2}"
+ shift 2
+ ;;
+ # ending module
+ "-e")
+ end="${2}"
+ shift 2
+ ;;
+ # stop processing optional parameters if passed '--'
+ "--")
+ shift
+ break
+ ;;
+ *)
+ ;;
+ esac
+ done
+
+ # if the start module was given as a module name, get it's positional
number
+ if [[ -z "$current" ]]
+ then
+ current="0"
+ elif [[ "$current" = [a-z]* ]]
+ current="$(grep -n $current $ENCHANT_DATA/modules | cut -d: -f1)"
+ fi
+
+ # if the end module wasn't explicitly specified, set it to the last
possible
+ # (non-error) module
+ if [[ -z "$end" ]]
+ then
+ endmod="${#list}"
+ # if the end module was specified as a module name, get it's positional
number
+ elif [[ "$end" = [a-z]* ]]
+ then
+ end="$(grep -n $end $ENCHANT_DATA/modules | cut -d: -f1)"
+ fi
+
+
+ # get the list of modules to operate on
+ list=($(enchant_modules_list))
+
+ # process each module's potion scripts from start module to end module
+ for ((current < end; current++))
+ do
+ enchant_modules_potion "${list[current]}" "$potion"
+ done
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##=back
+##
+##=head1 LICENSE
+##
+## This software is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This software is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this software; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+#-------------------------------------------------------------------------------
+
+# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/enchantment/lib/libenchantment b/enchantment/lib/libenchantment
new file mode 100755
index 0000000..73ad4fd
--- /dev/null
+++ b/enchantment/lib/libenchantment
@@ -0,0 +1,337 @@
+#!/bin/bash
+#-------------------------------------------------------------------------------
+##
+##=head1 SYNOPSIS
+##
+## Common functions and variables for different installers
+##
+##=head1 DESCRIPTION
+##
+## This file provides common function and variable definitions for
+## the different types of installers that can be included on an ISO.
+## This file is meant to be sourced by the different installers,
+## so this file should not be run directly. This file, as well as
+## the installer which sources this file, is meant to be called from
+## inside the ISO during the actual install onto the target system.
+##
+##=head1 COPYRIGHT
+##
+## Copyright 2009 The Cauldron Team
+##
+##=head1 FUNCTIONS
+##
+##=over 4
+##
+#-------------------------------------------------------------------------------
+
+ENCHANT_NULL="/dev/null"
+
+#-------------------------------------------------------------------------------
+##
+## Used only when checking initialization of the library and a fatal error
+## occurs. Afterwards, functions from liberror are used instead.
+##
+#-------------------------------------------------------------------------------
+function enchant_fatal_error() {
+ echo "$1"
+ exit 1
+}
+
+#-------------------------------------------------------------------------------
+# liberror includes
+#-------------------------------------------------------------------------------
+. "$ENCHANT_BASE/liberror" ||
+ enchant_fatal_error "error: cannot load base library liberror"
+
+# load enchantment error code and message defines
+. "$ENCHANT_LIBS/errorcodes" ||
+ enchant_fatal_error "error: cannot load enchantment error codes"
+
+. "$ENCHANT_BASE/libcolor" ||
+ enchant_fatal_error "error: cannot load base library libcolor"
+
+# test/set whether color output should be enabled
+[[ "$ENCHANT_COLOR" != "yes" || "$(grep -q 'nocolor' /proc/cmdline)" ]] &&
+ LIBCOLOR_NOCOLOR="yes"
+
+# drop enchant_fatal_error if liberror was successfully loaded
+unset enchant_fatal_error
+
+#-------------------------------------------------------------------------------
+## @param library name to load (no path, just basename)
+##
+## Loads the library given as the first argument. liberror_check_fatal_error
is
+## called to check if there was a problem loading the library, and if there
was
+## it will print a corresponding error message and then exit with the error
+## $ERR_LOAD_LIBRARY.
+##
+#-------------------------------------------------------------------------------
+function enchant_load_library() {
+ local lib="$1"
+
+ . "$ENCHANT_LIBS/$lib" 2>$ENCHANT_NULL
+ liberror_check_fatal_error
+}
+
+#-------------------------------------------------------------------------------
+# enchant includes
+#-------------------------------------------------------------------------------
+enchant_load_library "lib.chroot"
+enchant_load_library "lib.i18n"
+enchant_load_library "lib.install"
+enchant_load_library "lib.modules"
+enchant_load_library "lib.potion"
+
+#-------------------------------------------------------------------------------
+# function definitions
+#-------------------------------------------------------------------------------
+#-------------------------------------------------------------------------------
+##
+## Sets the installer system to a sane, known initial state. Should only be
+## called when first entering the installer system or ISO.
+##
+#-------------------------------------------------------------------------------
+function enchant_prepare() {
+ # this initializes the file which holds the current step
+ mkdir -p "$ENCHANT_TMP" || return $ERR_PREPARE
+ echo 'init' > "$ENCHANT_STATUS" || return $ERR_PREPARE
+
+ # the next lines are to init the history files
+ mkdir -p "$ENCHANT_TMP/history" || return $ERR_PREPARE
+ cat < $ENCHANT_NULL > "$ENCHANT_BACK" || return $ERR_PREPARE
+ cat < $ENCHANT_NULL > "$ENCHANT_FORWARD" || return $ERR_PREPARE
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Cleans up the tmp directories and such forth
+##
+#-------------------------------------------------------------------------------
+function enchant_cleanup() {
+ rm -fr "$ENCHANT_TMP" || return $ERR_CLEANUP
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Determines and returns the current module in the installation procedure.
+##
+#-------------------------------------------------------------------------------
+function enchant_get_current() {
+ [[ -z "$ENCHANT_STATUS" ]] && return $ERR_GET_CURRENT
+
+ cat "$ENCHANT_STATUS" || return $ERR_GET_CURRENT
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## @param step
+##
+## Sets the current module of the installer to be the step passed as an
+## argument. Stores the current module to the back history before setting it
to
+## the new module.
+##
+#-------------------------------------------------------------------------------
+function enchant_set_current() {
+ local module="$1"
+
+ if ! $(enchant_modules_list | grep -q "$module")
+ then
+ return $ERR_SET_CURRENT
+ fi
+
+ enchant_modules_exit || return $ERR_MODULE_EXIT
+
+ # if the max history size has been reached, then we drop the oldest item
+ if [[ "$(wc -l < $ENCHANT_BACK)" -ge "$ENCHANT_HISTORY_SIZE" ]]
+ then
+ sed -i '1d' "$ENCHANT_BACK" || return $ERR_SET_CURRENT
+ fi
+
+ # copy the current module to the back history
+ echo "$module" >> "$ENCHANT_BACK" || return $ERR_SET_CURRENT
+
+ # check the installation state
+ enchant_potion_update || return $ERR_POTION_UPDATE
+
+ # set the current module
+ echo "$module" > "$ENCHANT_STATUS" || return $ERR_SET_CURRENT
+
+ enchant_modules_enter || return $ERR_MODULE_ENTER
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Determines and returns the next module in the installation procedure.
+##
+#-------------------------------------------------------------------------------
+function enchant_get_next() {
+ local step
+ step="$(grep -m1 \"^$(enchant_get_current):\" $ENCHANT_DATA/modules)" ||
+ return $ERR_GET_NEXT
+
+ step="$(echo $step | cut -d: -f2)" || return $ERR_GET_NEXT
+
+ if [[ -z "$step" ]]
+ then
+ echo "error"
+ return $ERR_GET_NEXT
+ fi
+
+ echo $step
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Sets the current module to the next module in the installation procedure.
+##
+#-------------------------------------------------------------------------------
+function enchant_set_next() {
+ local module
+
+ # get next step
+ module="$(enchant_get_next)" || return $ERR_SET_NEXT
+
+ # save new status
+ enchant_set_step "$module" || return $ERR_SET_NEXT
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Determines and returns the previous module in the installation procedure.
+##
+#-------------------------------------------------------------------------------
+function enchant_get_prev() {
+ local step
+
+ # get the current step
+ step="$(enchant_get_current)" || return $ERR_GET_PREV
+
+ step="$(grep -m1 \":$step$\" $ENCHANT_DATA/order)" || return $ERR_GET_PREV
+
+ step="$(echo $step | cut -d: -f1)" || return $ERR_GET_PREV
+
+ if [[ -z "$step" ]]
+ then
+ echo "error"
+ return $ERR_GET_PREV
+ fi
+
+ echo "$step"
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Sets the current module to the previous module in the installation
procedure.
+##
+#-------------------------------------------------------------------------------
+function enchant_set_prev() {
+ local module
+
+ # get the current step
+ module="$(enchant_get_prev)" || return $ERR_SET_PREV
+
+ enchant_set_current "$module" || return $ERR_SET_PREV
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Moves the installer backward in its history (like the back button on a
+## web browser).
+##
+## when you go back, you store/save the forward pages
+##
+#-------------------------------------------------------------------------------
+function enchant_back() {
+ # if the back history is empty, then we can't go back
+ [[ "$(wc -l < $ENCHANT_BACK)" -eq 0 ]] && return $ERR_HISTORY_BACK
+
+ # if the max forward history size has been reached
+ if [[ "$(wc -l < $ENCHANT_FORWARD)" -ge "$ENCHANT_HISTORY_SIZE" ]]
+ then
+ # then we drop the oldest item from the forward history
+ sed -i '1d' "$ENCHANT_FORWARD" || return $ERR_HISTORY_BACK
+ fi
+
+ # copy the current status to the forward history, so we can go forward to
+ # where we are after we jump back
+ enchant_get_current >> "$ENCHANT_FORWARD" || return $ERR_HISTORY_BACK
+
+ # set the current step to be the one we are jumping to
+ tail -n 1 "$ENCHANT_BACK" > "$ENCHANT_STATUS" || return $ERR_HISTORY_BACK
+
+ # remove the step we jumped to from the back history
+ sed -i '$d' "$ENCHANT_BACK" || return $ERR_HISTORY_BACK
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##
+## Moves the installer forward in its history (like the forward button on a
+## web browser.
+##
+## when you go forward, you store/save the back pages
+##
+#-------------------------------------------------------------------------------
+function enchant_forward() {
+ # if the forward history is empty, then we can't go forward
+ [[ "$(wc -l < $ENCHANT_FORWARD)" -eq 0 ]] && return $ERR_HISTORY_FORWARD
+
+ # if the max back history size has been reached
+ if [[ "$(wc -l < $ENCHANT_BACK)" -ge "$ENCHANT_HISTORY_SIZE" ]]
+ then
+ # then we drop the oldest item from the back history
+ sed -i '1d' "$ENCHANT_BACK" || return $ERR_HISTORY_FORWARD
+ fi
+
+ # copy the current status to the back history, so we can go back to where
we
+ # are after we jump forward
+ enchant_get_current >> "$ENCHANT_BACK" || return $ERR_HISTORY_FORWARD
+
+ # set the current step to be the one we are jumping to
+ tail -n 1 "$ENCHANT_FORWARD" > "$ENCHANT_STATUS" || return
$ERR_HISTORY_FORWARD
+
+ # remove the step we jumped to from the forward history
+ sed -i '$d' "$ENCHANT_FORWARD" || return $ERR_HISTORY_FORWARD
+
+ return $ERR_OK
+}
+
+#-------------------------------------------------------------------------------
+##=back
+##
+##=head1 LICENSE
+##
+## This software is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This software is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this software; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+#-------------------------------------------------------------------------------
+
+# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/enchantment/libenchantment b/enchantment/libenchantment
deleted file mode 100755
index 73ad4fd..0000000
--- a/enchantment/libenchantment
+++ /dev/null
@@ -1,337 +0,0 @@
-#!/bin/bash
-#-------------------------------------------------------------------------------
-##
-##=head1 SYNOPSIS
-##
-## Common functions and variables for different installers
-##
-##=head1 DESCRIPTION
-##
-## This file provides common function and variable definitions for
-## the different types of installers that can be included on an ISO.
-## This file is meant to be sourced by the different installers,
-## so this file should not be run directly. This file, as well as
-## the installer which sources this file, is meant to be called from
-## inside the ISO during the actual install onto the target system.
-##
-##=head1 COPYRIGHT
-##
-## Copyright 2009 The Cauldron Team
-##
-##=head1 FUNCTIONS
-##
-##=over 4
-##
-#-------------------------------------------------------------------------------
-
-ENCHANT_NULL="/dev/null"
-
-#-------------------------------------------------------------------------------
-##
-## Used only when checking initialization of the library and a fatal error
-## occurs. Afterwards, functions from liberror are used instead.
-##
-#-------------------------------------------------------------------------------
-function enchant_fatal_error() {
- echo "$1"
- exit 1
-}
-
-#-------------------------------------------------------------------------------
-# liberror includes
-#-------------------------------------------------------------------------------
-. "$ENCHANT_BASE/liberror" ||
- enchant_fatal_error "error: cannot load base library liberror"
-
-# load enchantment error code and message defines
-. "$ENCHANT_LIBS/errorcodes" ||
- enchant_fatal_error "error: cannot load enchantment error codes"
-
-. "$ENCHANT_BASE/libcolor" ||
- enchant_fatal_error "error: cannot load base library libcolor"
-
-# test/set whether color output should be enabled
-[[ "$ENCHANT_COLOR" != "yes" || "$(grep -q 'nocolor' /proc/cmdline)" ]] &&
- LIBCOLOR_NOCOLOR="yes"
-
-# drop enchant_fatal_error if liberror was successfully loaded
-unset enchant_fatal_error
-
-#-------------------------------------------------------------------------------
-## @param library name to load (no path, just basename)
-##
-## Loads the library given as the first argument. liberror_check_fatal_error
is
-## called to check if there was a problem loading the library, and if there
was
-## it will print a corresponding error message and then exit with the error
-## $ERR_LOAD_LIBRARY.
-##
-#-------------------------------------------------------------------------------
-function enchant_load_library() {
- local lib="$1"
-
- . "$ENCHANT_LIBS/$lib" 2>$ENCHANT_NULL
- liberror_check_fatal_error
-}
-
-#-------------------------------------------------------------------------------
-# enchant includes
-#-------------------------------------------------------------------------------
-enchant_load_library "lib.chroot"
-enchant_load_library "lib.i18n"
-enchant_load_library "lib.install"
-enchant_load_library "lib.modules"
-enchant_load_library "lib.potion"
-
-#-------------------------------------------------------------------------------
-# function definitions
-#-------------------------------------------------------------------------------
-#-------------------------------------------------------------------------------
-##
-## Sets the installer system to a sane, known initial state. Should only be
-## called when first entering the installer system or ISO.
-##
-#-------------------------------------------------------------------------------
-function enchant_prepare() {
- # this initializes the file which holds the current step
- mkdir -p "$ENCHANT_TMP" || return $ERR_PREPARE
- echo 'init' > "$ENCHANT_STATUS" || return $ERR_PREPARE
-
- # the next lines are to init the history files
- mkdir -p "$ENCHANT_TMP/history" || return $ERR_PREPARE
- cat < $ENCHANT_NULL > "$ENCHANT_BACK" || return $ERR_PREPARE
- cat < $ENCHANT_NULL > "$ENCHANT_FORWARD" || return $ERR_PREPARE
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Cleans up the tmp directories and such forth
-##
-#-------------------------------------------------------------------------------
-function enchant_cleanup() {
- rm -fr "$ENCHANT_TMP" || return $ERR_CLEANUP
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Determines and returns the current module in the installation procedure.
-##
-#-------------------------------------------------------------------------------
-function enchant_get_current() {
- [[ -z "$ENCHANT_STATUS" ]] && return $ERR_GET_CURRENT
-
- cat "$ENCHANT_STATUS" || return $ERR_GET_CURRENT
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## @param step
-##
-## Sets the current module of the installer to be the step passed as an
-## argument. Stores the current module to the back history before setting it
to
-## the new module.
-##
-#-------------------------------------------------------------------------------
-function enchant_set_current() {
- local module="$1"
-
- if ! $(enchant_modules_list | grep -q "$module")
- then
- return $ERR_SET_CURRENT
- fi
-
- enchant_modules_exit || return $ERR_MODULE_EXIT
-
- # if the max history size has been reached, then we drop the oldest item
- if [[ "$(wc -l < $ENCHANT_BACK)" -ge "$ENCHANT_HISTORY_SIZE" ]]
- then
- sed -i '1d' "$ENCHANT_BACK" || return $ERR_SET_CURRENT
- fi
-
- # copy the current module to the back history
- echo "$module" >> "$ENCHANT_BACK" || return $ERR_SET_CURRENT
-
- # check the installation state
- enchant_potion_update || return $ERR_POTION_UPDATE
-
- # set the current module
- echo "$module" > "$ENCHANT_STATUS" || return $ERR_SET_CURRENT
-
- enchant_modules_enter || return $ERR_MODULE_ENTER
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Determines and returns the next module in the installation procedure.
-##
-#-------------------------------------------------------------------------------
-function enchant_get_next() {
- local step
- step="$(grep -m1 \"^$(enchant_get_current):\" $ENCHANT_DATA/modules)" ||
- return $ERR_GET_NEXT
-
- step="$(echo $step | cut -d: -f2)" || return $ERR_GET_NEXT
-
- if [[ -z "$step" ]]
- then
- echo "error"
- return $ERR_GET_NEXT
- fi
-
- echo $step
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Sets the current module to the next module in the installation procedure.
-##
-#-------------------------------------------------------------------------------
-function enchant_set_next() {
- local module
-
- # get next step
- module="$(enchant_get_next)" || return $ERR_SET_NEXT
-
- # save new status
- enchant_set_step "$module" || return $ERR_SET_NEXT
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Determines and returns the previous module in the installation procedure.
-##
-#-------------------------------------------------------------------------------
-function enchant_get_prev() {
- local step
-
- # get the current step
- step="$(enchant_get_current)" || return $ERR_GET_PREV
-
- step="$(grep -m1 \":$step$\" $ENCHANT_DATA/order)" || return $ERR_GET_PREV
-
- step="$(echo $step | cut -d: -f1)" || return $ERR_GET_PREV
-
- if [[ -z "$step" ]]
- then
- echo "error"
- return $ERR_GET_PREV
- fi
-
- echo "$step"
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Sets the current module to the previous module in the installation
procedure.
-##
-#-------------------------------------------------------------------------------
-function enchant_set_prev() {
- local module
-
- # get the current step
- module="$(enchant_get_prev)" || return $ERR_SET_PREV
-
- enchant_set_current "$module" || return $ERR_SET_PREV
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Moves the installer backward in its history (like the back button on a
-## web browser).
-##
-## when you go back, you store/save the forward pages
-##
-#-------------------------------------------------------------------------------
-function enchant_back() {
- # if the back history is empty, then we can't go back
- [[ "$(wc -l < $ENCHANT_BACK)" -eq 0 ]] && return $ERR_HISTORY_BACK
-
- # if the max forward history size has been reached
- if [[ "$(wc -l < $ENCHANT_FORWARD)" -ge "$ENCHANT_HISTORY_SIZE" ]]
- then
- # then we drop the oldest item from the forward history
- sed -i '1d' "$ENCHANT_FORWARD" || return $ERR_HISTORY_BACK
- fi
-
- # copy the current status to the forward history, so we can go forward to
- # where we are after we jump back
- enchant_get_current >> "$ENCHANT_FORWARD" || return $ERR_HISTORY_BACK
-
- # set the current step to be the one we are jumping to
- tail -n 1 "$ENCHANT_BACK" > "$ENCHANT_STATUS" || return $ERR_HISTORY_BACK
-
- # remove the step we jumped to from the back history
- sed -i '$d' "$ENCHANT_BACK" || return $ERR_HISTORY_BACK
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##
-## Moves the installer forward in its history (like the forward button on a
-## web browser.
-##
-## when you go forward, you store/save the back pages
-##
-#-------------------------------------------------------------------------------
-function enchant_forward() {
- # if the forward history is empty, then we can't go forward
- [[ "$(wc -l < $ENCHANT_FORWARD)" -eq 0 ]] && return $ERR_HISTORY_FORWARD
-
- # if the max back history size has been reached
- if [[ "$(wc -l < $ENCHANT_BACK)" -ge "$ENCHANT_HISTORY_SIZE" ]]
- then
- # then we drop the oldest item from the back history
- sed -i '1d' "$ENCHANT_BACK" || return $ERR_HISTORY_FORWARD
- fi
-
- # copy the current status to the back history, so we can go back to where
we
- # are after we jump forward
- enchant_get_current >> "$ENCHANT_BACK" || return $ERR_HISTORY_FORWARD
-
- # set the current step to be the one we are jumping to
- tail -n 1 "$ENCHANT_FORWARD" > "$ENCHANT_STATUS" || return
$ERR_HISTORY_FORWARD
-
- # remove the step we jumped to from the forward history
- sed -i '$d' "$ENCHANT_FORWARD" || return $ERR_HISTORY_FORWARD
-
- return $ERR_OK
-}
-
-#-------------------------------------------------------------------------------
-##=back
-##
-##=head1 LICENSE
-##
-## This software is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This software is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this software; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-#-------------------------------------------------------------------------------
-
-# vim:ai:tw=80:tabstop=2:softtabstop=2:shiftwidth=2:expandtab
diff --git a/ward/cauldron_sources b/ward/cauldron_sources
index fe63737..c99683c 100644
--- a/ward/cauldron_sources
+++ b/ward/cauldron_sources
@@ -18,12 +18,12 @@

#-------------------------------------------------------------------------------

sources=(
- "cauldron"
- "libcauldron"
- "lib.chroot"
- "lib.init"
- "lib.sorcerous"
- "lib.toolchain"
+ "bin/cauldron"
+ "lib/libcauldron"
+ "lib/lib.chroot"
+ "lib/lib.init"
+ "lib/lib.sorcerous"
+ "lib/lib.toolchain"
)


#-------------------------------------------------------------------------------
diff --git a/ward/enchantment_sources b/ward/enchantment_sources
index badeb7d..2e7ad35 100644
--- a/ward/enchantment_sources
+++ b/ward/enchantment_sources
@@ -18,11 +18,11 @@

#-------------------------------------------------------------------------------

sources=(
- "libenchantment"
- "lib.chroot"
- "lib.i18n"
- "lib.install"
- "lib.potion"
+ "lib/libenchantment"
+ "lib/lib.chroot"
+ "lib/lib.i18n"
+ "lib/lib.install"
+ "lib/lib.potion"
"shell/bashrc"
"shell/functions"
"shell/bin/enchantment"
diff --git a/ward/ward-configvars b/ward/ward-configvars
index 090787c..cd6a4fa 100755
--- a/ward/ward-configvars
+++ b/ward/ward-configvars
@@ -73,7 +73,7 @@ then
ward_get_sources "cauldron_sources"
cauldron="$WARD_PATH/../cauldron"
c_conf="$cauldron/etc/cauldron.conf"
- CAULDRON_CONF="$cauldron/config"
+ CAULDRON_CONF="$cauldron/data/config"

# check cauldron files
libcolor_notice "Checking cauldron config variables"
diff --git a/ward/ward-errorcodes b/ward/ward-errorcodes
index 8b934c1..9eff32f 100755
--- a/ward/ward-errorcodes
+++ b/ward/ward-errorcodes
@@ -71,7 +71,7 @@ if [[ "$PROCESS_CAULDRON" == "yes" ]]
then
ward_get_sources "cauldron_sources"
cauldron="$WARD_PATH/../cauldron"
- c_codes="$cauldron/errorcodes"
+ c_codes="$cauldron/lib/errorcodes"

libcolor_notice "Checking cauldron errorcodes for internal consistency"
echo ""
@@ -89,7 +89,7 @@ if [[ "$PROCESS_ENCHANTMENT" == "yes" ]]
then
ward_get_sources "enchantment_sources"
enchantment="$WARD_PATH/../enchantment"
- e_codes="$enchantment/errorcodes"
+ e_codes="$enchantment/lib/errorcodes"

libcolor_notice "Checking enchantment errorcodes for internal consistency"
echo ""
diff --git a/ward/ward-functions b/ward/ward-functions
index e9d90b8..34563f8 100755
--- a/ward/ward-functions
+++ b/ward/ward-functions
@@ -89,7 +89,7 @@ then
# check cauldron files
libcolor_notice "Checking cauldron functions"
echo ""
- ward_functions -p "$cauldron" -l "$cauldron" "${sources[@]}"
+ ward_functions -p "$cauldron" -l "$cauldron/lib" "${sources[@]}"
fi

if [[ "$PROCESS_ENCHANTMENT" == "yes" ]]
@@ -100,7 +100,7 @@ then
# check enchantment files
libcolor_notice "Checking enchantment functions"
echo ""
- ward_functions -p "$enchantment" -l "$enchantment" "${sources[@]}"
+ ward_functions -p "$enchantment" -l "$enchantment/lib" "${sources[@]}"
fi


#-------------------------------------------------------------------------------



  • [SM-Commit] GIT changes to master cauldron by Justin Boffemmyer (3c7f4e3d3ec0c238c08882c78c2a84d5a790929e), Justin Boffemmyer, 04/02/2011

Archive powered by MHonArc 2.6.24.

Top of Page