From 3342e40a3b485e6e9440520e777f9f4c4f9f8069 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Fri, 15 Apr 2011 08:16:46 -0700 Subject: [PATCH] nrelease - Adjust source inclusion, cleanups * When including sources only include the git repo, do not also include the broken-out source. * Add more slop to the size calculation for the usb image * tmpfs entries in /etc/fstab should specify 'dummy' as the device, not 'tmpfs'. * Add /usr/obj as a tmpfs mount. * misc cleanups. --- nrelease/Makefile | 15 +++++++++++---- nrelease/gui/etc/fstab | 18 +++++++++--------- nrelease/gui/etc/rc.conf | 11 ++++++----- nrelease/root/etc/fstab | 11 ++++++----- 4 files changed, 32 insertions(+), 23 deletions(-) diff --git a/nrelease/Makefile b/nrelease/Makefile index 93fe0c75b0..7ac5c075e3 100644 --- a/nrelease/Makefile +++ b/nrelease/Makefile @@ -271,8 +271,10 @@ buildiso: srcs: .if !defined(WITHOUT_SRCS) .if make(gui) - cd ${ISOROOT}/usr && make pkgsrc-create GITHOST=${GITHOST} - cd ${ISOROOT}/usr && make src-create GITHOST=${GITHOST} + rm -f ${ISOROOT}/usr/src-sys.tgz + rm -f ${ISOROOT}/usr/src-sys.tar.bz2 + cd ${ISOROOT}/usr && make pkgsrc-create-repo GITHOST=${GITHOST} + cd ${ISOROOT}/usr && make src-create-repo GITHOST=${GITHOST} .else rm -f ${ISOROOT}/usr/src-sys.tgz rm -f ${ISOROOT}/usr/src-sys.tar.bz2 @@ -408,9 +410,10 @@ mkimg: rm -f ${IMGFILE} sz=`bc -e "((${IMGSIZE}) * 512)" -equit`; truncate -s $${sz} ${IMGFILE} .else - @echo "STEP: determine required image size in 1GB steps" + @echo "STEP: Determine required image size in 1GB steps" + @echo " Leave ~600MB of unused space" sz=`du -ck ${ISOROOT} | tail -n 1 | cut -f 1`; \ - sz=`bc -e "(($${sz}) * 1.15 + 999999) / 1000000" -equit | \ + sz=`bc -e "(($${sz}) * 1.15 + 999999 + 600000) / 1000000" -equit | \ cut -f1 -d.`; \ sz=`bc -e "(($${sz}) * 953)" -equit | cut -f1 -d.`; \ rm -f ${IMGFILE}; \ @@ -439,6 +442,10 @@ mkimg: cpdup ${ISOROOT} ${IMGMNT} @echo "STEP: fixup ${IMGMNT}/etc/fstab" echo "/dev/${IMGUSBDEV}s1a / ufs rw,noatime 0 1" > ${IMGMNT}/etc/fstab + echo "dummy /tmp tmpfs rw 0 0" >> ${IMGMNT}/etc/fstab + echo "dummy /var/tmp tmpfs rw 0 0" >> ${IMGMNT}/etc/fstab + echo "dummy /var/run tmpfs rw 0 0" >> ${IMGMNT}/etc/fstab + echo "dummy /usr/obj tmpfs rw 0 0" >> ${IMGMNT}/etc/fstab echo "proc /proc procfs rw 0 0" >> ${IMGMNT}/etc/fstab @echo "STEP: fixup ${IMGMNT}/boot/loader.conf" -fgrep -v kernel_options ${IMGMNT}/boot/loader.conf > ${IMGMNT}/boot/loader.conf.new diff --git a/nrelease/gui/etc/fstab b/nrelease/gui/etc/fstab index aed0535150..cecbd00790 100644 --- a/nrelease/gui/etc/fstab +++ b/nrelease/gui/etc/fstab @@ -1,10 +1,10 @@ # -# Device Mountpoint FStype Options Dump Pass# -/dev/cd0 / cd9660 ro,noauto 0 0 -tmpfs /root tmpfs rw,-C,-s=16M 0 0 -tmpfs /var tmpfs rw,-C,-s=128M 0 0 -tmpfs /tmp tmpfs rw,-C,-s=8M 0 0 -tmpfs /etc tmpfs rw,-C,-s=12M 0 0 -tmpfs /usr/pkg/etc tmpfs rw,-C,-s=4M 0 0 -tmpfs /usr/pkg/share/X11/xkb/compiled tmpfs rw,-C,-s=4M 0 0 -proc /proc procfs rw 0 0 +# Device Mountpoint FStype Options Dump Pass# +/dev/cd0 / cd9660 ro,noauto 0 0 +dummy /root tmpfs rw,-C 0 0 +dummy /var tmpfs rw,-C 0 0 +dummy /tmp tmpfs rw,-C 0 0 +dummy /etc tmpfs rw,-C 0 0 +dummy /usr/pkg/etc tmpfs rw,-C 0 0 +dummy /usr/pkg/share/X11/xkb/compiled tmpfs rw,-C 0 0 +proc /proc procfs rw 0 0 diff --git a/nrelease/gui/etc/rc.conf b/nrelease/gui/etc/rc.conf index ba9fc61b07..00c8731933 100644 --- a/nrelease/gui/etc/rc.conf +++ b/nrelease/gui/etc/rc.conf @@ -1,16 +1,17 @@ -# $DragonFly: src/nrelease/gui/etc/rc.conf,v 1.2 2008/09/01 21:20:30 swildner Exp $ -# rc.conf for CDRom boot. +# rc.conf for live usb stick boot # -# NOTE! This rc.conf is designed for a CD boot. When starting fresh on -# your HD you can simply remove most or all of the lines below and then -# add features as appropriate. +# NOTE! This rc.conf is designed for a live usb stick boot. When starting +# fresh on your HD you can simply remove most or all of the lines +# below and then add features as appropriate. # hostname="dfly-live" +kern_securelevel_enable="NO" nfs_reserved_port_only="YES" sshd_enable="YES" usbd_enable="YES" syslogd_enable="NO" nfs_client_enable="YES" +nfs_server_enable="NO" rpc_umntall_enable="NO" cron_enable="NO" moused_enable="YES" diff --git a/nrelease/root/etc/fstab b/nrelease/root/etc/fstab index 808be6d297..fb638d6580 100644 --- a/nrelease/root/etc/fstab +++ b/nrelease/root/etc/fstab @@ -1,9 +1,10 @@ # # Device Mountpoint FStype Options Dump Pass# /dev/cd0 / cd9660 ro,noauto 0 0 -tmpfs /root tmpfs rw,-C,-s=4M 0 0 -tmpfs /var tmpfs rw,-C,-s=6M 0 0 -tmpfs /tmp tmpfs rw,-C,-s=4M 0 0 -tmpfs /etc tmpfs rw,-C,-s=12M 0 0 -tmpfs /usr/pkg/etc tmpfs rw,-C,-s=4M 0 0 +dummy /root tmpfs rw,-C 0 0 +dummy /var tmpfs rw,-C 0 0 +dummy /tmp tmpfs rw,-C 0 0 +dummy /etc tmpfs rw,-C 0 0 +dummy /usr/pkg/etc tmpfs rw,-C 0 0 +dummy /usr/obj tmpfs rw, 0 0 proc /proc procfs rw 0 0 -- 2.41.0