pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/mklivecd Update to 0.15.1:
details: https://anonhg.NetBSD.org/pkgsrc/rev/7db37713f376
branches: trunk
changeset: 527616:7db37713f376
user: xtraeme <xtraeme%pkgsrc.org@localhost>
date: Wed Apr 11 11:51:35 2007 +0000
description:
Update to 0.15.1:
* Changed informative messages to "MKLIVECD>".
* Improved all messages.
* Fix problems with MULTIPLE_KERNELS and USE_GNU_GRUB, previously
if they were not defined the build continued or failed silently.
* Added more error checks.
diffstat:
sysutils/mklivecd/Makefile | 4 +-
sysutils/mklivecd/files/mklivecd.sh | 235 ++++++++++++++++++-----------------
2 files changed, 124 insertions(+), 115 deletions(-)
diffs (truncated from 530 to 300 lines):
diff -r abc64130a544 -r 7db37713f376 sysutils/mklivecd/Makefile
--- a/sysutils/mklivecd/Makefile Wed Apr 11 09:09:17 2007 +0000
+++ b/sysutils/mklivecd/Makefile Wed Apr 11 11:51:35 2007 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.37 2007/04/10 02:23:34 xtraeme Exp $
+# $NetBSD: Makefile,v 1.38 2007/04/11 11:51:35 xtraeme Exp $
-DISTNAME= mklivecd-0.15
+DISTNAME= mklivecd-0.15.1
CATEGORIES= sysutils
MASTER_SITES= # empty
DISTFILES= # empty
diff -r abc64130a544 -r 7db37713f376 sysutils/mklivecd/files/mklivecd.sh
--- a/sysutils/mklivecd/files/mklivecd.sh Wed Apr 11 09:09:17 2007 +0000
+++ b/sysutils/mklivecd/files/mklivecd.sh Wed Apr 11 11:51:35 2007 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: mklivecd.sh,v 1.35 2007/04/10 20:52:01 xtraeme Exp $
+# $NetBSD: mklivecd.sh,v 1.36 2007/04/11 11:51:35 xtraeme Exp $
#
# Copyright (c) 2004-2007 Juan Romero Pardines.
# All rights reserved.
@@ -103,12 +103,12 @@
showmsg()
{
- echo "===> $@"
+ echo "MKLIVECD> $@"
}
showmsg_n()
{
- echo -n "===> $@"
+ echo -n "MKLIVECD> $@"
}
showmsgstring()
@@ -247,13 +247,13 @@
echo "$var=\"$val\"" >> $config_file
done
echo >> $config_file
- ( \
- echo "# MULTIPLE_KERNELS example:"; \
- echo "#"; \
- echo "# MULTIPLE_KERNELS=\"ACPI APM\""; \
- echo "# KERNEL_CONFIG_ACPI=\"KERN_ACPI\""; \
+ ( \
+ echo "# MULTIPLE_KERNELS example:"; \
+ echo "#"; \
+ echo "# MULTIPLE_KERNELS=\"ACPI APM\""; \
+ echo "# KERNEL_CONFIG_ACPI=\"KERN_ACPI\""; \
echo "# KERNEL_NAME_ACPI=\"LIVECD_ACPI\""; \
- echo "# KERNEL_CONFIG_APM=\"KERN_APM\""; \
+ echo "# KERNEL_CONFIG_APM=\"KERN_APM\""; \
echo "# KERNEL_NAME_APM=\"LIVECD_APM\""; \
) >> $config_file
echo >> $config_file
@@ -276,12 +276,12 @@
done
echo >> $config_file
- echo "=> Configuration file created, now please edit it."
- echo "=> Path: $config_file"
+ showmsg "Configuration file created, now please edit it."
+ showmsg "Path: $config_file"
elif [ -f $config_file -a $target != "config" ]; then
[ -n "$verbose_mode" ] && showmsg "Using $config_file"
else
- showmsg "$config_file already exists!"
+ showmsg "$config_file already exists, exiting."
bye 1
fi
}
@@ -309,29 +309,33 @@
[ -n "$verbose_mode" ] && \
showmsg "Copying $f into $ISODIR/$GRUB_BOOTDIR"
else
- echo "=> File $f not found!"
+ echo "=> file $f not found."
fi
else
echo "=> Not copying $f, already exists."
fi
done
- else
+ elif is_disabled USE_GNU_GRUB; then
#
# NetBSD cd9660 bootloader (bootxx_cd9660)
#
if [ -f ${CDBOOT_DIR}/${CDBOOT_IMG} ]; then
cp -f ${CDBOOT_DIR}/${CDBOOT_IMG} $ISODIR
else
- echo "=> Missing cdboot... exiting."
+ showmsg "Missing ${CDBOOT_IMG}... exiting."
bye 1
fi
if [ -f ${CDBOOT_DIR}/${BOOT_IMG} ]; then
cp -f ${CDBOOT_DIR}/${BOOT_IMG} $ISODIR
else
- echo "=> Missing boot... exiting."
+ showmsg "Missing ${BOOT_IMG}... exiting."
fi
+ else
+ showmsg "Unknown value in USE_GNU_GRUB, use 'yes' or 'no'."
+ bye 1
fi
+
}
do_menu_lst()
@@ -381,7 +385,7 @@
fi
if [ ! -d $WORKDIR/$kernname -a ! -f $bootkern ]; then
- showmsg "Missing files... exiting."
+ showmsg "couldn't find $bootkern, exiting."
bye 1
fi
@@ -389,11 +393,13 @@
cd $kernname
make depend && make
if [ "$?" -eq 0 ]; then
+
if is_enabled USE_GNU_GRUB; then
cp $WORKDIR/$kernname/netbsd $ISODIR/$GRUB_BOOTDIR/$bootkern
else
- cp $WORKDIR/$kernname/netbsd $ISODIR/$bootkern
+ cp $WORKDIR/$kernname/netbsd $ISODIR/k.$bootkern
fi
+
[ -n "$verbose_mode" ] && \
showmsg_n "Compressing kernel $bootkern..."
@@ -422,12 +428,16 @@
_EOF_
fi
showmsgstring
- else
+ elif is_disabled_USE_GNU_GRUB; then
gzip $ISODIR/$bootkern
+ mv $ISODIR/k.$kernname.gz $ISODIR/k.$bootkern
showmsgstring
+ else
+ showmsg "Unknown value in USE_GNU_GRUB, use 'yes' or 'no'."
+ bye 1
fi
else
- echo "=> kernel compilation failed! ($kernname)"
+ showmsg "kernel compilation failed! ($kernname), exiting."
bye 1
fi
done
@@ -447,7 +457,7 @@
case "$1" in
kernel)
if [ ! -d $SOURCEDIR/sys ]; then
- echo "=> CANNOT FIND THE NETBSD SOURCES, EXITING!"
+ showmsg "couldn't find $SOURCEDIR/sys, exiting."
bye 1
fi
@@ -457,81 +467,75 @@
KERNEL_NAME=MKLIVECD_$kernel_arg
fi
+ if [ -z "$USE_GNU_GRUB" ]; then
+ echo "*** USE_GNU_GRUB not set ***"
+ echo
+ echo "Please set it to 'YES' or 'NO'. On amd64 you should set it"
+ echo "to 'NO' because GRUB is not supported on this platform."
+ echo "See mklivecd(8) for more details."
+ bye 1
+ fi
+
if is_disabled MULTIPLE_KERNELS; then
showmsg "Building kernel on $(date):"
if [ -n "$verbose_mode" ]; then
- echo
- showmsg "Using kernel: $KERNEL_CONFIG"
- showmsg "Kernel name: $KERNEL_NAME"
+ showmsg "kernel configuration: $KERNEL_CONFIG"
+ showmsg "kernel name: $KERNEL_NAME"
sleep 2
- fi
- echo
- #
- # Use the specified kernel from ~/.mklivecd.
- #
- if [ -s $config_dir/$KERNEL_CONFIG ]; then
- cp $config_dir/$KERNEL_CONFIG $WORKDIR
+ fi
+ echo
+ #
+ # Use the specified kernel from ~/.mklivecd.
+ #
+ if [ -s $config_dir/$KERNEL_CONFIG ]; then
+ cp $config_dir/$KERNEL_CONFIG $WORKDIR
+ else
+ showmsg "couldn't find '$KERNEL_CONFIG' in $config_dir, exiting."
+ bye 1
+ fi
+
+ cd $WORKDIR
+ [ ! -d $WORKDIR/$KERNEL_NAME ] && mkdir $WORKDIR/$KERNEL_NAME
+ config -s $SOURCEDIR/sys -b $WORKDIR/$KERNEL_NAME $KERNEL_CONFIG
+ cd $KERNEL_NAME
+ make depend && make
+ if [ "$?" -eq 0 ]; then
+ copy_bootfiles
+ showmsg_n "Compressing kernel $KERNEL_CONFIG..."
+
+ if is_enabled USE_GNU_GRUB; then
+ cp $WORKDIR/$KERNEL_NAME/netbsd \
+ $ISODIR/$GRUB_BOOTDIR/$KERNEL_CONFIG
+ gzip -9 $ISODIR/$GRUB_BOOTDIR/$KERNEL_CONFIG
+ showmsgstring
else
- echo "=> CANNOT FIND '$KERNEL_CONFIG' in $config_dir, EXITING!"
- bye 1
+ cp $WORKDIR/$KERNEL_NAME/netbsd $ISODIR
+ gzip -9 $ISODIR/netbsd
+ mv $ISODIR/netbsd.gz $ISODIR/netbsd
+ showmsgstring
fi
- cd $WORKDIR
- [ ! -d $WORKDIR/$KERNEL_NAME ] && \
- mkdir $WORKDIR/$KERNEL_NAME
- config -s $SOURCEDIR/sys -b $WORKDIR/$KERNEL_NAME \
- $KERNEL_CONFIG
- cd $KERNEL_NAME
- make depend && make
- if [ "$?" -eq 0 ]; then
- copy_bootfiles
- showmsg_n "Compressing kernel $KERNEL_CONFIG..."
- if is_enabled USE_GNU_GRUB; then
- cp $WORKDIR/$KERNEL_NAME/netbsd \
- $ISODIR/$GRUB_BOOTDIR/$KERNEL_CONFIG
- gzip -9 $ISODIR/$GRUB_BOOTDIR/$KERNEL_CONFIG
- showmsgstring
- else
- if [ -f $ISODIR/netbsd ]; then
- #
- # ISO9660 specifies that ISO Level 1 cannot handle
- # filenames with > 8 characters... actually the
- # cd9660.c standalone file-system for the bootloader
- # does not support ISO Level 2/3.
- #
- # Note too that '-' is not an allowed character, so
- # is better to use a dot '.' .
- #
- # I'll change this when cd9660.c is fixed.
- #
- cp $WORKDIR/$KERNEL_NAME/netbsd \
- $ISODIR/k.$KERNEL_CONFIG
- gzip -9 $ISODIR/k.$KERNEL_CONFIG
- mv $ISODIR/k.$KERNEL_CONFIG.gz \
- $ISODIR/k.$KERNEL_CONFIG
- else
- cp $WORKDIR/$KERNEL_NAME/netbsd $ISODIR
- gzip -9 $ISODIR/netbsd
- mv $ISODIR/netbsd.gz $ISODIR/netbsd
- fi
- showmsgstring
- fi
- if [ "$?" -eq 0 ]; then
- is_enabled USE_GNU_GRUB && do_menu_lst
- [ -n "$verbose_mode" ] && \
- echo "=> NEXT STEP: ${progname} base"
- else
- echo "=> COULDN'T INSTALL THE KERNEL(S)"
- fi
- else
- echo
- showmsg "Target kernel failed."
- bye 1
+ if [ "$?" -eq 0 ]; then
+ is_enabled USE_GNU_GRUB && do_menu_lst
+ [ -n "$verbose_mode" ] && \
+ showmsg "next step: ${progname} base."
+ else
+ showmsg "couldn't install the kernel(s)."
fi
else
- copy_bootfiles
- do_build_kernels
+ echo
+ showmsg "target kernel failed."
+ bye 1
fi
+ elif [ -z "$MULTIPLE_KERNELS" ]; then
+ echo "*** MULTIPLE_KERNELS not defined ***"
+ echo
+ echo "Define it to 'NO' in the configuration file if you don't"
+ echo "want to use it. See mklivecd(8) for more details."
+ else
+ copy_bootfiles
Home |
Main Index |
Thread Index |
Old Index