From owner-p4-projects@FreeBSD.ORG Sat Jul 14 23:32:46 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2A2B216A405; Sat, 14 Jul 2007 23:32:46 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EB9A816A402 for ; Sat, 14 Jul 2007 23:32:45 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id DA88513C461 for ; Sat, 14 Jul 2007 23:32:45 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l6ENWjt7069930 for ; Sat, 14 Jul 2007 23:32:45 GMT (envelope-from ivoras@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l6ENWjTe069927 for perforce@freebsd.org; Sat, 14 Jul 2007 23:32:45 GMT (envelope-from ivoras@FreeBSD.org) Date: Sat, 14 Jul 2007 23:32:45 GMT Message-Id: <200707142332.l6ENWjTe069927@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to ivoras@FreeBSD.org using -f From: Ivan Voras To: Perforce Change Reviews Cc: Subject: PERFORCE change 123509 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2007 23:32:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=123509 Change 123509 by ivoras@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++