nrelease - Adjust source inclusion, cleanups
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 15 Apr 2011 15:16:46 +0000 (08:16 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 15 Apr 2011 15:16:46 +0000 (08:16 -0700)
* 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
nrelease/gui/etc/fstab
nrelease/gui/etc/rc.conf
nrelease/root/etc/fstab

index 93fe0c7..7ac5c07 100644 (file)
@@ -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
index aed0535..cecbd00 100644 (file)
@@ -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
index ba9fc61..00c8731 100644 (file)
@@ -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"
index 808be6d..fb638d6 100644 (file)
@@ -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