Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to test cauldron by Justin Boffemmyer (651c4eacee03c4a2d06f17d3db6818d4b02b8a8d)

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 test cauldron by Justin Boffemmyer (651c4eacee03c4a2d06f17d3db6818d4b02b8a8d)
  • Date: Fri, 2 Jan 2009 08:06:33 -0600

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

iso/usr/share/smgl.install/smgl-enchant | 6 +++---
iso/usr/share/smgl.install/smgl-spellcaster | 7 +++----
scripts/add-sauce.sh | 10 +++++-----
scripts/mkinitrd.sh | 23 +++++++++++++++++++++--
scripts/mkiso.sh | 6 +++---
scripts/spellcaster.sh | 26 ++++++++++++++++++++++++++
6 files changed, 61 insertions(+), 17 deletions(-)

New commits:
commit 651c4eacee03c4a2d06f17d3db6818d4b02b8a8d
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

smgl.install/smgl-spellcaster.sh: fix usage info

Corrected the usage info to match the current function of the script.

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

scripts/spellcaster.sh: add needed dev nodes

Add required static device nodes (and the simpleinit fifo initctl) to
both SYSDIR and ISODIR.

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

scripts/add-sauce.sh: correct module blacklisting

Improved the creation of the module blacklist file by correcting the sed
commands (they were missing the leading 's', so no replacement was
happening). Also improved the handling of the output dir for the
blacklist creation.

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

scripts/mkiso.sh: cleaned up

Fixed a capitalization in the usage output. Removed currently unused
variable references.

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

scripts/mkinitrd.sh: modify isolinux.cfg

Replace all values of @INITRD_SIZE@ with $initrd_size for the user, if
those values exist within isolinux.cfg. Otherwise, just let the user
know they need to modify isolinux.cfg with the initrd size.

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

scripts/mkinitrd.sh: better sanity checking

If the chroot dir (ISO_DIR) is given relative to $CWD, expand to an
absolute pathname. Quote uses of ISO_DIR in case spaces or other chars
are included in it. In addition to making sure the ISO_DIR kernel
modules can be found, also ensure that the ISO_DIR isolinux.cfg file can
be found.

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

smgl.install/smgl-enchant: opt-spells -> spells

Changed the name of the listing file smgl-enchant expects from
/tmp/opt-spells to /tmp/spells.

diff --git a/iso/usr/share/smgl.install/smgl-enchant
b/iso/usr/share/smgl.install/smgl-enchant
index f667de4..5450100 100755
--- a/iso/usr/share/smgl.install/smgl-enchant
+++ b/iso/usr/share/smgl.install/smgl-enchant
@@ -7,7 +7,7 @@ Usage: $(basename $0) [-h] [-d /path/to/target] [CACHE1
[CACHE2..]]
Installs caches to the target system (defined as /mnt/root if not
specified). The caches installed can either be specified on the
command-line as arguments, or they will be taken from information
-provided via /tmp/opt-spells. Note: if you are providing caches on the
+provided via /tmp/spells. Note: if you are providing caches on the
command-line, you must give the full cache filename, and caches with
an extension of .tar.bz2 are expected.

@@ -60,7 +60,7 @@ done
shift $(($OPTIND - 1))

CACHE_DIR="${CACHE_DIR:-/var/cache/sorcery}"
-CACHE_LIST="${CACHE_LIST:-/tmp/opt-spells}"
+CACHE_LIST="${CACHE_LIST:-/tmp/spells}"
TABLETS="${TABLETS:-/tmp/tablets}"
TARGET="${TARGET:-/mnt/root}"

