pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc Update sysutils/mklivecd to 0.8.
details: https://anonhg.NetBSD.org/pkgsrc/rev/29eb7ab60710
branches: trunk
changeset: 482884:29eb7ab60710
user: xtraeme <xtraeme%pkgsrc.org@localhost>
date: Thu Nov 04 16:29:55 2004 +0000
description:
Update sysutils/mklivecd to 0.8.
Changes:
* Added two new options: PKGSRCDISTDIR and CHROOT_SHELL, to specify
distfiles directory and the shell to be used in the `chroot' target.
* Remove MESSAGE file, it's useless right now... because
the `menu.lst' file is created when the `kernel' target has been
invoked, with default values, ready to boot.
* Replace another `j' tar(1) flag with `z'.
diffstat:
doc/CHANGES | 3 +-
sysutils/mklivecd/MESSAGE | 9 -
sysutils/mklivecd/Makefile | 4 +-
sysutils/mklivecd/files/mklivecd.8 | 16 ++-
sysutils/mklivecd/files/mklivecd.sh | 197 +++++++++++++++++++++++------------
5 files changed, 148 insertions(+), 81 deletions(-)
diffs (truncated from 444 to 300 lines):
diff -r 5eb74c787f21 -r 29eb7ab60710 doc/CHANGES
--- a/doc/CHANGES Thu Nov 04 15:47:12 2004 +0000
+++ b/doc/CHANGES Thu Nov 04 16:29:55 2004 +0000
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES,v 1.7697 2004/11/04 15:47:12 salo Exp $
+$NetBSD: CHANGES,v 1.7698 2004/11/04 16:29:55 xtraeme Exp $
Changes to the packages collection and infrastructure in 2004:
@@ -5072,3 +5072,4 @@
Updated zlib to 1.2.2 [adam 2004-11-04]
Added leafpad-0.7.5 [jmmv 2004-11-04]
Updated lftp to 3.0.11 [salo 2004-11-04]
+ Updated mklivecd to 0.8 [xtraeme 2004-11-04]
diff -r 5eb74c787f21 -r 29eb7ab60710 sysutils/mklivecd/MESSAGE
--- a/sysutils/mklivecd/MESSAGE Thu Nov 04 15:47:12 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE,v 1.5 2004/10/29 17:47:30 xtraeme Exp $
-
-Don't forget to create the ``menu.lst'' file in $ISODIR/boot/grub
-to specify what kernels you want to boot.
-
-Good luck!
-
-===========================================================================
diff -r 5eb74c787f21 -r 29eb7ab60710 sysutils/mklivecd/Makefile
--- a/sysutils/mklivecd/Makefile Thu Nov 04 15:47:12 2004 +0000
+++ b/sysutils/mklivecd/Makefile Thu Nov 04 16:29:55 2004 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.12 2004/10/29 20:44:32 xtraeme Exp $
+# $NetBSD: Makefile,v 1.13 2004/11/04 16:29:55 xtraeme Exp $
-DISTNAME= mklivecd-0.7
+DISTNAME= mklivecd-0.8
CATEGORIES= sysutils
MASTER_SITES= # empty
DISTFILES= # empty
diff -r 5eb74c787f21 -r 29eb7ab60710 sysutils/mklivecd/files/mklivecd.8
--- a/sysutils/mklivecd/files/mklivecd.8 Thu Nov 04 15:47:12 2004 +0000
+++ b/sysutils/mklivecd/files/mklivecd.8 Thu Nov 04 16:29:55 2004 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: mklivecd.8,v 1.7 2004/05/02 02:33:43 xtraeme Exp $
+.\" $NetBSD: mklivecd.8,v 1.8 2004/11/04 16:29:56 xtraeme Exp $
.\"
.\" mklivecd - Build a NetBSD Live CD for i386 machines
.\" Copyright (c) 2004 Juan RP <xtraeme%NetBSD.org@localhost>
@@ -93,6 +93,16 @@
and you could install any package.
Defaults to
.Pa /usr/pkgsrc .
+.It PKGSRCDISTDIR
+The
+.Nx
+distfiles pkgsrc directory.
+When the
+.Ar chroot
+target is invoked, the distfiles directory will be mounted via
+.Xr mount_null 8 .
+Defaults to
+.Pa /usr/pkgsrc/distfiles .
.It SHAREDIR
The main directory used to store the Makefiles, kernel, example configuration
files, etc.
@@ -131,6 +141,10 @@
.Pa $ISODIR .
Sets used by default are:
.Pa xbase.tgz xcomp.tgz xfont.tgz xserver.tgz .
+.It CHROOT_SHELL
+Default shell to use with the chroot target.
+Defaults to
+.Sy /bin/ksh
.It ENABLE_X11
If set to
.Sy yes
diff -r 5eb74c787f21 -r 29eb7ab60710 sysutils/mklivecd/files/mklivecd.sh
--- a/sysutils/mklivecd/files/mklivecd.sh Thu Nov 04 15:47:12 2004 +0000
+++ b/sysutils/mklivecd/files/mklivecd.sh Thu Nov 04 16:29:55 2004 +0000
@@ -1,22 +1,28 @@
#!/bin/sh
#
-# $NetBSD: mklivecd.sh,v 1.15 2004/10/29 17:47:30 xtraeme Exp $
+# $NetBSD: mklivecd.sh,v 1.16 2004/11/04 16:29:56 xtraeme Exp $
#
-# Copyright (c) 2004 Juan RP <xtraeme%NetBSD.org@localhost>
+# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Juan RP <xtraeme%NetBSD.org@localhost>.
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name of author nor the names of its contributors may
-# be used to endorse or promote products derived from this software
-# without specific prior written permission.
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. All advertising materials mentioning features or use of this software
+# must display the following acknowledgement:
+# This product includes software developed by the NetBSD
+# Foundation, Inc. and its contributors.
+# 4. Neither the name of The NetBSD Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@@ -34,20 +40,21 @@
# mklivecd - Build a NetBSD LiveCD! for i386 machines. #
# ====================================================================== #
-progname=$(basename $0)
-config_dir="$HOME/.mklivecd"
-pers_conffile="personal_config"
-tmp_file="/tmp/${progname}.$$"
-mntstat="$config_dir/mount.stat"
-
-MKISOFS="@LOCALBASE@/bin/mkisofs"
-CDRECORD="@LOCALBASE@/bin/cdrecord"
+: ${progname:=$(basename $0)}
+: ${config_dir:=$HOME/.mklivecd}
+: ${pers_conffile:=personal_config}
+: ${tmp_file:=/tmp/${progname}.$$}
+: ${pkgsrc_mntstat:=$config_dir/pkgsrc_mount.stat}
+: ${pkgsrcdist_mntstat:=$config_dir/pkgsrcdist_mount.stat}
+: ${MKISOFS:=@LOCALBASE@/bin/mkisofs}
+: ${CDRECORD:=@LOCALBASE@/bin/cdrecord}
#
-# Don't modify it! they are needed for booting grub
-MKISOFS_FIXED_ARGS="-no-emul-boot -boot-load-size 30 -boot-info-table"
-BOOTDIR="boot/grub"
-BOOTIMAGE="stage2_eltorito"
-GRUB_FILES="stage2_eltorito iso9660_stage1_5"
+# Don't modify the next ones! they are needed for booting grub.
+#
+: ${MKISOFS_FIXED_ARGS:=-no-emul-boot -boot-load-size 30 -boot-info-table}
+: ${BOOTDIR:=boot/grub}
+: ${BOOTIMAGE:=stage2_eltorito}
+: ${GRUB_FILES:=stage2_eltorito iso9660_stage1_5}
trap "echo; showmsg \"Process cancelled!\"; bye 127" INT QUIT
@@ -89,8 +96,9 @@
do_conf()
{
- BASE_VARS="SOURCEDIR PKGSRCDIR SHAREDIR BASEDIR WORKDIR ISODIR \
- BASE_SETS_DIR X11_SETS_DIR BASE_SETS X11_SETS"
+ BASE_VARS="SOURCEDIR PKGSRCDIR PKGSRCDISTDIR SHAREDIR BASEDIR WORKDIR \
+ ISODIR BASE_SETS_DIR X11_SETS_DIR BASE_SETS X11_SETS \
+ CHROOT_SHELL"
MISC_VARS="ENABLE_X11 MKISOFS_ARGS CDRECORD_ARGS BLANK_BEFORE_BURN \
CDROM_DEVICE PERSONAL_CONFIG BOOTKERN KERNEL_NAME \
@@ -103,6 +111,7 @@
# Base directories/sets
: ${SOURCEDIR:=/usr/src}
: ${PKGSRCDIR:=/usr/pkgsrc}
+ : ${PKGSRCDISTDIR:=/usr/pkgsrc/distfiles}
: ${SHAREDIR:=@PREFIX@/share/mklivecd}
: ${BASEDIR:=$HOME/livecd}
: ${WORKDIR:=${BASEDIR}/work}
@@ -111,6 +120,7 @@
: ${X11_SETS_DIR:=${BASE_SETS_DIR}}
: ${BASE_SETS:=etc.tgz base.tgz comp.tgz text.tgz}
: ${X11_SETS:=xbase.tgz xcomp.tgz xfont.tgz xserver.tgz}
+ : ${CHROOT_SHELL:=/bin/ksh}
# Miscellaneous options
: ${ENABLE_X11:=no}
@@ -153,7 +163,7 @@
EOF
echo "# Base directories/options" >> $config_file
- for var in `echo $BASE_VARS | tr ' ' '\n'`
+ for var in $(echo $BASE_VARS | tr ' ' '\n')
do
eval val=\""\$$var"\"
echo "$var=\"$val\"" >> $config_file
@@ -161,7 +171,7 @@
echo >> $config_file
echo "# Miscellaneous options" >> $config_file
- for var in `echo $MISC_VARS | tr ' ' '\n'`
+ for var in $(echo $MISC_VARS | tr ' ' '\n')
do
eval val=\""\$$var"\"
echo "$var=\"$val\"" >> $config_file
@@ -169,7 +179,7 @@
echo >> $config_file
echo "# Mount arguments" >> $config_file
- for var in `echo $MNT_VARS | tr ' ' '\n'`
+ for var in $(echo $MNT_VARS | tr ' ' '\n')
do
eval val=\""\$$var"\"
echo "$var=\"$val\"" >> $config_file
@@ -250,19 +260,37 @@
cp @PREFIX@/share/grub/@MACHINE_ARCH@-/$f \
$ISODIR/$BOOTDIR
[ "$verbose_mode" = "on" ] && \
- showmsg "Copying $f into $ISODIR/boot/grub."
+ showmsg "Copying $f into $ISODIR/$BOOTDIR."
else
showmsg "Not copying $f, already exists."
fi
done
- cp $WORKDIR/$KERNEL_NAME/netbsd $ISODIR/$BOOTDIR
+ cp $WORKDIR/$KERNEL_NAME/netbsd $ISODIR/$BOOTDIR/$BOOTKERN
+ [ "$verbose_mode" = "on" ] && \
+ showmsg "Compressing kernel $BOOTKERN..."
+
+ gzip $ISODIR/$BOOTDIR/$BOOTKERN
+
+ [ "$verbose_mode" = "on" ] && \
+ showmsg "Creating $ISODIR/$BOOTDIR/menu.lst..."
+
+ if [ ! -f $ISODIR/$BOOTDIR/menu.lst ]; then
+ cat > $ISODIR/$BOOTDIR/menu.lst << _EOF_
+# Default GRUB menu file created by ${progname}.
+# Date: $(date).
+
+default 0
+timeout 10
+
+title NetBSD/$BOOTKERN kernel
+kernel --type=netbsd /$BOOTDIR/$BOOTKERN.gz
+
+_EOF_
+ fi
+
if [ $? -eq 0 ]; then
- showmsg "boot/kernel installed.."
- if [ "$verbose_mode" = "on" ]; then
- showmsg "Boot/kernel images installed!"
- showmsg "Next step: ${progname} base"
- fi
- echo
+ showmsg "Boot/kernel files installed!"
+ showmsg "Next step: ${progname} base"
make clean >/dev/null 2>&1
rm -rf $KERNEL_NAME
else
@@ -271,13 +299,10 @@
else
echo
showmsg "kernel build failed."
- showmsg "Boot/kernel images were not installed!"
- echo
+ showmsg "Boot/kernel files were not installed!"
fi
;;
base)
- chown -R root:wheel $ISODIR/$BOOTDIR
-
for F in ${BASE_SETS}
do
if [ ! -f $BASE_SETS_DIR/$F ]; then
@@ -349,7 +374,7 @@
cat > $ISODIR/etc/rc.d/root <<_EOF_
#!/bin/sh
#
-# \$NetBSD: mklivecd.sh,v 1.15 2004/10/29 17:47:30 xtraeme Exp $
+# \$NetBSD: mklivecd.sh,v 1.16 2004/11/04 16:29:56 xtraeme Exp $
#
# PROVIDE: root
@@ -382,39 +407,54 @@
fi
;;
chroot)
- ( \
- echo "export PS1=\"$KERNEL_NAME> \""; \
- echo "set -o emacs"; \
+ ( \
+ echo "export PS1=\"$KERNEL_NAME> \""; \
+ echo "set -o emacs"; \
) > $ISODIR/etc/profile
- if [ ! -d $ISODIR/usr/pkgsrc ]; then
- mkdir $ISODIR/usr/pkgsrc
+ if [ ! -d $ISODIR/usr/pkgsrc/distfiles ]; then
+ mkdir -p $ISODIR/usr/pkgsrc/distfiles
fi
if [ ! -f $ISODIR/usr/share/misc/termcap ]; then
- cp /usr/share/misc/termcap* \
+ cp /usr/share/misc/termcap* \
$ISODIR/usr/share/misc
fi
Home |
Main Index |
Thread Index |
Old Index