PERFORCE change 123509 for review
Ivan Voras
ivoras at FreeBSD.org
Sat Jul 14 23:32:46 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=123509
Change 123509 by ivoras at ivoras_finstall on 2007/07/14 23:32:02
- make UZIP image more customizable
- fix file system creation & mounting to optimize for large
images and speed
- bunch of fixes & additions to bundled files to make the
livecd more usable
Images Created by the script in its current state with default
knobs will bring in entire xorg-7.2 system, Xfce 4.2, firefox
and thunderbird.
Affected files ...
.. //depot/projects/soc2007/ivoras_finstall/makeimage/bundles/bundle-spec#3 edit
.. //depot/projects/soc2007/ivoras_finstall/makeimage/bundles/dot.xinitrc#3 edit
.. //depot/projects/soc2007/ivoras_finstall/makeimage/bundles/font.local.conf#2 edit
.. //depot/projects/soc2007/ivoras_finstall/makeimage/bundles/fstab#3 edit
.. //depot/projects/soc2007/ivoras_finstall/makeimage/bundles/hosts#3 edit
.. //depot/projects/soc2007/ivoras_finstall/makeimage/bundles/livecd#4 edit
.. //depot/projects/soc2007/ivoras_finstall/makeimage/bundles/loader.conf#3 edit
.. //depot/projects/soc2007/ivoras_finstall/makeimage/bundles/rc.conf#3 edit
.. //depot/projects/soc2007/ivoras_finstall/makeimage/bundles/xorg.conf#3 edit
.. //depot/projects/soc2007/ivoras_finstall/makeimage/makeimage.py#9 edit
.. //depot/projects/soc2007/ivoras_finstall/makeimage/pkglist#3 edit
Differences ...
==== //depot/projects/soc2007/ivoras_finstall/makeimage/bundles/bundle-spec#3 (text+ko) ====
@@ -4,11 +4,19 @@
# kw : expand keywords in the (text) file
# x : set execute bit to destination file
# a : append to destination file
+/boot/loader.conf=loader.conf;kw
/etc/rc.conf=rc.conf;kw
/etc/X11/xorg.conf=xorg.conf;kw
/etc/rc.d/livecd=livecd;kw;x
-/root/.xinitrc=dot.xinitrc;kw
/etc/hosts=hosts;kw;a
/etc/fstab=fstab;kw
-/boot/loader.conf=loader.conf;kw
+/etc/rc.d/prelogin=prelogin;kw;x
+/etc/prelogin.txt=prelogin.txt
+/etc/ipfw.rules=ipfw.rules
+/root/.xinitrc=dot.xinitrc;kw
+/root/.config/xfce4/mcs_settings/gtk.xml=gtk.xml
+/install/.config/xfce4/mcs_settings/gtk.xml=gtk.xml
+/install/.config/autostart/xfce4-tips-autostart.desktop=xfce4-tips-autostart.desktop
+/install/.xinitrc=dot.xinitrc;kw
+/install/.config/xfce4/mcs_settings/gtk.xml=gtk.xml
/usr/local/etc/fonts/local.conf=font.local.conf;kw
==== //depot/projects/soc2007/ivoras_finstall/makeimage/bundles/dot.xinitrc#3 (text+ko) ====
==== //depot/projects/soc2007/ivoras_finstall/makeimage/bundles/font.local.conf#2 (text+ko) ====
==== //depot/projects/soc2007/ivoras_finstall/makeimage/bundles/fstab#3 (text+ko) ====
@@ -1,4 +1,5 @@
# $dest_file$ generated by finstall makeimage.py on $date$ $time$
/dev/iso9660/$label$ / cd9660 ro 0 0
+dev /dev devfs rw 0 0
#md /tmp mfs rw,-S,-s32m 0 0
#/tmp /etc unionfs rw,copymode=transparent 0 0
==== //depot/projects/soc2007/ivoras_finstall/makeimage/bundles/hosts#3 (text+ko) ====
==== //depot/projects/soc2007/ivoras_finstall/makeimage/bundles/livecd#4 (text+ko) ====
@@ -18,13 +18,13 @@
/bin/date -f %s $t
fi
-/sbin/mount_mfs -s 128m -S -m 3 -f 512 -b 4096 md /tmp
+/sbin/mount_mfs -s 64m -S -m 3 -f 512 -b 4096 md /tmp
/bin/mkdir /tmp/etc /tmp/var /tmp/root /tmp/install
/sbin/mount_unionfs -o copymode=transparent /tmp/etc /etc
/sbin/mount_unionfs -o copymode=transparent /tmp/var /var
/sbin/mount_unionfs -o copymode=transparent /tmp/root /root
/sbin/mount_unionfs -o copymode=transparent /tmp/install /install
-/sbin/mdconfig -a -t vnode -f /usr/usr.img.uzip -u 60
-/sbin/mount -o ro /dev/md60.uzip /usr
+/sbin/mdconfig -a -t vnode -f /usr/.usr.local.img.uzip -u 60
+/sbin/mount -o ro /dev/md60.uzip /usr/local
==== //depot/projects/soc2007/ivoras_finstall/makeimage/bundles/loader.conf#3 (text+ko) ====
@@ -1,4 +1,5 @@
# $dest_file$ generated by finstall makeimage.py on $date$ $time$
-rootdev="iso9660/$label$"
-boot_cdrom="1"
-ipfw_load="YES"
+#rootdev="iso9660/$label$"
+#boot_cdrom="1"
+#ipfw_load="YES"
+geom_uzip_load="YES"
==== //depot/projects/soc2007/ivoras_finstall/makeimage/bundles/rc.conf#3 (text+ko) ====
@@ -6,3 +6,10 @@
usbd_enable="YES"
moused_enable="YES"
sendmail_enable="NONE"
+
+firewall_enable="YES"
+firewall_type="/etc/ipfw.rules"
+
+#hald_enable="YES"
+#polkitd_enable="YES"
+#dbus_enable="YES"
==== //depot/projects/soc2007/ivoras_finstall/makeimage/bundles/xorg.conf#3 (text+ko) ====
@@ -55,7 +55,7 @@
SubSection "Display"
Viewport 0 0
Depth 24
- Modes "800x600"
+ Modes "1024x768"
EndSubSection
EndSection
==== //depot/projects/soc2007/ivoras_finstall/makeimage/makeimage.py#9 (text+ko) ====
@@ -72,6 +72,9 @@
PKGLISTFILE = None
ISO = None
STARTDIR = os.path.realpath(".")
+ZIMAGE = "/usr/.usr.local.img.uzip"
+ZIMAGE_IMGNAME = "usr.local.img"
+ZIMAGE_TREE = "/usr/local"
opts, args = getopt(sys.argv[1:], "d:s:i:p:k:bch")
for o,a in opts:
@@ -132,16 +135,22 @@
os.chdir(WORKDIR)
if DoMakeRoot:
- execute("touch usr.img")
- execute("truncate -s 600m usr.img")
-if not os.path.exists("%s/usr.img" % WORKDIR):
- print "No usr.img"
+ if os.path.exists(ZIMAGE_IMGNAME):
+ execute("rm %s" % ZIMAGE_IMGNAME)
+ execute("touch %s" % ZIMAGE_IMGNAME)
+ execute("truncate -s 700m %s" % ZIMAGE_IMGNAME)
+if not os.path.exists("%s/%s" % (WORKDIR, ZIMAGE_IMGNAME)):
+ print "No %s" % ZIMAGE_IMGNAME
sys.exit(1)
-execute("mdconfig -a -t vnode -f usr.img -u 60")
-execute("newfs -m 2 /dev/md60")
+execute("mdconfig -a -t vnode -f %s -u 60" % ZIMAGE_IMGNAME)
+if DoMakeRoot:
+ execute("newfs /dev/md60")
+
if not os.path.exists("%s/usr" % DESTDIR):
os.mkdir("%s/usr" % DESTDIR)
-execute("mount /dev/md60 %s/usr" % DESTDIR)
+if not os.path.exists("%s/usr/local" % DESTDIR):
+ os.mkdir("%s/usr/local" % DESTDIR)
+execute("mount -o async /dev/md60 %s%s" % (DESTDIR, ZIMAGE_TREE))
os.chdir(STARTDIR)
@@ -156,7 +165,7 @@
execute("make installworld DESTDIR=%s" % DESTDIR)
execute("make installkernel KERNCONF=%s DESTDIR=%s" % (KERNEL, DESTDIR))
execute("make distribution DESTDIR=%s" % DESTDIR)
-# execute("rm %s/boot/kernel/*.symbols" % DESTDIR)
+ execute("rm %s/boot/kernel/*.symbols" % DESTDIR)
os.chdir(DESTDIR)
execute("mtree -c > livecd.mtree")
os.chdir(STARTDIR)
@@ -222,7 +231,8 @@
if os.path.exists("%s/%s" % (BUNDLEDIR, BUNDLEFILE)):
printmsg("Bundling config files")
cflist = []
- f = file("%s/%s" % (BUNDLEDIR, BUNDLEFILE), "r")
+ filename = "%s/%s" % (BUNDLEDIR, BUNDLEFILE)
+ f = file(filename, "r")
for line in f.readlines():
line = line.strip()
if len(line) == 0:
@@ -246,10 +256,13 @@
file_contents = file_contents.replace("$date$", str_date)
file_contents = file_contents.replace("$dest_file$", dest_file)
file_contents = file_contents.replace("$src_file$", src_file)
+ filename = "%s%s" % (DESTDIR, dest_file)
+ if not os.path.exists(os.path.dirname(filename)):
+ os.makedirs(os.path.dirname(filename))
if "a" in flags:
- df = file("%s%s" % (DESTDIR, dest_file), "a")
+ df = file(filename, "a")
else:
- df = file("%s%s" % (DESTDIR, dest_file), "w")
+ df = file(filename, "w")
df.write(file_contents)
df.close()
if "x" in flags:
@@ -278,18 +291,19 @@
f.close()
execute("chroot %s /bin/sh /tmp/userinst.sh" % DESTDIR)
os.unlink("%s/tmp/userinst.sh" % DESTDIR)
-skel_cshrc = file("%s/usr/share/skel/dot.cshrc" % DESTDIR, "r").read()
-f = file("%s/install/.cshrc" % DESTDIR, "w")
-f.write(skel_cshrc)
+
+skel_data = file("%s/usr/share/skel/dot.login" % DESTDIR, "r").read()
+f = file("%s/install/.login" % DESTDIR, "w")
+f.write(skel_data)
f.write("startx\n")
f.close()
# finish usr image
os.chdir(WORKDIR)
-execute("umount %s/usr" % DESTDIR)
+execute("umount %s%s" % (DESTDIR, ZIMAGE_TREE))
execute("mdconfig -d -u 60")
-execute("mkuzip -v -o %s/usr/usr.img.uzip -s 16384 usr.img" % DESTDIR)
+execute("mkuzip -o %s%s -s 16384 %s" % (DESTDIR, ZIMAGE, ZIMAGE_IMGNAME))
os.chdir(WORKDIR)
if ISO == None:
==== //depot/projects/soc2007/ivoras_finstall/makeimage/pkglist#3 (text+ko) ====
@@ -1,14 +1,10 @@
-#vim-gtk2
+# Package list
+xorg-7.2
+xfce-4
+vim-gtk2
py24-gtk
-xorg-server
-xf86-input-keyboard
-xf86-input-mouse
-xkeyboard-config
-xf86-video-vesa
-xf86-video-fbdev
-xf86-video-vga
-xorg-fonts-7.2
-xkbcomp
-xinit
-#gnome-icons-slick
-xfce-4
+firefox
+thunderbird
+strace
+unixbench
+bonnie++
More information about the p4-projects
mailing list