@@ -90,7 +90,7 @@ then
shift
done
else
- # for each spell-version listed in /tmp/opt-spells, untar the corresponding
+ # for each spell-version listed in /tmp/spells, untar the corresponding
# cache file from the ISO into the TARGET system and generate the necessary
# sorcery state information afterwards so the TARGET sorcery can deal with
# after the new system is booted
diff --git a/iso/usr/share/smgl.install/smgl-spellcaster
b/iso/usr/share/smgl.install/smgl-spellcaster
index dc8ac8f..6c8c726 100755
--- a/iso/usr/share/smgl.install/smgl-spellcaster
+++ b/iso/usr/share/smgl.install/smgl-spellcaster
@@ -8,10 +8,9 @@ NUM_CACHES=

function usage() {
cat <<USAGE
-$(basename $0) [/path/to/target]
-Generates a listing of cache files available to install, and then
-installs the selected caches to the target directory (defined as
-/mnt/root if not specified).
+$(basename $0)
+Generates a listing of cache files available to install.
+
USAGE
}

diff --git a/scripts/add-sauce.sh b/scripts/add-sauce.sh
index 626df15..7c47be4 100755
--- a/scripts/add-sauce.sh
+++ b/scripts/add-sauce.sh
@@ -82,15 +82,15 @@ if ! [[ -e "$MYDIR"/base/etc/shadow ]] ;then
fi >&2

function blacklist_modules {
- local SRC=$1
- local DEST=$2
+ local SRC="${1%/}"
+ local DEST="${2%/}"

[[ ! -d "$SRC" || ! -d "$DEST" ]] && exit 3
mkdir -p "$DEST"/etc/modprobe.d

find "$SRC" -name "*.ko" |
- sed '#.*/##' |
- sed '#^\(.*\)\.ko$#install \1 /bin/true#' |
+ sed 's#^.*/##' |
+ sed 's#^\(.*\)\.ko$#install \1 /bin/true#' |
sort >> "$DEST"/etc/modprobe.d/blacklist
}

@@ -112,7 +112,7 @@ fi
# ISO Sauce
if [[ $TYPE == "iso" ]] ;then
# add the relevant modules to the blacklist
- blacklist_modules "$CHROOTDIR/lib/modules/$KVER/kernel/drivers/video"
"$TEMPDIR"/
+ blacklist_modules "$CHROOTDIR/lib/modules/$KVER/kernel/drivers/video"
"$TEMPDIR"

# copy everything from the cauldron repo iso dir
# into the TEMPDIR staging area
diff --git a/scripts/mkinitrd.sh b/scripts/mkinitrd.sh
index ea25222..efed2e7 100755
--- a/scripts/mkinitrd.sh
+++ b/scripts/mkinitrd.sh
@@ -57,14 +57,28 @@ fi
ISO_DIR=$1
KERNEL_VERSION=$2

+# ensure full pathnames
+if [[ $(dirname "$ISO_DIR") == "." ]]
+then
+ ISO_DIR="$(pwd)/$ISO_DIR"
+fi
+echo "Chroot dir: $ISO_DIR"
+
OUTPUT="${OUTPUT:-./initrd.gz}"

-if ! [[ -d $ISO_DIR/lib/modules/$KERNEL_VERSION/kernel ]] ;then
+if ! [[ -d "$ISO_DIR"/lib/modules/$KERNEL_VERSION/kernel ]] ;then
echo "Chroot failed sanity check:"
echo "Unable to find $ISO_DIR/lib/modules/$KERNEL_VERSION/kernel"
exit 2
fi >&2

+if ! [[ -f "$ISO_DIR"/isolinux/isolinux.cfg ]]
+then
+ echo "Chroot failed sanity check:"
+ echo "Chroot is missing isolinux.cfg!"
+ exit 2
+fi >&2
+
# The temporary dir I'll use to put the initrd files
INITRDROOT=/tmp/initrd-dir

