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 the long awaited 0.14 vers...
details: https://anonhg.NetBSD.org/pkgsrc/rev/fb22cd7a7942
branches: trunk
changeset: 519724:fb22cd7a7942
user: xtraeme <xtraeme%pkgsrc.org@localhost>
date: Sun Oct 08 19:08:38 2006 +0000
description:
Update to the long awaited 0.14 version with the following changes:
* Support for tmpfs, enabled via MNT_RAMFS_{ARGS,CMD}.
To use tmpfs and all the available RAM in the machine, use the
following lines in your configuration file:
MNT_RAMFS_CMD="mount_tmpfs"
MNT_RAMFS_ARGS="tmpfs"
By default it will default to MNT_RAMFS_CMD="mount_mfs" and
MNT_RAMFS_ARGS="-s 128m swap" to maintain compatibility with NetBSD
versions < 4.0.
* Support to mount a specific PACKAGES directory via PACKAGESDIR
in the configuration file.
* Added CDRECORD_BIN and MKISOFS_BIN to specify alternative binaries.
* Remove MNT_FOO_ARGS, mount_null(8) is used on the root memory filesystem
to mount all dependent directories.
* Fix booting with GNU GRUB and MULTIBOOT on >=4.0.
Please upgrade to this version and let me know if you are not
happy...
diffstat:
sysutils/mklivecd/Makefile | 5 +-
sysutils/mklivecd/files/livecd | 38 ++++----
sysutils/mklivecd/files/mklivecd.8 | 57 ++++++++++++--
sysutils/mklivecd/files/mklivecd.sh | 141 +++++++++++++++++++++++++----------
4 files changed, 166 insertions(+), 75 deletions(-)
diffs (truncated from 487 to 300 lines):
diff -r 82d9410d71c3 -r fb22cd7a7942 sysutils/mklivecd/Makefile
--- a/sysutils/mklivecd/Makefile Sun Oct 08 18:40:23 2006 +0000
+++ b/sysutils/mklivecd/Makefile Sun Oct 08 19:08:38 2006 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.28 2006/02/05 23:10:55 joerg Exp $
+# $NetBSD: Makefile,v 1.29 2006/10/08 19:08:38 xtraeme Exp $
-DISTNAME= mklivecd-0.13.3
-PKGREVISION= 1
+DISTNAME= mklivecd-0.14
CATEGORIES= sysutils
MASTER_SITES= # empty
DISTFILES= # empty
diff -r 82d9410d71c3 -r fb22cd7a7942 sysutils/mklivecd/files/livecd
--- a/sysutils/mklivecd/files/livecd Sun Oct 08 18:40:23 2006 +0000
+++ b/sysutils/mklivecd/files/livecd Sun Oct 08 19:08:38 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: livecd,v 1.2 2005/08/13 23:35:45 xtraeme Exp $
+# $NetBSD: livecd,v 1.3 2006/10/08 19:08:38 xtraeme Exp $
#
# Mount mfs directories and unpack the required files
# before anything.
@@ -21,27 +21,27 @@
/rescue/mount -r /dev/vnd0a /usr
fi
- echo -n "=> Mounting Memory based filesystems: "
-
- mount_mfs @MNT_DEV_ARGS@ swap /dev
- echo -n "/dev, "
+ echo -n "=> Mounting memory filesystem directories: "
- mount_mfs @MNT_ETC_ARGS@ swap /etc
- echo -n "/etc, "
-
- mount_mfs @MNT_ROOT_ARGS@ swap /root
- echo -n "/root, "
+ /rescue/@MNT_RAMFS_CMD@ @MNT_RAMFS_ARGS@ /ramfs
- mount_mfs @MNT_TMP_ARGS@ swap /tmp
- echo -n "/tmp, "
+ for f in dev etc root tmp var
+ do
+ /rescue/mkdir /ramfs/$f
+ /rescue/mount_null /ramfs/$f /$f
+ if [ "$f" = "var" ]; then
+ echo "/$f"
+ else
+ echo -n "/$f, "
+ fi
+ done
- mount_mfs @MNT_VAR_ARGS@ swap /var
- echo "/var."
-
- @HOME@
- @HOMETAR@
- @USRPKGETC@
- @USRPKGETCTAR@
+ @HOME_MKDIR@
+ @HOME_MOUNT@
+ @HOME_UNPACK@
+ @USRPKGETC_MKDIR@
+ @USRPKGETC_MOUNT@
+ @USRPKGETC_UNPACK@
for f in mfs_dev mfs_etc mfs_var mfs_root
do
diff -r 82d9410d71c3 -r fb22cd7a7942 sysutils/mklivecd/files/mklivecd.8
--- a/sysutils/mklivecd/files/mklivecd.8 Sun Oct 08 18:40:23 2006 +0000
+++ b/sysutils/mklivecd/files/mklivecd.8 Sun Oct 08 19:08:38 2006 +0000
@@ -1,8 +1,8 @@
-.\" $NetBSD: mklivecd.8,v 1.12 2005/08/11 20:48:55 xtraeme Exp $
+.\" $NetBSD: mklivecd.8,v 1.13 2006/10/08 19:08:38 xtraeme Exp $
.\"
.\" mklivecd - Make your own NetBSD/i386 Live CD-ROM/DVD-ROM
.\"
-.\" Copyright (c) 2004, 2005 Juan Romero Pardines <xtraeme%NetBSD.org@localhost>
+.\" Copyright (c) 2004-2006 Juan Romero Pardines <xtraeme%NetBSD.org@localhost>
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
@@ -28,7 +28,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd August 11, 2005
+.Dd October 8, 2006
.Dt MKLIVECD 8
.Os
.Sh NAME
@@ -127,7 +127,7 @@
.It PKGSRCDIR
The
.Nx
-packages collection directory.
+pkgsrc collection directory.
When the
.Ar chroot
target is invoked, the pkgsrc directory will be mounted via
@@ -145,6 +145,16 @@
.Xr mount_null 8 .
Defaults to
.Pa /usr/pkgsrc/distfiles .
+.It PACKAGESDIR
+The
+.Nx
+packages pkgsrc directory.
+When the
+.Ar chroot
+target is invoked, the packages directory will be mounted via
+.Xr mount_null 8 .
+Defaults to
+.Pa /usr/pkgsrc/packages .
.It SHAREDIR
The main directory used to store the Makefiles, kernel, example configuration
files, etc.
@@ -210,6 +220,12 @@
Live CD ISO image.
Defaults to
.Sy -v .
+.It CDRECORD_BIN
+Name of the cdrecord binary used by
+.Nm
+to burn the image.
+Defaults to
+.Sy @PREFIX@/bin/cdrecord .
.It CDROM_DEVICE
Used in the target
.Ar burn
@@ -244,6 +260,12 @@
ISO image.
Defaults to
.Sy -nobak -J -R -v .
+.It MKISOFS_BIN
+Name of the mkisofs binary used by
+.Nm
+to build the image.
+Defaults to
+.Sy @PREFIX@/bin/mkisofs .
.It PERSONAL_CONFIG
If set to
.Sy yes ,
@@ -289,7 +311,7 @@
.Nx
>=4.0. Defaults to
.Sy no .
-.It MNT_{MOUNT_POINT}_ARGS
+.It MNT_RAMFS_ARGS
This specifies the arguments passed to the
.Xr mount 8
command used in the
@@ -297,10 +319,24 @@
script, when the
.Nx
Live CD is booted.
-You shouldn't add
-.Sy swap
-at the end, because it will be added automatically by
-the script.
+By default it will contain
+.Sy -s 128m swap
+to be used by
+.Xr mount_mfs 8 .
+If you want to use
+.Xr mount_tmpfs 8
+change it just to
+.Sy tmpfs .
+.It MNT_RAMFS_CMD
+This specifies the
+.Xr mount 8
+command used by
+.Nm
+in the boot configuration stage. Defaults to
+.Pa mount_mfs .
+Can be changed to
+.Pa mount_tmpfs
+too.
.El
.Sh TARGETS
A target specifies what
@@ -467,7 +503,8 @@
.Sh SEE ALSO
.Xr packages 7 ,
.Xr mount_mfs 8 ,
-.Xr mount_null 8
+.Xr mount_null 8,
+.Xr mount_tmpfs 8
.Sh AUTHORS
The
.Nm
diff -r 82d9410d71c3 -r fb22cd7a7942 sysutils/mklivecd/files/mklivecd.sh
--- a/sysutils/mklivecd/files/mklivecd.sh Sun Oct 08 18:40:23 2006 +0000
+++ b/sysutils/mklivecd/files/mklivecd.sh Sun Oct 08 19:08:38 2006 +0000
@@ -1,8 +1,8 @@
#!/bin/sh
#
-# $NetBSD: mklivecd.sh,v 1.24 2005/10/08 23:20:10 xtraeme Exp $
+# $NetBSD: mklivecd.sh,v 1.25 2006/10/08 19:08:38 xtraeme Exp $
#
-# Copyright (c) 2004, 2005 The NetBSD Foundation, Inc.
+# Copyright (c) 2004-2006 Juan Romero Pardines.
# All rights reserved.
#
# This code is derived from software contributed to The NetBSD Foundation
@@ -46,8 +46,7 @@
: ${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}
+: ${packages_mntstat:=$config_dir/packages_mount.stat}
#
# NetBSD >= 4.0 has cdboot, no need to use grub here.
#
@@ -122,23 +121,22 @@
do_conf()
{
- BASE_VARS="SOURCEDIR PKGSRCDIR PKGSRCDISTDIR SHAREDIR BASEDIR WORKDIR \
- ISODIR BASE_SETS_DIR X11_SETS_DIR BASE_SETS X11_SETS \
+ BASE_VARS="SOURCEDIR PACKAGESDIR PKGSRCDIR PKGSRCDISTDIR SHAREDIR BASEDIR \
+ WORKDIR ISODIR BASE_SETS_DIR X11_SETS_DIR BASE_SETS X11_SETS \
CHROOT_SHELL"
KERNEL_VARS="MULTIPLE_KERNELS BOOTKERN KERNEL_NAME"
- MISC_VARS="ENABLE_X11 MKISOFS_ARGS CDRECORD_ARGS BLANK_BEFORE_BURN \
- CDROM_DEVICE PERSONAL_CONFIG IMAGE_NAME PKG_SYSCONFDIR \
- REMOVE_DIRS USE_GNU_GRUB GRUB_FILES_DIR HOSTNAME \
+ MISC_VARS="ENABLE_X11 MKISOFS_BIN MKISOFS_ARGS CDRECORD_BIN CDRECORD_ARGS \
+ BLANK_BEFORE_BURN CDROM_DEVICE PERSONAL_CONFIG IMAGE_NAME \
+ PKG_SYSCONFDIR REMOVE_DIRS USE_GNU_GRUB GRUB_FILES_DIR HOSTNAME \
VND_COMPRESSION"
- MNT_VARS="MNT_ETC_ARGS MNT_VAR_ARGS MNT_ROOT_ARGS \
- MNT_TMP_ARGS MNT_HOME_ARGS MNT_PKG_SYSCONFDIR_ARGS \
- MNT_DEV_ARGS"
+ MNT_VARS="MNT_RAMFS_CMD MNT_RAMFS_ARGS"
# Base directories/sets
: ${SOURCEDIR:=/usr/src}
+ : ${PACKAGESDIR:=/usr/pkgsrc/packages}
: ${PKGSRCDIR:=/usr/pkgsrc}
: ${PKGSRCDISTDIR:=/usr/pkgsrc/distfiles}
: ${SHAREDIR:=@PREFIX@/share/mklivecd}
@@ -159,7 +157,9 @@
# Miscellaneous options
: ${ENABLE_X11:=no}
+ : ${MKISOFS_BIN:=@PREFIX@/bin/mkisofs}
: ${MKISOFS_ARGS:=-J -R -nobak -v}
+ : ${CDRECORD_BIN:=@PREFIX@/bin/cdrecord}
: ${CDRECORD_ARGS:=-v}
: ${BLANK_BEFORE_BURN:=no}
: ${CDROM_DEVICE:=15,1,0}
@@ -173,15 +173,8 @@
#
# Mount arguments
#
- # Best value for /dev, there are >512 inodes free and some Kbytes free too.
- # I don't recommend changing this!
- : ${MNT_DEV_ARGS:=-o noatime -s 512k -i 64}
- : ${MNT_ETC_ARGS:=-o noatime -s 2m}
- : ${MNT_VAR_ARGS:=-o noatime -s 10m}
- : ${MNT_ROOT_ARGS:=-o noatime -s 5m}
- : ${MNT_TMP_ARGS:=-o noatime -s 10m}
- : ${MNT_HOME_ARGS:=-o noatime -s 50m}
- : ${MNT_PKG_SYSCONFDIR_ARGS:=-o noatime -s 1m}
+ : ${MNT_RAMFS_CMD:=mount_mfs}
+ : ${MNT_RAMFS_ARGS:=-s 128m swap}
[ ! -d $config_dir ] && mkdir $config_dir
@@ -347,8 +340,7 @@
config -s $SOURCEDIR/sys -b $WORKDIR/$kernname $bootkern
cd $kernname
- make depend
- make COPTS="-Os" # Don't use additional flags
+ make depend && make
if [ "$?" -eq 0 ]; then
if [ "$USE_GNU_GRUB" = "yes" ]; then
cp $WORKDIR/$kernname/netbsd $ISODIR/$GRUB_BOOTDIR/$bootkern
@@ -545,12 +537,12 @@
( \
echo "livecd=yes"; \
- echo "dhclient=yes dhclient_flags=-q"; \
+ echo "dhclient=no"; \
echo "wscons=yes"; \
echo "hostname=$HOSTNAME"; \
echo "nfs_client=yes"; \
echo "inetd=no"; \
- echo "ntpdate=yes"; \
+ echo "ntpdate=no"; \
echo "savecore=no"; \
) >> $ISODIR/etc/rc.conf
@@ -561,7 +553,7 @@
Home |
Main Index |
Thread Index |
Old Index