Installer import into contrib (real import this time) vendor/BSDINSTALLER
authorDave Hayes <dave@dragonflybsd.org>
Wed, 12 Mar 2008 22:15:56 +0000 (22:15 +0000)
committerDave Hayes <dave@dragonflybsd.org>
Wed, 12 Mar 2008 22:15:56 +0000 (22:15 +0000)
366 files changed:
contrib/bsdinstaller-1.1.6/docs/dfui/dfui.html [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/docs/dfui/form_multiple.png [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/docs/dfui/form_single.png [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/docs/dfui/property.html [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/docs/dfui/session_cgi.png [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/docs/dfui/session_curses.png [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/libaura/.cvsignore [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/libaura/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/libaura/pkg-descr [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-app/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-app/pkg-descr [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-compat51/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-compat51/distinfo [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-compat51/files/lua50c51.sh [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-compat51/files/patch-compat-5.1.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-compat51/pkg-descr [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-curses/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-curses/files/patch-Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-curses/pkg-descr [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-dfui/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-dfui/pkg-descr [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-filename/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-filename/pkg-descr [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-filesystem/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-filesystem/files/patch-config [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-filesystem/pkg-descr [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-gettext/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-gettext/pkg-descr [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-posix/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-posix/distinfo [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-posix/files/patch-Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-posix/files/patch-lposix.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-posix/files/patch-posix.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-posix/pkg-descr [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-pty/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/devel/lua50-pty/pkg-descr [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/lang/lua50/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/lang/lua50/distinfo [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/lang/lua50/files/patch-Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/lang/lua50/files/patch-src__Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/lang/lua50/files/patch-src__lib__Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/lang/lua50/files/patch-src__lib__lmathlib.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/lang/lua50/files/patch-src__lua__Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/lang/lua50/files/patch-src__luac__Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/lang/lua50/pkg-descr [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/lang/lua50/pkg-plist [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/net/lua50-socket/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/net/lua50-socket/distinfo [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/net/lua50-socket/files/patch-Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/net/lua50-socket/pkg-descr [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/sysutils/dfuibe_installer/.cvsignore [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/sysutils/dfuibe_installer/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/sysutils/dfuibe_installer/pkg-descr [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/sysutils/dfuibe_lua/.cvsignore [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/sysutils/dfuibe_lua/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/sysutils/dfuibe_lua/pkg-descr [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_cgi/.cvsignore [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_cgi/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_cgi/pkg-descr [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_curses/.cvsignore [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_curses/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_curses/pkg-descr [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_qt/.cvsignore [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_qt/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_qt/pkg-descr [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/sysutils/libdfui/.cvsignore [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/sysutils/libdfui/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/sysutils/libdfui/pkg-descr [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/sysutils/libinstaller/.cvsignore [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/sysutils/libinstaller/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/sysutils/libinstaller/pkg-descr [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/distinfo [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/extra-patch-config.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-ab [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-ac [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-ad [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-config.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-libhttpd.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-libhttpd.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-mmc.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-thttpd.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/thttpd.sh [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/pkg-descr [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/pkg-message [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/pkg-plist [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/root_skels/installer/boot/cdboot.flp.bz2 [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/root_skels/installer/boot/memtest86.flp.bz2 [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/root_skels/installer/etc/defaults/pfi.conf [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/root_skels/installer/etc/fstab [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/root_skels/installer/etc/issue [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/root_skels/installer/etc/master.passwd [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/root_skels/installer/etc/rc.d/pfi [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/root_skels/installer/etc/ttys [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/root_skels/installer/usr/local/bin/installer [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/root_skels/installer/usr/local/etc/dhcpd.conf [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/root_skels/installer/usr/local/etc/thttpd.conf [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/scripts/build/.cvsignore [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/scripts/build/build.conf.defaults [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/scripts/build/build_installer_packages.sh [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/scripts/build/copy_ports_to_portsdir.sh [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/scripts/build/create_installer_tarballs.sh [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/scripts/build/install_installer_packages.sh [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/scripts/build/make_installer_image.sh [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/scripts/build/pver.conf [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/scripts/build/remove_installer_packages.sh [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/scripts/report/gen_rel_notes.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/installer/.cvsignore [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/installer/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/installer/conf/cmdnames.conf [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/installer/flow.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/installer/flow.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/installer/fn.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/installer/fn_configure.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/installer/fn_diagnostic.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/installer/fn_disk.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/installer/fn_install.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/installer/fn_subpart.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/installer/fn_zonetab.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/installer/fn_zonetab.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/installer/main.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/installer/pathnames.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/installer/po/dfuibe_installer.pot [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/installer/po/ru.po [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/200_install.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/400_configure.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/600_upgrade.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/800_netboot.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/conf/cmdnames.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/conf/def_pkgs.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/conf/mountpoints.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/conf/sources.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/configure/100_choose_where_from.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/configure/200_select_disk.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/configure/300_select_part.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/configure/400_mount_target_system.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/configure/500_menu.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/configure/600_unmount_target_system.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/configure/main.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/configure/menu/100_set_root_password.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/configure/menu/200_add_user.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/configure/menu/300_set_timezone.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/configure/menu/350_set_datetime.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/configure/menu/400_change_console_settings.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/configure/menu/500_install_packages.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/configure/menu/550_remove_packages.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/configure/menu/main.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/install/100_welcome.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/install/200_select_disk.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/install/250_partition_disk.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/install/270_install_bootblocks.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/install/300_select_part.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/install/400_select_subparts.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/install/450_select_packages.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/install/500_install_os.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/install/700_install_bootblocks.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/install/800_finished.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/install/900_reboot.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/install/main.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/Bitwise.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/Capacity.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/CmdChain.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/ConfigFile.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/Disk.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/Flow.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/FlowStep.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/Installation.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/Menu.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/MenuItem.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/Network.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/Package.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/PackageGraph.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/PackageList.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/PackageSet.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/Partition.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/StorageSystem.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/StorageSystemUI.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/StorageUI.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/Subpartition.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/bitwise.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/cmdchain.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/configvars.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/flow.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/fsm.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/menu.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/mountpoint.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/network.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/package.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/storage.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/storage_ui.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/lib/target_system.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/main.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/netboot/500_setup_server.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/netboot/main.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/pit/100_select_language.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/pit/800_configure_network.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/pit/main.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/po/dfuibe_lua.pot [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/po/ru.po [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/apptest.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/bitwise.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/clock.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/commands.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/configvars.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/dfui.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/expander.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/filesystem.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/fsm.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/fsm/final.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/fsm/main.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/fsm/middle.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/fsm/start.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/fsm/subfsm.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/fsm/subfsm/main.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/fsm/subfsm/one.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/fsm/subfsm/two.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/main.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/menu.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/menu/010_first.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/menu/020_second.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/menu/030_third.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/menu/500_submenu.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/menu/500_submenu/010_first.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/menu/500_submenu/main.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/menu/main.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/network.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/pipe.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/progress.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/pty.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/storage.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/scripts/test/wait_for.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/upgrade/200_select_disk.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/upgrade/300_select_part.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/upgrade/400_mount_target_system.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/upgrade/500_perform_upgrade.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/upgrade/600_unmount_target_system.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/lua/upgrade/main.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/test/.cvsignore [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/test/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/test/be_test.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/test/po/dfuibe_test.pot [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/backend/test/po/ru.po [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/cgi/.cvsignore [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/cgi/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/cgi/applet.conf [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/cgi/capture.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/cgi/cgic.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/cgi/cgic.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/cgi/cgic.html [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/cgi/cgic_readme.txt [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/cgi/cgictest.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/cgi/dfly-pg.gif [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/cgi/dfuife.css [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/cgi/dfuife.js [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/cgi/dfuife_cgi.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/cgi/example.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/cgi/fred-bg.gif [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/cgi/fred.png [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/cgi/green_dot.jpg [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/cgi/index.html [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/cgi/license.txt [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/ncurses/.cvsignore [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/ncurses/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/ncurses/curses_bar.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/ncurses/curses_bar.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/ncurses/curses_form.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/ncurses/curses_form.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/ncurses/curses_util.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/ncurses/curses_util.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/ncurses/curses_widget.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/ncurses/curses_widget.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/ncurses/curses_xlat.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/ncurses/curses_xlat.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/ncurses/fred.txt [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/ncurses/main.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/ncurses/po/dfuife_curses.pot [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/ncurses/po/ru.po [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/ncurses/puffy.txt [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/qt/.cvsignore [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/qt/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/qt/dfuife_qt.pro [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/qt/images/icon.png [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/qt/include/.cvsignore [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/qt/include/form.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/qt/include/mainwindow.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/qt/src/form.cpp [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/qt/src/main.cpp [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/qt/src/mainwindow.cpp [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/test/.cvsignore [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/test/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/frontends/test/fe_test.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libaura/.cvsignore [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libaura/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libaura/README [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libaura/buffer.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libaura/buffer.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libaura/dict.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libaura/dict.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libaura/fspred.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libaura/fspred.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libaura/mem.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libaura/mem.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libaura/popen.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libaura/popen.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libaura/test.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libdfui/.cvsignore [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libdfui/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libdfui/README [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libdfui/conn_caps.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libdfui/conn_caps.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libdfui/conn_npipe.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libdfui/conn_npipe.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libdfui/conn_tcp.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libdfui/conn_tcp.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libdfui/connection.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libdfui/decode.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libdfui/dfui.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libdfui/dump.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libdfui/dump.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libdfui/encode.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libdfui/encoding.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libdfui/form.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libdfui/lang.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libdfui/lang.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libdfui/system.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libdfui/system.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libinstaller/.cvsignore [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libinstaller/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libinstaller/README [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libinstaller/commands.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libinstaller/commands.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libinstaller/confed.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libinstaller/confed.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libinstaller/diskutil.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libinstaller/diskutil.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libinstaller/functions.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libinstaller/functions.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libinstaller/mount.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libinstaller/package.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libinstaller/package.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libinstaller/survey.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libinstaller/sysids.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libinstaller/uiutil.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/libinstaller/uiutil.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/lua/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/lua/app/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/lua/app/app.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/lua/dfui/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/lua/dfui/common.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/lua/dfui/dfui.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/lua/dfui/dfui.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/lua/dfui/lua_dfui.h [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/lua/dfui/progress.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/lua/filename/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/lua/filename/filename.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/lua/gettext/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/lua/gettext/gettext.lua [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/lua/gettext/lua_gettext.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/lua/pty/Makefile [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/lua/pty/pty.c [new file with mode: 0644]
contrib/bsdinstaller-1.1.6/src/lib/lua/pty/pty.lua [new file with mode: 0644]

diff --git a/contrib/bsdinstaller-1.1.6/docs/dfui/dfui.html b/contrib/bsdinstaller-1.1.6/docs/dfui/dfui.html
new file mode 100644 (file)
index 0000000..5cd8678
--- /dev/null
@@ -0,0 +1,502 @@
+<html>
+<head><title>DragonFly Abstract User Interface (DFUI)</title></head>
+<body bgcolor="#ffffff">
+
+<h1>DragonFly Abstract User Interface (DFUI)</h1>
+
+<p><i>$Id: dfui.html,v 1.2 2004/07/17 01:50:34 cpressey Exp $</i></p>
+
+<h2>Introduction</h2>
+
+<p>This document describes a user interface (UI) abstraction which allows an
+application to communicate with a user through any number of kinds
+of concrete user interfaces, such as <code>curses</code>, GTK+, or a
+web browser.</p>
+
+<p>This abstraction should be suitable for presenting the DragonFly system
+installer to the user; however it need not and should not be limited to only the
+installer.  Many other tasks in DragonFly, such as system configuration and
+package installation, could and for the sake of consistency should use the
+same UI.</p>
+
+<h2>Abstraction</h2>
+
+<p>The DFUI abstraction isolates the semantics of user interation from
+the concrete details of it, similar to a <i>Model View Controller</i>
+abstraction.  Such a system is split into <i>frontend</i> and <i>backend</i>:
+
+<ul>
+<li>The backend contains the control logic and invokes the tool programs (such
+as <code>fdisk</code>.)</li>
+<li>The frontend constructs the concrete user interface (with widgets and such)
+and presents it to the user.</li>
+</ul></p>
+
+<p>The backend tells the frontend what kind of conversation to hold with the user;
+the frontend tells the backend the user's ultimate decisions.</p>
+
+<p>The backend talks to the frontend in terms of abstract user interface elements.
+It tells the frontend nothing about <em>how</em> the UI should
+be presented, only the bare essentials of what it must convey.  Likewise, the frontend
+talks to the backend in terms of data.  It keeps trivia about the user (like what language
+they are using) to itself.  In this way, we maintain component isolation: the
+backend is concerned only with the <i>semantics</i> of the user interaction, while
+the frontend is concerned only with its <i>implementation</i>.</p>
+
+<p>The frontend may be constructed in almost any manner.  It may be a
+<code>curses</code> program, or it may be a CGI.  This presents a unique barrier, namely that the
+frontend might be either a single, long-running process <em>or</em> a series of short-running
+processes.  This essentially requires a concurrently design where the frontend and backend
+exist in seperate processes that exchange messages using IPC.</p>
+
+<p>The contrast between the <code>curses</code> scenario and the CGI scenario
+is illustrated below.</p>
+
+<p>
+<table width="100%" cellpadding=4 border=1>
+<tr><td align="left" valign="top">
+<p><img src="session_curses.png"></p>
+</td><td align="right" valign="top">
+<p><img src="session_cgi.png"></p>
+</td></tr>
+</table>
+</p>
+
+<p>This abstraction gives us several benefits:
+
+<ul>
+<li>We're not tying the installer (and other tasks) to one specific user interface toolkit.
+<li>We're not even tying the installer (and other tasks) to one particular <i>kind</i> of UI.
+<li>The code for the installation process itself should be easier to manage
+because it won't be clouded with UI details.
+<li>The code for the UI itself should be easier to manage
+because it won't be clouded with installer details.
+<li>The frontend and backend don't have to be written in the same
+programming language (with some caveats; see below.)
+<li>We have the opportunity for the frontend and backend to work
+asymchronously (with some caveats; see below.)
+<li>We can use the same UI consistently for all tasks, rather than only in the installer.
+</ul></p>
+
+<h2>Data Types</h2>
+
+<p>Each of the messages sent between the frontend and the backend consists of
+one piece of data.  Before getting to the messages themselves, we'll examine the
+data types in use.</p>
+
+<h3>Id's</h3>
+
+<p>Many of the other data types each have an <i>id</i>.</p>
+
+<p>An id is a key which identifies the object to both the frontend and the
+backend.  It should be unique across all similar objects in the same container.
+(i.e. a form id should be unique across all forms in a session, a field id should
+be unique across all fields in a form, etc.)</p>
+
+<p>Id's are implemented as a short alphanumeric (plus underscores) strings
+such as <code>disk_select_menu</code>.</p>
+
+<h3>Info Blocks</h3>
+
+<p>Many of the other data types each have an <i>info block</i>.</p>
+
+<p>In contrast to the id, which the computer uses to tell objects apart, an
+info block is for the human operator's benefit.  Each info block contains:
+
+<ul>
+<li>the <i>name</i> of the object, which should be a short and
+descriptive title such as "Select Disk";</li>
+<li>the <i>short description</i> of the object, which should be one or
+two sentences describing the purpose of the object; and</li>
+<li>the <i>long description</i> of the object, which is analogous to
+a "help file" on the object which should describe its purpose and
+behaviour in a usefully verbose way.  The long description component
+of an info block need not contain the actual text of the long description;
+it should instead contain a reference to it in the form of a filename or URL.</li>
+</ul></p>
+
+<h3>Forms</h3>
+
+<p>The basic unit of interaction is a <i>form</i>.  While typically displayed as
+a familiar electronic version of a paper fill-out form, it is defined abstractly enough
+to not pose any obstacles should we need to deal with other media.  However,
+in this document we will give typical examples using a familiar GUI interpretation.</p>
+
+<p>Each form consists of:
+
+<ul>
+<li>a form id</li>
+<li>an info block</li>
+<li>a <i>multiplicity flag</i></li>
+<li>zero or more <i>fields</i></li>
+<li>one or more <i>actions</i></li>
+<li>zero or more <i>properties</i></li>
+<li>zero or more <i>datasets</i></li>
+</ul></p>
+
+<p>The multiplicity flag determines whether there is a single set of data displayed on the
+form (multiplicity = false), or multiple sets of data (multiplicity = true).
+The former resembles a 'dialog box' in a typical UI.
+The latter resembles a spreadsheet or database entry form, with zero or more 'rows'
+of a data, and facilities for the user to add, remove, etc rows.  Examples of these
+two different layout styles are shown below (note of course that these are only
+examples - the frontend may interpret them any reasonable way it likes.)</p>
+
+<p>
+<table width="100%" cellpadding=4 border=1>
+<tr><td align="left" valign="top">
+<p align="center">multiplicity = false</p>
+<p><img src="form_single.png"></p>
+</td><td align="right" valign="top">
+<p align="center">multiplicity = true</p>
+<p><img src="form_multiple.png"></p>
+</td></tr>
+</table>
+</p>
+
+<h3>Fields</h3>
+
+<p>Each field describes a piece of data that the user can view and possibly manipulate.
+In a typical GUI, fields are rendered as text boxes and similar widgets.
+Each field has:
+
+<ul>
+<li>a field id</li>
+<li>an info block</li>
+<li>zero or more <i>options</i></li>
+<li>zero or more <i>properties</i></li>
+</ul></p>
+
+<p>A form with zero fields has only actions, and might typically look like a menu
+or informative-only dialog box.</p>
+
+<h3>Actions</h3>
+
+<p>Each action describes an action that can be taken.
+In a typical GUI, actions are rendered as buttons that can be clicked.
+Each action consists of:
+
+<ul>
+<li>an action id</li>
+<li>an info block</li>
+<li>zero or more <i>properties</i></li>
+</ul></p>
+
+<h3>Datasets</h3>
+
+<p>Each dataset describes a set of data that is displayed or entered into a
+form.  In a form with more than zero fields, a multiplicity = false form has
+exactly one dataset, while a multiplicity = true form may have more than one.
+A form with zero fields must have zero datasets.</p>
+
+<p>Each dataset consists of a set of one celldata for each field of the form.</p>
+
+<h3>Celldatas</h3>
+
+<p>A celldata represents a value entered into a field on a form, either
+as a default value by the backend, or by the user's choice.</p>
+
+<p>Each celldata consists of:
+
+<ul>
+<li>the field id to which it applies</li>
+<li>the value</li>
+</ul></p>
+
+<p>The data type of all celldata values, as far as DFUI is concerned, is text.
+The backend may convert the text into a more semantically meaningful format,
+such as floating-point values, internally.</p>
+
+<h3>Options</h3>
+
+<p>Each field has zero or more options.  These are supplied values that the
+user may choose to place in the field.</p>
+
+<p>The semantics of options in combination with the editable flag are summarized here:
+
+<table border=1>
+<tr><th>Editable flag</th><th>Number of Options</th><th>Semantics</th></tr>
+<tr><td>true</td><td>zero</td><td>user may manually enter any value in field</td></tr>
+<tr><td>true</td><td>one or more</td><td>user may manually enter any value in field, or may select any option to fill field with ("combo box")</td></tr>
+<tr><td>false</td><td>zero</td><td>user may not enter data into field in any fashion</td></tr>
+<tr><td>false</td><td>one or more</td><td>user may not manually enter values into field, but may select an option to fill the field with ("list box")</td></tr>
+</table></p>
+
+<h3>Responses</h3>
+
+<p>Each response describes a user's decision.  Each response consists of:
+
+<ul>
+<li>a form id</li>
+<li>an action id</li>
+<li>zero or more datasets</li>
+</ul></p>
+
+<p>The form id indicates the form that this is a response to.</p>
+
+<p>The action id indicates the action that the user executed which caused
+this response.</p>
+
+<p>The datasets contain the user's choices.  When the form is
+multiplicity = false, there should be exactly one dataset; when the form
+is multiplicity = true, there should be one dataset per "row" of data that the
+user entered.  Either way, there should always be one celldata per field
+of the form in each dataset.</p>
+
+<h3>Progresses</h3>
+
+<p>A progress represents some task which takes a relatively long time to
+complete; in a typical GUI it would be implemented by a progress bar.
+Each progress consists of:
+
+<ul>
+<li>an info block</li>
+<li>an <i>amount</i></li>
+</ul></p>
+
+<p>The amount is an integer which ranges from 0 to 100, where 0 indicates
+no progress has been made, and 100 indicates that the task is finished.</p>
+
+<p>Progresses do not have responses, but they may be cancelled.</p>
+
+<h3>Properties</h3>
+
+<p>See <code><a href="property.html">dfui_property</a></code>.</p>
+
+<h2>Messages</h2>
+
+<p>The backend may send the following kinds of messages to the frontend:
+
+<ul>
+<li><code>present(<i>form</i>)</code></li>
+<li><code>prog_begin(<i>progress</i>)</code></li>
+<li><code>prog_update(<i>progress</i>)</code></li>
+<li><code>prog_end()</code></li>
+<li><code>stop()</code></li>
+</ul>
+</p>
+
+<p>The frontend may send the following kinds of replies to the backend:
+
+<ul>
+<li><code>submit(<i>response</i>)</code></li>
+<li><code>continue()</code></li>
+<li><code>cancel()</code></li>
+<li><code>abort()</code></li>
+</ul>
+</p>
+
+<p>These may, in theory, be asynchronous: the backend may, for example, send several
+<code>present</code> messages before receiving any <code>submit</code> replies,
+so long as there is some way to identify which <code>submit</code>s are associated with
+which <code>present</code>s (i.e. the form id).</p>
+
+<p>However, in practice, while some UI's support concurrently displaying multiple
+UI elements in a natural fashion (typified by "windows",) others do not.  So to begin,
+we will limit ourselves by enforcing
+a sychronous discipline: each message from the backend must be replied by a reply from
+the frontend before the next message from the backend is sent.</p>
+
+<h3>The <code>present</code> Message</h3>
+
+<p>The <code>present</code> message carries a form as a payload.  Upon
+receipt of this message, the frontend should display the form and let the user
+manipulate it.</p>
+
+<p>The frontend may then reply to a <code>present</code> message with:
+
+<ul>
+<li>a <code>submit</code> reply with the corresponding form id, which
+indicates that the user chose an action from the form; or</li>
+<li>an <code>abort</code> reply, which indicates something catastrophic happened
+and that the backend should halt everything.</li>
+</ul>
+</p>
+
+<h3>The <code>submit</code> Reply</h3>
+
+<p>The <code>submit</code> reply carries a response as a payload.  It should
+only occur after a <code>present</code> message.</p>
+
+<h3>The <code>prog_begin</code> Message</h3>
+
+<p>A <code>prog_begin</code> message carries a progress as a payload
+and indicates that a progress has begun.</p>
+
+<p>The frontend may reply to a <code>prog_begin</code> message with:
+
+<ul>
+<li>a <code>continue</code> reply, indicating all is well; or</li>
+<li>an <code>abort</code> reply, indicating the backend should halt.</li>
+</ul>
+</p>
+
+<h3>The <code>prog_update</code> Message</h3>
+
+<p>A <code>prog_update</code> message carries a progress as a payload
+and indicates that the state of progress has changed.</p>
+
+<p>The frontend may reply to a <code>prog_update</code> message with:
+
+<ul>
+<li>a <code>continue</code> reply, indicating all is well;</li>
+<li>a <code>cancel</code> reply, indicating that the user cancelled the
+progress; or</li>
+<li>an <code>abort</code> reply, indicating the backend should halt.</li>
+</ul>
+</p>
+
+<h3>The <code>prog_end</code> Message</h3>
+
+<p>A <code>prog_end</code> message indicates that a progress is finished.
+It has no payload.</p>
+
+<p>The frontend may reply to a <code>prog_end</code> message with:
+
+<ul>
+<li>a <code>continue</code> reply, indicating all is well; or</li>
+<li>an <code>abort</code> reply, indicating the backend should halt.</li>
+</ul>
+</p>
+
+<h3>The <code>stop</code> Message</h3>
+
+<p>The <code>stop</code> message has no payload; it simply tells the frontend
+that the backend has finished processing.  The frontend may exit, if it is a
+long-running process, or it may simply display a 'finished' page, if it is a
+short-running CGI process.</p>
+
+<h2>Pseudocode</h2>
+
+<table width=100% cellpadding=4 border=1>
+<tr>
+<td align="center">curses frontend</td>
+<td align="center">CGI frontend</td>
+</tr>
+<tr>
+<td><pre>
+    if backend is running
+        error "backend is already running"
+    start backend
+    while not done {
+        wait for a message from backend
+        if the message is 'stop'
+            done := TRUE
+        else if the message is 'present' {
+            display a form based on the message
+            let the user interact with the form
+            until the user selects an action
+            send 'submit' message to backend
+        }
+    }
+</pre></td>
+<td><pre>
+    if the request method was 'POST' {
+        create 'submit' message from POSTed data
+        send 'submit' message to backend
+    } else {
+        if backend is running
+            error "backend is already running"
+        start backend
+    }
+    wait for a message from backend
+    if the message is 'stop'
+        display 'done' page
+    else if the message is 'present'
+        display a form based on the message
+</pre></td>
+</tr></table>
+
+<h2>Library</h2>
+
+<p>Let us consider now a library, <code>libdfui</code>, which implements this abstraction:
+
+<ul>
+<li>A C program could use functions in this library directly.
+<li>A program in another high-level language, such as Python,
+could use the functions in this library with a C binding made
+(with, say, SWIG) for this purpose.
+<li>A shell script could use these functions via
+utility programs which parse their arguments and call
+these functions directly (or via a proxy daemon.)
+</ul></p>
+
+<h3>Backend</h3>
+
+<p>From the backend's point of view, the useful functions in this library are
+as follows.  Each function returns an error response (1 = success, 0 = failure.)</p>
+
+<ul>
+<li><code>dfui_be_start(struct dfui_connection *c)</code>
+<p>Connect to the frontend and return a handle to it in <code>c</code>.  XXX this function
+also needs to know what frontend to try to connect to and how somehow.</p>
+<li><code>dfui_be_present(struct dfui_connection *c, struct dfui_form *f, struct dfui_response *r)</code>
+<p>Ask the frontend on the other end of <code>c</code> to present the form <code>f</code>, wait
+for a submit reply, and return the response in <code>r</code></p>
+<li><code>dfui_be_prog_begin(struct dfui_connection *c, struct dfui_progress *p)</code>
+<p>Ask the frontend on the other end of <code>c</code> to start showing the progress <code>p</code>.</p>
+<li><code>dfui_be_prog_update(struct dfui_connection *c, struct dfui_progress *p)</code>
+<p>Ask the frontend on the other end of <code>c</code> to update the progress <code>p</code>.</p>
+<li><code>dfui_be_prog_end(struct dfui_connection *c)</code>
+<p>Ask the frontend on the other end of <code>c</code> to stop showing any progress.</p>
+<li><code>dfui_be_stop(struct dfui_connection *c)</code>
+<p>Tell the frontend on the other end of <code>c</code> to stop, and close the connection.</p>
+</ul>
+
+<p>Notably, there are also functions for constructing <code>struct dfui_form</code>s and its
+brethren, and for intrerpreting and freeing <code>struct dfui_response</code>s.</p>
+
+<h3>Frontend</h3>
+
+<p>From the frontend's point of view, the useful functions in this library are
+as follows. Like the backend, these all return failure/success values.</p>
+
+<ul>
+<li><code>dfui_fe_start(struct dfui_connection *c)</code>
+<p>Connect to the backend XXX somehow.</p>
+<li><code>dfui_fe_receive(struct dfui_connection *c, char *msgtype, void **payload)</code>
+<p>Wait for the backend to send a message, then return the message type in <code>*msgtype</code>
+and the message itself in <code>*payload</code>.  It is the frontend's reponsibility to cast the
+payload to the correct data type (based on <code>*msgtype</code>,) and to free it at some later
+time if it is not NULL.</p>
+<li><code>dfui_fe_submit(struct dfui_connection *c, struct dfui_response *r)</code>
+<p>Send a submit reply to the backend.</p>
+<li><code>dfui_fe_progress_continue(struct dfui_connection *c)</code>
+<p>Send a continue reply to the backend.</p>
+<li><code>dfui_fe_progress_cancel(struct dfui_connection *c)</code>
+<p>Send a cancel reply to the backend.</p>
+<li><code>dfui_fe_abort(struct dfui_connection *c)</code>
+<p>Send an abort reply to the backend.</p>
+<li><code>dfui_fe_stop(struct dfui_connection *c)</code>
+<p>Close the connection.</p>
+</ul>
+
+<p>Notably, there are also functions for intrerpreting <code>struct dfui_form</code>s et al,
+and for constructing and freeing <code>struct dfui_responses</code>s.</p>
+
+<h2>Implementation</h2>
+
+<p>The IPC used by libdfui, through which the frontend and backend exchange messages
+and replies, is a wrapper around the CAPS mechanism.  CAPS is the lightweight messaging
+abstraction Matt Dillon has introduced into DragonFly.</p>
+
+<p>CAPS was chosen for two reasons: it fulfils DFUI's needs as an IPC mechanism, and DFUI
+provides a good "real world" test for CAPS.</p>
+
+<p>The implementation of libdfui in CAPS is fairly straightforward, with one significant twist.</p>
+
+<p>Despite the backend sending 'requests' and the frontend sending 'replies', the backend is
+a CAPS service, while the frontend is a CAPS client.  This is necessary as the frontend could
+be a series of short-lived processes.  A CAPS service cannot receive a message in one
+process and reply to it in another.</p>
+
+<p>We implement this role reversal by having each message exchange, as described above,
+be implemented by two full CAPS message-reply exchange cycles internally.</p>
+
+<p>That is, for a backend to send a message to the frontend, the backend waits until it
+receives a generic 'client ready' message from the frontend, then sends it's request as a
+CAPS reply.  It then waits for another message from the frontend (the DFUI reply) and
+replies to that with a generic 'service ready' message.</p>
+
+</body>
+</html>
diff --git a/contrib/bsdinstaller-1.1.6/docs/dfui/form_multiple.png b/contrib/bsdinstaller-1.1.6/docs/dfui/form_multiple.png
new file mode 100644 (file)
index 0000000..255feae
Binary files /dev/null and b/contrib/bsdinstaller-1.1.6/docs/dfui/form_multiple.png differ
diff --git a/contrib/bsdinstaller-1.1.6/docs/dfui/form_single.png b/contrib/bsdinstaller-1.1.6/docs/dfui/form_single.png
new file mode 100644 (file)
index 0000000..d49b95c
Binary files /dev/null and b/contrib/bsdinstaller-1.1.6/docs/dfui/form_single.png differ
diff --git a/contrib/bsdinstaller-1.1.6/docs/dfui/property.html b/contrib/bsdinstaller-1.1.6/docs/dfui/property.html
new file mode 100644 (file)
index 0000000..e285d0c
--- /dev/null
@@ -0,0 +1,150 @@
+<html>
+<head><title>DFUI: dfui_property</title></head>
+<body bgcolor="#ffffff">
+
+<h1>dfui_property</h1>
+
+<p><i>$Id: property.html,v 1.3 2005/02/15 21:56:23 cpressey Exp $</i></p>
+
+<p>A <code>dfui_property</code> gives some information about an object
+which may or may not be present.</p>
+
+<p>Properties may either be <i>weak</i>, meaning that frontends can ignore
+them and still be considered correct, or they may be <i>strong</i>, meaning
+that they carry with them a guarantee of behaviour, and any frontend which
+does not conform to that behaviour should be considered incorrect.  The vast
+majority of properties are weak.  Frontends are still encouraged to implement
+as many weak properties as apply to them, however, as they are used to help
+create a more pleasant and effective experience for the user.</p>
+
+<h4>Form Properties</h4>
+
+<table border=1>
+<tr><th>Hint Id</th><th>Description</th><th>Values</th></tr>
+<tr><td><code>role</code></td>
+    <td>Allows the frontend to display a more meaningful form.</td>
+    <td>
+        <table>
+       <tr><th>Value</th><th>Description</th><th>Assumptions</th></tr>
+       <tr><td><code>menu</code></td>
+         <td>Form is a menu, where the user may select one of a number of choices.</td>
+         <td>Form has zero fields; form has more than one action.</td></tr>
+       <tr><td><code>confirmation</code></td>
+         <td>Form is a confirmation dialog box or similar, with a question and yes/no/etc choices.</td>
+         <td>Form has zero fields; form has two or more actions.</td></tr>
+       <tr><td><code>alert</code></td>
+         <td>Form is there to display important information.</td>
+         <td>Form has zero fields.</td></tr>
+        </table>
+    </td></tr>
+<tr><td><code>special</code></td>
+    <td>Allows the frontend to display a special-purpose form for a particular occasion.
+              These are typically unique forms used in only one application, such as the installer.</td>
+    <td>
+        <table>
+       <tr><th>Value</th><th>Description</th><th>Assumptions</th></tr>
+       <tr><td><code>bsdinstaller_welcome</code></td>
+               <td>Welcome screen for the BSD Installer.</td>
+               <td>TBA</td></tr>
+        </table>
+    </td></tr>
+<tr><td><code>minimum_width</code></td>
+    <td>Suggests a minimum visual width of the form.</td>
+    <td>
+        Any integer.  The units of measurement are "em"'s, i.e.
+       the width of the widest character in the typeface used to render the form.
+    </td></tr>
+<tr><td><code>monospaced</code></td>
+    <td>Suggests that the textual content of the form should be monospaced
+       (i.e. each character should occupy the same width.)</td>
+    <td>
+        <code>true</code> or <code>false</code>, default <code>false</code>.
+    </td></tr>
+<tr><td><code>default_action</code></td>
+    <td>Specifies which action is the default (selected when the form is first displayed
+           and/or triggered by the 'obvious thing' on the user's part, such as pressing Enter,
+       depending on the interface.</td>
+    <td>
+        The id of an action on the form.
+    </td></tr>
+</table>
+
+<h4>Field Hints</h4>
+
+<table border=1>
+<tr><th>Hint Id</th><th>Description</th><th>Values</th></tr>
+<tr><td><code>editable</code></td>
+    <td>(<strong>STRONG</strong>) Determines whether the value(s) in this field may be edited by the user.</td>
+    <td>
+        <code>true</code> or <code>false</code>, default <code>true</code>.
+    </td></tr>
+<tr><td><code>obscured</code></td>
+    <td>(<strong>STRONG</strong>) Determines whether the user is allowed to observe the value(s) in this field.</td>
+    <td>
+        <code>true</code> or <code>false</code>, default <code>false</code>.
+        Typically <code>true</code> is used for password-entry fields.
+    </td></tr>
+<tr><td><code>control</code></td>
+    <td>Allows the frontend to use a more meaningful widget.</td>
+    <td>
+        <table>
+       <tr><th>Value</th><th>Description</th><th>Assumptions</th></tr>
+       <tr><td><code>checkbox</code></td>
+         <td>Field may be either 'on' or 'off' (a.k.a. 'yes' or 'no', 'true' or 'false').</td>
+         <td>'on' is represented by the text <tt>Y</tt>, 'off' is represented by <tt>N</tt></td></tr>
+        </table>
+    </td></tr>
+<tr><td><code>prominence</code></td>
+    <td>Indicates how prominent a particular field should be.</td>
+    <td>
+        <table>
+       <tr><th>Value</th><th>Description</th><th>Assumptions</th></tr>
+       <tr><td><code>minimal</code></td><td>Try to save space.  Typically means
+       that an effort should be taken to save screen real estate by having
+       the important contents of this field "drop down" or "pop up" when needed.  This
+       is particularly germane for fields with more than zero options, but that need not be
+       a strict assumption.</td><td>TBA</td></tr>
+       <tr><td><code>maximal</code></td><td>Try to draw attention to this field.</td><td>TBA</td></tr>
+       <tr><td><code>normal</code></td><td>No special prominence (default.)</td><td>TBA</td></tr>
+        </table>
+    </td></tr>
+<tr><td><code>regexp</code></td>
+    <td>Describes the pattern of characters that values of the field should match.</td>
+    <td>
+       A basic regular expression (define??)  Some examples might be <code>^\d+$</code> to match
+       a positive integer, and <code>^a.*z$</code> to match anything that starts with a and ends with z.
+    </td></tr>
+<tr><td><code>alignment</code></td>
+    <td>Indicates how data within the field should be aligned.</td>
+    <td>
+        <table>
+       <tr><th>Value</th><th>Description</th><th>Assumptions</th></tr>
+       <tr><td><code>left</code></td><td>Align to the left edge.</td><td>TBA</td></tr>
+       <tr><td><code>right</code></td><td>Align to the right edge.</td><td>TBA</td></tr>
+       <tr><td><code>center</code></td><td>Center the contents.</td><td>TBA</td></tr>
+        </table>
+    </td></tr>
+</table>
+
+<h4>Action Hints</h4>
+
+<table border=1>
+<tr><th>Hint Id</th><th>Description</th><th>Values</th></tr>
+<tr><td><code>visited</code></td>
+    <td>Indicates that this action leads to a form which has already been filled-out, or a path
+        of events which has already been taken.  Supplied purely as a navigation aid.</td>
+    <td>
+        <table>
+       <tr><th>Value</th><th>Description</th><th>Assumptions</th></tr>
+       <tr><td><code>true</code></td><td>Indicate to user that this action was already visited.</td><td>TBA</td></tr>
+        </table>
+    </td></tr>
+<tr><td><code>accelerator</code></td>
+    <td>Specifies a keystroke which will trigger this action under normal circumstances.</td>
+    <td>
+        Any letter between <code>a</code> and <code>z</code>.
+    </td></tr>
+</table>
+
+</body>
+</html>
diff --git a/contrib/bsdinstaller-1.1.6/docs/dfui/session_cgi.png b/contrib/bsdinstaller-1.1.6/docs/dfui/session_cgi.png
new file mode 100644 (file)
index 0000000..58ddc0e
Binary files /dev/null and b/contrib/bsdinstaller-1.1.6/docs/dfui/session_cgi.png differ
diff --git a/contrib/bsdinstaller-1.1.6/docs/dfui/session_curses.png b/contrib/bsdinstaller-1.1.6/docs/dfui/session_curses.png
new file mode 100644 (file)
index 0000000..d846833
Binary files /dev/null and b/contrib/bsdinstaller-1.1.6/docs/dfui/session_curses.png differ
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/libaura/.cvsignore b/contrib/bsdinstaller-1.1.6/ports/devel/libaura/.cvsignore
new file mode 100644 (file)
index 0000000..8e15c86
--- /dev/null
@@ -0,0 +1 @@
+distinfo
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/libaura/Makefile b/contrib/bsdinstaller-1.1.6/ports/devel/libaura/Makefile
new file mode 100644 (file)
index 0000000..f6a2847
--- /dev/null
@@ -0,0 +1,57 @@
+# New ports collection makefile for:   libaura
+# Date created:                        July 21, 2004
+# Whom:                                Chris Pressey <cpressey@catseye.mine.nu>
+
+PORTNAME=      libaura
+PORTVERSION=    3.1
+INTERNAL=      YES
+CATEGORIES=    sysutils
+DISTNAME=      ${PORTNAME}-${PORTVERSION}
+WRKSRC=                work/${PORTNAME}
+
+MAINTAINER=    cpressey@catseye.mine.nu
+COMMENT=       Library of Assorted Useful Reusable Abstractions
+
+PLIST_FILES=   lib/libaura.a                   \
+               lib/libaura.so                  \
+               lib/libaura.so.3                \
+               include/aura/buffer.h           \
+               include/aura/dict.h             \
+               include/aura/fspred.h           \
+               include/aura/popen.h            \
+               include/aura/mem.h
+
+do-fetch:
+       @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then                \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!";   \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved";   \
+               ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the";       \
+               ${ECHO_MSG} "BSD Installer CVS repository.  Please see the shell scripts in the";       \
+               ${ECHO_MSG} "scripts/build directory of the repository for more information on how";    \
+               ${ECHO_MSG} "to create these distfiles.";                       \
+               false;                                                          \
+       fi
+
+do-install:
+       ${MKDIR} -p ${LOCALBASE}/include/aura
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/libaura.a ${LOCALBASE}/lib/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/libaura.so.3 ${LOCALBASE}/lib/
+       ${LN} -sf ${LOCALBASE}/lib/libaura.so.3 ${LOCALBASE}/lib/libaura.so
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/buffer.h ${LOCALBASE}/include/aura/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/dict.h ${LOCALBASE}/include/aura/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/popen.h ${LOCALBASE}/include/aura/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/fspred.h ${LOCALBASE}/include/aura/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/mem.h ${LOCALBASE}/include/aura/
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include <bsd.port.mk>
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include <bsd.dfport.mk>
+.endif
+
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/libaura/pkg-descr b/contrib/bsdinstaller-1.1.6/ports/devel/libaura/pkg-descr
new file mode 100644 (file)
index 0000000..c3bba1f
--- /dev/null
@@ -0,0 +1,10 @@
+Libaura is a library of Assorted Useful Reusable Abstractions -
+data structures and utilities for C language programming.  At
+present, they include:
+
+- memory allocators/deallocators
+- key<->value dictionaries (hashed or sorted)
+- extensible buffers
+- filesystem predicates (is_dir, is_named_pipe, etc)
+- popen() variation which allows the caller to know the pid of
+  the process on the other end of the pipe.
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-app/Makefile b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-app/Makefile
new file mode 100644 (file)
index 0000000..ad93dfc
--- /dev/null
@@ -0,0 +1,50 @@
+# New ports collection makefile for:   lua50-app
+# Date created:                                23 Feb 2005
+# Whom:                                        Chris Pressey
+
+PORTNAME=      lua50-app
+PORTVERSION=   0.1
+INTERNAL=      YES
+CATEGORIES=    devel
+DISTNAME=      luaapp-${PORTVERSION}
+WRKSRC=                work/app
+
+LIB_DEPENDS=   lua50.5:${PORTSDIR}/lang/lua50
+BUILD_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+RUN_DEPENDS=   ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51 \
+               ${LOCALBASE}/share/lua/5.0/posix.lua:${PORTSDIR}/devel/lua50-posix \
+               ${LOCALBASE}/share/lua/5.0/filename.lua:${PORTSDIR}/devel/lua50-filename
+
+MAINTAINER=    cpressey@catseye.mine.nu
+COMMENT=       App framework for Lua 5.0.x
+
+PLIST_FILES=   share/lua/5.0/app.lua
+
+do-fetch:
+       @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then                \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!";   \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved";   \
+               ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the";       \
+               ${ECHO_MSG} "BSD Installer CVS repository.  Please see the shell scripts in the";       \
+               ${ECHO_MSG} "scripts/build directory of the repository for more information on how";    \
+               ${ECHO_MSG} "to create these distfiles.";                       \
+               false;                                                          \
+       fi
+
+do-build:
+       @${ECHO} "No building required."
+
+do-install:
+       ${CP} ${WRKSRC}/app.lua ${LOCALBASE}/share/lua/5.0/app.lua
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include <bsd.port.mk>
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include <bsd.dfport.mk>
+.endif
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-app/pkg-descr b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-app/pkg-descr
new file mode 100644 (file)
index 0000000..49c7a36
--- /dev/null
@@ -0,0 +1,3 @@
+App framework for Lua, inspired by several sources, primarily the
+Erlang app module.
+
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-compat51/Makefile b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-compat51/Makefile
new file mode 100644 (file)
index 0000000..60b1b1a
--- /dev/null
@@ -0,0 +1,41 @@
+# New ports collection makefile for:   lua50-compat51
+# Date created:                                10 Feb 2005
+# Whom:                                        Chris Pressey
+
+PORTNAME=      lua50-compat51
+PORTVERSION=   5.1.r2
+CATEGORIES=    devel
+DISTNAME=      compat-5.1r2
+MASTER_SITES=  http://luaforge.net/frs/download.php/402/
+
+LIB_DEPENDS=   lua50.5:${PORTSDIR}/lang/lua50
+
+MAINTAINER=    cpressey@catseye.mine.nu
+COMMENT=       Lua 5.1 package compatibility layer for Lua 5.0.x
+
+PLIST_FILES=   share/lua/5.0/compat-5.1.lua            \
+               lib/lua/${DISTNAME}/compat-5.1.c        \
+               lib/lua/${DISTNAME}/compat-5.1.h        \
+               bin/lua50c51
+
+do-build:
+       @echo "Nothing to build."
+
+do-install:
+       ${MKDIR} -p ${PREFIX}/lib/lua/5.0
+       ${MKDIR} -p ${PREFIX}/lib/lua/${DISTNAME}
+       ${MKDIR} -p ${PREFIX}/share/lua/5.0
+       ${INSTALL_DATA} ${WRKSRC}/compat-5.1.lua ${PREFIX}/share/lua/5.0
+       ${INSTALL_DATA} ${WRKSRC}/compat-5.1.c ${PREFIX}/lib/lua/${DISTNAME}
+       ${INSTALL_DATA} ${WRKSRC}/compat-5.1.h ${PREFIX}/lib/lua/${DISTNAME}
+       ${INSTALL_SCRIPT} ${FILESDIR}/lua50c51.sh ${PREFIX}/bin/lua50c51
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include <bsd.port.mk>
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include <bsd.dfport.mk>
+.endif
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-compat51/distinfo b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-compat51/distinfo
new file mode 100644 (file)
index 0000000..42d562b
--- /dev/null
@@ -0,0 +1,2 @@
+MD5 (compat-5.1r2.tar.gz) = 751de141b3f6faa0b9706b757c8bc7a1
+SIZE (compat-5.1r2.tar.gz) = 2039
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-compat51/files/lua50c51.sh b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-compat51/files/lua50c51.sh
new file mode 100644 (file)
index 0000000..a54664d
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec /usr/local/bin/lua50 -l/usr/local/share/lua/5.0/compat-5.1.lua $*
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-compat51/files/patch-compat-5.1.c b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-compat51/files/patch-compat-5.1.c
new file mode 100644 (file)
index 0000000..a404ef0
--- /dev/null
@@ -0,0 +1,12 @@
+--- compat-5.1.c.orig  Mon Apr  4 17:35:33 2005
++++ compat-5.1.c       Mon Apr  4 17:35:51 2005
+@@ -1,7 +1,7 @@
+ #include <stdio.h>
+ #include <string.h>
+-#include "lua.h"
+-#include "lauxlib.h"
++#include "lua50/lua.h"
++#include "lua50/lauxlib.h"
+ #include "compat-5.1.h"
+ static void getfield(lua_State *L, const char *name) {
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-compat51/pkg-descr b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-compat51/pkg-descr
new file mode 100644 (file)
index 0000000..46e4e06
--- /dev/null
@@ -0,0 +1,4 @@
+This is a Lua 5.1.x compatibility shim for Lua 5.0.x.  It also
+includes a wrapper script, lua5, which sets the LUA_PATH and
+loads the compatibility layer automatically.
+
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-curses/Makefile b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-curses/Makefile
new file mode 100644 (file)
index 0000000..6f255a6
--- /dev/null
@@ -0,0 +1,31 @@
+# New ports collection makefile for:   lua50-curses
+# Date created:                                10 Feb 2005
+# Whom:                                        Chris Pressey
+
+PORTNAME=      lua50-curses
+PORTVERSION=   0.1a
+CATEGORIES=    devel
+DISTNAME=      lcurses-0.1-devel
+MASTER_SITES=  http://mega.ist.utl.pt/~tngd/lua/
+
+LIB_DEPENDS=   lua50.5:${PORTSDIR}/lang/lua50
+BUILD_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+RUN_DEPENDS=   ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+
+MAINTAINER=    cpressey@catseye.mine.nu
+COMMENT=       Curses binding for Lua 5.0.x
+
+PLIST_FILES=   lib/lua/5.0/lcurses.so
+
+do-install:
+       ${INSTALL_DATA} ${WRKSRC}/lcurses.so ${PREFIX}/lib/lua/5.0
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include <bsd.port.mk>
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include <bsd.dfport.mk>
+.endif
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-curses/files/patch-Makefile b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-curses/files/patch-Makefile
new file mode 100644 (file)
index 0000000..c47d650
--- /dev/null
@@ -0,0 +1,11 @@
+--- Makefile.orig      2005-02-20 13:10:18.000000000 -0800
++++ Makefile   2005-02-20 13:11:13.000000000 -0800
+@@ -5,7 +5,7 @@
+ TMP=/tmp
+ # change these to reflect your Lua installation
+-LUA=../lua-5.0.2
++LUA=/usr/local
+ LUAINC= $(LUA)/include
+ LUALIB= $(LUA)/lib
+ LUABIN= $(LUA)/bin
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-curses/pkg-descr b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-curses/pkg-descr
new file mode 100644 (file)
index 0000000..0548258
--- /dev/null
@@ -0,0 +1 @@
+Curses bindings for Lua.
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-dfui/Makefile b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-dfui/Makefile
new file mode 100644 (file)
index 0000000..6a5cd03
--- /dev/null
@@ -0,0 +1,51 @@
+# New ports collection makefile for:   lua50-dfui
+# Date created:                                21 Feb 2005
+# Whom:                                        Chris Pressey
+
+PORTNAME=      lua50-dfui
+PORTVERSION=   0.1
+INTERNAL=      YES
+CATEGORIES=    devel
+DISTNAME=      luadfui-${PORTVERSION}
+WRKSRC=                work/dfui
+
+LIB_DEPENDS=   lua50.5:${PORTSDIR}/lang/lua50 \
+               aura.3:${PORTSDIR}/devel/libaura \
+               dfui.4:${PORTSDIR}/sysutils/libdfui
+
+BUILD_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+RUN_DEPENDS=   ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51 \
+               ${LOCALBASE}/lib/lua/5.0/lposix.so:${PORTSDIR}/devel/lua50-posix
+
+MAINTAINER=    cpressey@catseye.mine.nu
+COMMENT=       DFUI binding for Lua 5.0.x
+
+PLIST_FILES=   lib/lua/5.0/ldfui.so \
+               share/lua/5.0/dfui.lua
+
+do-fetch:
+       @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then                \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!";   \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved";   \
+               ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the";       \
+               ${ECHO_MSG} "BSD Installer CVS repository.  Please see the shell scripts in the";       \
+               ${ECHO_MSG} "scripts/build directory of the repository for more information on how";    \
+               ${ECHO_MSG} "to create these distfiles.";                       \
+               false;                                                          \
+       fi
+
+do-install:
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/ldfui.so ${LOCALBASE}/lib/lua/5.0/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/dfui.lua ${LOCALBASE}/share/lua/5.0/
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include <bsd.port.mk>
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include <bsd.dfport.mk>
+.endif
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-dfui/pkg-descr b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-dfui/pkg-descr
new file mode 100644 (file)
index 0000000..1b6a25d
--- /dev/null
@@ -0,0 +1 @@
+Lua bindings for DFUI.
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-filename/Makefile b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-filename/Makefile
new file mode 100644 (file)
index 0000000..a62c2e5
--- /dev/null
@@ -0,0 +1,49 @@
+# New ports collection makefile for:   lua50-filename
+# Date created:                                28 Mar 2005
+# Whom:                                        Chris Pressey
+
+PORTNAME=      lua50-filename
+PORTVERSION=   0.1
+INTERNAL=      YES
+CATEGORIES=    devel
+DISTNAME=      luafilename-${PORTVERSION}
+WRKSRC=                work/filename
+
+LIB_DEPENDS=   lua50.5:${PORTSDIR}/lang/lua50
+BUILD_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+RUN_DEPENDS=   ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51 \
+               ${LOCALBASE}/share/lua/5.0/posix.lua:${PORTSDIR}/devel/lua50-posix
+
+MAINTAINER=    cpressey@catseye.mine.nu
+COMMENT=       Filename-manipulating functions for Lua 5.0.x
+
+PLIST_FILES=   share/lua/5.0/filename.lua
+
+do-fetch:
+       @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then                \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!";   \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved";   \
+               ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the";       \
+               ${ECHO_MSG} "BSD Installer CVS repository.  Please see the shell scripts in the";       \
+               ${ECHO_MSG} "scripts/build directory of the repository for more information on how";    \
+               ${ECHO_MSG} "to create these distfiles.";                       \
+               false;                                                          \
+       fi
+
+do-build:
+       @${ECHO} "No building required."
+
+do-install:
+       ${CP} ${WRKSRC}/filename.lua ${LOCALBASE}/share/lua/5.0/filename.lua
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include <bsd.port.mk>
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include <bsd.dfport.mk>
+.endif
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-filename/pkg-descr b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-filename/pkg-descr
new file mode 100644 (file)
index 0000000..24096e2
--- /dev/null
@@ -0,0 +1 @@
+Package of filename-manipulating functions for Lua.
\ No newline at end of file
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-filesystem/Makefile b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-filesystem/Makefile
new file mode 100644 (file)
index 0000000..e9ec7e4
--- /dev/null
@@ -0,0 +1,32 @@
+# New ports collection makefile for:   lua50-filesystem
+# Date created:                                10 Feb 2005
+# Whom:                                        Chris Pressey
+
+PORTNAME=      lua50-filesystem
+PORTVERSION=   1.0
+CATEGORIES=    devel
+DISTNAME=      luafilesystem-${PORTVERSION}
+MASTER_SITES=  http://luaforge.net/frs/download.php/430/
+
+LIB_DEPENDS=   lua50.5:${PORTSDIR}/lang/lua50
+BUILD_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+RUN_DEPENDS=   ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+
+MAINTAINER=    cpressey@catseye.mine.nu
+COMMENT=       Portable File System routines for Lua 5.0.x
+
+PLIST_FILES=   lib/lua/5.0/liblfs.1.0.so       \
+               lib/lua/5.0/lfs.so
+
+ALL_TARGET=    lib
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include <bsd.port.mk>
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include <bsd.dfport.mk>
+.endif
+
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-filesystem/files/patch-config b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-filesystem/files/patch-config
new file mode 100644 (file)
index 0000000..1590fff
--- /dev/null
@@ -0,0 +1,30 @@
+--- config.orig        2005-01-19 09:20:04.000000000 -0800
++++ config     2005-02-20 11:18:02.000000000 -0800
+@@ -7,19 +7,19 @@
+ LUA_INC= /usr/local/include/lua5
+ # OS dependent
+-LIB_EXT= .dylib
+-#LIB_EXT= .so
+-LIB_OPTION= -dynamiclib #for MacOS X
+-#LIB_OPTION= -shared #for Linux
++#LIB_EXT= .dylib
++LIB_EXT= .so
++#LIB_OPTION= -dynamiclib #for MacOS X
++LIB_OPTION= -shared #for Linux
+-COMPAT_DIR= .
++COMPAT_DIR= /usr/local/share/lua/compat-5.1r2
+ # Compilation directives
+ # On FreeBSD systems, the following line should be commented
+-DLLIB= -ldl
++#DLLIB= -ldl
+ WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings
+-INCS= -I$(LUA_INC) -I$(COMPAT_DIR)
+-LIBS= -L$(LUA_LIBDIR) -llua -llualib -lm $(DLLIB)
++INCS= -I$(LUA_INC) -I$(COMPAT_DIR) -I/usr/local/include
++LIBS= -L$(LUA_LIBDIR) -L/usr/local/lib -llua -llualib -lm $(DLLIB)
+ CFLAGS= $(WARN) $(INCS)
+ CC= gcc
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-filesystem/pkg-descr b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-filesystem/pkg-descr
new file mode 100644 (file)
index 0000000..c2d132b
--- /dev/null
@@ -0,0 +1 @@
+Portable file system manipulation routines for Lua.
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-gettext/Makefile b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-gettext/Makefile
new file mode 100644 (file)
index 0000000..c0ae7ed
--- /dev/null
@@ -0,0 +1,48 @@
+# New ports collection makefile for:   lua50-gettext
+# Date created:                                23 Feb 2005
+# Whom:                                        Chris Pressey
+
+PORTNAME=      lua50-gettext
+PORTVERSION=   0.1
+INTERNAL=      YES
+CATEGORIES=    devel
+DISTNAME=      luagettext-${PORTVERSION}
+WRKSRC=                work/gettext
+
+LIB_DEPENDS=   lua50.5:${PORTSDIR}/lang/lua50 \
+               intl.6:${PORTSDIR}/devel/gettext
+BUILD_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+RUN_DEPENDS=   ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+
+MAINTAINER=    cpressey@catseye.mine.nu
+COMMENT=       Gettext binding for Lua 5.0.x
+
+PLIST_FILES=   lib/lua/5.0/lgettext.so \
+               share/lua/5.0/gettext.lua
+
+do-fetch:
+       @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then                \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!";   \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved";   \
+               ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the";       \
+               ${ECHO_MSG} "BSD Installer CVS repository.  Please see the shell scripts in the";       \
+               ${ECHO_MSG} "scripts/build directory of the repository for more information on how";    \
+               ${ECHO_MSG} "to create these distfiles.";                       \
+               false;                                                          \
+       fi
+
+do-install:
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lgettext.so ${LOCALBASE}/lib/lua/5.0/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/gettext.lua ${LOCALBASE}/share/lua/5.0/
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include <bsd.port.mk>
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include <bsd.dfport.mk>
+.endif
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-gettext/pkg-descr b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-gettext/pkg-descr
new file mode 100644 (file)
index 0000000..68e55f9
--- /dev/null
@@ -0,0 +1 @@
+Lua bindings for Gettext.
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-posix/Makefile b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-posix/Makefile
new file mode 100644 (file)
index 0000000..ade3609
--- /dev/null
@@ -0,0 +1,35 @@
+# New ports collection makefile for:   lua50-posix
+# Date created:                                10 Feb 2005
+# Whom:                                        Chris Pressey
+
+PORTNAME=      lua50-posix
+PORTVERSION=   2005.0327
+CATEGORIES=    devel
+DISTNAME=      lposix
+WRKSRC=                work/posix
+MASTER_SITES=  http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/
+
+LIB_DEPENDS=   lua50.5:${PORTSDIR}/lang/lua50
+BUILD_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+RUN_DEPENDS=   ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+
+MAINTAINER=    cpressey@catseye.mine.nu
+COMMENT=       POSIX bindings for Lua 5.0.x
+
+PLIST_FILES=   lib/lua/5.0/lposix.so   \
+               share/lua/5.0/posix.lua
+
+do-install:
+       ${INSTALL_DATA} ${WRKSRC}/lposix.so ${PREFIX}/lib/lua/5.0/
+       ${INSTALL_DATA} ${WRKSRC}/posix.lua ${PREFIX}/share/lua/5.0/
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include <bsd.port.mk>
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include <bsd.dfport.mk>
+.endif
+
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-posix/distinfo b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-posix/distinfo
new file mode 100644 (file)
index 0000000..0348f78
--- /dev/null
@@ -0,0 +1,2 @@
+MD5 (lposix.tar.gz) = f22871247e444412a901d179028a0d82
+SIZE (lposix.tar.gz) = 9651
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-posix/files/patch-Makefile b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-posix/files/patch-Makefile
new file mode 100644 (file)
index 0000000..758f8b1
--- /dev/null
@@ -0,0 +1,41 @@
+--- Makefile.orig      2003-11-05 16:26:49.000000000 -0800
++++ Makefile   2005-04-03 14:22:32.000000000 -0700
+@@ -1,30 +1,33 @@
+ # makefile for POSIX library for Lua
+ # change these to reflect your Lua installation
+-LUA= /tmp/lhf/lua-5.0
++LUA= /usr/local
+ LUAINC= $(LUA)/include
+ LUALIB= $(LUA)/lib
+ LUABIN= $(LUA)/bin
+ # no need to change anything below here
+ CFLAGS= -fPIC $(INCS) $(WARN) -O2 $G
+-WARN= -pedantic -Wall
++WARN= -Wall
+ INCS= -I$(LUAINC)
+ MYNAME= posix
+ MYLIB= l$(MYNAME)
+-OBJS= $(MYLIB).o
++OBJS= $(MYLIB).o compat-5.1.o
+ T= $(MYLIB).so
+-all:  test
++all:  $T
+ test: $T
+       $(LUABIN)/lua -l$(MYNAME) test.lua
+ $T:   $(OBJS)
+-      $(CC) -o $@ -shared $(OBJS)
++      $(CC) -o $@ -shared $(OBJS) -L$(LUALIB) -llua50 -llualib50
++
++compat-5.1.c: $(LUALIB)/lua/compat-5.1r2/compat-5.1.c
++      cp $(LUALIB)/lua/compat-5.1r2/compat-5.1.? .
+ $(OBJS): modemuncher.c
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-posix/files/patch-lposix.c b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-posix/files/patch-lposix.c
new file mode 100644 (file)
index 0000000..873bfe4
--- /dev/null
@@ -0,0 +1,139 @@
+--- lposix.c.orig      Thu Nov  6 03:23:48 2003
++++ lposix.c   Mon Apr  4 17:30:55 2005
+@@ -9,6 +9,7 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <grp.h>
++#include <math.h>
+ #include <pwd.h>
+ #include <signal.h>
+ #include <stdio.h>
+@@ -24,10 +25,10 @@
+ #include <utime.h>
+ #define MYNAME                "posix"
+-#define MYVERSION     MYNAME " library for " LUA_VERSION " / Nov 2003"
++#define MYVERSION     "2005.0327"
+-#include "lua.h"
+-#include "lauxlib.h"
++#include "lua50/lua.h"
++#include "lua50/lauxlib.h"
+ #ifndef MYBUFSIZ
+ #define MYBUFSIZ 512
+@@ -112,6 +113,20 @@
+               return pusherror(L, info);
+ }
++/*
++ * This function is adapted from liolib.c: push a FILE * onto the
++ * Lua stack as a file object that Lua's file module understands.
++ */
++static void pushfileptr(lua_State *L, FILE *f)
++{
++      FILE **pf;
++
++      pf = (FILE **)lua_newuserdata(L, sizeof(FILE *));
++      *pf = f;  
++      luaL_getmetatable(L, "FILE*");
++      lua_setmetatable(L, -2);
++}
++
+ static void badoption(lua_State *L, int i, const char *what, int option)
+ {
+       luaL_argerror(L, 2,
+@@ -312,6 +327,33 @@
+ }
++static int Pmkstemp(lua_State *L)             /** mkstemp(template) */
++{
++      char *tpl;
++      int fd;
++      FILE *f;
++
++      if ((tpl = strdup(luaL_checkstring(L, 1))) == NULL) {
++              lua_pushnil(L);
++              lua_pushnumber(L, ENOMEM);
++              return(2);
++      }
++      fd = mkstemp(tpl);
++      f = fdopen(fd, "w+");
++      if (f == NULL) {
++              lua_pushnil(L);
++              lua_pushnumber(L, errno);
++              free(tpl);
++              return(1);
++      }
++
++      pushfileptr(L, f);
++      lua_pushstring(L, tpl);
++      free(tpl);
++      return(2);
++}
++
++
+ static int Pexec(lua_State *L)                        /** exec(path,[args]) */
+ {
+       const char *path = luaL_checkstring(L, 1);
+@@ -355,6 +397,40 @@
+ }
++static int Pnanosleep(lua_State *L)           /** nanosleep(secs,[nanosecs]) */
++{
++      double sec, nsec;
++      struct timespec ts;
++
++      sec = lua_tonumber(L, 1);
++      nsec = lua_tonumber(L, 2);
++
++      /*
++       * Any fractional part of the seconds value should
++       * slide over into the nanoseconds value.
++       */
++      nsec += (sec - floor(sec)) * 1000000000.0;
++
++      /*
++       * Don't allow overflow.
++       */
++      if (sec > 1000000000.0) {
++              sec = 1000000000.0;
++      }
++      while (nsec > 1000000000.0) {
++              nsec -= 1000000000.0;
++              sec += 1.0;
++      }
++
++      ts.tv_sec = sec;
++      ts.tv_nsec = nsec;
++
++      lua_pushnumber(L, nanosleep(&ts, NULL));
++
++      return 1;
++}
++
++
+ static int Pputenv(lua_State *L)              /** putenv(string) */
+ {
+       size_t l;
+@@ -777,6 +853,8 @@
+       {"link",                Plink},
+       {"mkdir",               Pmkdir},
+       {"mkfifo",              Pmkfifo},
++      {"mkstemp",             Pmkstemp},
++      {"nanosleep",           Pnanosleep},
+       {"pathconf",            Ppathconf},
+       {"putenv",              Pputenv},
+       {"readlink",            Preadlink},
+@@ -809,4 +887,9 @@
+       lua_pushliteral(L,MYVERSION);
+       lua_settable(L,-3);
+       return 1;
++}
++
++LUALIB_API int luaopen_lposix (lua_State *L)
++{
++      return luaopen_posix(L);
+ }
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-posix/files/patch-posix.lua b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-posix/files/patch-posix.lua
new file mode 100644 (file)
index 0000000..812965a
--- /dev/null
@@ -0,0 +1,16 @@
+--- posix.lua.orig     2003-06-18 05:47:44.000000000 -0700
++++ posix.lua  2005-03-28 20:13:37.000000000 -0800
+@@ -2,9 +2,8 @@
+ -- support code for posix library
+ -- usage lua -lposix ...
+-local function so(x)
+-      local SOPATH= os.getenv"LUA_SOPATH" or "./"
+-      assert(loadlib(SOPATH.."l"..x..".so","luaopen_"..x))()
+-end
++module("posix")
+-so"posix"
++require "lposix"
++
++return posix
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-posix/pkg-descr b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-posix/pkg-descr
new file mode 100644 (file)
index 0000000..1a7b93a
--- /dev/null
@@ -0,0 +1,2 @@
+These are POSIX bindings for lua 5.0.x.
+
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-pty/Makefile b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-pty/Makefile
new file mode 100644 (file)
index 0000000..c28d701
--- /dev/null
@@ -0,0 +1,47 @@
+# New ports collection makefile for:   lua50-pty
+# Date created:                                3 Apr 2005
+# Whom:                                        Chris Pressey
+
+PORTNAME=      lua50-pty
+PORTVERSION=   0.1
+INTERNAL=      YES
+CATEGORIES=    devel
+DISTNAME=      luapty-${PORTVERSION}
+WRKSRC=                work/pty
+
+LIB_DEPENDS=   lua50.5:${PORTSDIR}/lang/lua50
+BUILD_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+RUN_DEPENDS=   ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+
+MAINTAINER=    cpressey@catseye.mine.nu
+COMMENT=       Pty (pseudo-terminal) bindings for Lua 5.0.x
+
+PLIST_FILES=   lib/lua/5.0/lpty.so \
+               share/lua/5.0/pty.lua
+
+do-fetch:
+       @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then                \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!";   \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved";   \
+               ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the";       \
+               ${ECHO_MSG} "BSD Installer CVS repository.  Please see the shell scripts in the";       \
+               ${ECHO_MSG} "scripts/build directory of the repository for more information on how";    \
+               ${ECHO_MSG} "to create these distfiles.";                       \
+               false;                                                          \
+       fi
+
+do-install:
+       ${INSTALL_DATA} ${WRKSRC}/lpty.so ${PREFIX}/lib/lua/5.0
+       ${INSTALL_DATA} ${WRKSRC}/pty.lua ${PREFIX}/share/lua/5.0
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include <bsd.port.mk>
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include <bsd.dfport.mk>
+.endif
diff --git a/contrib/bsdinstaller-1.1.6/ports/devel/lua50-pty/pkg-descr b/contrib/bsdinstaller-1.1.6/ports/devel/lua50-pty/pkg-descr
new file mode 100644 (file)
index 0000000..a358d87
--- /dev/null
@@ -0,0 +1 @@
+Lua 5.0.x bindings Pty's (pseudo-terminals.)
diff --git a/contrib/bsdinstaller-1.1.6/ports/lang/lua50/Makefile b/contrib/bsdinstaller-1.1.6/ports/lang/lua50/Makefile
new file mode 100644 (file)
index 0000000..8a876e8
--- /dev/null
@@ -0,0 +1,50 @@
+# New ports collection makefile for:   lua50
+# Date created:                                16 Feb 2005
+# Whom:                                        Chris Pressey <cpressey@catseye.mine.nu>
+
+PORTNAME=      lua50
+PORTVERSION=   5.0.2
+CATEGORIES=    lang
+DISTNAME=      lua-${PORTVERSION}
+MASTER_SITES=  http://www.lua.org/ftp/ \
+               ftp://ftp.tecgraf.puc-rio.br/pub/lua/ \
+               ftp://csg.uwaterloo.ca/pub/lhf/lua/ \
+               ftp://ftp.ntua.gr/pub/lang/lua/ \
+               ftp://ftp.uni-trier.de/pub/languages/lua/ \
+               ftp://ftp.gwdg.de/pub/languages/lua/
+
+COMMENT=       Maintenance (5.0.x) version of Lua
+
+USE_REINPLACE= yes
+ALL_TARGET=    all so
+INSTALL_TARGET=        install soinstall
+INSTALLS_SHLIB=        YES
+
+do-configure:
+       ${REINPLACE_CMD} \
+               -e 's|^\(MYCFLAGS=\).*$$|\1 ${CFLAGS}|' \
+               -e 's|^\(LOADLIB=\).*$$|\1 -DUSE_DLOPEN=1|' \
+               -e 's|^\(CC=\).*$$|\1 ${CC}|' \
+               -e 's|^\(STRIP=\).*$$|\1 ${STRIP_CMD}|' \
+               -e 's|^\(INSTALL_ROOT=\).*$$|\1 ${PREFIX}|' \
+               -e 's|^\(INSTALL_EXEC=\).*$$|\1 ${INSTALL_PROGRAM}|' \
+               -e 's|^\(INSTALL_DATA=\).*$$|\1 ${INSTALL_DATA}|' \
+               -e 's|^\(INSTALL_INC=\).*$$|\1 ${PREFIX}/include/lua50|' \
+               -e 's|^#\(USERCONF.*READLINE.*\)$$|\1|' \
+               -e 's|^\(EXTRA_LIBS=\).*$$|\1 -lm -lreadline -lhistory -lncurses|' \
+               -e 's|V=5.0|V=5|' \
+               ${WRKSRC}/config
+
+.if ${MACHINE_ARCH:L} == "amd64"
+CFLAGS+=       -fPIC
+.endif
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include <bsd.port.mk>
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include <bsd.dfport.mk>
+.endif
diff --git a/contrib/bsdinstaller-1.1.6/ports/lang/lua50/distinfo b/contrib/bsdinstaller-1.1.6/ports/lang/lua50/distinfo
new file mode 100644 (file)
index 0000000..77a8b26
--- /dev/null
@@ -0,0 +1,2 @@
+MD5 (lua-5.0.2.tar.gz) = dea74646b7e5c621fef7174df83c34b1
+SIZE (lua-5.0.2.tar.gz) = 190442
diff --git a/contrib/bsdinstaller-1.1.6/ports/lang/lua50/files/patch-Makefile b/contrib/bsdinstaller-1.1.6/ports/lang/lua50/files/patch-Makefile
new file mode 100644 (file)
index 0000000..8ddbe4a
--- /dev/null
@@ -0,0 +1,33 @@
+--- Makefile.orig      2004-03-11 17:50:55.000000000 -0800
++++ Makefile   2005-02-16 19:56:33.000000000 -0800
+@@ -30,17 +30,16 @@
+ # official installation
+ install: all strip
+-      mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN)
++      mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB)
+       $(INSTALL_EXEC) bin/* $(INSTALL_BIN)
+       $(INSTALL_DATA) include/*.h $(INSTALL_INC)
+       $(INSTALL_DATA) lib/*.a $(INSTALL_LIB)
+-      $(INSTALL_DATA) doc/*.1 $(INSTALL_MAN)
+ # shared libraries (for Linux)
+ so:
+-      ld -o lib/liblua.so.$V -shared src/*.o
+-      ld -o lib/liblualib.so.$V -shared src/lib/*.o
+-      cd lib; ln -fs liblua.so.$V liblua.so; ln -fs liblualib.so.$V liblualib.so
++      ld -o lib/liblua50.so.$V -shared src/*.o
++      ld -o lib/liblualib50.so.$V -shared src/lib/*.o
++      cd lib; ln -fs liblua50.so.$V liblua50.so; ln -fs liblualib50.so.$V liblualib50.so
+ # binaries using shared libraries
+ sobin:
+@@ -51,7 +50,7 @@
+ # install shared libraries
+ soinstall:
+       $(INSTALL_EXEC) lib/*.so.* $(INSTALL_LIB)
+-      cd $(INSTALL_LIB); ln -fs liblua.so.$V liblua.so; ln -fs liblualib.so.$V liblualib.so
++      cd $(INSTALL_LIB); ln -fs liblua50.so.$V liblua50.so; ln -fs liblualib50.so.$V liblualib50.so
+ # clean shared libraries
+ soclean:
diff --git a/contrib/bsdinstaller-1.1.6/ports/lang/lua50/files/patch-src__Makefile b/contrib/bsdinstaller-1.1.6/ports/lang/lua50/files/patch-src__Makefile
new file mode 100644 (file)
index 0000000..13950f5
--- /dev/null
@@ -0,0 +1,11 @@
+--- src/Makefile.orig  2005-02-16 19:56:55.000000000 -0800
++++ src/Makefile       2005-02-16 19:57:06.000000000 -0800
+@@ -67,7 +67,7 @@
+       lvm.h \
+       lzio.h
+-T= $(LIB)/liblua.a
++T= $(LIB)/liblua50.a
+ all:  $T
diff --git a/contrib/bsdinstaller-1.1.6/ports/lang/lua50/files/patch-src__lib__Makefile b/contrib/bsdinstaller-1.1.6/ports/lang/lua50/files/patch-src__lib__Makefile
new file mode 100644 (file)
index 0000000..fef1213
--- /dev/null
@@ -0,0 +1,11 @@
+--- src/lib/Makefile.orig      2005-02-16 20:00:23.000000000 -0800
++++ src/lib/Makefile   2005-02-16 20:00:33.000000000 -0800
+@@ -9,7 +9,7 @@
+ OBJS= lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o ltablib.o lstrlib.o loadlib.o
+ SRCS= lauxlib.c lbaselib.c ldblib.c liolib.c lmathlib.c ltablib.c lstrlib.c loadlib.c
+-T= $(LIB)/liblualib.a
++T= $(LIB)/liblualib50.a
+ all:  $T
diff --git a/contrib/bsdinstaller-1.1.6/ports/lang/lua50/files/patch-src__lib__lmathlib.c b/contrib/bsdinstaller-1.1.6/ports/lang/lua50/files/patch-src__lib__lmathlib.c
new file mode 100644 (file)
index 0000000..5a24cd6
--- /dev/null
@@ -0,0 +1,20 @@
+--- src/lib/lmathlib.c.orig    Tue Mar 11 21:30:37 2003
++++ src/lib/lmathlib.c Fri May  9 02:32:59 2003
+@@ -170,7 +170,7 @@
+ static int math_random (lua_State *L) {
+   /* the `%' avoids the (rare) case of r==1, and is needed also because on
+      some systems (SunOS!) `rand()' may return a value larger than RAND_MAX */
+-  lua_Number r = (lua_Number)(rand()%RAND_MAX) / (lua_Number)RAND_MAX;
++  lua_Number r = (lua_Number)(random()%RAND_MAX) / (lua_Number)RAND_MAX;
+   switch (lua_gettop(L)) {  /* check number of arguments */
+     case 0: {  /* no arguments */
+       lua_pushnumber(L, r);  /* Number between 0 and 1 */
+@@ -196,7 +196,7 @@
+ static int math_randomseed (lua_State *L) {
+-  srand(luaL_checkint(L, 1));
++  srandom(luaL_checkint(L, 1));
+   return 0;
+ }
diff --git a/contrib/bsdinstaller-1.1.6/ports/lang/lua50/files/patch-src__lua__Makefile b/contrib/bsdinstaller-1.1.6/ports/lang/lua50/files/patch-src__lua__Makefile
new file mode 100644 (file)
index 0000000..f3d87f8
--- /dev/null
@@ -0,0 +1,18 @@
+--- src/lua/Makefile.orig      2003-04-08 19:07:23.000000000 -0700
++++ src/lua/Makefile   2005-02-16 19:59:19.000000000 -0800
+@@ -8,12 +8,12 @@
+ OBJS= lua.o
+ SRCS= lua.c
+-T= $(BIN)/lua
++T= $(BIN)/lua50
+ all:  $T
+-$T:   $(OBJS) $(LIB)/liblua.a $(LIB)/liblualib.a
+-      $(CC) -o $@ $(MYLDFLAGS) $(OBJS) -L$(LIB) -llua -llualib $(EXTRA_LIBS) $(DLLIB)
++$T:   $(OBJS) $(LIB)/liblua50.a $(LIB)/liblualib50.a
++      $(CC) -o $@ $(MYLDFLAGS) $(OBJS) -L$(LIB) -llua50 -llualib50 $(EXTRA_LIBS) $(DLLIB)
+ $(LIB)/liblua.a:
+       cd ..; $(MAKE)
diff --git a/contrib/bsdinstaller-1.1.6/ports/lang/lua50/files/patch-src__luac__Makefile b/contrib/bsdinstaller-1.1.6/ports/lang/lua50/files/patch-src__luac__Makefile
new file mode 100644 (file)
index 0000000..f7bf2ff
--- /dev/null
@@ -0,0 +1,18 @@
+--- src/luac/Makefile.orig     2003-10-21 04:54:08.000000000 -0700
++++ src/luac/Makefile  2005-02-16 19:59:00.000000000 -0800
+@@ -8,12 +8,12 @@
+ OBJS= luac.o print.o lopcodes.o
+ SRCS= luac.c print.c
+-T= $(BIN)/luac
++T= $(BIN)/luac50
+ all:  $T
+-$T:   $(OBJS) $(LIB)/liblua.a $(LIB)/liblualib.a
+-      $(CC) -o $@ $(MYLDFLAGS) $(OBJS) -L$(LIB) -llua -llualib $(EXTRA_LIBS) $(DLLIB)
++$T:   $(OBJS) $(LIB)/liblua50.a $(LIB)/liblualib50.a
++      $(CC) -o $@ $(MYLDFLAGS) $(OBJS) -L$(LIB) -llua50 -llualib50 $(EXTRA_LIBS) $(DLLIB)
+ # print.c needs opcode names from lopcodes.c
+ lopcodes.o:   ../lopcodes.c ../lopcodes.h
diff --git a/contrib/bsdinstaller-1.1.6/ports/lang/lua50/pkg-descr b/contrib/bsdinstaller-1.1.6/ports/lang/lua50/pkg-descr
new file mode 100644 (file)
index 0000000..7c3ffd8
--- /dev/null
@@ -0,0 +1,3 @@
+This is a maintenance version of Lua, 5.0.x.
+
+WWW: http://www.lua.org/
diff --git a/contrib/bsdinstaller-1.1.6/ports/lang/lua50/pkg-plist b/contrib/bsdinstaller-1.1.6/ports/lang/lua50/pkg-plist
new file mode 100644 (file)
index 0000000..ac038ae
--- /dev/null
@@ -0,0 +1,12 @@
+bin/lua50
+bin/luac50
+include/lua50/lauxlib.h
+include/lua50/lua.h
+include/lua50/lualib.h
+lib/liblua50.a
+lib/liblua50.so
+lib/liblua50.so.5
+lib/liblualib50.a
+lib/liblualib50.so
+lib/liblualib50.so.5
+
diff --git a/contrib/bsdinstaller-1.1.6/ports/net/lua50-socket/Makefile b/contrib/bsdinstaller-1.1.6/ports/net/lua50-socket/Makefile
new file mode 100644 (file)
index 0000000..cfb7dd1
--- /dev/null
@@ -0,0 +1,43 @@
+# New ports collection makefile for:   lua50-socket
+# Date created:                                15 Feb 2005
+# Whom:                                        Chris Pressey
+
+PORTNAME=      lua50-socket
+PORTVERSION=   2.0.b3
+CATEGORIES=    net
+DISTNAME=      luasocket-2.0-beta3
+MASTER_SITES=  http://www.cs.princeton.edu/~diego/professional/luasocket/
+
+COMMENT=       Socket binding for Lua 5.0.x (+5.1-compat)
+
+BUILD_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+RUN_DEPENDS=   ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+
+PLIST_FILES=   lib/lua/5.0/lsocket.so          \
+               lib/lua/5.0/lmime.so            \
+               share/lua/5.0/ftp.lua           \
+               share/lua/5.0/http.lua          \
+               share/lua/5.0/ltn12.lua         \
+               share/lua/5.0/mime.lua          \
+               share/lua/5.0/smtp.lua          \
+               share/lua/5.0/socket.lua        \
+               share/lua/5.0/tp.lua            \
+               share/lua/5.0/url.lua
+
+USE_GMAKE=     YES
+MAKEFILE=      makefile.Linux
+
+do-install:
+       ${INSTALL_DATA} ${WRKSRC}/lsocket.so ${PREFIX}/lib/lua/5.0/
+       ${INSTALL_DATA} ${WRKSRC}/lmime.so ${PREFIX}/lib/lua/5.0/
+       ${INSTALL_DATA} ${WRKSRC}/lua/*.lua ${PREFIX}/share/lua/5.0/
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include <bsd.port.mk>
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include <bsd.dfport.mk>
+.endif
diff --git a/contrib/bsdinstaller-1.1.6/ports/net/lua50-socket/distinfo b/contrib/bsdinstaller-1.1.6/ports/net/lua50-socket/distinfo
new file mode 100644 (file)
index 0000000..e00c8fb
--- /dev/null
@@ -0,0 +1,2 @@
+MD5 (luasocket-2.0-beta3.tar.gz) = ba32118746205cb088ce7fed06d8d1b7
+SIZE (luasocket-2.0-beta3.tar.gz) = 115472
diff --git a/contrib/bsdinstaller-1.1.6/ports/net/lua50-socket/files/patch-Makefile b/contrib/bsdinstaller-1.1.6/ports/net/lua50-socket/files/patch-Makefile
new file mode 100644 (file)
index 0000000..d00591c
--- /dev/null
@@ -0,0 +1,35 @@
+--- makefile.Linux.orig        2005-01-15 14:52:38.000000000 -0800
++++ makefile.Linux     2005-04-08 22:07:50.000000000 -0700
+@@ -3,7 +3,7 @@
+ COMPAT=compat-5.1r2
+-LUAC=luac
++LUAC=lua50c
+ BIN2C=bin2c
+ CC=gcc
+ OPT=-O2 $(INC) 
+@@ -28,7 +28,9 @@
+       mime.o \
+       $(COMPAT)/compat-5.1.o 
+-CFLAGS=-I../../include -I$(COMPAT) $(PROF) $(OPT) $(DBG) $(DEF) -pedantic -W -Wall 
++CFLAGS=-I../../include -I$(COMPAT) -I/usr/local/include/lua50 \
++      $(PROF) $(OPT) $(DBG) $(DEF) -pedantic -W -Wall 
++LDFLAGS=-L/usr/local/lib -llua50 -llualib50
+ LDYN=lsocket.so
+@@ -37,10 +39,10 @@
+ all: $(LDYN) $(MDYN)
+ $(LDYN): $(LOBJS)
+-      gcc -shared -o $(LDYN) $(LOBJS)
++      gcc -shared -o $(LDYN) $(LOBJS) $(LDFLAGS)
+ $(MDYN): $(MOBJS)
+-      gcc -shared -o $(MDYN) $(MOBJS)
++      gcc -shared -o $(MDYN) $(MOBJS) $(LDFLAGS)
+ auxiliar.o: auxiliar.c auxiliar.h
+ buffer.o: buffer.c buffer.h io.h timeout.h
diff --git a/contrib/bsdinstaller-1.1.6/ports/net/lua50-socket/pkg-descr b/contrib/bsdinstaller-1.1.6/ports/net/lua50-socket/pkg-descr
new file mode 100644 (file)
index 0000000..65708e1
--- /dev/null
@@ -0,0 +1,2 @@
+Luasocket is a socket binding for Lua 5.
+
diff --git a/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuibe_installer/.cvsignore b/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuibe_installer/.cvsignore
new file mode 100644 (file)
index 0000000..8e15c86
--- /dev/null
@@ -0,0 +1 @@
+distinfo
diff --git a/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuibe_installer/Makefile b/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuibe_installer/Makefile
new file mode 100644 (file)
index 0000000..c6ad07c
--- /dev/null
@@ -0,0 +1,68 @@
+# New ports collection makefile for:   dfuibe_installer
+# Date created:                        May 13, 2004
+# Whom:                                Chris Pressey <cpressey@catseye.mine.nu>
+
+PORTNAME=      dfuibe_installer
+PORTVERSION=    1.1.6
+INTERNAL=      YES
+CATEGORIES=    sysutils
+DISTNAME=      ${PORTNAME}-${PORTVERSION}
+WRKSRC=                work/installer
+
+LIB_DEPENDS=   aura.3:${PORTSDIR}/devel/libaura \
+               dfui.4:${PORTSDIR}/sysutils/libdfui \
+               installer.5:${PORTSDIR}/sysutils/libinstaller
+.if defined(WITH_NLS)
+LIB_DEPENDS:=  ${LIB_DEPENDS} \
+               intl.6:${PORTSDIR}/devel/gettext
+.endif
+
+MAINTAINER=    cpressey@catseye.mine.nu
+COMMENT=       DFUI BSD Installer backend
+
+SHAREDIR=      ${LOCALBASE}/share/dfuibe_installer
+
+.if defined(WITH_NLS)
+LOCALEDIR=     ${LOCALBASE}/share/locale
+LANGUAGES=     ru
+.endif
+
+PLIST_FILES=   sbin/dfuibe_installer \
+               share/dfuibe_installer/cmdnames.conf
+
+.if defined(WITH_NLS)
+PLIST_FILES+=  share/locale/ru/LC_MESSAGES/dfuibe_installer.mo
+.endif
+
+do-fetch:
+       @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then                \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!";   \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved";   \
+               ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the";       \
+               ${ECHO_MSG} "BSD Installer CVS repository.  Please see the shell scripts in the";       \
+               ${ECHO_MSG} "scripts/build directory of the repository for more information on how";    \
+               ${ECHO_MSG} "to create these distfiles.";                       \
+               false;                                                          \
+       fi
+
+do-install:
+       ${INSTALL_DATA} -s -o root -g wheel -m 555 ${WRKSRC}/dfuibe_installer ${LOCALBASE}/sbin
+       ${MKDIR} -p ${SHAREDIR}
+       ${INSTALL_DATA} -o root -g wheel -m 555 ${WRKSRC}/conf/cmdnames.conf ${SHAREDIR}
+       for _language in ${LANGUAGES}; do \
+               ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/po/$${_language}.mo \
+                   ${LOCALEDIR}/$${_language}/LC_MESSAGES/${PORTNAME}.mo; \
+       done
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include <bsd.port.mk>
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include <bsd.dfport.mk>
+.endif
+
diff --git a/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuibe_installer/pkg-descr b/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuibe_installer/pkg-descr
new file mode 100644 (file)
index 0000000..97dab99
--- /dev/null
@@ -0,0 +1,2 @@
+BSD Installer backend.  Uses DFUI, so one of the available
+DFUI frontends must also be installed for this to be useful.
diff --git a/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuibe_lua/.cvsignore b/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuibe_lua/.cvsignore
new file mode 100644 (file)
index 0000000..8e15c86
--- /dev/null
@@ -0,0 +1 @@
+distinfo
diff --git a/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuibe_lua/Makefile b/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuibe_lua/Makefile
new file mode 100644 (file)
index 0000000..35da752
--- /dev/null
@@ -0,0 +1,142 @@
+# New ports collection makefile for:   dfuibe_lua
+# Date created:                        Nov 27, 2004
+# Whom:                                Chris Pressey <cpressey@catseye.mine.nu>
+
+PORTNAME=      dfuibe_lua
+PORTVERSION=    0.4
+INTERNAL=      YES
+CATEGORIES=    sysutils
+DISTNAME=      ${PORTNAME}-${PORTVERSION}
+WRKSRC=                work/lua
+
+LIB_DEPENDS=   lua50.5:${PORTSDIR}/lang/lua50
+
+RUN_DEPENDS=   ${LOCALBASE}/lib/lua/5.0/lpty.so:${PORTSDIR}/devel/lua50-pty \
+               ${LOCALBASE}/lib/lua/5.0/ldfui.so:${PORTSDIR}/devel/lua50-dfui \
+               ${LOCALBASE}/share/lua/5.0/app.lua:${PORTSDIR}/devel/lua50-app
+.if defined(WITH_NLS)
+RUN_DEPENDS:=  ${RUN_DEPENDS} \
+               ${LOCALBASE}/lib/lua/5.0/lgettext.so:${PORTSDIR}/devel/lua50-gettext
+.endif
+
+MAINTAINER=    cpressey@catseye.mine.nu
+COMMENT=       DFUI Lua backend
+
+DFUIBE_LUA_DIR=        ${LOCALBASE}/share/dfuibe_lua
+
+.if defined(WITH_NLS)
+LOCALEDIR=     /usr/local/share/locale
+LANGUAGES=     ru
+.endif
+
+PLIST_FILES=   share/dfuibe_lua/main.lua \
+               share/dfuibe_lua/200_install.lua \
+               share/dfuibe_lua/400_configure.lua \
+               share/dfuibe_lua/600_upgrade.lua \
+               share/dfuibe_lua/800_netboot.lua \
+               share/dfuibe_lua/lib/bitwise.lua \
+               share/dfuibe_lua/lib/cmdchain.lua \
+               share/dfuibe_lua/lib/configvars.lua \
+               share/dfuibe_lua/lib/fsm.lua \
+               share/dfuibe_lua/lib/menu.lua \
+               share/dfuibe_lua/lib/mountpoint.lua \
+               share/dfuibe_lua/lib/network.lua \
+               share/dfuibe_lua/lib/package.lua \
+               share/dfuibe_lua/lib/storage.lua \
+               share/dfuibe_lua/lib/storage_ui.lua \
+               share/dfuibe_lua/lib/target_system.lua \
+               share/dfuibe_lua/conf/cmdnames.lua \
+               share/dfuibe_lua/conf/sources.lua \
+               share/dfuibe_lua/conf/mountpoints.lua \
+               share/dfuibe_lua/conf/def_pkgs.lua \
+               share/dfuibe_lua/pit/main.lua \
+               share/dfuibe_lua/pit/100_select_language.lua \
+               share/dfuibe_lua/pit/800_configure_network.lua \
+               share/dfuibe_lua/install/main.lua \
+               share/dfuibe_lua/install/100_welcome.lua \
+               share/dfuibe_lua/install/200_select_disk.lua \
+               share/dfuibe_lua/install/250_partition_disk.lua \
+               share/dfuibe_lua/install/300_select_part.lua \
+               share/dfuibe_lua/install/400_select_subparts.lua \
+               share/dfuibe_lua/install/450_select_packages.lua \
+               share/dfuibe_lua/install/500_install_os.lua \
+               share/dfuibe_lua/install/700_install_bootblocks.lua \
+               share/dfuibe_lua/install/800_finished.lua \
+               share/dfuibe_lua/install/900_reboot.lua \
+               share/dfuibe_lua/configure/main.lua \
+               share/dfuibe_lua/configure/100_choose_where_from.lua \
+               share/dfuibe_lua/configure/200_select_disk.lua \
+               share/dfuibe_lua/configure/300_select_part.lua \
+               share/dfuibe_lua/configure/400_mount_target_system.lua \
+               share/dfuibe_lua/configure/500_menu.lua \
+               share/dfuibe_lua/configure/600_unmount_target_system.lua \
+               share/dfuibe_lua/configure/menu/main.lua \
+               share/dfuibe_lua/configure/menu/100_set_root_password.lua \
+               share/dfuibe_lua/configure/menu/200_add_user.lua \
+               share/dfuibe_lua/configure/menu/300_set_timezone.lua \
+               share/dfuibe_lua/configure/menu/350_set_datetime.lua \
+               share/dfuibe_lua/configure/menu/400_change_console_settings.lua \
+               share/dfuibe_lua/configure/menu/500_install_packages.lua \
+               share/dfuibe_lua/configure/menu/550_remove_packages.lua \
+               share/dfuibe_lua/upgrade/main.lua \
+               share/dfuibe_lua/upgrade/200_select_disk.lua \
+               share/dfuibe_lua/upgrade/300_select_part.lua \
+               share/dfuibe_lua/upgrade/400_mount_target_system.lua \
+               share/dfuibe_lua/upgrade/500_perform_upgrade.lua \
+               share/dfuibe_lua/upgrade/600_unmount_target_system.lua \
+               share/dfuibe_lua/netboot/main.lua \
+               share/dfuibe_lua/netboot/500_setup_server.lua
+
+.if defined(WITH_NLS)
+PLIST_FILES+=  share/locale/ru/LC_MESSAGES/dfuibe_lua.mo
+.endif
+
+do-fetch:
+       @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then                \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!";   \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved";   \
+               ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the";       \
+               ${ECHO_MSG} "BSD Installer CVS repository.  Please see the shell scripts in the";       \
+               ${ECHO_MSG} "scripts/build directory of the repository for more information on how";    \
+               ${ECHO_MSG} "to create these distfiles.";                       \
+               false;                                                          \
+       fi
+
+do-install:
+       ${MKDIR} -p ${DFUIBE_LUA_DIR}
+       ${MKDIR} -p ${DFUIBE_LUA_DIR}/lib
+       ${MKDIR} -p ${DFUIBE_LUA_DIR}/conf
+       ${MKDIR} -p ${DFUIBE_LUA_DIR}/pit
+       ${MKDIR} -p ${DFUIBE_LUA_DIR}/install
+       ${MKDIR} -p ${DFUIBE_LUA_DIR}/configure
+       ${MKDIR} -p ${DFUIBE_LUA_DIR}/configure/menu
+       ${MKDIR} -p ${DFUIBE_LUA_DIR}/upgrade
+       ${MKDIR} -p ${DFUIBE_LUA_DIR}/netboot
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/*.lua ${DFUIBE_LUA_DIR}/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lib/*.lua ${DFUIBE_LUA_DIR}/lib/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/conf/*.lua ${DFUIBE_LUA_DIR}/conf/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/pit/*.lua ${DFUIBE_LUA_DIR}/pit/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/install/*.lua ${DFUIBE_LUA_DIR}/install/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/configure/*.lua ${DFUIBE_LUA_DIR}/configure/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/configure/menu/*.lua ${DFUIBE_LUA_DIR}/configure/menu/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/upgrade/*.lua ${DFUIBE_LUA_DIR}/upgrade/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/netboot/*.lua ${DFUIBE_LUA_DIR}/netboot/
+.if defined(WITH_NLS)
+       for _language in ${LANGUAGES}; do \
+               (cd ${WRKSRC}/po && msgfmt -o $${_language}.mo $${_language}); \
+               ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/po/$${_language}.mo \
+                   ${LOCALEDIR}/$${_language}/LC_MESSAGES/${PORTNAME}.mo; \
+       done
+.endif
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include <bsd.port.mk>
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include <bsd.dfport.mk>
+.endif
diff --git a/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuibe_lua/pkg-descr b/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuibe_lua/pkg-descr
new file mode 100644 (file)
index 0000000..3d3b1c9
--- /dev/null
@@ -0,0 +1,5 @@
+Lua backend for DFUI.  Most useful if one of the available
+DFUI frontends is also installed.
+
+
+
diff --git a/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_cgi/.cvsignore b/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_cgi/.cvsignore
new file mode 100644 (file)
index 0000000..8e15c86
--- /dev/null
@@ -0,0 +1 @@
+distinfo
diff --git a/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_cgi/Makefile b/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_cgi/Makefile
new file mode 100644 (file)
index 0000000..4de9ab2
--- /dev/null
@@ -0,0 +1,57 @@
+# New ports collection makefile for:   dfuife_cgi
+# Date created:                        June 5, 2004
+# Whom:                                Chris Pressey <cpressey@catseye.mine.nu>
+
+PORTNAME=      dfuife_cgi
+PORTVERSION=    1.4
+INTERNAL=      YES
+CATEGORIES=    sysutils
+DISTNAME=      ${PORTNAME}-${PORTVERSION}
+WRKSRC=                work/cgi
+
+LIB_DEPENDS=   aura.3:${PORTSDIR}/devel/libaura \
+               dfui.4:${PORTSDIR}/sysutils/libdfui
+
+MAINTAINER=    cpressey@catseye.mine.nu
+COMMENT=       DFUI CGI frontend
+
+PLIST_FILES=   www/dfuife.cgi          \
+               www/dfly-pg.gif         \
+               www/fred-bg.gif         \
+               www/fred.png            \
+               www/dfuife.css          \
+               www/dfuife.js           \
+               www/index.html
+
+do-fetch:
+       @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then                \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!";   \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved";   \
+               ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the";       \
+               ${ECHO_MSG} "BSD Installer CVS repository.  Please see the shell scripts in the";       \
+               ${ECHO_MSG} "scripts/build directory of the repository for more information on how";    \
+               ${ECHO_MSG} "to create these distfiles.";                       \
+               false;                                                          \
+       fi
+
+do-install:
+               ${INSTALL_PROGRAM} ${WRKSRC}/dfuife.cgi ${PREFIX}/www
+               ${INSTALL_DATA} ${WRKSRC}/dfly-pg.gif ${PREFIX}/www
+               ${INSTALL_DATA} ${WRKSRC}/fred-bg.gif ${PREFIX}/www
+               ${INSTALL_DATA} ${WRKSRC}/fred.png ${PREFIX}/www
+               ${INSTALL_DATA} ${WRKSRC}/dfuife.css ${PREFIX}/www
+               ${INSTALL_DATA} ${WRKSRC}/dfuife.js ${PREFIX}/www
+               ${INSTALL_DATA} ${WRKSRC}/index.html ${PREFIX}/www
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include <bsd.port.mk>
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include <bsd.dfport.mk>
+.endif
+
diff --git a/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_cgi/pkg-descr b/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_cgi/pkg-descr
new file mode 100644 (file)
index 0000000..af72ab3
--- /dev/null
@@ -0,0 +1,6 @@
+DFUI CGI frontend.  Allows a DFUI backend (such as a system
+installer) to communicate with the user via a web browser.
+
+*** NOTE *** : this port will install files into ${PREFIX}/www,
+probably /usr/local/www, overwriting any files you may already
+have there, such as /usr/local/www/index.html.
diff --git a/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_curses/.cvsignore b/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_curses/.cvsignore
new file mode 100644 (file)
index 0000000..8e15c86
--- /dev/null
@@ -0,0 +1 @@
+distinfo
diff --git a/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_curses/Makefile b/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_curses/Makefile
new file mode 100644 (file)
index 0000000..6c30d66
--- /dev/null
@@ -0,0 +1,66 @@
+# New ports collection makefile for:   dfuife_curses
+# Date created:                        May 13, 2004
+# Whom:                                Chris Pressey <cpressey@catseye.mine.nu>
+
+PORTNAME=      dfuife_curses
+PORTVERSION=    1.5
+INTERNAL=      YES
+CATEGORIES=    sysutils
+DISTNAME=      ${PORTNAME}-${PORTVERSION}
+WRKSRC=                work/ncurses
+
+LIB_DEPENDS=   aura.3:${PORTSDIR}/devel/libaura \
+               dfui.4:${PORTSDIR}/sysutils/libdfui
+
+.if defined(WITH_NLS)
+LIB_DEPENDS:=  ${LIB_DEPENDS} \
+               intl.6:${PORTSDIR}/devel/gettext
+.endif
+
+MAINTAINER=    cpressey@catseye.mine.nu
+COMMENT=       DFUI curses frontend
+
+PLIST_FILES=   sbin/dfuife_curses share/dfuife_curses/fred.txt
+.if defined(WITH_NLS)
+PLIST_FILES+=  share/locale/ru/LC_MESSAGES/dfuife_curses.mo
+.endif
+
+.if defined(WITH_NLS)
+LOCALEDIR=     ${LOCALBASE}/share/locale
+LANGUAGES=     ru
+.endif
+
+do-fetch:
+       @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then                \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!";   \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved";   \
+               ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the";       \
+               ${ECHO_MSG} "BSD Installer CVS repository.  Please see the shell scripts in the";       \
+               ${ECHO_MSG} "scripts/build directory of the repository for more information on how";    \
+               ${ECHO_MSG} "to create these distfiles.";                       \
+               false;                                                          \
+       fi
+
+do-install:
+       ${MKDIR} -p ${LOCALBASE}/share/dfuife_curses
+       ${INSTALL_PROGRAM} -o root -g wheel ${WRKSRC}/dfuife_curses ${LOCALBASE}/sbin/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/fred.txt ${LOCALBASE}/share/dfuife_curses/
+.if defined(WITH_NLS)
+       for _language in ${LANGUAGES}; do \
+               ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/po/$${_language}.mo \
+                   ${LOCALEDIR}/$${_language}/LC_MESSAGES/${PORTNAME}.mo; \
+       done
+.endif
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include <bsd.port.mk>
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include <bsd.dfport.mk>
+.endif
+
diff --git a/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_curses/pkg-descr b/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_curses/pkg-descr
new file mode 100644 (file)
index 0000000..acedf46
--- /dev/null
@@ -0,0 +1,6 @@
+DFUI curses frontend.  Allows a DFUI backend (such as a system
+installer) to communicate with the user with an addressable text
+screen-oriented ('curses') user interface.
+
+
+
diff --git a/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_qt/.cvsignore b/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_qt/.cvsignore
new file mode 100644 (file)
index 0000000..8e15c86
--- /dev/null
@@ -0,0 +1 @@
+distinfo
diff --git a/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_qt/Makefile b/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_qt/Makefile
new file mode 100644 (file)
index 0000000..fc1b063
--- /dev/null
@@ -0,0 +1,46 @@
+# New ports collection makefile for:   dfuife_qt
+# Date created:                        Oct 19, 2004
+# Whom:                                Chris Pressey <cpressey@catseye.mine.nu>
+
+PORTNAME=      dfuife_qt
+PORTVERSION=    1.2
+INTERNAL=      YES
+CATEGORIES=    sysutils
+DISTNAME=      ${PORTNAME}-${PORTVERSION}
+WRKSRC=                work/qt
+
+LIB_DEPENDS=   dfui.4:${PORTSDIR}/sysutils/libdfui
+
+USE_QT_VER=    3
+
+MAINTAINER=    cpressey@catseye.mine.nu
+COMMENT=       DFUI Qt frontend
+
+PLIST_FILES=   sbin/dfuife_qt
+
+do-fetch:
+       @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then                \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!";   \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved";   \
+               ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the";       \
+               ${ECHO_MSG} "BSD Installer CVS repository.  Please see the shell scripts in the";       \
+               ${ECHO_MSG} "scripts/build directory of the repository for more information on how";    \
+               ${ECHO_MSG} "to create these distfiles.";                       \
+               false;                                                          \
+       fi
+
+do-install:
+       ${INSTALL_PROGRAM} -o root -g wheel -m 555 ${WRKSRC}/dfuife_qt ${LOCALBASE}/sbin
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include <bsd.port.mk>
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include <bsd.dfport.mk>
+.endif
+
diff --git a/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_qt/pkg-descr b/contrib/bsdinstaller-1.1.6/ports/sysutils/dfuife_qt/pkg-descr
new file mode 100644 (file)
index 0000000..8e43136
--- /dev/null
@@ -0,0 +1,3 @@
+DFUI Qt frontend.  Allows a DFUI backend (such as a system
+installer) to communicate with the user via a graphical
+user interface built with the Qt Toolkit, as seen in KDE.
diff --git a/contrib/bsdinstaller-1.1.6/ports/sysutils/libdfui/.cvsignore b/contrib/bsdinstaller-1.1.6/ports/sysutils/libdfui/.cvsignore
new file mode 100644 (file)
index 0000000..8e15c86
--- /dev/null
@@ -0,0 +1 @@
+distinfo
diff --git a/contrib/bsdinstaller-1.1.6/ports/sysutils/libdfui/Makefile b/contrib/bsdinstaller-1.1.6/ports/sysutils/libdfui/Makefile
new file mode 100644 (file)
index 0000000..6aa3193
--- /dev/null
@@ -0,0 +1,57 @@
+# New ports collection makefile for:   libdfui
+# Date created:                        May 13, 2004
+# Whom:                                Chris Pressey <cpressey@catseye.mine.nu>
+
+PORTNAME=      libdfui
+PORTVERSION=    4.1
+INTERNAL=      YES
+CATEGORIES=    sysutils
+DISTNAME=      ${PORTNAME}-${PORTVERSION}
+WRKSRC=                work/${PORTNAME}
+
+LIB_DEPENDS=   aura.3:${PORTSDIR}/devel/libaura
+
+MAINTAINER=    cpressey@catseye.mine.nu
+COMMENT=       Abstract user interface protocol library
+
+PLIST_FILES=   lib/libdfui.a                   \
+               lib/libdfui.so                  \
+               lib/libdfui.so.4                \
+               include/dfui/dfui.h             \
+               include/dfui/dump.h             \
+               include/dfui/lang.h             \
+               include/dfui/system.h
+
+do-fetch:
+       @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then                \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!";   \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved";   \
+               ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the";       \
+               ${ECHO_MSG} "BSD Installer CVS repository.  Please see the shell scripts in the";       \
+               ${ECHO_MSG} "scripts/build directory of the repository for more information on how";    \
+               ${ECHO_MSG} "to create these distfiles.";                       \
+               false;                                                          \
+       fi
+
+do-install:
+       ${MKDIR} -p ${LOCALBASE}/include/dfui
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/libdfui.a ${LOCALBASE}/lib/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/libdfui.so.4 ${LOCALBASE}/lib/
+       ${LN} -sf ${LOCALBASE}/lib/libdfui.so.4 ${LOCALBASE}/lib/libdfui.so
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/dfui.h ${LOCALBASE}/include/dfui/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/dump.h ${LOCALBASE}/include/dfui/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lang.h ${LOCALBASE}/include/dfui/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/system.h ${LOCALBASE}/include/dfui/
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include <bsd.port.mk>
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include <bsd.dfport.mk>
+.endif
+
diff --git a/contrib/bsdinstaller-1.1.6/ports/sysutils/libdfui/pkg-descr b/contrib/bsdinstaller-1.1.6/ports/sysutils/libdfui/pkg-descr
new file mode 100644 (file)
index 0000000..82d953c
--- /dev/null
@@ -0,0 +1,6 @@
+DFUI is a user interface abstraction in the form of a protocol by
+which application logic (such as a system installer) in the backend
+can talk to a concrete user interface (such as curses or GTK) in
+the frontend.
+
+
diff --git a/contrib/bsdinstaller-1.1.6/ports/sysutils/libinstaller/.cvsignore b/contrib/bsdinstaller-1.1.6/ports/sysutils/libinstaller/.cvsignore
new file mode 100644 (file)
index 0000000..8e15c86
--- /dev/null
@@ -0,0 +1 @@
+distinfo
diff --git a/contrib/bsdinstaller-1.1.6/ports/sysutils/libinstaller/Makefile b/contrib/bsdinstaller-1.1.6/ports/sysutils/libinstaller/Makefile
new file mode 100644 (file)
index 0000000..a7770f5
--- /dev/null
@@ -0,0 +1,62 @@
+# New ports collection makefile for:   libinstaller
+# Date created:                        Aug 8, 2004
+# Whom:                                Chris Pressey <cpressey@catseye.mine.nu>
+
+PORTNAME=      libinstaller
+PORTVERSION=    5.1
+INTERNAL=      YES
+CATEGORIES=    sysutils
+DISTNAME=      ${PORTNAME}-${PORTVERSION}
+WRKSRC=                work/${PORTNAME}
+
+LIB_DEPENDS=   aura.3:${PORTSDIR}/devel/libaura \
+               dfui.4:${PORTSDIR}/sysutils/libdfui
+
+MAINTAINER=    cpressey@catseye.mine.nu
+COMMENT=       BSD Installer library
+
+PLIST_FILES=   lib/libinstaller.a              \
+               lib/libinstaller.so             \
+               lib/libinstaller.so.5           \
+               include/installer/commands.h    \
+               include/installer/confed.h      \
+               include/installer/diskutil.h    \
+               include/installer/functions.h   \
+               include/installer/package.h     \
+               include/installer/uiutil.h
+
+do-fetch:
+       @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then                \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!";   \
+               ${ECHO_MSG};                                                    \
+               ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved";   \
+               ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the";       \
+               ${ECHO_MSG} "BSD Installer CVS repository.  Please see the shell scripts in the";       \
+               ${ECHO_MSG} "scripts/build directory of the repository for more information on how";    \
+               ${ECHO_MSG} "to create these distfiles.";                       \
+               false;                                                          \
+       fi
+
+do-install:
+       ${MKDIR} -p ${LOCALBASE}/include/installer
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/libinstaller.a ${LOCALBASE}/lib/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/libinstaller.so.5 ${LOCALBASE}/lib/
+       ${LN} -sf ${LOCALBASE}/lib/libinstaller.so.5 ${LOCALBASE}/lib/libinstaller.so
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/commands.h ${LOCALBASE}/include/installer/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/confed.h ${LOCALBASE}/include/installer/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/diskutil.h ${LOCALBASE}/include/installer/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/functions.h ${LOCALBASE}/include/installer/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/package.h ${LOCALBASE}/include/installer/
+       ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/uiutil.h ${LOCALBASE}/include/installer/
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include <bsd.port.mk>
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include <bsd.dfport.mk>
+.endif
+
diff --git a/contrib/bsdinstaller-1.1.6/ports/sysutils/libinstaller/pkg-descr b/contrib/bsdinstaller-1.1.6/ports/sysutils/libinstaller/pkg-descr
new file mode 100644 (file)
index 0000000..307d932
--- /dev/null
@@ -0,0 +1,2 @@
+This is the library used by the BSD Installer.
+
diff --git a/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/Makefile b/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/Makefile
new file mode 100644 (file)
index 0000000..39281f4
--- /dev/null
@@ -0,0 +1,92 @@
+# New ports collection makefile for:   thttpd
+# Date created:                24 May 1999
+# Whom:                        Anders Nordby <anders@fix.no>
+#
+# $FreeBSD: ports/www/thttpd/Makefile,v 1.35 2004/02/01 04:51:54 silby Exp $
+#
+
+PORTNAME=      thttpd
+PORTVERSION=   2.24
+PKGNAMESUFFIX= -notimeout
+CATEGORIES=    www ipv6
+MASTER_SITES=  http://www.acme.com/software/thttpd/ \
+               http://atreides.freenix.no/~anders/
+DISTFILES=     ${DISTNAME}${EXTRACT_SUFX} notes.html
+DIST_SUBDIR=   ${PORTNAME}
+EXTRACT_ONLY=  ${DISTNAME}${EXTRACT_SUFX}
+
+MAINTAINER=    anders@FreeBSD.org
+COMMENT=       Tiny/turbo/throttling HTTP server
+
+IGNOREFILES=   notes.html
+
+GNU_CONFIGURE= yes
+USE_REINPLACE= yes
+
+MAN1=          makeweb.1 htpasswd.1
+MAN8=          thttpd.8 redirect.8 ssi.8 syslogtocern.8
+
+.include <bsd.port.pre.mk>
+
+do-install:
+       @${INSTALL_PROGRAM} ${WRKSRC}/thttpd ${PREFIX}/sbin/
+       @${INSTALL_MAN} ${WRKSRC}/thttpd.8 ${PREFIX}/man/man8
+       @${INSTALL} -d -o root -g wheel -m 0755 ${PREFIX}/www
+       @${INSTALL} -d -o root -g wheel -m 0755 ${PREFIX}/www/data
+       @${INSTALL} -d -o root -g wheel -m 0755 ${PREFIX}/www/logs
+       @${INSTALL} -d -o root -g wheel -m 0755 ${PREFIX}/www/cgi-bin
+       @${INSTALL_PROGRAM} ${WRKSRC}/cgi-src/redirect ${PREFIX}/www/cgi-bin/
+       @${INSTALL_PROGRAM} ${WRKSRC}/cgi-src/ssi ${PREFIX}/www/cgi-bin/
+       @${INSTALL_PROGRAM} ${WRKSRC}/cgi-src/phf ${PREFIX}/www/cgi-bin/
+       @${INSTALL_MAN} ${WRKSRC}/cgi-src/redirect.8 ${PREFIX}/man/man8
+       @${INSTALL_MAN} ${WRKSRC}/cgi-src/ssi.8 ${PREFIX}/man/man8
+       @${INSTALL_PROGRAM} ${WRKSRC}/extras/makeweb ${PREFIX}/bin/
+       @${INSTALL} -c -m 755 -o root -g wheel ${WRKSRC}/extras/syslogtocern ${PREFIX}/bin/
+       @${INSTALL_PROGRAM} ${WRKSRC}/extras/htpasswd ${PREFIX}/bin/
+       @${INSTALL_MAN} ${WRKSRC}/extras/makeweb.1 ${PREFIX}/man/man1
+       @${INSTALL_MAN} ${WRKSRC}/extras/htpasswd.1 ${PREFIX}/man/man1
+       @${INSTALL_MAN} ${WRKSRC}/extras/syslogtocern.8 ${PREFIX}/man/man8
+       @if [ ! -f ${PREFIX}/sbin/thttpd_wrapper ]; then \
+               ${ECHO} "Installing ${PREFIX}/sbin/thttpd_wrapper file."; \
+               ${ECHO_CMD} "#!/bin/sh" > ${PREFIX}/sbin/thttpd_wrapper; \
+               ${ECHO_CMD} "${ECHO_CMD} \$$\$$ > /var/run/thttpd_wrapper.pid" >> ${PREFIX}/sbin/thttpd_wrapper; \
+               ${ECHO_CMD} "while true ; do" >> ${PREFIX}/sbin/thttpd_wrapper; \
+               ${ECHO_CMD} "   ${PREFIX}/sbin/thttpd -D -C ${PREFIX}/etc/thttpd.conf" >> ${PREFIX}/sbin/thttpd_wrapper; \
+               ${ECHO_CMD} "   sleep 10" >> ${PREFIX}/sbin/thttpd_wrapper; \
+               ${ECHO_CMD} "done" >> ${PREFIX}/sbin/thttpd_wrapper; \
+               ${CHMOD} 751 ${PREFIX}/sbin/thttpd_wrapper; \
+       fi
+       @${ECHO} "Installing ${PREFIX}/etc/thttpd.conf.sample configuration file."
+       @${ECHO_CMD} "dir=${PREFIX}/www/data" > ${PREFIX}/etc/thttpd.conf.sample
+       @${ECHO_CMD} "chroot" >> ${PREFIX}/etc/thttpd.conf.sample
+       @${ECHO_CMD} "cgipat=*.cgi" >> ${PREFIX}/etc/thttpd.conf.sample
+       @${ECHO_CMD} "logfile=${PREFIX}/www/logs/thttpd.log" >> ${PREFIX}/etc/thttpd.conf.sample
+       @${ECHO_CMD} "pidfile=/var/run/thttpd.pid" >> ${PREFIX}/etc/thttpd.conf.sample
+       @${ECHO} "Installing ${PREFIX}/etc/rc.d/thttpd.sh sample startup file."
+       @${INSTALL_SCRIPT} -m 751 ${FILESDIR}/thttpd.sh ${PREFIX}/etc/rc.d/thttpd.sh.sample
+       @${REINPLACE_CMD} -i '' -e 's|%%PREFIX%%|${PREFIX}|g' ${PREFIX}/etc/rc.d/thttpd.sh.sample
+
+.if !defined(NOPORTDOCS)
+       @${MKDIR} ${PREFIX}/share/doc/thttpd
+       @${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/notes.html ${PREFIX}/share/doc/thttpd
+.endif
+
+post-install:
+       @${CAT} ${PKGMESSAGE}
+
+post-configure: config-message
+.if ${OSVERSION} > 502101
+       @cd ${WRKSRC} && patch < ${PATCHDIR}/extra-patch-config.h
+.endif
+
+post-build: config-message
+
+config-message:
+       @${ECHO} "====================================================================="
+       @${ECHO} ""
+       @${ECHO} "Be sure to take a look at the options in config.h before (re)building"
+       @${ECHO} "if you want to tweak the server."
+       @${ECHO} ""
+       @${ECHO} "====================================================================="
+
+.include <bsd.port.post.mk>
diff --git a/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/distinfo b/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/distinfo
new file mode 100644 (file)
index 0000000..4a24fe4
--- /dev/null
@@ -0,0 +1,3 @@
+MD5 (thttpd/thttpd-2.24.tar.gz) = 9e72c27986548d0cbc8ea850b7b47bdd
+SIZE (thttpd/thttpd-2.24.tar.gz) = 130116
+MD5 (thttpd/notes.html) = IGNORE
diff --git a/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/extra-patch-config.h b/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/extra-patch-config.h
new file mode 100644 (file)
index 0000000..4eda85b
--- /dev/null
@@ -0,0 +1,9 @@
+--- config.h.old       Sat Jan 31 22:17:25 2004
++++ config.h   Sat Jan 31 22:17:38 2004
+@@ -380,4 +380,6 @@
+ */
+ #define MIN_WOULDBLOCK_DELAY 100L
++#define USE_SENDFILE
++
+ #endif /* _CONFIG_H_ */
diff --git a/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-ab b/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-ab
new file mode 100644 (file)
index 0000000..a51144a
--- /dev/null
@@ -0,0 +1,11 @@
+--- Makefile.in.orig   Tue Apr 24 19:21:06 2001
++++ Makefile.in        Tue Apr 24 19:21:33 2001
+@@ -47,7 +47,7 @@
+ # You shouldn't need to edit anything below here.
+ CC =          @CC@
+-CCOPT =               @V_CCOPT@
++CCOPT =               @CFLAGS@
+ DEFS =                @DEFS@
+ INCLS =               -I.
+ CFLAGS =      $(CCOPT) $(DEFS) $(INCLS)
diff --git a/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-ac b/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-ac
new file mode 100644 (file)
index 0000000..5c8235b
--- /dev/null
@@ -0,0 +1,11 @@
+--- cgi-src/Makefile.in.orig   Tue Apr 24 19:44:12 2001
++++ cgi-src/Makefile.in        Tue Apr 24 19:44:25 2001
+@@ -31,7 +31,7 @@
+ MANDIR =      @mandir@
+ CC =          @CC@
+-CCOPT =               @V_CCOPT@
++CCOPT =               @CFLAGS@
+ DEFS =                @DEFS@
+ INCLS =               -I..
+ CFLAGS =      $(CCOPT) $(DEFS) $(INCLS)
diff --git a/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-ad b/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-ad
new file mode 100644 (file)
index 0000000..ffbea63
--- /dev/null
@@ -0,0 +1,11 @@
+--- extras/Makefile.in.orig    Tue Apr 24 19:46:03 2001
++++ extras/Makefile.in Tue Apr 24 19:46:13 2001
+@@ -32,7 +32,7 @@
+ MANDIR =      @mandir@
+ CC =          @CC@
+-CCOPT =               @V_CCOPT@
++CCOPT =               @CFLAGS@
+ DEFS =                @DEFS@
+ INCLS =               -I..
+ CFLAGS =      $(CCOPT) $(DEFS) $(INCLS)
diff --git a/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-config.h b/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-config.h
new file mode 100644 (file)
index 0000000..1c35486
--- /dev/null
@@ -0,0 +1,11 @@
+--- config.h.orig      2004-06-06 18:09:22.000000000 -0700
++++ config.h   2004-06-06 18:09:58.000000000 -0700
+@@ -75,7 +75,7 @@
+ ** or whatever.  If you don't want any limit, comment this out, but that's
+ ** probably a really bad idea.
+ */
+-#define CGI_TIMELIMIT 30
++/* #define CGI_TIMELIMIT 30 */
+ /* CONFIGURE: How many seconds to allow for reading the initial request
+ ** on a new connection.
diff --git a/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-libhttpd.c b/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-libhttpd.c
new file mode 100644 (file)
index 0000000..01e0054
--- /dev/null
@@ -0,0 +1,12 @@
+--- libhttpd.c.orig    Mon May 27 01:22:26 2002
++++ libhttpd.c Sun Oct 20 23:49:58 2002
+@@ -3816,6 +3816,9 @@
+           httpd_send_err( hc, 500, err500title, "", err500form, hc->encodedurl );
+           return -1;
+           }
++#ifdef USE_SENDFILE
++      hc->file_fd = *((int *) hc->file_address);
++#endif
+       send_mime(
+           hc, 200, ok200title, hc->encodings, "", hc->type, hc->sb.st_size,
+           hc->sb.st_mtime );
diff --git a/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-libhttpd.h b/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-libhttpd.h
new file mode 100644 (file)
index 0000000..329fd6a
--- /dev/null
@@ -0,0 +1,12 @@
+--- libhttpd.h.orig    Sun Oct 20 23:50:43 2002
++++ libhttpd.h Sun Oct 20 23:51:10 2002
+@@ -141,6 +141,9 @@
+     struct stat sb;
+     int conn_fd;
+     char* file_address;
++#ifdef USE_SENDFILE
++    int file_fd;
++#endif
+     } httpd_conn;
+ /* Methods. */
diff --git a/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-mmc.c b/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-mmc.c
new file mode 100644 (file)
index 0000000..c992a32
--- /dev/null
@@ -0,0 +1,89 @@
+--- mmc.c.orig Tue Oct 22 09:42:01 2002
++++ mmc.c      Fri Nov 14 12:26:39 2003
+@@ -74,6 +74,9 @@
+     time_t ctime;
+     int refcount;
+     time_t reftime;
++#ifdef USE_SENDFILE
++    int fd;
++#endif
+     void* addr;
+     unsigned int hash;
+     int hash_idx;
+@@ -140,7 +143,11 @@
+       /* Yep.  Just return the existing map */
+       ++m->refcount;
+       m->reftime = now;
++#ifdef USE_SENDFILE
++      return (&m->fd);
++#else
+       return m->addr;
++#endif
+       }
+     /* Open the file. */
+@@ -186,7 +193,9 @@
+     else
+       {
+       size_t size_size = (size_t) m->size;    /* loses on files >2GB */
+-#ifdef HAVE_MMAP
++#ifdef USE_SENDFILE
++      m->fd = fd;
++#elif defined(HAVE_MMAP)
+       /* Map the file into memory. */
+       m->addr = mmap( 0, size_size, PROT_READ, MAP_PRIVATE, fd, 0 );
+       if ( m->addr == (void*) -1 && errno == ENOMEM )
+@@ -234,8 +243,9 @@
+           }
+ #endif /* HAVE_MMAP */
+       }
++#ifndef USE_SENDFILE
+     (void) close( fd );
+-
++#endif /* !USE_SENDFILE */
+     /* Put the Map into the hash table. */
+     if ( add_hash( m ) < 0 )
+       {
+@@ -253,8 +263,12 @@
+     /* Update the total byte count. */
+     mapped_bytes += m->size;
++#ifdef USE_SENDFILE
++    return (&m->fd);
++#else
+     /* And return the address. */
+     return m->addr;
++#endif
+     }
+@@ -267,14 +281,18 @@
+     if ( sbP != (struct stat*) 0 )
+       {
+       m = find_hash( sbP->st_ino, sbP->st_dev, sbP->st_size, sbP->st_ctime );
++#ifndef USE_SENDFILE
+       if ( m != (Map*) 0 && m->addr != addr )
+           m = (Map*) 0;
++#endif
+       }
++#ifndef USE_SENDFILE
+     /* If that didn't work, try a full search. */
+     if ( m == (Map*) 0 )
+       for ( m = maps; m != (Map*) 0; m = m->next )
+           if ( m->addr == addr )
+               break;
++#endif
+     if ( m == (Map*) 0 )
+       syslog( LOG_ERR, "mmc_unmap failed to find entry!" );
+     else if ( m->refcount <= 0 )
+@@ -363,7 +381,9 @@
+     m = *mm;
+     if ( m->size != 0 )
+       {
+-#ifdef HAVE_MMAP
++#ifdef USE_SENDFILE
++      close(m->fd);       
++#elif defined(HAVE_MMAP)
+       if ( munmap( m->addr, m->size ) < 0 )
+           syslog( LOG_ERR, "munmap - %m" );
+ #else /* HAVE_MMAP */
diff --git a/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-thttpd.c b/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/patch-thttpd.c
new file mode 100644 (file)
index 0000000..fde13bd
--- /dev/null
@@ -0,0 +1,56 @@
+--- thttpd.c.orig      Tue May 13 17:14:33 2003
++++ thttpd.c   Wed Oct 29 05:50:14 2003
+@@ -1593,12 +1593,45 @@
+     if ( hc->responselen == 0 )
+       {
+       /* No, just write the file. */
++#ifdef USE_SENDFILE
++      off_t sbytes;
++      
++      sz = sendfile(
++           hc->file_fd, hc->conn_fd, c->bytes_sent,
++           MIN( c->bytes_to_send - c->bytes_sent, c->max_limit ),
++           NULL, &sbytes, 0 );
++      if (sz == -1 && errno == EAGAIN)
++          sz = sbytes > 0 ? sbytes : -1;
++      else if (sz == 0)
++          sz = sbytes;
++#else               
+       sz = write(
+           hc->conn_fd, &(hc->file_address[c->bytes_sent]),
+           MIN( c->bytes_to_send - c->bytes_sent, c->max_limit ) );
++#endif
+       }
+     else
+       {
++#ifdef USE_SENDFILE
++      struct sf_hdtr sf;
++      struct iovec iv;
++      off_t sbytes;
++
++      iv.iov_base = hc->response;
++      iv.iov_len = hc->responselen;
++      sf.headers = &iv;
++      sf.hdr_cnt = 1;
++      sf.trailers = NULL;
++      sf.trl_cnt = 0;
++      sz = sendfile(
++           hc->file_fd, hc->conn_fd, c->bytes_sent,
++           MIN( c->bytes_to_send - c->bytes_sent, c->max_limit ),
++           &sf, &sbytes, 0 );
++      if (sz == -1 && errno == EAGAIN)
++          sz = sbytes > 0 ? sbytes : -1;
++      else if (sz == 0)
++          sz = sbytes;
++#else               
+       /* Yes.  We'll combine headers and file into a single writev(),
+       ** hoping that this generates a single packet.
+       */
+@@ -1609,6 +1642,7 @@
+       iv[1].iov_base = &(hc->file_address[c->bytes_sent]);
+       iv[1].iov_len = MIN( c->bytes_to_send - c->bytes_sent, c->max_limit );
+       sz = writev( hc->conn_fd, iv, 2 );
++#endif
+       }
+     if ( sz == 0 ||
diff --git a/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/thttpd.sh b/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/files/thttpd.sh
new file mode 100644 (file)
index 0000000..e559a17
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+case "$1" in
+start)
+       if [ -x %%PREFIX%%/sbin/thttpd_wrapper ]; then
+               %%PREFIX%%/sbin/thttpd_wrapper &
+               echo -n ' thttpd'
+       fi
+       ;;
+stop)
+       kill `cat /var/run/thttpd_wrapper.pid` && killall thttpd && echo -n ' thttpd'
+       ;;
+*)
+       echo "Usage: `basename $0` {start|stop}" >&2
+       ;;
+esac
+
+exit 0
diff --git a/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/pkg-descr b/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/pkg-descr
new file mode 100644 (file)
index 0000000..d47449f
--- /dev/null
@@ -0,0 +1,24 @@
+             thttpd - tiny/turbo/throttling HTTP server
+
+thttpd is a simple, small, portable, fast, and secure HTTP server. 
+
+Simple: It handles only the minimum necessary to implement HTTP/1.1.
+
+Small: See the size comparison chart at
+http://www.acme.com/software/thttpd/notes.html#sizes.  It also has a
+very small run-time size, since it does not fork and is very careful about
+memory allocation.
+
+Portable: It compiles cleanly on SunOS 4.1.x, Solaris 2.x, BSD/OS 2.x,
+Linux 1.2.x, and OSF/1 (on a 64-bit Alpha).
+
+Fast: In typical use it's about as fast as the best full-featured servers
+(Apache, NCSA, Netscape).  Under extreme load it's much faster.
+
+Secure: It goes to great lengths to protect the web server machine
+against attacks and breakins from other sites.
+
+It also has one extremely useful feature (URL-traffic-based throttling) that
+no other server currently has.
+
+WWW: http://www.acme.com/software/thttpd/
diff --git a/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/pkg-message b/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/pkg-message
new file mode 100644 (file)
index 0000000..06a5dc7
--- /dev/null
@@ -0,0 +1,11 @@
+===========================================================================
+
+       If you want users to be able to create their own web
+       subdirectories off of the main web directory, you need to:
+
+       a) add a group for www admins
+       b) chgrp yourgroup ${PREFIX}/bin/makeweb ${PREFIX}/www
+       c) chmod 2755 ${PREFIX}/bin/makeweb
+       d) tell them about makeweb(1)
+
+===========================================================================
diff --git a/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/pkg-plist b/contrib/bsdinstaller-1.1.6/ports/www/thttpd-notimeout/pkg-plist
new file mode 100644 (file)
index 0000000..a18b507
--- /dev/null
@@ -0,0 +1,16 @@
+bin/htpasswd
+bin/makeweb
+bin/syslogtocern
+etc/rc.d/thttpd.sh.sample
+etc/thttpd.conf.sample
+sbin/thttpd
+sbin/thttpd_wrapper
+%%PORTDOCS%%share/doc/thttpd/notes.html
+www/cgi-bin/phf
+www/cgi-bin/redirect
+www/cgi-bin/ssi
+%%PORTDOCS%%@dirrm share/doc/thttpd
+@unexec rmdir %D/www/cgi-bin 2> /dev/null || true
+@unexec rmdir %D/www/data 2> /dev/null || true
+@unexec rmdir %D/www/logs 2> /dev/null || true
+@unexec rmdir %D/www 2> /dev/null || true
diff --git a/contrib/bsdinstaller-1.1.6/root_skels/installer/boot/cdboot.flp.bz2 b/contrib/bsdinstaller-1.1.6/root_skels/installer/boot/cdboot.flp.bz2
new file mode 100644 (file)
index 0000000..d8ee09c
Binary files /dev/null and b/contrib/bsdinstaller-1.1.6/root_skels/installer/boot/cdboot.flp.bz2 differ
diff --git a/contrib/bsdinstaller-1.1.6/root_skels/installer/boot/memtest86.flp.bz2 b/contrib/bsdinstaller-1.1.6/root_skels/installer/boot/memtest86.flp.bz2
new file mode 100644 (file)
index 0000000..b9ca13a
Binary files /dev/null and b/contrib/bsdinstaller-1.1.6/root_skels/installer/boot/memtest86.flp.bz2 differ
diff --git a/contrib/bsdinstaller-1.1.6/root_skels/installer/etc/defaults/pfi.conf b/contrib/bsdinstaller-1.1.6/root_skels/installer/etc/defaults/pfi.conf
new file mode 100644 (file)
index 0000000..f9770ec
--- /dev/null
@@ -0,0 +1,134 @@
+#######################################################################
+# $Id: pfi.conf,v 1.8 2005/03/19 05:31:14 cpressey Exp $
+# Defaults for pfi.conf.
+
+# A space-seperated list of what services to restart when we are done
+# changing options.  The services are the base names of RCNG scripts
+# (i.e. without the "/etc/rc.d/" prefix.)  Note that these must be
+# given explicitly in the same order they would normally be started
+# by rcorder during RCNG (e.g. "netif dhclient sshd"); they are not
+# automatically ordered by their dependencies here.
+
+pfi_rc_actions=""
+
+# Determines which installer frontend to use.  Defaults to "curses";
+# other legal options are "cgi" and "none".
+
+pfi_frontend="curses"
+
+# Determines which installer backend to use.  Typically this is
+# "/usr/local/sbin/dfuibe_installer", the traditional C backend,
+# but can be changed to start an alternate backend.
+
+pfi_backend="/usr/local/sbin/dfuibe_installer"
+
+# When using the curses frontend:
+# Set the amount of time, in milliseconds, which must pass after
+# the 'ESC' key is pressed, in order for it to be recognized
+# as a plain 'ESC' keystroke, and not part of an escape code.
+
+pfi_curses_escdelay="150"
+
+# A password to set as the root password on the LiveCD, if any.
+
+pfi_set_root_password=""
+
+# Control corresponding sshd options.  To make sure sshd restarts with
+# these options, add "sshd" to pfi_rc_actions.
+
+pfi_sshd_permit_root_login="NO"
+pfi_sshd_permit_empty_passwords="NO"
+
+# An script to run before the installer.  It is assumed this script is
+# located on the pfi media.  While it is run, the media's root directory
+# is mounted on /mnt.
+
+pfi_script=""
+
+# A program to run before the installer.  It is assumed to reside on
+# the LiveCD; /mnt is not mounted.
+
+pfi_run=""
+
+# What transport layer the DFUI in the installer should use.  Valid
+# values are currently "caps", "npipe", and "tcp".
+
+pfi_dfui_transport="tcp"
+
+# User to automatically log in as, or "NONE".
+
+pfi_autologin="NONE"
+
+# Command to use to reboot.  "shutdown -h now" is typically used
+# interactively, to give the user a chance to eject the disk, but
+# "shutdown -r now" can be used for headless operation.
+
+pfi_shutdown_command="shutdown -h now"
+
+#######################################################################
+# EXAMPLES
+# To use one of these examples, extract it to a text file and remove the
+# leading pound-signs.  Copy this text file to the file "/pfi.conf"
+# on a floppy disk or USB pen drive (hereinafter referred to as "the pfi
+# media") and have that media inserted or attached to the computer while
+# you boot from the installer CD-ROM.  The installer will attempt to
+# locate this file and, if found, will use the variables present within it
+# to configure the installer boot process.
+
+# This file has the same syntax as /etc/rc.conf, and it can contain any
+# setting which is meaningful in /etc/rc.conf as well.  Any rc.conf
+# setting which is given will only be obeyed, however, if the RCNG script
+# to which that setting applies is named in pfi_rc_actions.
+
+# EXAMPLE 1:
+# Boot the installer headless, configure the network interface dc0,
+# and start the CGI frontend.
+#
+# ifconfig_dc0="DHCP"
+# pfi_rc_actions="netif dhclient"
+# pfi_frontend="cgi"
+# pfi_autologin="installer"
+# pfi_shutdown_command="shutdown -r now"
+
+# EXAMPLE 2:
+# Boot the installer headless, configure the network interface rl0,
+# and allow ssh'ing into the box as root with the password "sekrit".
+#
+# ifconfig_rl0="DHCP"
+# pfi_sshd_permit_root_login="YES"
+# pfi_set_root_password="sekrit"
+# pfi_rc_actions="netif dhclient sshd"
+# pfi_frontend="none"
+# pfi_autologin="installer"
+# pfi_shutdown_command="shutdown -r now"
+
+# EXAMPLE 3:
+# Boot the cd and setup a PXE/TFTP/DCHPD server environment
+# so that clients can boot from the network and enter the installer
+#
+# Enable tftp and NFS services with pxeboot and a kernel available via
+# tftp and the CD's root mount available via NFS.
+#
+# pfi_boot_tftp_server="YES"
+# pfi_boot_nfs_server="YES"
+# pfi_boot_pxeserver="YES"
+# pfi_boot_ipserver="YES"
+# pfi_option_subnet-mask="255.255.255.0"
+# pfi_option_routers="10.0.250.1"
+# pfi_filename="pxeboot"
+# pfi_ddns-update-style="none"
+# pfi_option_domain-name="domain.com"
+# pfi_option_broadcast-address="10.0.250.255"
+# pfi_option_domain-name-servers="192.168.64.3"
+# pfi_server-name="DHCPServer"
+# pfi_server-identifier="10.0.250.50"
+# pfi_default-lease-time="7200"
+# pfi_max-lease-time="7200"
+# pfi_subnet="10.0.250.0 netmask 255.255.255.0"
+# pfi_next-server="10.0.250.50"
+# pfi_range="10.0.250.29 10.0.250.250"
+
+# EXAMPLE 4:
+# Test-drive the new, experimental Lua backend.
+#
+# pfi_backend="/usr/local/bin/lua50c51 /usr/local/share/dfuibe_lua/main.lua"
diff --git a/contrib/bsdinstaller-1.1.6/root_skels/installer/etc/fstab b/contrib/bsdinstaller-1.1.6/root_skels/installer/etc/fstab
new file mode 100644 (file)
index 0000000..94f6462
--- /dev/null
@@ -0,0 +1,12 @@
+# $Id: fstab,v 1.3 2005/01/08 20:37:05 cpressey Exp $
+# $DragonFly: src/contrib/bsdinstaller-1.1.6/root_skels/installer/etc/Attic/fstab,v 1.1.1.1 2008/03/12 22:15:45 dave Exp $
+#
+# Device               Mountpoint      FStype  Options         Dump    Pass#
+/dev/acd0a             /               cd9660  ro,noauto       0       0
+swap                   /root           mfs     rw,-C,-s=8192   0       0
+swap                   /var            mfs     rw,-C,-s=8192   0       0
+swap                   /tmp            mfs     rw,-C,-s=8192   0       0
+swap                   /etc            mfs     rw,-C,-s=8192   0       0
+swap                   /dev            mfs     rw,-C,-s=8192,-i=512 0  0
+swap                   /usr/local/etc  mfs     rw,-C,-s=8192   0       0
+proc                   /proc           procfs  rw              0       0
diff --git a/contrib/bsdinstaller-1.1.6/root_skels/installer/etc/issue b/contrib/bsdinstaller-1.1.6/root_skels/installer/etc/issue
new file mode 100644 (file)
index 0000000..ef021a4
--- /dev/null
@@ -0,0 +1,7 @@
+Welcome to DragonFly!
+
+To start the installer, login as 'installer'.  To just get a shell prompt,
+login as 'root'.
+
+Once you are booting from your hard drive, you can get rid of this 
+annoying message by removing the file /etc/issue.
diff --git a/contrib/bsdinstaller-1.1.6/root_skels/installer/etc/master.passwd b/contrib/bsdinstaller-1.1.6/root_skels/installer/etc/master.passwd
new file mode 100644 (file)
index 0000000..be1205d
--- /dev/null
@@ -0,0 +1,22 @@
+# $DragonFly: src/contrib/bsdinstaller-1.1.6/root_skels/installer/etc/Attic/master.passwd,v 1.1.1.1 2008/03/12 22:15:45 dave Exp $
+#
+root::0:0::0:0:Charlie &:/root:/bin/csh
+toor:*:0:0::0:0:Bourne-again Superuser:/root:
+installer::0:0::0:0:Bourne-again Superuser:/root:/usr/local/bin/installer
+daemon:*:1:1::0:0:Owner of many system processes:/root:/sbin/nologin
+operator:*:2:5::0:0:System &:/:/sbin/nologin
+bin:*:3:7::0:0:Binaries Commands and Source:/:/sbin/nologin
+tty:*:4:65533::0:0:Tty Sandbox:/:/sbin/nologin
+kmem:*:5:65533::0:0:KMem Sandbox:/:/sbin/nologin
+games:*:7:13::0:0:Games pseudo-user:/usr/games:/sbin/nologin
+news:*:8:8::0:0:News Subsystem:/:/sbin/nologin
+man:*:9:9::0:0:Mister Man Pages:/usr/share/man:/sbin/nologin
+sshd:*:22:22::0:0:Secure Shell Daemon:/var/empty:/sbin/nologin
+smmsp:*:25:25::0:0:Sendmail Submission User:/var/spool/clientmqueue:/sbin/nologin
+mailnull:*:26:26::0:0:Sendmail Default User:/var/spool/mqueue:/sbin/nologin
+bind:*:53:53::0:0:Bind Sandbox:/:/sbin/nologin
+uucp:*:66:66::0:0:UUCP pseudo-user:/var/spool/uucppublic:/usr/libexec/uucp/uucico
+xten:*:67:67::0:0:X-10 daemon:/usr/local/xten:/sbin/nologin
+pop:*:68:6::0:0:Post Office Owner:/nonexistent:/sbin/nologin
+www:*:80:80::0:0:World Wide Web Owner:/nonexistent:/sbin/nologin
+nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/sbin/nologin
diff --git a/contrib/bsdinstaller-1.1.6/root_skels/installer/etc/rc.d/pfi b/contrib/bsdinstaller-1.1.6/root_skels/installer/etc/rc.d/pfi
new file mode 100644 (file)
index 0000000..57ed0ed
--- /dev/null
@@ -0,0 +1,201 @@
+#!/bin/sh
+
+# $Id: pfi,v 1.12 2005/03/07 06:18:21 cpressey Exp $
+# $DragonFly: src/contrib/bsdinstaller-1.1.6/root_skels/installer/etc/rc.d/Attic/pfi,v 1.1.1.1 2008/03/12 22:15:45 dave Exp $
+
+# PROVIDE: pfi
+# REQUIRE: mountoptional
+# KEYWORD: DragonFly
+
+. /etc/rc.subr
+
+name=pfi
+start_cmd="pfi_start"
+stop_cmd=":"
+
+get_pfi_config()
+{
+       [ -r /etc/pfi.conf ] && return 0
+
+       if [ -r $1/pfi.conf ]; then
+               echo " found!"
+               tr -d "\r" < $1/pfi.conf > /etc/pfi.conf
+               echo "pfi_found_on_device='$2'" >> /etc/pfi.conf
+       
+               # If the pfi.conf says to run a custom script from the pfi
+               # media, run it now, so that it has access to the pfi media.
+       
+               if [ -r /etc/defaults/pfi.conf ]; then
+                       . /etc/defaults/pfi.conf
+               fi
+               . /etc/pfi.conf
+               if [ "$pfi_script" != "" -a -x "$1/$pfi_script" ]; then
+                       $1/$pfi_script
+               fi
+               return 0
+       else
+               return 1
+       fi
+}
+
+get_authorized_hosts()
+{
+       [ -r /root/.ssh/authorized_hosts ] && return 0
+       if [ -r $1/authorized_hosts ]; then
+               echo "authorized_hosts found!"
+               mkdir -p /root/.ssh/
+               tr -d "\r" < $1/authorized_hosts > /root/.ssh/authorized_hosts
+       fi
+}
+
+look_for_pfi_config_msdos()
+{
+       [ -r /etc/pfi.conf ] && return 0
+
+       for try_device in da0s1 da1s1 fd0 fd1; do
+               echo -n "Looking for pfi.conf on /dev/${try_device}..."
+               if [ ! -e /dev/${try_device} ]; then
+                       ( cd /dev && ./MAKEDEV ${try_device} )
+               fi
+               if mount_msdos -o rdonly /dev/$try_device /mnt ; then
+                       echo -n " /dev/$try_device ok..."
+                       if get_pfi_config /mnt /dev/$try_device; then
+                               get_authorized_hosts /mnt
+                               umount /mnt
+                               return 0
+                       fi
+                       umount /mnt
+               fi
+               echo " not found"
+       done
+       return 1
+}
+
+look_for_pfi_config_cd9660()
+{
+       [ -r /etc/pfi.conf ] && return 0
+
+       for try_device in acd0c; do
+               echo -n "Looking for pfi.conf on /dev/${try_device}..."
+               if [ ! -e /dev/${try_device} ]; then
+                       ( cd /dev && ./MAKEDEV ${try_device} )
+               fi
+               if mount_cd9660 /dev/$try_device /mnt ; then
+                       echo -n " /dev/$try_device ok..."
+                       if get_pfi_config /mnt /dev/$try_device; then
+                               get_authorized_hosts /mnt
+                               umount /mnt
+                               return 0
+                       fi
+                       umount /mnt
+               fi
+               echo " not found"
+       done
+       return 1
+}
+
+pfi_start()
+{
+       echo "Starting pfi..."
+
+       # Get the pfi.conf file off the pfi media and into /etc/pfi.conf.
+
+       look_for_pfi_config_cd9660
+       look_for_pfi_config_msdos
+
+       # If the search was not successful, stub out a dummy pfi.conf.
+
+       if [ ! -r /etc/pfi.conf ]; then
+               echo '' >/etc/pfi.conf
+       fi
+
+       # Append the contents of pfi.conf onto rc.conf, so that settings
+       # (such as ifconfig_dc0="DHCP") will be picked up by pfi_rc_actions.
+
+       cp /etc/rc.conf /etc/rc.conf.orig
+       cat /etc/pfi.conf >>/etc/rc.conf
+
+       # Read in the pfi.conf we either found or created for ourselves.
+
+       if [ -r /etc/defaults/pfi.conf ]; then
+               . /etc/defaults/pfi.conf
+       fi
+       . /etc/pfi.conf
+
+       # We can perform any pre-install tasks here by
+       # examining the contents of pfi_* variables.
+
+       # Interpret pfi_sshd_* options.  These basically add settings
+       # to /etc/ssh/sshd_config; it is assumed "sshd" will appear
+       # in pfi_rc_actions to restart sshd.
+
+       case ${pfi_sshd_permit_root_login} in
+       YES)
+               echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
+               ;;
+       without-password)
+               echo "PermitRootLogin without-password" >> /etc/ssh/sshd_config
+               ;;
+       forced-commands-only)
+               echo "PermitRootLogin forced-commands-only" >> /etc/ssh/sshd_config
+               ;;
+       *)
+               ;;
+       esac
+
+       case ${pfi_sshd_permit_empty_passwords} in
+       YES)
+               echo "PermitEmptyPasswords yes" >> /etc/ssh/sshd_config
+               ;;
+       *)
+               ;;
+       esac
+
+       # Interpret pfi_set_root_password.  If it is not empty, use
+       # it to set root's LiveCD password.
+
+       if [ "X$pfi_set_root_password" != "X" ]; then
+               echo "$pfi_set_root_password" | \
+                   /usr/sbin/pw usermod root -h 0
+       fi
+
+       # The most important pre-install task is to restart
+       # any RCNG scripts listed in pfi_rc_actions with any new
+       # settings that might have been set up by pfi.conf.
+
+       if [ "X$pfi_rc_actions" != "X" ]; then
+               rev_actions=`reverse_list $pfi_rc_actions`
+
+               for _rc_elem in ${rev_actions}; do
+                       echo "Stopping ${_rc_elem}..."
+                       rcstop ${_rc_elem}
+               done
+               for _rc_elem in ${pfi_rc_actions}; do
+                       echo "Starting ${_rc_elem}..."
+                       rcstart ${_rc_elem}
+               done
+       fi
+
+       # Now restore the original pfi.conf.
+
+       mv /etc/rc.conf.orig /etc/rc.conf
+
+       # Set up auto-login if requested.
+
+       if [ "X$pfi_autologin" != "XNONE" ]; then
+               echo 'AL.pfi:\' >> /etc/gettytab
+               echo "        :al=${pfi_autologin}:tc=Pc:" >> /etc/gettytab
+               sed -i '' 's|^ttyv0.*|ttyv0 "/usr/libexec/getty AL.pfi" cons25 on secure|' /etc/ttys
+       fi
+
+       # Finally, start thttpd if the user wants to use
+       # the cgi frontend.
+
+       if [ "X$pfi_frontend" = "Xcgi" ]; then
+               echo "Starting thttpd..."
+               /usr/local/sbin/thttpd_wrapper &
+       fi
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/contrib/bsdinstaller-1.1.6/root_skels/installer/etc/ttys b/contrib/bsdinstaller-1.1.6/root_skels/installer/etc/ttys
new file mode 100644 (file)
index 0000000..e4a15e8
--- /dev/null
@@ -0,0 +1,307 @@
+#
+# $FreeBSD: src/etc/etc.i386/ttys,v 1.8 2000/01/29 12:18:03 obrien Exp $
+# $Id: ttys,v 1.3 2005/01/08 20:34:03 cpressey Exp $
+# $DragonFly: src/contrib/bsdinstaller-1.1.6/root_skels/installer/etc/Attic/ttys,v 1.1.1.1 2008/03/12 22:15:45 dave Exp $
+#      @(#)ttys        5.1 (Berkeley) 4/17/89
+#
+# This file specifies various information about terminals on the system.
+# It is used by several different programs.  Common entries for the
+# various columns include:
+#
+# name  The name of the terminal device.
+#
+# getty The program to start running on the terminal.  Typically a
+#       getty program, as the name implies.  Other common entries
+#       include none, when no getty is needed, and xdm, to start the
+#       X Window System.
+#
+# type The initial terminal type for this port.  For hardwired
+#      terminal lines, this will contain the type of terminal used.
+#      For virtual consoles, the correct type is cons25.  Other
+#      common values include network for network connections on
+#      pseudo-terminals, dialup for incoming modem ports, and unknown
+#      when the terminal type cannot be predetermined.
+#
+# status Must be on or off.  If on, init will run the getty program on
+#        the specified port.  If the word "secure" appears, this tty
+#        allows root login.
+#
+# name getty                           type    status          comments
+#
+# If console is marked "insecure", then init will ask for the root password
+# when going to single-user mode.
+console        none                            unknown off secure
+#
+ttyv0  "/usr/libexec/getty Pc"         cons25  on  secure
+# Virtual terminals
+ttyv2  "/usr/libexec/getty Pc"         cons25  on  secure
+ttyv3  "/usr/libexec/getty Pc"         cons25  on  secure
+ttyv4  "/usr/libexec/getty Pc"         cons25  on  secure
+ttyv5  "/usr/libexec/getty Pc"         cons25  on  secure
+ttyv6  "/usr/libexec/getty Pc"         cons25  on  secure
+ttyv7  "/usr/libexec/getty Pc"         cons25  on  secure
+#ttyv8 "/usr/X11R6/bin/xdm -nodaemon"  xterm   off secure
+# Serial terminals
+# vt100-color seems to work best when talking to the serial port
+# from a cu/tip running on an xterm.
+ttyd0  "/usr/libexec/getty std.9600"   vt100-color off secure
+ttyd1  "/usr/libexec/getty std.9600"   dialup  off secure
+ttyd2  "/usr/libexec/getty std.9600"   dialup  off secure
+ttyd3  "/usr/libexec/getty std.9600"   dialup  off secure
+# Pseudo terminals
+ttyp0  none                    network
+ttyp1  none                    network
+ttyp2  none                    network
+ttyp3  none                    network
+ttyp4  none                    network
+ttyp5  none                    network
+ttyp6  none                    network
+ttyp7  none                    network
+ttyp8  none                    network
+ttyp9  none                    network
+ttypa  none                    network
+ttypb  none                    network
+ttypc  none                    network
+ttypd  none                    network
+ttype  none                    network
+ttypf  none                    network
+ttypg  none                    network
+ttyph  none                    network
+ttypi  none                    network
+ttypj  none                    network
+ttypk  none                    network
+ttypl  none                    network
+ttypm  none                    network
+ttypn  none                    network
+ttypo  none                    network
+ttypp  none                    network
+ttypq  none                    network
+ttypr  none                    network
+ttyps  none                    network
+ttypt  none                    network
+ttypu  none                    network
+ttypv  none                    network
+ttyq0  none                    network
+ttyq1  none                    network
+ttyq2  none                    network
+ttyq3  none                    network
+ttyq4  none                    network
+ttyq5  none                    network
+ttyq6  none                    network
+ttyq7  none                    network
+ttyq8  none                    network
+ttyq9  none                    network
+ttyqa  none                    network
+ttyqb  none                    network
+ttyqc  none                    network
+ttyqd  none                    network
+ttyqe  none                    network
+ttyqf  none                    network
+ttyqg  none                    network
+ttyqh  none                    network
+ttyqi  none                    network
+ttyqj  none                    network
+ttyqk  none                    network
+ttyql  none                    network
+ttyqm  none                    network
+ttyqn  none                    network
+ttyqo  none                    network
+ttyqp  none                    network
+ttyqq  none                    network
+ttyqr  none                    network
+ttyqs  none                    network
+ttyqt  none                    network
+ttyqu  none                    network
+ttyqv  none                    network
+ttyr0  none                    network
+ttyr1  none                    network
+ttyr2  none                    network
+ttyr3  none                    network
+ttyr4  none                    network
+ttyr5  none                    network
+ttyr6  none                    network
+ttyr7  none                    network
+ttyr8  none                    network
+ttyr9  none                    network
+ttyra  none                    network
+ttyrb  none                    network
+ttyrc  none                    network
+ttyrd  none                    network
+ttyre  none                    network
+ttyrf  none                    network
+ttyrg  none                    network
+ttyrh  none                    network
+ttyri  none                    network
+ttyrj  none                    network
+ttyrk  none                    network
+ttyrl  none                    network
+ttyrm  none                    network
+ttyrn  none                    network
+ttyro  none                    network
+ttyrp  none                    network
+ttyrq  none                    network
+ttyrr  none                    network
+ttyrs  none                    network
+ttyrt  none                    network
+ttyru  none                    network
+ttyrv  none                    network
+ttys0  none                    network
+ttys1  none                    network
+ttys2  none                    network
+ttys3  none                    network
+ttys4  none                    network
+ttys5  none                    network
+ttys6  none                    network
+ttys7  none                    network
+ttys8  none                    network
+ttys9  none                    network
+ttysa  none                    network
+ttysb  none                    network
+ttysc  none                    network
+ttysd  none                    network
+ttyse  none                    network
+ttysf  none                    network
+ttysg  none                    network
+ttysh  none                    network
+ttysi  none                    network
+ttysj  none                    network
+ttysk  none                    network
+ttysl  none                    network
+ttysm  none                    network
+ttysn  none                    network
+ttyso  none                    network
+ttysp  none                    network
+ttysq  none                    network
+ttysr  none                    network
+ttyss  none                    network
+ttyst  none                    network
+ttysu  none                    network
+ttysv  none                    network
+ttyP0  none                    network
+ttyP1  none                    network
+ttyP2  none                    network
+ttyP3  none                    network
+ttyP4  none                    network
+ttyP5  none                    network
+ttyP6  none                    network
+ttyP7  none                    network
+ttyP8  none                    network
+ttyP9  none                    network
+ttyPa  none                    network
+ttyPb  none                    network
+ttyPc  none                    network
+ttyPd  none                    network
+ttyPe  none                    network
+ttyPf  none                    network
+ttyPg  none                    network
+ttyPh  none                    network
+ttyPi  none                    network
+ttyPj  none                    network
+ttyPk  none                    network
+ttyPl  none                    network
+ttyPm  none                    network
+ttyPn  none                    network
+ttyPo  none                    network
+ttyPp  none                    network
+ttyPq  none                    network
+ttyPr  none                    network
+ttyPs  none                    network
+ttyPt  none                    network
+ttyPu  none                    network
+ttyPv  none                    network
+ttyQ0  none                    network
+ttyQ1  none                    network
+ttyQ2  none                    network
+ttyQ3  none                    network
+ttyQ4  none                    network
+ttyQ5  none                    network
+ttyQ6  none                    network
+ttyQ7  none                    network
+ttyQ8  none                    network
+ttyQ9  none                    network
+ttyQa  none                    network
+ttyQb  none                    network
+ttyQc  none                    network
+ttyQd  none                    network
+ttyQe  none                    network
+ttyQf  none                    network
+ttyQg  none                    network
+ttyQh  none                    network
+ttyQi  none                    network
+ttyQj  none                    network
+ttyQk  none                    network
+ttyQl  none                    network
+ttyQm  none                    network
+ttyQn  none                    network
+ttyQo  none                    network
+ttyQp  none                    network
+ttyQq  none                    network
+ttyQr  none                    network
+ttyQs  none                    network
+ttyQt  none                    network
+ttyQu  none                    network
+ttyQv  none                    network
+ttyR0  none                    network
+ttyR1  none                    network
+ttyR2  none                    network
+ttyR3  none                    network
+ttyR4  none                    network
+ttyR5  none                    network
+ttyR6  none                    network
+ttyR7  none                    network
+ttyR8  none                    network
+ttyR9  none                    network
+ttyRa  none                    network
+ttyRb  none                    network
+ttyRc  none                    network
+ttyRd  none                    network
+ttyRe  none                    network
+ttyRf  none                    network
+ttyRg  none                    network
+ttyRh  none                    network
+ttyRi  none                    network
+ttyRj  none                    network
+ttyRk  none                    network
+ttyRl  none                    network
+ttyRm  none                    network
+ttyRn  none                    network
+ttyRo  none                    network
+ttyRp  none                    network
+ttyRq  none                    network
+ttyRr  none                    network
+ttyRs  none                    network
+ttyRt  none                    network
+ttyRu  none                    network
+ttyRv  none                    network
+ttyS0  none                    network
+ttyS1  none                    network
+ttyS2  none                    network
+ttyS3  none                    network
+ttyS4  none                    network
+ttyS5  none                    network
+ttyS6  none                    network
+ttyS7  none                    network
+ttyS8  none                    network
+ttyS9  none                    network
+ttySa  none                    network
+ttySb  none                    network
+ttySc  none                    network
+ttySd  none                    network
+ttySe  none                    network
+ttySf  none                    network
+ttySg  none                    network
+ttySh  none                    network
+ttySi  none                    network
+ttySj  none                    network
+ttySk  none                    network
+ttySl  none                    network
+ttySm  none                    network
+ttySn  none                    network
+ttySo  none                    network
+ttySp  none                    network
+ttySq  none                    network
+ttySr  none                    network
+ttySs  none                    network
+ttySt  none                    network
+ttySu  none                    network
+ttySv  none                    network
diff --git a/contrib/bsdinstaller-1.1.6/root_skels/installer/usr/local/bin/installer b/contrib/bsdinstaller-1.1.6/root_skels/installer/usr/local/bin/installer
new file mode 100644 (file)
index 0000000..5b0ba8b
--- /dev/null
@@ -0,0 +1,159 @@
+#!/bin/sh
+
+# installer - start installer frontend and backend as per pfi config.
+# $Id: installer,v 1.18 2005/03/19 05:31:14 cpressey Exp $
+# $DragonFly: src/contrib/bsdinstaller-1.1.6/root_skels/installer/usr/local/bin/Attic/installer,v 1.1.1.1 2008/03/12 22:15:45 dave Exp $
+
+### SUBS ###
+
+background_backend()
+{
+       RENDEZVOUS=$1
+       TRANSPORT=$2
+       cp /usr/local/sbin/dfuibe_installer /var/run/dfuibe_installer
+       /var/run/dfuibe_installer -r $RENDEZVOUS -t $TRANSPORT >/dev/null 2>&1
+       RESULT=$?
+       case "$RESULT" in
+       0)
+               ;;
+       5)
+               $pfi_shutdown_command
+               ;;
+       *)
+               ;;
+       esac
+}
+
+installer_start()
+{
+       # Console start sequence:
+       # - Backend (and all other logging) goes to console (ttyv0)
+       # - curses frontend starts on ttyv1.
+       # - Uses vidcontrol -s 2 to switch to ttyv1 once the frontend is up.
+
+       echo -n "Starting installer.  "
+
+       if [ -r /etc/defaults/pfi.conf ]; then
+               . /etc/defaults/pfi.conf
+       fi
+
+       if [ -r /etc/pfi.conf ]; then
+               echo "Reading /etc/pfi.conf ..."
+               . /etc/pfi.conf
+       else
+               echo "/etc/pfi.conf not found, starting interactive install."
+       fi
+
+       # We can set up any install variables and such
+       # here by examining pfi_* variables.
+
+       if [ "X$pfi_run" != "X" ]; then
+               pfi_frontend=none
+               $pfi_run
+       fi
+
+       case "X$pfi_dfui_transport" in
+       Xcaps)
+               sysctl kern.caps_enabled=1
+               RENDEZVOUS="installer"
+               ;;
+       Xnpipe)
+               RENDEZVOUS="installer"
+               ;;
+       Xtcp)
+               RENDEZVOUS="9999"
+               ;;
+       *)
+               echo "Unsupported DFUI transport '$pfi_dfui_transport'."
+               return
+               ;;
+       esac
+
+       if [ "X$SERIAL" = "XYES" ]; then
+               background_backend $RENDEZVOUS $pfi_dfui_transport &
+               sleep 1
+               ESCDELAY=$pfi_curses_escdelay \
+                   /usr/local/sbin/dfuife_curses \
+                       -r $RENDEZVOUS \
+                       -t $pfi_dfui_transport \
+                       -b /usr/local/share/dfuife_curses/fred.txt \
+                   2>/dev/null
+               pfi_frontend=none
+       fi
+
+       case "X$pfi_frontend" in
+       Xqt)
+               background_backend $RENDEZVOUS $pfi_dfui_transport &
+               sleep 1
+               rcrun forcestart moused
+               X -configure
+               mv /root/xorg.conf.new /etc/X11/xorg.conf
+               echo "exec dfuife_qt" > /root/.xinitrc
+               xinit
+               ;;
+       Xcgi)
+               $pfi_backend -r $RENDEZVOUS -t $pfi_dfui_transport
+               RESULT=$?
+               ;;
+       Xcurses)
+               ps auwwwxxx > /tmp/ps.txt
+               if grep -q dfuife_curses /tmp/ps.txt; then
+                       # Frontend is already running.
+               else
+                       ESCDELAY=$pfi_curses_escdelay \
+                           /usr/local/sbin/dfuife_curses \
+                               -r $RENDEZVOUS \
+                               -t $pfi_dfui_transport \
+                               -b /usr/local/share/dfuife_curses/fred.txt \
+                           2>/dev/ttyv0 </dev/ttyv1 >/dev/ttyv1 &
+               fi
+               rm -f /tmp/ps.txt
+               sleep 1
+               vidcontrol -s 2
+               $pfi_backend -r $RENDEZVOUS -t $pfi_dfui_transport
+               RESULT=$?
+               sleep 1
+               killall dfuife_curses
+               vidcontrol -s 1
+               ;;
+       Xnone)
+               RESULT=0
+               ;;
+       *)
+               echo "Unknown installer frontend '$pfi_frontend'."
+               return
+               ;;
+       esac
+
+       case "$RESULT" in
+       0)
+               ;;
+       5)
+               $pfi_shutdown_command
+               ;;
+       *)
+               ;;
+       esac
+}
+
+### MAIN ###
+
+if [ "X$1" = "Xserial" ]; then
+       SERIAL=YES
+fi
+
+TTY=`w | awk '{ print $2 }' | tail -n1`
+if [ "tty$TTY" = "ttyd0" ]; then
+       SERIAL=YES
+fi
+
+ps auwwwxxx > /tmp/ps.txt
+if grep -q dfuibe_installer /tmp/ps.txt; then
+       # Installer is already running. Log in normally.
+       rm -f /tmp/ps.txt
+else
+       rm -f /tmp/ps.txt
+       installer_start
+fi
+
+### END of installer ###
diff --git a/contrib/bsdinstaller-1.1.6/root_skels/installer/usr/local/etc/dhcpd.conf b/contrib/bsdinstaller-1.1.6/root_skels/installer/usr/local/etc/dhcpd.conf
new file mode 100644 (file)
index 0000000..851e287
--- /dev/null
@@ -0,0 +1,25 @@
+# /usr/local/etc/dhcpd.conf
+#
+ddns-update-style none;
+
+class "pxeboot-class" {
+    match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
+}
+
+class "etherboot-class" {
+    match if substring (option vendor-class-identifier, 0, 9) = "Etherboot";
+}
+
+subnet 10.1.0.0 netmask 255.255.0.0 {
+    pool {
+        allow members of "pxeboot-class";
+        allow members of "etherboot-class";
+        range 10.1.0.128 10.1.0.254;
+        option subnet-mask 255.255.255.0;
+        option broadcast-address 10.1.0.255;
+        filename "pxeboot";
+        option root-path "10.1.0.1:/cdrom";
+       next-server 10.1.0.1;
+    }
+}
+
diff --git a/contrib/bsdinstaller-1.1.6/root_skels/installer/usr/local/etc/thttpd.conf b/contrib/bsdinstaller-1.1.6/root_skels/installer/usr/local/etc/thttpd.conf
new file mode 100644 (file)
index 0000000..813d9ac
--- /dev/null
@@ -0,0 +1,8 @@
+# $DragonFly: src/contrib/bsdinstaller-1.1.6/root_skels/installer/usr/local/etc/Attic/thttpd.conf,v 1.1.1.1 2008/03/12 22:15:45 dave Exp $
+# $Id: thttpd.conf,v 1.2 2005/01/09 00:11:27 cpressey Exp $
+#
+dir=/usr/local/www
+user=root
+cgipat=*.cgi
+logfile=/var/log/thttpd.log
+pidfile=/var/run/thttpd.pid
diff --git a/contrib/bsdinstaller-1.1.6/scripts/build/.cvsignore b/contrib/bsdinstaller-1.1.6/scripts/build/.cvsignore
new file mode 100644 (file)
index 0000000..f32a221
--- /dev/null
@@ -0,0 +1 @@
+build.conf
diff --git a/contrib/bsdinstaller-1.1.6/scripts/build/build.conf.defaults b/contrib/bsdinstaller-1.1.6/scripts/build/build.conf.defaults
new file mode 100644 (file)
index 0000000..c97b535
--- /dev/null
@@ -0,0 +1,30 @@
+# $Id: build.conf.defaults,v 1.1 2005/02/21 22:18:55 cpressey Exp $
+
+# Defaults settings for the build scripts.
+# NOTE: There should be NO NEED to edit this file directly!
+# Instead, create a file build.conf with your own overrides.
+
+CVSUSER=${CVSUSER:-cpressey}                   # user to `cvs update' as
+LOCALUSER=${LOCALUSER:-catseye}                        # user who owns cvs tree
+CVSDIR=${CVSDIR:-/home/${LOCALUSER}/projects}  # local cvs checkout dir
+CVSSITE=${CVSSITE:-216.135.66.6}               # host to cvs from
+CVSROOT=${CVSROOT:-cvsroot}                    # cvsroot dir, on host
+CVSMODULE=${CVSMODULE:-installer}              # cvs module name
+CVSUPDATE=${CVSUPDATE:-NO}                     # invoke 'cvs update'?
+
+TMPDIR=${TMPDIR:-/tmp}                         # dir for temp files
+SRCDIR=${SRCDIR:-/usr/src}                     # system source dir
+PORTSDIR=${PORTSDIR:-/usr/ports}               # system ports dir
+DISTFILESDIR=${DISTFILESDIR:-${PORTSDIR}/distfiles} # distfiles dir
+PACKAGESDIR=${PACKAGESDIR:-${PORTSDIR}/packages/All} # pkgs dir
+
+REMOVEOLDPKGS=${REMOVEOLDPKGS:-YES}            # rm old pkgs when making new
+RELEASEBUILD=${RELEASEBUILD:-NO}               # NO = tack date on pkg vers
+ROOTSKEL=${ROOTSKEL:-/usr/src/nrelease/installer} # root skeleton to use
+EXTRA_ROOTSKELS=${EXTRA_ROOTSKELS:-}           # extra root skeletons
+
+INSTALL_DFUIFE_QT=${INSTALL_DFUIFE_QT:-NO}     # build & install Qt frontend
+INSTALL_DFUIBE_LUA=${INSTALL_DFUIBE_LUA:-NO}   # build & install Lua backend
+
+WITH_NLS=${WITH_NLS:-NO}                       # build pkgs with i18n
+WITH_X11=${WITH_X11:-NO}                       # build X11 support pkgs
diff --git a/contrib/bsdinstaller-1.1.6/scripts/build/build_installer_packages.sh b/contrib/bsdinstaller-1.1.6/scripts/build/build_installer_packages.sh
new file mode 100644 (file)
index 0000000..18c2b61
--- /dev/null
@@ -0,0 +1,71 @@
+#!/bin/sh -x
+
+# $Id: build_installer_packages.sh,v 1.32 2005/04/06 20:56:23 cpressey Exp $
+# Build packages for BSD Installer components.
+# This script generally requires root privledges.
+# copy_ports_to_portsdir.sh should generally be run first.
+
+SCRIPT=`realpath $0`
+SCRIPTDIR=`dirname $SCRIPT`
+
+[ -r $SCRIPTDIR/build.conf ] && . $SCRIPTDIR/build.conf
+. $SCRIPTDIR/build.conf.defaults
+. $SCRIPTDIR/pver.conf
+
+PVERSUFFIX=""
+if [ "X$RELEASEBUILD" != "XYES" ]; then
+       PVERSUFFIX=.`date "+%Y.%m%d"`
+fi
+
+WITH_NLS_DEF=""
+if [ "X$WITH_NLS" = "XYES" ]; then
+       WITH_NLS_DEF="WITH_NLS=YES"
+fi
+
+rebuild_port()
+{
+       cd $PORTSDIR/$1/$2/                     && \
+       rm -rf work distinfo                    && \
+       make makesum                            && \
+       make patch                              && \
+       chmod -R 777 work                       && \
+       make $WITH_NLS_DEF package              && \
+       rm -rf work
+}
+
+pkg_delete -f 'libaura-*'
+pkg_delete -f 'libinstaller-*'
+pkg_delete -f '*dfui*'
+pkg_delete -f 'thttpd-notimeout-*'
+pkg_delete -f 'lua50-*'
+if [ "X$REMOVEOLDPKGS" = "XYES" ]; then
+       rm -rf $PACKAGESDIR/libaura-*.????.????.t?z
+       rm -rf $PACKAGESDIR/libinstaller-*.????.????.t?z
+       rm -rf $PACKAGESDIR/*dfui*.????.????.t?z
+       rm -rf $PACKAGESDIR/lua50-*.????.????.t?z
+fi
+
+# Now, rebuild all the ports, making packages in the process.
+
+rebuild_port devel libaura                     && \
+rebuild_port sysutils libdfui                  && \
+rebuild_port sysutils libinstaller             && \
+rebuild_port sysutils dfuibe_installer         && \
+rebuild_port sysutils dfuife_curses            && \
+rebuild_port sysutils dfuife_cgi               && \
+rebuild_port www thttpd-notimeout              && \
+if [ "X$INSTALL_DFUIFE_QT" = "XYES" ]; then
+       rebuild_port sysutils dfuife_qt
+fi                                             && \
+if [ "X$INSTALL_DFUIBE_LUA" = "XYES" ]; then
+       rebuild_port lang lua50
+       rebuild_port devel lua50-compat51
+       rebuild_port devel lua50-posix
+       rebuild_port devel lua50-pty
+       rebuild_port devel lua50-gettext
+       rebuild_port devel lua50-dfui
+       rebuild_port devel lua50-filename
+       rebuild_port devel lua50-app
+       rebuild_port net lua50-socket
+       rebuild_port sysutils dfuibe_lua
+fi
diff --git a/contrib/bsdinstaller-1.1.6/scripts/build/copy_ports_to_portsdir.sh b/contrib/bsdinstaller-1.1.6/scripts/build/copy_ports_to_portsdir.sh
new file mode 100644 (file)
index 0000000..fbde24f
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/sh -x
+
+# $Id: copy_ports_to_portsdir.sh,v 1.3 2005/04/05 10:37:57 den Exp $
+# Copy the ports in our CVS tree to the system-wide ports directory.
+# This script generally requires root privledges.
+# create_installer_tarballs.sh should generally be run first.
+
+SCRIPT=`realpath $0`
+SCRIPTDIR=`dirname $SCRIPT`
+
+[ -r $SCRIPTDIR/build.conf ] && . $SCRIPTDIR/build.conf
+. $SCRIPTDIR/build.conf.defaults
+. $SCRIPTDIR/pver.conf
+
+PVERSUFFIX=""
+if [ "X$RELEASEBUILD" != "XYES" ]; then
+       PVERSUFFIX=.`date "+%Y.%m%d"`
+fi
+
+cd $CVSDIR/$CVSMODULE/ports            && \
+rm -rf */*/work                                && \
+for CATEGORY in *; do
+       for PORT in $CATEGORY/*; do
+               if [ "X$CATEGORY" != "XCVS" -a "X$PORT" != "X$CATEGORY/CVS" ]; then
+                       rm -rf $PORTSDIR/$PORT
+                       cp -Rp $PORT $PORTSDIR/$PORT
+                       if grep -q '^INTERNAL[[:space:]]*=[[:space:]]*YES[[:space:]]*$' $PORT/Makefile; then
+                               sed -i '' "s/PORTVERSION=[[:space:]]*\([^[:space:]]*\)[[:space:]]*$/PORTVERSION=\1${PVERSUFFIX}/" \
+                                   $PORTSDIR/$PORT/Makefile
+                       fi
+               fi
+       done
+done
diff --git a/contrib/bsdinstaller-1.1.6/scripts/build/create_installer_tarballs.sh b/contrib/bsdinstaller-1.1.6/scripts/build/create_installer_tarballs.sh
new file mode 100644 (file)
index 0000000..bb85559
--- /dev/null
@@ -0,0 +1,49 @@
+#!/bin/sh -x
+
+# $Id: create_installer_tarballs.sh,v 1.30 2005/04/05 10:37:57 den Exp $
+# Create tarballs from the contents of the CVS repo.
+
+SCRIPT=`realpath $0`
+SCRIPTDIR=`dirname $SCRIPT`
+
+[ -r $SCRIPTDIR/build.conf ] && . $SCRIPTDIR/build.conf
+. $SCRIPTDIR/build.conf.defaults
+. $SCRIPTDIR/pver.conf
+
+PVERSUFFIX=""
+if [ "X$RELEASEBUILD" != "XYES" ]; then
+       PVERSUFFIX=.`date "+%Y.%m%d"`
+fi
+
+rm -f $DISTFILESDIR/*dfui*
+rm -f $DISTFILESDIR/libaura-*
+
+cd $CVSDIR/$CVSMODULE/src && \
+    make clean && \
+(find $CVSDIR/$CVSMODULE -name '*.core' -print0 | xargs -0 rm -f) && \
+(find $CVSDIR/$CVSMODULE -name '.#*' -print0  | xargs -0 rm -f) && \
+cd $CVSDIR/$CVSMODULE/ports && \
+    rm -rf `find . -name 'work' -print` && \
+if [ "X$CVSUPDATE" = "XYES" ]; then
+       cd $CVSDIR/$CVSMODULE && \
+           cvs -d:ext:$CVSUSER@$CVSSITE:/$CVSROOT update
+fi && \
+cd $CVSDIR && \
+    tar zcvf $DISTFILESDIR/installer-${INSTALLER_VER}${PVERSUFFIX}.tar.gz --exclude CVS installer && \
+cd $CVSDIR/$CVSMODULE/src/lib && \
+    tar zcvf $DISTFILESDIR/libaura-${LIBAURA_VER}${PVERSUFFIX}.tar.gz --exclude CVS libaura && \
+    tar zcvf $DISTFILESDIR/libdfui-${LIBDFUI_VER}${PVERSUFFIX}.tar.gz --exclude CVS libdfui && \
+    tar zcvf $DISTFILESDIR/libinstaller-${LIBINSTALLER_VER}${PVERSUFFIX}.tar.gz --exclude CVS libinstaller && \
+cd $CVSDIR/$CVSMODULE/src/lib/lua && \
+    tar zcvf $DISTFILESDIR/luapty-${LUA50_PTY_VER}${PVERSUFFIX}.tar.gz --exclude CVS pty && \
+    tar zcvf $DISTFILESDIR/luagettext-${LUA50_GETTEXT_VER}${PVERSUFFIX}.tar.gz --exclude CVS gettext && \
+    tar zcvf $DISTFILESDIR/luadfui-${LUA50_DFUI_VER}${PVERSUFFIX}.tar.gz --exclude CVS dfui && \
+    tar zcvf $DISTFILESDIR/luafilename-${LUA50_FILENAME_VER}${PVERSUFFIX}.tar.gz --exclude CVS filename && \
+    tar zcvf $DISTFILESDIR/luaapp-${LUA50_APP_VER}${PVERSUFFIX}.tar.gz --exclude CVS app && \
+cd $CVSDIR/$CVSMODULE/src/frontends && \
+    tar zcvf $DISTFILESDIR/dfuife_curses-${DFUIFE_CURSES_VER}${PVERSUFFIX}.tar.gz --exclude CVS ncurses && \
+    tar zcvf $DISTFILESDIR/dfuife_cgi-${DFUIFE_CGI_VER}${PVERSUFFIX}.tar.gz --exclude CVS cgi && \
+    tar zcvf $DISTFILESDIR/dfuife_qt-${DFUIFE_QT_VER}${PVERSUFFIX}.tar.gz --exclude CVS qt && \
+cd $CVSDIR/$CVSMODULE/src/backend && \
+    tar zcvf $DISTFILESDIR/dfuibe_installer-${DFUIBE_INSTALLER_VER}${PVERSUFFIX}.tar.gz --exclude CVS installer && \
+    tar zcvf $DISTFILESDIR/dfuibe_lua-${DFUIBE_LUA_VER}${PVERSUFFIX}.tar.gz --exclude CVS lua
diff --git a/contrib/bsdinstaller-1.1.6/scripts/build/install_installer_packages.sh b/contrib/bsdinstaller-1.1.6/scripts/build/install_installer_packages.sh
new file mode 100644 (file)
index 0000000..39951fc
--- /dev/null
@@ -0,0 +1,88 @@
+#!/bin/sh -x
+
+# $Id: install_installer_packages.sh,v 1.32 2005/04/05 10:37:57 den Exp $
+# Install packages for the installer into the ISO-to-be, using
+# DragonFly's src/nrelease/Makefile.  This assumes a release (or
+# quickrel etc) has already been built; it simply (re)installs pkgs.
+# Note that this generally requires root privledges.
+
+SCRIPT=`realpath $0`
+SCRIPTDIR=`dirname $SCRIPT`
+
+[ -r $SCRIPTDIR/build.conf ] && . $SCRIPTDIR/build.conf
+. $SCRIPTDIR/build.conf.defaults
+. $SCRIPTDIR/pver.conf
+
+PVERSUFFIX=""
+if [ "X$RELEASEBUILD" != "XYES" ]; then
+       PVERSUFFIX=.`date "+%Y.%m%d"`
+fi
+
+INSTALLER_PACKAGES="libaura-${LIBAURA_VER}${PVERSUFFIX}
+                   libdfui-${LIBDFUI_VER}${PVERSUFFIX}
+                   libinstaller-${LIBINSTALLER_VER}${PVERSUFFIX}
+                   dfuibe_installer-${DFUIBE_INSTALLER_VER}${PVERSUFFIX}
+                   dfuife_curses-${DFUIFE_CURSES_VER}${PVERSUFFIX}
+                   dfuife_cgi-${DFUIFE_CGI_VER}${PVERSUFFIX}
+                   thttpd-notimeout-${THTTPD_NOTIMEOUT_VER}"
+
+# dfuife_qt is not installed by default, since it requires X11.
+if [ "X$INSTALL_DFUIFE_QT" = "XYES" ]; then
+       INSTALLER_PACKAGES="$INSTALLER_PACKAGES
+                           dfuife_qt-${DFUIFE_QT_VER}${PVERSUFFIX}"
+       WITH_X11="YES"
+fi
+
+# i18n is not installed by default, only because bsd-gettext needs work.
+if [ "X$WITH_NLS" = "XYES" ]; then
+       INSTALLER_PACKAGES="libiconv-${LIBICONV_VER}
+                           expat-${EXPAT_VER}
+                           gettext-${GETTEXT_VER}
+                           $INSTALLER_PACKAGES"
+fi
+
+# dfuibe_lua is not installed by default, since it's not ready yet.
+if [ "X$INSTALL_DFUIBE_LUA" = "XYES" ]; then
+       INSTALLER_PACKAGES="$INSTALLER_PACKAGES
+                           lua50-${LUA50_VER}
+                           lua50-compat51-${LUA50_COMPAT51_VER}
+                           lua50-posix-${LUA50_POSIX_VER}
+                           lua50-pty-${LUA50_PTY_VER}${PVERSUFFIX}
+                           lua50-filename-${LUA50_FILENAME_VER}${PVERSUFFIX}
+                           lua50-app-${LUA50_APP_VER}${PVERSUFFIX}
+                           lua50-gettext-${LUA50_GETTEXT_VER}${PVERSUFFIX}
+                           lua50-dfui-${LUA50_DFUI_VER}${PVERSUFFIX}
+                           lua50-socket-${LUA50_SOCKET_VER}
+                           dfuibe_lua-${DFUIBE_LUA_VER}${PVERSUFFIX}"
+fi
+
+if [ "X$WITH_X11" = "XYES" ]; then
+       INSTALLER_PACKAGES="pkgconfig-${PKGCONFIG_VER}
+                           freetype2-${FREETYPE2_VER}
+                           fontconfig-${FONTCONFIG_VER}
+                           X.org-${X_ORG_VER}
+                           png-${PNG_VER}
+                           jpeg-${JPEG_VER}
+                           lcms-${LCMS_VER}
+                           libmng-${LIBMNG_VER}
+                           qt-${QT_VER}
+                           $INSTALLER_PACKAGES"
+fi
+
+CLEAN_PACKAGES=""
+for PKG in $INSTALLER_PACKAGES; do
+       ANYPKG=`echo "$PKG" | sed 's/\\-.*$/\\-\\*/'`
+       CLEAN_PACKAGES="$CLEAN_PACKAGES '$ANYPKG'"
+done
+
+cd $SRCDIR/nrelease && \
+make pkgcleaniso EXTRA_PACKAGES="$CLEAN_PACKAGES" && \
+make pkgaddiso EXTRA_PACKAGES="$INSTALLER_PACKAGES" && \
+rm -rf $TMPDIR/root_installer && \
+cp -pR $ROOTSKEL $TMPDIR/root_installer && \
+chown -R root:wheel $TMPDIR/root_installer && \
+chmod -R 755 \
+       $TMPDIR/root_installer/etc/rc.d \
+       $TMPDIR/root_installer/usr/local/bin && \
+make customizeiso EXTRA_ROOTSKELS="$TMPDIR/root_installer $EXTRA_ROOTSKELS" && \
+rm -rf $TMPDIR/root_installer
diff --git a/contrib/bsdinstaller-1.1.6/scripts/build/make_installer_image.sh b/contrib/bsdinstaller-1.1.6/scripts/build/make_installer_image.sh
new file mode 100644 (file)
index 0000000..91610ef
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh -x
+
+# $Id: make_installer_image.sh,v 1.3 2005/04/05 10:37:57 den Exp $
+# Trivial driver script for the other four scripts.
+# Generally requires root privledges.
+# Assumes a 'cd /usr/src/nrelease && make realquickrel'
+# (or equivalent) has recently been done.
+# Can be run multiple times thereafter.
+
+SCRIPT=`realpath $0`
+SCRIPTDIR=`dirname $SCRIPT`
+
+[ -r $SCRIPTDIR/build.conf ] && . $SCRIPTDIR/build.conf
+. $SCRIPTDIR/build.conf.defaults
+
+su ${LOCALUSER} -c $SCRIPTDIR/create_installer_tarballs.sh && \
+$SCRIPTDIR/copy_ports_to_portsdir.sh && \
+$SCRIPTDIR/build_installer_packages.sh && \
+$SCRIPTDIR/install_installer_packages.sh && \
+chown -R ${LOCALUSER} ${CVSDIR}
diff --git a/contrib/bsdinstaller-1.1.6/scripts/build/pver.conf b/contrib/bsdinstaller-1.1.6/scripts/build/pver.conf
new file mode 100644 (file)
index 0000000..3c8fad1
--- /dev/null
@@ -0,0 +1,43 @@
+# $Id: pver.conf,v 1.24 2005/04/08 05:37:18 cpressey Exp $
+# Current package versions configuration file, shared by all build scripts.
+
+# Version of the project as a whole
+# (used for the source tarball of the entire repo only:)
+
+INSTALLER_VER=1.1.6
+
+# Versions of all the individual installer packages:
+
+LIBAURA_VER=3.1
+LIBDFUI_VER=4.1
+LIBINSTALLER_VER=5.1
+DFUIFE_CURSES_VER=1.5
+DFUIFE_CGI_VER=1.4
+DFUIFE_QT_VER=1.2
+DFUIBE_INSTALLER_VER=1.1.6
+DFUIBE_LUA_VER=0.4
+
+# Versions of support packages:
+
+LUA50_VER=5.0.2
+LUA50_COMPAT51_VER=5.1.r2
+LUA50_PTY_VER=0.1
+LUA50_GETTEXT_VER=0.1
+LUA50_DFUI_VER=0.1
+LUA50_APP_VER=0.1
+LUA50_FILENAME_VER=0.1
+LUA50_SOCKET_VER=2.0.b3
+LUA50_POSIX_VER=2005.0327
+THTTPD_NOTIMEOUT_VER=2.24
+LIBICONV_VER=1.9.2_1
+EXPAT_VER=1.95.8
+GETTEXT_VER=0.14.1
+PKGCONFIG_VER=0.15.0_1
+FREETYPE2_VER=2.1.7_4
+FONTCONFIG_VER=2.2.3,1
+X_ORG_VER=6.8.1_1
+PNG_VER=1.2.8_1
+JPEG_VER=6b_3
+LCMS_VER=1.14,1
+LIBMNG_VER=1.0.8
+QT_VER=3.3.3_3
diff --git a/contrib/bsdinstaller-1.1.6/scripts/build/remove_installer_packages.sh b/contrib/bsdinstaller-1.1.6/scripts/build/remove_installer_packages.sh
new file mode 100644 (file)
index 0000000..4198f4c
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh -x
+
+# $Id: remove_installer_packages.sh,v 1.3 2005/04/08 07:02:24 cpressey Exp $
+# Remove all BSD Installer packages from the running system.
+# Note that this generally requires root privledges.
+
+SCRIPT=`realpath $0`
+SCRIPTDIR=`dirname $SCRIPT`
+
+[ -r $SCRIPTDIR/build.conf ] && . $SCRIPTDIR/build.conf
+. $SCRIPTDIR/build.conf.defaults
+. $SCRIPTDIR/pver.conf
+
+PVERSUFFIX=""
+if [ "X$RELEASEBUILD" != "XYES" ]; then
+       PVERSUFFIX=.`date "+%Y.%m%d"`
+fi
+
+INSTALLER_PACKAGES='libaura-*
+                   libdfui-*
+                   libinstaller-*
+                   dfuibe_*
+                   dfuife_*
+                   thttpd-notimeout-*
+                   lua50-*'
+
+for PKG in $INSTALLER_PACKAGES; do
+       pkg_delete -f $PKG || true
+done
+
diff --git a/contrib/bsdinstaller-1.1.6/scripts/report/gen_rel_notes.lua b/contrib/bsdinstaller-1.1.6/scripts/report/gen_rel_notes.lua
new file mode 100644 (file)
index 0000000..582e16d
--- /dev/null
@@ -0,0 +1,56 @@
+-- $Id: gen_rel_notes.lua,v 1.1 2005/03/03 20:29:03 cpressey Exp $
+-- Lua script to generate release notes.
+-- Usage: lua gen_rel_notes.lua prev_release_tag this_release_tag
+-- e.g.:  lua gen_rel_notes.lua RELENG_1_1_4 RELENG_1_1_5
+
+local cvsdir = "/home/catseye/projects/installer"
+local tmpdir = "/tmp"
+local tmpfn  = tmpdir .. "/gen_rel_notes.txt"
+local old_tag, new_tag = arg[1], arg[2]
+local cmd = "cd " .. cvsdir .. " && cvs log -r" .. old_tag .. ":" .. new_tag ..
+           " >" .. tmpfn .. " 2>&1"
+os.execute(cmd)
+local file = io.open(tmpfn)
+
+local line
+local lines, logs
+
+logs = {}
+while true do
+       lines = {}
+       line = file:read("*l")
+       if not line then break end
+       while not string.find(line, "^===================") do
+               line = file:read("*l")
+               if not line then break end
+               table.insert(lines, line)
+       end
+       if not line then break end
+       table.insert(logs, lines)
+end
+file:close()
+
+for logno, logtab in logs do
+       local found, len, cap
+       local old_rev, new_rev
+       if string.find(logtab[1], "^cvs log: warning: no revision") then
+               logs[logno] = nil
+       else
+               for k, v in logtab do
+                       found, len, cap = string.find(logtab[k], "^\t" .. old_tag .. ": (.+)$")
+                       if found then old_rev = cap end
+                       found, len, cap = string.find(logtab[k], "^\t" .. new_tag .. ": (.+)$")
+                       if found then new_rev = cap end
+               end
+               if new_rev == old_rev then
+                       logs[logno] = nil
+               end
+       end
+end
+
+for logno, logtab in logs do
+       for k, v in logtab do
+               print(logno, v)
+       end
+       print("")
+end
diff --git a/contrib/bsdinstaller-1.1.6/src/Makefile b/contrib/bsdinstaller-1.1.6/src/Makefile
new file mode 100644 (file)
index 0000000..b783f82
--- /dev/null
@@ -0,0 +1,14 @@
+# Make everything.
+# $Id: Makefile,v 1.4 2005/04/05 20:53:46 cpressey Exp $
+
+SUBDIR=        lib backend frontends
+TARGETS=all in_cvs clean
+
+.for _target in ${TARGETS}
+${_target}:
+       @for _subdir in ${SUBDIR}; do                                   \
+               echo "===> $${_subdir}" &&                              \
+               cd ${.CURDIR}$//$${_subdir} &&                          \
+               ${MAKE} ${_target};                                     \
+       done
+.endfor
diff --git a/contrib/bsdinstaller-1.1.6/src/backend/Makefile b/contrib/bsdinstaller-1.1.6/src/backend/Makefile
new file mode 100644 (file)
index 0000000..299e8b4
--- /dev/null
@@ -0,0 +1,14 @@
+# Build all backends.
+# $Id: Makefile,v 1.5 2005/04/05 20:53:46 cpressey Exp $
+
+SUBDIR=        installer test lua
+TARGETS=all in_cvs clean
+
+.for _target in ${TARGETS}
+${_target}:
+       @for _subdir in ${SUBDIR}; do                                   \
+               echo "===> $${_subdir}" &&                              \
+               cd ${.CURDIR}$//$${_subdir} &&                          \
+               ${MAKE} ${_target};                                     \
+       done
+.endfor
diff --git a/contrib/bsdinstaller-1.1.6/src/backend/installer/.cvsignore b/contrib/bsdinstaller-1.1.6/src/backend/installer/.cvsignore
new file mode 100644 (file)
index 0000000..b704cc7
--- /dev/null
@@ -0,0 +1 @@
+dfuibe_installer
diff --git a/contrib/bsdinstaller-1.1.6/src/backend/installer/Makefile b/contrib/bsdinstaller-1.1.6/src/backend/installer/Makefile
new file mode 100644 (file)
index 0000000..3755ffb
--- /dev/null
@@ -0,0 +1,85 @@
+# $Id: Makefile,v 1.26 2005/04/05 19:40:46 cpressey Exp $
+
+OSTYPE!=sysctl -n kern.ostype
+
+PROG=  dfuibe_installer
+OBJS=  fn_disk.o fn_configure.o fn_diagnostic.o fn_subpart.o fn_install.o \
+       flow.o main.o
+
+WARNS= -W -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
+       -Wpointer-arith -Wno-uninitialized -Wreturn-type -Wcast-qual \
+       -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wchar-subscripts \
+       -Winline -Wnested-externs -Wredundant-decls
+
+CFLAGS+=${WARNS} -I/usr/local/include
+.ifdef DEBUG
+CFLAGS+=-g -DDEBUG
+.endif
+LDADD= -L/usr/local/lib/ -laura -ldfui -linstaller
+
+.if ${OSTYPE} == "NetBSD"
+CFLAGS+= -I/usr/pkg/include
+LDADD+= -L/usr/pkg/lib
+.endif
+
+.if defined(WITH_NLS)
+# Localization (gettext)
+LOCALEDIR=     /usr/local/share/locale
+PACKAGE=       ${PROG}
+CFLAGS+=       -DLOCALEDIR=\"${LOCALEDIR}\"
+CFLAGS+=       -DPACKAGE=\"${PACKAGE}\"
+CFLAGS+=       -DENABLE_NLS
+LDADD+=                -lintl
+LANGUAGES=     ru
+.endif
+
+# Default target:
+
+all: ${PROG} mo
+
+# To build this straight from a checkout of the CVS tree, *without* first
+# installing the support libraries, do a 'make in_cvs'.  This causes
+# search paths and symbolic links to be set up so that the build process
+# can find the needed header files and libraries.
+
+in_cvs:
+       cd ../../lib/libaura && ${MAKE} in_cvs
+       ln -sf ../../lib/libaura aura
+       cd ../../lib/libdfui && ${MAKE} in_cvs
+       ln -sf ../../lib/libdfui dfui
+       cd ../../lib/libinstaller && ${MAKE} in_cvs
+       ln -sf ../../lib/libinstaller installer
+       ${MAKE} -DIN_CVS all
+
+.if defined(IN_CVS)
+CFLAGS+=-I.
+LDADD+=        -L../../lib/libaura -L../../lib/libdfui -L../../lib/libinstaller
+.endif
+
+# Main target:
+
+${PROG}: ${OBJS}
+       ${CC} ${CFLAGS} ${OBJS} ${LDADD} -o ${PROG}
+
+# NLS (translated text) compilations:
+
+mo:
+       for _language in ${LANGUAGES}; do \
+               msgfmt -o po/$${_language}.mo po/$${_language}; \
+       done
+
+# Translator templates:
+
+pot:
+       xgettext -s --no-location --keyword=_ -o po/${PROG}.pot *.c
+
+# Cleaning up after ourselves:
+
+clean:
+       rm -f aura dfui installer
+       rm -rf ${PROG} *.o po/*.mo
+
+# Testing from within the CVS checkout.
+
+test: in_cvs
+       env LD_LIBRARY_PATH="../../lib/libaura:../../lib/libdfui:../../lib/libinstaller" ./${PROG}
diff --git a/contrib/bsdinstaller-1.1.6/src/backend/installer/conf/cmdnames.conf b/contrib/bsdinstaller-1.1.6/src/backend/installer/conf/cmdnames.conf
new file mode 100644 (file)
index 0000000..b6107f9
--- /dev/null
@@ -0,0 +1,102 @@
+# Command names for DragonFly installer backend.
+# $Id: cmdnames.conf,v 1.15 2005/04/08 02:29:17 cpressey Exp $
+
+# This is in Bourne shell syntax so that it is easily editable;
+# it is also sourced by the installer, a C program.
+
+# Note that file names here should all be relative to the
+# installation media.  They should NOT include leading slashes.
+# They may contain extra command-line options.
+
+SH=bin/sh
+MKDIR=bin/mkdir
+CHMOD=bin/chmod
+LN=bin/ln
+RM=bin/rm
+CP=bin/cp
+DATE=bin/date
+ECHO=bin/echo
+DD=bin/dd
+MV=bin/mv
+CAT=bin/cat
+TEST=bin/test
+
+# XXX 'sysctl' and '[' in the following tests should ideally include
+# the full path to the executable.
+
+# Some operating systems (OpenBSD) have block devices for disks, slices, etc.
+# Others don't.
+
+if [ X`sysctl -n kern.ostype` = "XOpenBSD" ]; then
+       TEST_DEV="$TEST -b"
+else
+       TEST_DEV="$TEST -c"
+fi
+
+# Some operating systems (DragonFly) have a version of cpdup that supports -u.
+# Others don't, and we assume it is installed as a 'port' on those systems.
+
+if [ X`sysctl -n kern.ostype` = "XDragonFly" ]; then
+       CPDUP="bin/cpdup -o -vvv -u"
+       DHCPD=usr/sbin/dhcpd
+       RPCBIND=usr/sbin/portmap
+       MOUNTD=sbin/mountd
+       NFSD=sbin/nfsd
+else
+       CPDUP="usr/local/bin/cpdup -o -vvv"
+       DHCPD=usr/local/sbin/dhcpd
+       RPCBIND=usr/sbin/rpcbind
+       MOUNTD=usr/sbin/mountd
+       NFSD=usr/sbin/nfsd
+fi
+
+MOUNT=sbin/mount
+MOUNT_MFS=sbin/mount_mfs
+UMOUNT=sbin/umount
+SWAPON=sbin/swapon
+DISKLABEL=sbin/disklabel
+NEWFS=sbin/newfs
+NEWFS_MSDOS=sbin/newfs_msdos
+FDISK=sbin/fdisk
+DUMPON=sbin/dumpon
+IFCONFIG=sbin/ifconfig
+ROUTE=sbin/route
+DHCLIENT=sbin/dhclient
+SYSCTL=sbin/sysctl
+
+TOUCH=usr/bin/touch
+YES=usr/bin/yes
+BUNZIP2=usr/bin/bunzip2
+GREP=usr/bin/grep
+KILLALL=usr/bin/killall
+BASENAME=usr/bin/basename
+SORT=usr/bin/sort
+COMM=usr/bin/comm
+AWK=usr/bin/awk
+SED=usr/bin/sed
+BC=usr/bin/bc
+TR=usr/bin/tr
+
+PWD_MKDB=usr/sbin/pwd_mkdb
+CHROOT=usr/sbin/chroot
+VIDCONTROL=usr/sbin/vidcontrol
+KBDCONTROL=usr/sbin/kbdcontrol
+PW=usr/sbin/pw
+SWAPINFO=usr/sbin/swapinfo
+BOOT0CFG=usr/sbin/boot0cfg
+FDFORMAT=usr/sbin/fdformat
+PKG_ADD=usr/sbin/pkg_add
+PKG_DELETE=usr/sbin/pkg_delete
+PKG_CREATE=usr/sbin/pkg_create
+PKG_INFO=usr/sbin/pkg_info
+INETD=usr/sbin/inetd
+
+TFTPD=usr/libexec/tftpd
+
+CVSUP=usr/local/bin/cvsup
+MEMTEST=usr/local/bin/memtest
+
+# These aren't commands, but they're configurable here nonetheless.
+
+DMESG_BOOT=var/run/dmesg.boot
+INSTALLER_TEMP="/tmp/"
diff --git a/contrib/bsdinstaller-1.1.6/src/backend/installer/flow.c b/contrib/bsdinstaller-1.1.6/src/backend/installer/flow.c
new file mode 100644 (file)
index 0000000..003a2e6
--- /dev/null
@@ -0,0 +1,1485 @@
+/*
+ * Copyright (c)2004 The DragonFly Project.  All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ *   Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * 
+ *   Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in
+ *   the documentation and/or other materials provided with the
+ *   distribution.
+ * 
+ *   Neither the name of the DragonFly Project nor the names of its
+ *   contributors may be used to endorse or promote products derived
+ *   from this software without specific prior written permission. 
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+/*
+ * flow.c
+ * Workflow logic for installer.
+ * $Id: flow.c,v 1.67 2005/04/08 08:09:23 cpressey Exp $
+ */
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef ENABLE_NLS
+#include <libintl.h>
+#include <locale.h>
+#include "dfui/lang.h"
+#define _(String) gettext (String)
+extern int _nl_msg_cat_cntr;
+#else
+#define _(String) (String)
+#endif
+
+#include "aura/mem.h"
+#include "aura/dict.h"
+#include "aura/fspred.h"
+
+#include "dfui/dfui.h"
+#ifdef DEBUG
+#include "dfui/dump.h"
+#endif
+#include "dfui/system.h"
+
+#include "installer/commands.h"
+#include "installer/confed.h"
+#include "installer/diskutil.h"
+#include "installer/functions.h"
+#include "installer/package.h"
+#include "installer/uiutil.h"
+
+#include "flow.h"
+#include "fn.h"
+#include "pathnames.h"
+
+/*** GLOBALS ***/
+
+void (*state)(struct i_fn_args *) = NULL;
+int do_reboot;
+
+/*** STATES ***/
+
+/*
+ * The installer works like a big state machine.  Each major form is
+ * a state.  When the user has filled out the form satisfactorily,
+ * and selects "OK", there is a transition to the next state, in a
+ * mostly-linear order towards the final, "successfully installed"
+ * state.  The user may also "Cancel", which generally causes a
+ * transition to the previous state (but may also take them back to
+ * the very first state in some cases.)
+ *
+ * Installer States:
+ * - Select localization       optional
+ * - Welcome to DragonFly      required
+ * - Begin Installation                required
+ * - Select Disk               required
+ * - Format Disk               optional        dd, fdisk
+ * - Select Partition          required        dd, disklabel
+ * - Create Subpartitions      required        disklabel, newfs
+ * - Install DragonFly         required        swapon, mkdir, mount, cpdup
+ * - Install Bootstrap         optional        boot0cfg
+ * - Reboot                    optional        reboot
+ */
+
+#ifdef ENABLE_NLS
+void 
+state_lang_menu(struct i_fn_args *a)
+{
+       struct dfui_form *f;
+       struct dfui_response *r;
+       int done = 0;
+       char *id;
+       int cancelled = 0;
+
+       while (!done) {
+               f = dfui_form_create(
+                       "main_menu",
+                       _("Select Language"),
+                       _("Please select the language you wish you use."),
+                       "",
+
+                       "p", "role", "menu",
+
+                       "a", "default", "default",
+                       "Do not choose any language", "",
+                       "a", "ru", "Russian",
+                       "Russian KOI8-R", "",
+                       NULL
+               );
+
+               if (!dfui_be_present(a->c, f, &r))
+                       abort_backend();
+
+               id = aura_strdup(dfui_response_get_action_id(r));
+
+               if (strcmp(id, "default") == 0) {
+                       state = state_welcome;
+                       return;
+               } else {
+                       state = state_welcome;
+                       done = 1;
+               }
+
+               dfui_form_free(f);
+               dfui_response_free(r);
+       }
+
+       /* set keymap, scrnmap, fonts */
+       if (!set_lang_syscons(id))
+               return;
+
+       /* set envars */
+       if (!set_lang_envars(id))
+               return;
+
+       dfui_be_set_global_setting(a->c, "lang", id, &cancelled);
+
+       /* XXX if (!cancelled) ... ? */
+
+       /* let gettext know about changes */
+       ++_nl_msg_cat_cntr;
+}
+#endif
+
+/*
+ * state_welcome_livecd: the start state of the installer state machine,
+ * when run from the Live CD.  Briefly describe DragonFly to the user,
+ * and present them with a set of reasonable options of how to proceed.
+ */
+void
+state_welcome(struct i_fn_args *a)
+{
+       struct dfui_form *f;
+       struct dfui_action *k;
+       struct dfui_response *r;
+       char msg_buf[2][1024];
+
+       snprintf(msg_buf[0], sizeof(msg_buf[0]),
+           _("Welcome to %s"), OPERATING_SYSTEM_NAME);
+
+       snprintf(msg_buf[1], sizeof(msg_buf[1]),
+           _("Welcome to the %s Live CD."
+           "\n\n" 
+           "%s is an efficient and elegant BSD "
+           "Unix-derived operating system.  For more information, see %s"
+           "\n\n"
+           "From this CD, you can boot into %s ``live'' "
+           "(without installing it) to evaluate it, to install it "
+           "manually, or to troubleshoot problems with an "
+           "existing installation, using either a command prompt "
+           "or menu-driven utilities."
+           "\n\n"
+           "Also, you can use this automated application to assist "
+           "you in installing %s on this computer and "
+           "configuring it once it is installed."
+           ""),
+           OPERATING_SYSTEM_NAME, OPERATING_SYSTEM_NAME, OPERATING_SYSTEM_URL,
+           OPERATING_SYSTEM_NAME, OPERATING_SYSTEM_NAME);
+
+       if (!a->booted_from_livecd) {
+               state = state_welcome_system;
+               return;
+       }
+
+       f = dfui_form_create(
+           "welcome",
+           msg_buf[0],
+
+           msg_buf[1],
+
+           "",
+
+           "p",        "special",      "dfinstaller_welcome",
+
+           NULL
+       );
+
+       if (a->upgrade_menu_toggle) {
+               snprintf(msg_buf[0], sizeof(msg_buf[0]),
+                   _("Upgrade a FreeBSD 4.X system to %s"),
+                   OPERATING_SYSTEM_NAME);
+               dfui_form_action_add(f, "upgrade",
+                   dfui_info_new(_("Upgrade"),
+                   msg_buf[0], ""));
+       } else {
+               snprintf(msg_buf[0], sizeof(msg_buf[0]),
+                   _("Install %s"), OPERATING_SYSTEM_NAME);
+               snprintf(msg_buf[1], sizeof(msg_buf[1]),
+                   _("Install %s on a HDD or HDD partition on this computer"),
+                   OPERATING_SYSTEM_NAME);
+               dfui_form_action_add(f, "install",
+                   dfui_info_new(msg_buf[0],
+                   msg_buf[1], ""));
+       }
+
+       snprintf(msg_buf[0], sizeof(msg_buf[0]),
+           _("Configure a %s system once it has been installed on HDD"),
+           OPERATING_SYSTEM_NAME);
+       dfui_form_action_add(f, "configure",
+           dfui_info_new(_("Configure an Installed System"),
+           msg_buf[0], ""));
+
+       dfui_form_action_add(f, "utilities",
+           dfui_info_new(_("Live CD Utilities"),
+           _("Utilities to work with disks, diagnostics, and the LiveCD Environment"), ""));
+
+       k = dfui_form_action_add(f, "exit",
+           dfui_info_new(_("Exit to Live CD"),
+           _("Exit this program to a login prompt with access to the LiveCD"), ""));
+
+       dfui_form_action_add(f, "reboot",
+           dfui_info_new(_("Reboot this Computer"),
+           _("Reboot this computer (e.g. to boot into a newly installed system)"), ""));
+
+       dfui_form_action_add(f, "configure_netboot",
+           dfui_info_new(_("Setup NetBoot Install Services"),
+           _("Setup machine as remote installation server"), ""));
+
+       if (!dfui_be_present(a->c, f, &r))
+               abort_backend();
+
+       if (strcmp(dfui_response_get_action_id(r), "install") == 0) {
+               state = state_begin_install;
+       } else if (strcmp(dfui_response_get_action_id(r), "upgrade") == 0) {
+               state = state_begin_upgrade;
+       } else if (strcmp(dfui_response_get_action_id(r), "configure") == 0) {
+               storage_set_selected_disk(a->s, NULL);
+               storage_set_selected_slice(a->s, NULL);
+               state = state_configure_menu;
+       } else if (strcmp(dfui_response_get_action_id(r), "utilities") == 0) {
+               state = state_utilities_menu;
+       } else if (strcmp(dfui_response_get_action_id(r), "exit") == 0) {
+               state = NULL;
+        } else if (strcmp(dfui_response_get_action_id(r), "configure_netboot") == 0) {
+                state = state_setup_remote_installation_server;
+       } else if (strcmp(dfui_response_get_action_id(r), "reboot") == 0) {
+               state = state_reboot;
+       }
+
+       dfui_form_free(f);
+       dfui_response_free(r);
+}
+
+/*
+ * state_welcome_system: the start state of the installer state machine,
+ * when run from the installed system.  Allow the user to configure the
+ * system.
+ */
+void
+state_welcome_system(struct i_fn_args *a)
+{
+       struct dfui_form *f;
+       struct dfui_response *r;
+       char msg_buf[2][1024];
+
+       snprintf(msg_buf[0], sizeof(msg_buf[0]),
+           _("Configure this %s System"), OPERATING_SYSTEM_NAME);
+       
+       snprintf(msg_buf[1], sizeof(msg_buf[1]),
+           _("Thank you for choosing %s."
+           "\n\n"
+           "For up-to-date news and information on %s, "
+           "make sure to check out"
+           "\n\n"
+           "%s" 
+           "\n\n"
+           "You can use this automated application to assist "
+           "you in setting up this %s system."
+           ""),
+           OPERATING_SYSTEM_NAME, OPERATING_SYSTEM_NAME,
+           OPERATING_SYSTEM_URL, OPERATING_SYSTEM_NAME);
+
+
+       f = dfui_form_create(
+           "welcome",
+           msg_buf[0],
+
+           msg_buf[1],
+
+           "",
+
+           "p",        "special",      "dfinstaller_welcome",
+
+           NULL
+       );
+
+       snprintf(msg_buf[0], sizeof(msg_buf[0]),
+           _("Configure this %s system"), OPERATING_SYSTEM_NAME);
+
+       dfui_form_action_add(f, "environment",
+           dfui_info_new(_("Configure this System"),
+           msg_buf[0], ""));
+
+       dfui_form_action_add(f, "utilities", 
+           dfui_info_new(_("Utilities"),
+           _("Utilities to work with and diagnose disks and other subsystems"), ""));
+
+       dfui_form_action_add(f, "exit",
+           dfui_info_new(_("Exit Installer"),
+           _("Exit this program and return to the system"), ""));
+
+       if (!dfui_be_present(a->c, f, &r))
+               abort_backend();
+
+       if (strcmp(dfui_response_get_action_id(r), "environment") == 0) {
+               state = state_environment_menu;
+       } else if (strcmp(dfui_response_get_action_id(r), "utilities") == 0) {
+               state = state_utilities_menu;
+       } else if (strcmp(dfui_response_get_action_id(r), "exit") == 0) {
+               state = NULL;
+       } else if (strcmp(dfui_response_get_action_id(r), "reboot") == 0) {
+               state = state_reboot;
+       }
+
+       dfui_form_free(f);
+       dfui_response_free(r);
+}
+
+void
+state_configure_menu(struct i_fn_args *a)
+{
+       struct dfui_form *f = NULL;
+       struct dfui_response *r = NULL;
+       struct commands *cmds;
+       int done = 0;
+       char msg_buf[2][1024];
+
+       if (storage_get_selected_disk(a->s) == NULL || storage_get_selected_slice(a->s) == NULL) {
+               if (!survey_storage(a)) {
+                       inform(a->c, _("Errors occurred while probing "
+                           "the system for its storage capabilities."));
+               }
+
+               a->short_desc = _("Select the disk containing the installation.");
+               a->cancel_desc = _("Return to Welcome Menu");
+               fn_select_disk(a);
+               if (!a->result || storage_get_selected_disk(a->s) == NULL) {
+                       state = state_welcome;
+                       return;
+               }
+
+               a->short_desc = _("Select the primary partition containing the installation.");
+               a->cancel_desc = _("Return to Welcome Menu");
+               fn_select_slice(a);
+
+               if (!a->result || storage_get_selected_slice(a->s) == NULL) {
+                       state = state_welcome;
+                       return;
+               }
+       }
+
+       a->cfg_root = "mnt";
+       if (!mount_target_system(a)) {
+               inform(a->c, _("Target system could not be mounted."));
+               state = state_welcome;
+               return;
+       }
+
+       snprintf(msg_buf[0], sizeof(msg_buf[0]),
+           _("The options on this menu allow you to configure a "
+           "%s system after it has already been "
+           "installed."), OPERATING_SYSTEM_NAME);
+
+       while (!done) {
+               f = dfui_form_create(
+                   "configure_menu",
+                   _("Configure an Installed System"),
+                   msg_buf[0],
+                   "",
+                   "p", "role", "menu",
+
+                   "a", "set_timezone",
+                   _("Select timezone"),
+                   _("Set the Time Zone of your physical location"), "",
+                   "a", "set_datetime",
+                   _("Set date and time"),
+                   _("Set the Time and Date of your machine"), "",
+
+                   "a", "root_passwd", _("Set root password"),
+                   _("Set the password that the root (superuser) account will use"), "",
+                   "a", "add_user", _("Add a user"),
+                   _("Add a user to the system"), "",
+                   /*
+                   "a",        "cvsup_sources","Synchronize system sources", "", "",
+                   */
+                   "a", "assign_ip", _("Configure network interfaces"),
+                   _("Set up network interfaces (NICs, ethernet, TCP/IP, etc)"), "",
+                   "a", "assign_hostname_domain",
+                   _("Configure hostname and domain"),
+                   _("Configure the hostname and domain for this system"), "",
+                   /*
+                   "a", "select_services", "Select Services",
+                   "Enable/Disable system services (servers, daemons, etc.)", "",
+                   */
+                   "a", "set_kbdmap",
+                   _("Set keyboard map"),
+                   _("Set what kind of keyboard layout you have"), "",
+                   "a", "set_vidfont",
+                   _("Set console font"),
+                   _("Set how the characters on your video console look"), "",
+                   "a", "set_scrnmap",
+                   _("Set screen map"),
+                   _("Set how characters are translated before console display"), "",
+
+                   "a", "install_pkgs", _("Install extra software packages"),
+                   _("Install third-party software packages from the LiveCD"), "",
+                   "a", "remove_pkgs", _("Remove software packages"),
+                   _("Remove third-party software packages from the installed system"), "",
+
+                   "a", "cancel", _("Return to Welcome Menu"), "", "",
+                   "p", "accelerator", "ESC",
+
+                   NULL
+               );
+
+               if (!dfui_be_present(a->c, f, &r))
+                       abort_backend();
+
+               /* XXX set up a */
+               a->cfg_root = "mnt/";
+               if (strcmp(dfui_response_get_action_id(r), "root_passwd") == 0) {
+                       fn_root_passwd(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "add_user") == 0) {
+                       fn_add_user(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "cvsup_sources") == 0) {
+                       fn_cvsup_sources(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "install_pkgs") == 0) {
+                       fn_install_packages(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "remove_pkgs") == 0) {
+                       fn_remove_packages(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "assign_ip") == 0) {
+                       fn_assign_ip(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "assign_hostname_domain") == 0) {
+                       fn_assign_hostname_domain(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "select_services") == 0) {
+                       fn_select_services(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "set_kbdmap") == 0) {
+                       fn_set_kbdmap(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "set_vidfont") == 0) {
+                       fn_set_vidfont(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "set_scrnmap") == 0) {
+                       fn_set_scrnmap(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "set_timezone") == 0) {
+                       fn_set_timezone(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "set_datetime") == 0) {
+                       fn_assign_datetime(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "cancel") == 0) {
+                       state = state_welcome;
+                       done = 1;
+               }
+
+               dfui_form_free(f);
+               dfui_response_free(r);
+       }
+
+       /*
+        * Before unmounting the system, write out any changes to rc.conf.
+        */
+       config_vars_write(rc_conf, CONFIG_TYPE_SH,
+           "%s%setc/rc.conf", a->os_root, a->cfg_root);
+
+       /*
+        * Clear out configuration variable table in memory.
+        */
+       config_vars_free(rc_conf);
+       rc_conf = config_vars_new();
+
+       /*
+        * Finally, unmount the system we mounted on /mnt.
+        */
+       cmds = commands_new();
+       unmount_all_under(a, cmds, "%smnt", a->os_root);
+       commands_execute(a, cmds);
+       commands_free(cmds);
+}
+
+void 
+state_utilities_menu(struct i_fn_args *a)
+{
+       struct dfui_form *f;
+       struct dfui_response *r;
+
+       if (!survey_storage(a)) {
+               inform(a->c, _("Errors occurred while probing "
+                   "the system for its storage capabilities."));
+       }
+
+       f = dfui_form_create(
+           "utilities_menu",
+           _("Live CD Utilities Menu"),
+           _("On these submenus you will find utilities to help "
+           "you set up your Live CD environment, diagnose "
+           "and analyse this system, and work with "
+           "the devices attached to this computer."),
+           "",
+           "p", "role", "menu",
+           "a", "environment", _("LiveCD Environment"),
+           _("Configure the LiveCD Environment"), "",
+           "a", "diagnostics", _("System Diagnostics"),
+           _("Probe and display detailed information about this system"), "",
+           "a", "diskutil", _("Disk Utilities"),
+           _("Format and check hard drives and floppy disks"), "",
+           "a", "livecd", _("Exit to Live CD"),
+           _("Exit this program to a login prompt with access to the LiveCD"), "",
+           "a", "reboot",
+           _("Reboot this Computer"), "", "",
+           "a", "cancel",
+           _("Return to Welcome Menu"), "", "",
+           "p", "accelerator", "ESC",
+           NULL
+       );
+
+       if (!dfui_be_present(a->c, f, &r))
+               abort_backend();
+
+       if (strcmp(dfui_response_get_action_id(r), "environment") == 0)
+               state = state_environment_menu;
+       else if (strcmp(dfui_response_get_action_id(r), "diagnostics") == 0)
+               state = state_diagnostics_menu;
+       else if (strcmp(dfui_response_get_action_id(r), "diskutil") == 0)
+               state = state_diskutil_menu;
+       else if (strcmp(dfui_response_get_action_id(r), "livecd") == 0)
+               state = NULL;
+       else if (strcmp(dfui_response_get_action_id(r), "reboot") == 0)
+               state = state_reboot;
+       else if (strcmp(dfui_response_get_action_id(r), "cancel") == 0)
+               state = state_welcome;
+
+       dfui_form_free(f);
+       dfui_response_free(r);
+}
+
+void 
+state_environment_menu(struct i_fn_args *a)
+{
+       struct dfui_form *f;
+       struct dfui_response *r;
+       int done = 0;
+       char msg_buf[2][1024];
+
+       snprintf(msg_buf[0], sizeof(msg_buf[0]),
+           _("On this menu you will find utilities to help you "
+           "set up your Live CD environment.\n\nNote "
+           "that these functions affect only the LiveCD "
+           "environment you are currently using, and they will "
+           "not affect any system that may be installed on "
+           "this computer UNLESS you subsequently choose to "
+           "install %s from this environment, in which "
+           "case they will be copied to the newly installed "
+           "system."), OPERATING_SYSTEM_NAME);
+
+       while (!done) {
+               f = dfui_form_create(
+                   "environment_menu",
+                   _("Live CD Environment Menu"),
+                   msg_buf[0],
+                   "",
+                   "p", "role", "menu",
+
+                   "a", "set_timezone",
+                   _("Select timezone"),
+                   _("Set the Time Zone of your physical location"), "",
+                   "a", "set_datetime",
+                   _("Set date and time"),
+                   _("Set the Time and Date of your machine"), "",
+
+                   "a", "set_kbdmap",
+                   _("Set keyboard map"),
+                   _("Set what kind of keyboard layout you have"), "",
+                   "a", "set_vidfont",
+                   _("Set console font"),
+                   _("Set how the characters on your video console look"), "",
+                   "a", "set_scrnmap",
+                   _("Set screen map"),
+                   _("Set how characters are translated before console display"), "",
+
+                   "a", "assign_hostname_domain",
+                   _("Configure hostname and domain"),
+                   _("Configure the hostname and domain for this system"), "",
+                   "a", "assign_ip",
+                   _("Configure network interfaces"),
+                   _("Set up network interfaces (NICs, ethernet, TCP/IP, etc)"), "",
+
+                   "a", "cancel",
+                   _("Return to Utilities Menu"), "", "",
+                   "p", "accelerator", "ESC",
+
+                   NULL
+               );
+
+               if (!dfui_be_present(a->c, f, &r))
+                       abort_backend();
+
+               /* Set up a */
+               a->cfg_root = "";
+               if (strcmp(dfui_response_get_action_id(r), "set_kbdmap") == 0) {
+                       fn_set_kbdmap(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "set_vidfont") == 0) {
+                       fn_set_vidfont(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "set_scrnmap") == 0) {
+                       fn_set_scrnmap(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "assign_hostname_domain") == 0) {
+                       fn_assign_hostname_domain(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "assign_ip") == 0) {
+                       fn_assign_ip(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "set_timezone") == 0) {
+                       fn_set_timezone(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "set_datetime") == 0) {
+                       fn_assign_datetime(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "cancel") == 0) {
+                       state = state_utilities_menu;
+                       done = 1;
+               }
+
+               dfui_form_free(f);
+               dfui_response_free(r);
+       }
+}
+
+void 
+state_diagnostics_menu(struct i_fn_args *a)
+{
+       struct dfui_form *f;
+       struct dfui_action *k;
+       struct dfui_response *r;
+       int done = 0;
+
+       while (!done) {
+               f = dfui_form_create(
+                   "utilities_menu",
+                   _("Live CD Diagnostics Menu"),
+                   _("These functions can help you diagnose this system."),
+                   "",
+                   "p", "role", "menu",
+               
+                   "a", "show_dmesg",
+                   _("Display system startup messages"),
+                   _("Display system startup messages (dmesg)"), "",
+                   "a", "pciconf",
+                   _("Display PCI devices"),
+                   _("Display PCI devices (pciconf)"), "",
+                   "a", "pnpinfo",
+                   _("Display Plug'n'Play ISA devices"),
+                   _("Display Plug'n'Play ISA devices (pnpinfo)"), "",
+                   "a", "atacontrol",
+                   _("Display ATA devices"),
+                   _("Display ATA devices (atactl)"), "",
+                   NULL
+               );
+
+               if (is_file("%sboot/memtest86.flp.bz2", a->os_root)) {
+                       dfui_form_action_add(f, "memtest86",
+                           dfui_info_new(_("Create memtest86 Floppy"),
+                           _("Create a floppy which boots into a dedicated memory-test"),
+                           ""));
+               }
+
+               if (is_program("%susr/local/bin/memtest", a->os_root)) {
+                       dfui_form_action_add(f, "memtest",
+                           dfui_info_new(_("Run On-Line Memory Test"),
+                           _("Test the memory in the machine while running"),
+                           ""));
+               }
+
+               k = dfui_form_action_add(f, "cancel",
+                   dfui_info_new(_("Return to Utilities Menu"), "", ""));
+               dfui_action_property_set(k, "accelerator", "ESC");
+
+               if (!dfui_be_present(a->c, f, &r))
+                       abort_backend();
+
+               /* XXX set up a */
+               if (strcmp(dfui_response_get_action_id(r), "show_dmesg") == 0) {
+                       fn_show_dmesg(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "pciconf") == 0) {
+                       fn_show_pciconf(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "pnpinfo") == 0) {
+                       fn_show_pnpinfo(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "atacontrol") == 0) {
+                       fn_show_atacontrol(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "memtest") == 0) {
+                       fn_memtest(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "memtest86") == 0) {
+                       fn_create_memtest86_floppy(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "cancel") == 0) {
+                       state = state_utilities_menu;
+                       done = 1;
+               }
+
+               dfui_form_free(f);
+               dfui_response_free(r);
+       }
+}
+
+void 
+state_diskutil_menu(struct i_fn_args *a)
+{
+       struct dfui_form *f;
+       struct dfui_action *k;
+       struct dfui_response *r;
+       int done = 0;
+
+       while (!done) {
+               f = dfui_form_create(
+                   "utilities_menu",
+                   _("Disk Utilities Menu"),
+                   _("These functions let you manipulate the storage devices "
+                   "attached to this computer."),
+                   "",
+
+                   "p", "role", "menu",
+
+                   "a", "format_hdd",
+                   _("Format a hard disk drive"), "", "",
+                   "a", "wipe_start_of_disk",
+                   _("Wipe out the start of a disk"), "", "",
+                   "a", "wipe_start_of_slice",
+                   _("Wipe out the start of a primary partition"), "", "",
+                   "a", "install_bootblocks",
+                   _("Install bootblocks on disks"), "", "",
+                   "a", "format_msdos_floppy",
+                   _("Format an MSDOS floppy"), "", "",
+                   NULL
+               );
+
+               if (is_file("%sboot/cdboot.flp.bz2", a->os_root)) {
+                       dfui_form_action_add(f, "create_cdboot_floppy",
+                           dfui_info_new(_("Create a CDBoot floppy"),
+                           "",
+                           ""));
+               }
+
+               k = dfui_form_action_add(f, "cancel",
+                   dfui_info_new(_("Return to Utilities Menu"), "", ""));
+               dfui_action_property_set(k, "accelerator", "ESC");
+
+               if (!dfui_be_present(a->c, f, &r))
+                       abort_backend();
+
+               /* XXX set up a */
+               if (strcmp(dfui_response_get_action_id(r), "format_hdd") == 0) {
+                       storage_set_selected_disk(a->s, NULL);
+                       storage_set_selected_slice(a->s, NULL);
+                       fn_format_disk(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "wipe_start_of_disk") == 0) {
+                       fn_wipe_start_of_disk(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "wipe_start_of_slice") == 0) {
+                       fn_wipe_start_of_slice(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "install_bootblocks") == 0) {
+                       a->short_desc = _("Select the disks on which "
+                           "you wish to install bootblocks.");
+                       a->cancel_desc = _("Return to Utilities Menu");
+                       fn_install_bootblocks(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "format_msdos_floppy") == 0) {
+                       fn_format_msdos_floppy(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "create_cdboot_floppy") == 0) {
+                       fn_create_cdboot_floppy(a);
+               } else if (strcmp(dfui_response_get_action_id(r), "cancel") == 0) {
+                       state = state_utilities_menu;
+                       done = 1;
+               }
+
+               dfui_form_free(f);
+               dfui_response_free(r);
+       }
+}
+
+/** INSTALLER STATES **/
+
+/*
+ * state_begin_upgrade: Ask the user where the freebsd
+ * 4.X install is and make sure its safe to proceed.
+ *
+ */
+void 
+state_begin_upgrade(struct i_fn_args *a)
+{
+        //struct dfui_form *f = NULL;
+        //struct dfui_response *r = NULL;
+        //int done = 0;
+
+        if (storage_get_selected_disk(a->s) == NULL || storage_get_selected_slice(a->s) == NULL) {
+               if (!survey_storage(a)) {
+                       inform(a->c, _("Errors occurred while probing "
+                           "the system for its storage capabilities."));
+               }
+
+                a->short_desc = _("Select the disk containing the installation that you would like to upgrade.");
+                a->cancel_desc = _("Return to Welcome Menu");
+                fn_select_disk(a);
+                if (!a->result || storage_get_selected_disk(a->s) == NULL) {
+                        state = state_welcome;
+                        return;
+                }
+
+                a->short_desc = _("Select the primary partition containing the installation you would like to upgrade.");
+                a->cancel_desc = _("Return to Welcome Menu");
+                fn_select_slice(a);
+
+                if (!a->result || storage_get_selected_slice(a->s) == NULL) {
+                        state = state_welcome;
+                        return;
+                }
+        }
+
+        a->cfg_root = "mnt";
+        if (!mount_target_system(a)) {
+                inform(a->c, _("Target system could not be mounted."));
+                state = state_welcome;
+                return;
+        }
+}
+
+/*
+ * state_begin_install: Briefly describe the install process
+ * to the user, and let them proceed (or not.)
+ */
+void
+state_begin_install(struct i_fn_args *a)
+{
+       struct dfui_form *f;
+       struct dfui_response *r;
+       char msg_buf[3][1024];
+
+       snprintf(msg_buf[0], sizeof(msg_buf[0]),
+           _("This experimental application will install %s"
+           " on one of the hard disk drives attached to this computer. "
+           "It has been designed to make it easy to install "
+           "%s in the typical case. "
+           "If you have special requirements that are not addressed "
+           "by this installer, or if you have problems using it, you "
+           "are welcome to install %s manually. "
+           "To do so select Exit to Live CD, login as root, and follow "
+           "the instructions given in the file /README ."
+           "\n\n"
+           "NOTE! As with any installation process, YOU ARE "
+           "STRONGLY ENCOURAGED TO BACK UP ANY IMPORTANT DATA ON THIS "
+           "COMPUTER BEFORE PROCEEDING!"
+           ""),
+           OPERATING_SYSTEM_NAME, OPERATING_SYSTEM_NAME,
+           OPERATING_SYSTEM_NAME);
+
+       snprintf(msg_buf[1], sizeof(msg_buf[1]),
+           _("Some situations in which you might not wish to use this "
+           "installer are:\n\n"
+           "- you want to install %s onto a "
+           "logical/extended partition;\n"
+           "- you want to install %s "
+           "onto a ``dangerously dedicated'' disk; or\n"
+           "- you want full and utter control over the install process."
+           ""),
+           OPERATING_SYSTEM_NAME, OPERATING_SYSTEM_NAME);
+
+       snprintf(msg_buf[2], sizeof(msg_buf[2]),
+           _("Install %s"), OPERATING_SYSTEM_NAME);
+
+       f = dfui_form_create(
+           "begin_install",
+           _("Begin Installation"),
+           msg_buf[0],
+
+           msg_buf[1],
+           "p", "special", "dfinstaller_begin_install",
+           "p", "minimum_width", "76",
+
+           "a", "proceed", msg_buf[2],
+           "", "",
+           "a", "cancel", _("Return to Welcome Menu"),
+           "", "",
+           "p", "accelerator", "ESC",
+           "a", "livecd", _("Exit to Live CD"),
+           "", "",
+           NULL
+       );
+
+       if (!dfui_be_present(a->c, f, &r))
+               abort_backend();
+
+       if (strcmp(dfui_response_get_action_id(r), "proceed") == 0) {
+               if (!survey_storage(a)) {
+                       inform(a->c, _("Errors occurred while probing "
+                           "the system for its storage capabilities."));
+               }
+               state = state_select_disk;
+       } else if (strcmp(dfui_response_get_action_id(r), "livecd") == 0) {
+               state = NULL;
+       } else if (strcmp(dfui_response_get_action_id(r), "cancel") == 0) {
+               state = state_welcome;
+       }
+
+       dfui_form_free(f);
+       dfui_response_free(r);
+}
+
+/*
+ * state_select_disk: ask the user on which physical disk they wish
+ * to install DragonFly.
+ */
+void
+state_select_disk(struct i_fn_args *a)
+{
+       struct disk *d;
+       int num_disks = 0;
+       char msg_buf[1][1024];
+
+       for (d = storage_disk_first(a->s); d != NULL; d = disk_next(d))
+               num_disks++;
+
+       if (num_disks == 0) {
+               inform(a->c, _("The installer could not find any disks suitable "
+                   "for installation (IDE or SCSI) attached to this "
+                   "computer.  If you wish to install %s"
+                   " on an unorthodox storage device, you will have to "
+                   "exit to a LiveCD command prompt and install it "
+                   "manually, using the file /README as a guide."),
+                   OPERATING_SYSTEM_NAME);
+               state = state_welcome;
+               return;
+       }
+
+       snprintf(msg_buf[0], sizeof(msg_buf[0]),
+           _("Select a disk on which to install %s"),
+           OPERATING_SYSTEM_NAME);
+       a->short_desc = msg_buf[0];
+       a->cancel_desc = _("Return to Begin Installation");
+       fn_select_disk(a);
+       if (!a->result || storage_get_selected_disk(a->s) == NULL) {
+               state = state_begin_install;
+       } else {
+#if 0
+               if (disk_get_capacity(storage_get_selected_disk(a->s)) < DISK_MIN) {
+                       inform(a->c, _("WARNING: you should have a disk "
+                           "at least %dM in size, or "
+                           "you may encounter problems trying to "
+                           "install %s."), DISK_MIN, OPERATING_SYSTEM_NAME);
+               }
+#endif
+               state = state_format_disk;
+       }
+}
+
+/*
+ * state_format_disk: ask the user if they wish to format the disk they
+ * selected.
+ */
+void
+state_format_disk(struct i_fn_args *a)
+{
+
+       switch (dfui_be_present_dialog(a->c, _("How Much Disk?"),
+           _("Use Entire Disk|Use Part of Disk|Return to Select Disk"),
+           _("Select how much of this disk you want to use for %s.\n\n%s"),
+           OPERATING_SYSTEM_NAME,
+           disk_get_desc(storage_get_selected_disk(a->s)))) {
+       case 1:
+               /* Entire Disk */
+               if (measure_activated_swap_from_disk(a, storage_get_selected_disk(a->s)) > 0) {
+                       switch(dfui_be_present_dialog(a->c,
+                           _("Swap already active"),
+                           _("Reboot|Return to Select Disk"),
+                           _("Some subpartitions on the primary partition "
+                           "of this disk are already activated as swap. "
+                           "Since there is no way to deactivate swap in "
+                           "%s once it is activated, in order "
+                           "to edit the subpartition layout of this "
+                           "primary partition, you must first reboot."),
+                           OPERATING_SYSTEM_NAME)) {
+                       case 1:
+                               state = state_reboot;
+                               return;
+                       case 2:
+                               state = state_select_disk;
+                               return;
+                       default:
+                               abort_backend();
+                       }
+               }
+
+               fn_format_disk(a);
+               if (a->result)
+                       state = state_create_subpartitions;
+               else
+                       state = state_format_disk;
+               break;
+       case 2:
+               /* Part of Disk */
+               state = state_select_slice;
+               break;
+       case 3:
+               /* Return */
+               state = state_select_disk;
+               break;
+       default:
+               abort_backend();
+               break;
+       }
+}
+
+/*
+ * state_select_slice: ask the user which slice they wish to install
+ * DragonFly on.  In order to avoid confusing them, refer to it as
+ * a primary partition, but tell them what BSD has traditionally called
+ * it, too.
+ */
+void
+state_select_slice(struct i_fn_args *a)
+{
+       char msg_buf[1][1024];
+
+       snprintf(msg_buf[0], sizeof(msg_buf[0]),
+           _("Select the existing primary partition (also "
+           "known as a `slice' in the BSD tradition) on "
+           "which to install %s.\n\n"
+           "Note that if you do not have any existing "
+           "primary partitions on this disk, you must "
+           "first create some. This installer does not "
+           "currently have the ability to do this, so "
+           "you will have to exit and run fdisk (in "
+           "DOS or *BSD) or parted (in Linux) to do so."),
+           OPERATING_SYSTEM_NAME);
+           
+       a->short_desc = msg_buf[0];
+       a->cancel_desc = _("Return to Select Disk");
+       fn_select_slice(a);
+       if (!a->result || storage_get_selected_slice(a->s) == NULL) {
+               state = state_select_disk;
+       } else {
+               if (measure_activated_swap_from_slice(a, storage_get_selected_disk(a->s),
+                   storage_get_selected_slice(a->s)) > 0) {
+                       switch(dfui_be_present_dialog(a->c,
+                           _("Swap already active"),
+                           _("Reboot|Return to Select Primary Partition"),
+                           _("Some subpartitions on the selected primary "
+                           "partition are already activated as swap. "
+                           "Since there is no way to deactivate swap in "
+                           "%s once it is activated, in order "
+                           "to edit the subpartition layout of this "
+                           "primary partition, you must first reboot."),
+                           OPERATING_SYSTEM_NAME)) {
+                       case 1:
+                               state = state_reboot;
+                               return;
+                       case 2:
+                               state = state_select_slice;
+                               return;
+                       default:
+                               abort_backend();
+                       }
+               }
+
+               if (slice_get_capacity(storage_get_selected_slice(a->s)) < DISK_MIN) {
+                       inform(a->c, _("WARNING: you should have a primary "
+                           "partition at least %dM in size, or "
+                           "you may encounter problems trying to "
+                           "install %s."), DISK_MIN, OPERATING_SYSTEM_NAME);
+               }
+
+               if (confirm_dangerous_action(a->c,
+                   _("WARNING!  ALL data in primary partition #%d,\n\n%s\n\non the "
+                   "disk\n\n%s\n\n will be IRREVOCABLY ERASED!\n\nAre you "
+                   "ABSOLUTELY SURE you wish to take this action?  This is "
+                   "your LAST CHANCE to cancel!"),
+                   slice_get_number(storage_get_selected_slice(a->s)),
+                   slice_get_desc(storage_get_selected_slice(a->s)),
+                   disk_get_desc(storage_get_selected_disk(a->s)))) {
+                       if (!format_slice(a)) {
+                               inform(a->c, _("Primary partition #%d was "
+                                   "not correctly formatted, and may "
+                                   "now be in an inconsistent state. "
+                                   "We recommend re-formatting it "
+                                   "before proceeding."),
+                                   slice_get_number(storage_get_selected_slice(a->s)));
+                       } else {
+                               inform(a->c, _("Primary partition #%d was formatted."),
+                                   slice_get_number(storage_get_selected_slice(a->s)));
+                               state = state_create_subpartitions;
+                       }
+               } else {
+                       inform(a->c, _("Action cancelled - no primary partitions were formatted."));
+                       state = state_select_slice;
+               }
+       }
+}
+
+/*
+ * state_create_subpartitions: let the user specify what subpartitions they
+ * want on the disk, how large each should be, and where it should be mounted.
+ */
+void
+state_create_subpartitions(struct i_fn_args *a)
+{
+       char msg_buf[1][1024];
+
+       if (measure_activated_swap_from_slice(a, storage_get_selected_disk(a->s),
+           storage_get_selected_slice(a->s)) > 0) {
+               snprintf(msg_buf[0], sizeof(msg_buf[0]),
+                   _("Some subpartitions on the selected primary "
+                   "partition are already activated as swap. "
+                   "Since there is no way to deactivate swap in "
+                   "%s once it is activated, in order "
+                   "to edit the subpartition layout of this "
+                   "primary partition, you must first reboot."),
+                   OPERATING_SYSTEM_NAME);
+               switch(dfui_be_present_dialog(a->c, _("Swap already active"),
+                   disk_get_formatted(storage_get_selected_disk(a->s)) ?
+                   _("Reboot|Return to Select Disk") :
+                   _("Reboot|Return to Select Primary Partition"),
+                   msg_buf[0])) {
+               case 1:
+                       state = state_reboot;
+                       return;
+               case 2:
+                       state = disk_get_formatted(storage_get_selected_disk(a->s)) ?
+                           state_select_disk : state_select_slice;
+                       return;
+               default:
+                       abort_backend();
+               }
+       }
+
+       fn_create_subpartitions(a);
+       if (a->result) {
+               state = state_install_os;
+       } else {
+               state = disk_get_formatted(storage_get_selected_disk(a->s)) ?
+                   state_select_disk : state_select_slice;
+       }
+}
+
+/*
+ * state_install_os: actually put DragonFly on the disk.
+ */
+void
+state_install_os(struct i_fn_args *a)
+{
+       struct dfui_form *f;
+       struct dfui_response *r;
+       char msg_buf[1][1024];
+
+       snprintf(msg_buf[0], sizeof(msg_buf[0]),
+           _("Everything is now ready to install the actual files which "
+           "comprise the %s operating system "
+           "on the selected partition of the selected disk.\n\n"
+           "Note that this process will take quite a while to finish. "
+           "You may wish to take a break now and come back to the "
+           "computer in a short while."),
+           OPERATING_SYSTEM_NAME);
+
+       f = dfui_form_create(
+           "install_os",
+           _("Install OS"),
+           msg_buf[0],
+
+           "",
+
+           "p", "role", "confirm",
+           "p", "special", "dfinstaller_install_os",
+
+           "a", "ok", _("Begin Installing Files"), "", "",
+           "a", "cancel", _("Return to Create Subpartitions"), "", "",
+           "p", "accelerator", "ESC",
+
+           NULL
+       );
+
+       if (!dfui_be_present(a->c, f, &r))
+               abort_backend();
+
+       if (strcmp(dfui_response_get_action_id(r), "cancel") == 0) {
+               state = state_create_subpartitions;
+       } else {
+               fn_install_os(a);
+               if (a->result)
+                       state = state_install_bootstrap;
+       }
+
+       dfui_form_free(f);
+       dfui_response_free(r);
+}
+
+/*
+ * state_install_bootstrap: put boot0 bootblocks on selected disks.
+ */
+void
+state_install_bootstrap(struct i_fn_args *a)
+{
+       char msg_buf[1][1024];
+
+       snprintf(msg_buf[0], sizeof(msg_buf[0]),
+           _("You may now wish to install bootblocks on one or more disks. "
+           "If you already have a boot manager installed, you can skip "
+           "this step (but you may have to configure your boot manager "
+           "separately.)  If you installed %s on a disk other "
+           "than your first disk, you will need to put the bootblock "
+           "on at least your first disk and the %s disk."),
+           OPERATING_SYSTEM_NAME, OPERATING_SYSTEM_NAME);
+
+       a->short_desc = msg_buf[0];
+       a->cancel_desc = _("Skip this Step");
+       fn_install_bootblocks(a);
+       state = state_finish_install;
+}
+
+/*
+ * Finish up the install.
+ */
+void
+state_finish_install(struct i_fn_args *a)
+{
+       char msg_buf[1][1024];
+
+       snprintf(msg_buf[0], sizeof(msg_buf[0]),
+           "%s is Installed!",
+           OPERATING_SYSTEM_NAME);
+
+       switch (dfui_be_present_dialog(a->c, msg_buf[0],
+           _("Configure this System|Reboot|Return to Welcome Menu"),
+           _("Congratulations!\n\n"
+           "%s has successfully been installed on "
+           "this computer. You may now proceed to configure "
+           "the installation. Alternately, you may wish to "
+           "reboot the computer and boot into the installed "
+           "system to confirm that it works."),
+           OPERATING_SYSTEM_NAME)) {
+       case 1:
+               state = state_configure_menu;
+               break;
+       case 2:
+               state = state_reboot;
+               break;
+       case 3:
+               state = state_welcome;
+               break;
+       default:
+               abort_backend();
+       }
+}
+
+/*
+ * state_reboot: reboot the machine.
+ */
+void
+state_reboot(struct i_fn_args *a)
+{
+       struct dfui_form *f;
+       struct dfui_response *r;
+
+       f = dfui_form_create(
+           "reboot",
+           _("Reboot"),
+           _("This machine is about to be shut down. "
+           "After the machine has reached its shutdown state, "
+           "you may remove the CD from the CD-ROM drive tray "
+           "and press Enter to reboot from the HDD."),
+
+           "",
+
+           "p", "role", "confirm",
+
+           "a", "ok", _("Reboot"), "", "",
+           "a", "cancel", _("Return to Welcome Menu"), "", "",
+           "p", "accelerator", "ESC",
+           NULL
+       );
+
+       if (!dfui_be_present(a->c, f, &r))
+               abort_backend();
+
+       if (strcmp(dfui_response_get_action_id(r), "cancel") == 0) {
+               state = state_welcome;
+       } else {
+               do_reboot = 1;
+               state = NULL;
+       }
+
+       dfui_form_free(f);
+       dfui_response_free(r);
+}
+
+/*
+ *
+ *  state_setup_remote_installation_server:
+ *  Setup a remote boot installation environment where a machine
+ *  can boot via DHCP/TFTP/NFS and have a running environment
+ *  where the installer can setup the machine.
+ *
+ */
+void 
+state_setup_remote_installation_server(struct i_fn_args *a)
+{
+        FILE *p;
+        struct commands *cmds;
+        struct dfui_form *f;
+       struct dfui_action *k;
+        struct dfui_response *r;
+        char *word;
+        char interface[256];
+        char line[256];
+
+        switch (dfui_be_present_dialog(a->c, _("Enable Netboot Installation Services?"),
+            _("Enable NetBoot Installation Services|No thanks"),
+            _("NetBoot Installation Services allows this machine to become "
+            "a Installation Server that will allow the clients to boot over the network "
+           "via PXE and start the Installation Environment."
+           "\n\n*NOTE!*  This will assign the IP Address of 10.1.0.1/24 to the selected interface."
+            "\n\nWould you like to provision this machine to serve up the LiveCD/Installer?"))) {
+               case 1:
+                       /*
+                        * Get interface list.
+                        */
+                       p = popen("/sbin/ifconfig -l", "r");
+                       /* XXX it's possible (though extremely unlikely) this will fail. */
+                       while (fgets(line, 255, p) != NULL)
+                               line[strlen(line) - 1] = '\0';
+                       pclose(p);
+
+                       f = dfui_form_create(
+                           "assign_ip",
+                           _("Setup NetBoot Installation Environment"),
+                           _("Please select which interface you would like to configure:"),
+                           "",
+                           "p",        "role", "menu",
+                           NULL
+                       );
+
+                       /* Loop through array. */
+                       word = strtok(line, " \t");
+                       while (word != NULL) {
+                               dfui_form_action_add(f, word,
+                                   dfui_info_new(word, "", ""));
+                               word = strtok(NULL, " ");
+                       }
+
+                       k = dfui_form_action_add(f, "cancel",
+                           dfui_info_new("Cancel", "", ""));
+                       dfui_action_property_set(k, "accelerator", "ESC");
+
+                       if (!dfui_be_present(a->c, f, &r))
+                       abort_backend();
+
+                       strlcpy(interface, dfui_response_get_action_id(r), 256);
+
+                       if (strcmp(dfui_response_get_action_id(r), "cancel") == 0) {
+                               dfui_form_free(f);
+                               dfui_response_free(r);
+                               return;
+                       }
+
+                       /* 
+                        *
+                        * Issues the necessary commands to setup the remote boot environment
+                        *
+                        */
+                       cmds = commands_new();
+                       command_add(cmds, "%s%s %s 10.1.0.1 netmask 255.255.255.0",
+                           a->os_root, cmd_name(a, "IFCONFIG"), interface);
+                       command_add(cmds, "%s%s -p %stftpdroot",
+                           a->os_root, cmd_name(a, "MKDIR"), a->tmp);
+                       command_add(cmds, "%s%s %sboot/pxeboot %stftpdroot",
+                           a->os_root, cmd_name(a, "CP"), a->os_root, a->tmp);
+                       command_add(cmds, "%s%s %s -ro -alldirs -maproot=root: -network 10.1.0.0 -mask 255.255.255.0 >> %setc/exports",
+                           a->os_root, cmd_name(a, "ECHO"), a->os_root, a->os_root);
+                       command_add(cmds, "%s%s tftp dgram udp wait root %s%s tftpd -l -s %stftpdroot >> %setc/inetd.conf",
+                           a->os_root, cmd_name(a, "ECHO"),
+                           a->os_root, cmd_name(a, "TFTPD"),
+                           a->tmp, a->os_root);
+                       command_add(cmds, "%s%s",
+                           a->os_root, cmd_name(a, "INETD"));
+                       command_add(cmds, "%s%s %svar/db/dhcpd.leases",
+                           a->os_root, cmd_name(a, "TOUCH"), a->os_root);
+                       command_add(cmds, "%s%s >%sdev/null 2>&1",
+                           a->os_root, cmd_name(a, "DHCPD"), a->os_root);
+                       command_add(cmds, "%s%s >%sdev/null 2>&1",
+                           a->os_root, cmd_name(a, "RPCBIND"), a->os_root);
+                       command_add(cmds, "%s%s -ln >%sdev/null 2>&1",
+                           a->os_root, cmd_name(a, "MOUNTD"), a->os_root);
+                       command_add(cmds, "%s%s -u -t -n 6 >%sdev/null 2>&1",
+                           a->os_root, cmd_name(a, "NFSD"), a->os_root);
+
+                       if (commands_execute(a, cmds)) {
+                               inform(a->c, _("NetBoot installation services are now started."));
+                       } else {
+                               inform(a->c, _("A failure occured while provisioning the NetBoot environment.  Please check the logs."));
+                       }
+
+                       commands_free(cmds);
+                       dfui_form_free(f);
+                       dfui_response_free(r);
+
+                       break;
+               case 2: 
+
+                       break;
+       
+       };
+
+       state = state_welcome;
+
+}
+
+/*** MAIN ***/
+
+int
+flow(int transport, char *rendezvous, char *os_root,
+     int booted_from_livecd __unused, int upgrade_menu_toggle __unused)
+{
+       struct i_fn_args *a;
+
+       rc_conf = config_vars_new();
+
+       if ((a = i_fn_args_new(os_root, DEFAULT_INSTALLER_TEMP,
+                              transport, rendezvous)) == NULL) {
+               return(0);
+       }
+
+       /*
+        * XXX We can't handle this yet.
+        *
+          a->booted_from_livecd = booted_from_livecd;
+          a->upgrade_menu_toggle = upgrade_menu_toggle;
+       */
+       a->booted_from_livecd = 1;
+       a->upgrade_menu_toggle = 0;
+
+       /*
+        * Execute the state machine here.  The global function pointer
+        * variable `state' points to the next state_* function to execute.
+        * Before it exits, this function should set `state' to the next
+        * state to make a transition to, or NULL to indicate that the
+        * state machine is finished.
+        */
+#ifdef ENABLE_NLS
+       state = state_lang_menu;
+#else
+       state = state_welcome;
+#endif
+       for (; state != NULL; )
+               state(a);
+
+       config_vars_free(rc_conf);
+
+       i_fn_args_free(a);
+
+       return(do_reboot);
+}
diff --git a/contrib/bsdinstaller-1.1.6/src/backend/installer/flow.h b/contrib/bsdinstaller-1.1.6/src/backend/installer/flow.h
new file mode 100644 (file)
index 0000000..26c4f74
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c)2004 The DragonFly Project.  All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ *   Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * 
+ *   Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in
+ *   the documentation and/or other materials provided with the
+ *   distribution.
+ * 
+ *   Neither the name of the DragonFly Project nor the names of its
+ *   contributors may be used to endorse or promote products derived
+ *   from this software without specific prior written permission. 
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+/*
+ * flow.h
+ * $Id: flow.h,v 1.10 2005/03/20 18:40:40 den Exp $
+ */
+
+#ifndef __FLOW_H_
+#define __FLOW_H_
+
+#define        DISK_MIN        340
+#define INSTALL_USR_LOCAL
+#define INSTALL_USR_X11R6
+
+#define        MTPT_ROOT       0
+#define        MTPT_SWAP       1
+#define        MTPT_VAR        2
+#define        MTPT_TMP        3
+#define        MTPT_USR        4
+#define        MTPT_HOME       5
+
+struct i_fn_args;
+
+/*** PROTOTYPES ***/
+
+/* Menus */
+
+#ifdef ENABLE_NLS
+void            state_lang_menu(struct i_fn_args *);
+#endif
+void            state_welcome(struct i_fn_args *);
+void            state_welcome_system(struct i_fn_args *);
+void            state_configure_menu(struct i_fn_args *);
+void            state_utilities_menu(struct i_fn_args *);
+
+void            state_environment_menu(struct i_fn_args *);
+void            state_diagnostics_menu(struct i_fn_args *);
+void            state_diskutil_menu(struct i_fn_args *);
+
+/* Install */
+
+void            state_begin_install(struct i_fn_args *);
+void            state_begin_upgrade(struct i_fn_args *);
+void            state_select_disk(struct i_fn_args *);
+void            state_format_disk(struct i_fn_args *);
+void            state_select_slice(struct i_fn_args *);
+void            state_create_subpartitions(struct i_fn_args *);
+void            state_install_os(struct i_fn_args *);
+void            state_install_bootstrap(struct i_fn_args *);
+void            state_finish_install(struct i_fn_args *);
+void            state_reboot(struct i_fn_args *);
+void            state_setup_remote_installation_server(struct i_fn_args *);
+
+/* Entry Point */
+
+int             flow(int, char *, char *, int livecd_configuration, int upgrade_menu_toggle);
+
+#endif /* !__FLOW_H_ */
diff --git a/contrib/bsdinstaller-1.1.6/src/backend/installer/fn.h b/contrib/bsdinstaller-1.1.6/src/backend/installer/fn.h
new file mode 100644 (file)
index 0000000..eb64230
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c)2004 The DragonFly Project.  All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ *   Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * 
+ *   Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in
+ *   the documentation and/or other materials provided with the
+ *   distribution.
+ * 
+ *   Neither the name of the DragonFly Project nor the names of its
+ *   contributors may be used to endorse or promote products derived
+ *   from this software without specific prior written permission. 
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+/*
+ * fn.h
+ * $Id: fn.h,v 1.3 2005/02/07 06:46:20 cpressey Exp $
+ */
+
+#ifndef __FN_H_
+#define __FN_H_
+
+#include "aura/dict.h"
+#include "dfui/dfui.h"
+
+#include "installer/functions.h"
+
+/*** PROTOTYPES ***/
+
+/* General fn_ functions */
+
+void            fn_select_disk(struct i_fn_args *);
+void            fn_select_slice(struct i_fn_args *);
+
+/* Configure an Installed System (only) */
+
+void            fn_root_passwd(struct i_fn_args *);
+void            fn_add_user(struct i_fn_args *);
+void            fn_cvsup_sources(struct i_fn_args *);
+void            fn_install_packages(struct i_fn_args *);
+void            fn_remove_packages(struct i_fn_args *);
+void            fn_select_services(struct i_fn_args *);
+
+int             mount_target_system(struct i_fn_args *);
+
+/* Configure the LiveCD Environment -or- an Installed System */
+
+void            fn_assign_datetime(struct i_fn_args *);
+void            fn_set_timezone(struct i_fn_args *);
+void            fn_set_kbdmap(struct i_fn_args *);
+void            fn_set_vidfont(struct i_fn_args *);
+void            fn_set_scrnmap(struct i_fn_args *);
+void            fn_assign_hostname_domain(struct i_fn_args *);
+void            fn_assign_ip(struct i_fn_args *);
+
+/* LiveCD Utilities: Diagnostics */
+
+void            fn_show_dmesg(struct i_fn_args *);
+void            fn_show_pciconf(struct i_fn_args *);
+void            fn_show_pnpinfo(struct i_fn_args *);
+void            fn_show_atacontrol(struct i_fn_args *);
+void            fn_memtest(struct i_fn_args *);
+
+void            view_memtest_log(struct i_fn_args *);
+void            show_ifconfig(struct dfui_connection *, char *);
+
+/* LiveCD Utilties: Disk Utilities */
+
+char           *fn_select_file(const char *, const char *, const char *,
+                               const char *, const char *, const char *,
+                               const struct i_fn_args *);
+
+void            fn_format_disk(struct i_fn_args *);
+void            fn_install_bootblocks(struct i_fn_args *);
+void            fn_wipe_start_of_disk(struct i_fn_args *);
+void            fn_wipe_start_of_slice(struct i_fn_args *);
+void            fn_format_msdos_floppy(struct i_fn_args *);
+void            fn_create_cdboot_floppy(struct i_fn_args *);
+void            fn_create_memtest86_floppy(struct i_fn_args *);
+
+int             format_slice(struct i_fn_args *);
+int             autopacket(struct disk *);
+
+void            fn_create_subpartitions(struct i_fn_args *);
+void            fn_install_os(struct i_fn_args *);
+
+/* Global variables */
+
+struct         config_vars *rc_conf;
+
+#endif /* !__FN_H_ */
diff --git a/contrib/bsdinstaller-1.1.6/src/backend/installer/fn_configure.c