@@ -161,7 +175,12 @@ function mk_initrd_file() {

rm -rf $tmp_file $tmp_mountdir
echo "initrd is at $2, compressed $(du -ks $2 | cut -d$'\t' -f1)K,
uncompressed ${initrd_size}K."
- echo "Don't forget to adjust isolinux.cfg for the new size."
+ if grep -q '@INITRD_SIZE@' "$ISO_DIR"/isolinux/isolinux.cfg
+ then
+ sed -i "s/@INITRD_SIZE@/$initrd_size/" "$ISO_DIR"/isolinux/isolinux.cfg
+ else
+ echo "Don't forget to adjust isolinux.cfg for the new size."
+ fi
}


diff --git a/scripts/mkiso.sh b/scripts/mkiso.sh
index bbc12c3..c4e7147 100755
--- a/scripts/mkiso.sh
+++ b/scripts/mkiso.sh
@@ -20,7 +20,7 @@ Required:

ISO_VERSION
A string that specifies the filename of the iso output file.
- you must specify an absolute path or the command will not likely
be
+ You must specify an absolute path or the command will not likely
be
found (a way around this would be to either set the path as part
of
the command to execute, or to set the command to be /bin/bash -l
some_command_without_abs_path). Defaults to "/bin/bash -l".
@@ -68,11 +68,11 @@ fi
ISO_CHROOT=$1
ISO_VERSION=$2

-$SUODOCMD mkisofs -R -b isolinux/isolinux.bin -c isolinux/boot.cat
-no-emul-boot -boot-load-size 4 -boot-info-table -V ${ISO_VERSION} -publisher
"Source Mage GNU/Linux" -p "Cauldron" -o "${ISO_VERSION}.iso" "$ISO_CHROOT"
+mkisofs -R -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot
-boot-load-size 4 -boot-info-table -V ${ISO_VERSION} -publisher "Source Mage
GNU/Linux" -p "Cauldron" -o "${ISO_VERSION}.iso" "$ISO_CHROOT"

if $COMPRESS || [[ -n $KEEP ]]
then
- $SUODOCMD bzip2 -f -v $KEEP "${ISO_VERSION}.iso"
+ bzip2 -f -v $KEEP "${ISO_VERSION}.iso"
fi

[[ $ISOCHOWN ]] && chown "$CHOWNSTR" "${ISO_VERSION}".iso*
diff --git a/scripts/spellcaster.sh b/scripts/spellcaster.sh
index 0be58a9..eb962ee 100755
--- a/scripts/spellcaster.sh
+++ b/scripts/spellcaster.sh
@@ -325,6 +325,19 @@ function setup_sys() {
cat "$dep" >> "$depends"
done
done
+
+ # populate /dev with static device nodes
+ cat > "$SYSDIR/makedev" <<-"DEV"
+ #!/bin/bash
+ cd /dev
+ /sbin/MAKEDEV generic
+DEV
+ chmod a+x "$SYSDIR/makedev"
+ chroot "$SYSDIR" /makedev
+ rm -f "$SYSDIR/makedev"
+
+ # ensure the existence of /dev/initctl
+ chroot "$SYSDIR" mkfifo -m 0600 /dev/initctl
}

function setup_iso() {
@@ -348,6 +361,19 @@ function setup_iso() {

# save the grimoire version used for building everything to ISODIR
for reference
cp -f $GVERS "$ISODIR"/etc/grimoire_version
+
+ # populate /dev with static device nodes
+ cat > "$ISODIR/makedev" <<-"DEV"
+ #!/bin/bash
+ cd /dev
+ /sbin/MAKEDEV generic
+DEV
+ chmod a+x "$ISODIR/makedev"
+ chroot "$ISODIR" /makedev
+ rm -f "$ISODIR/makedev"
+
+ # ensure the existence of /dev/initctl
+ chroot "$ISODIR" mkfifo -m 0600 /dev/initctl
}

function clean_target() {



  • [SM-Commit] GIT changes to test cauldron by Justin Boffemmyer (651c4eacee03c4a2d06f17d3db6818d4b02b8a8d), Justin Boffemmyer, 01/02/2009

Archive powered by MHonArc 2.6.24.

Top of Page