From dc861544316c4f15dbd2c9ef4fae5e79438b173c Mon Sep 17 00:00:00 2001 From: Dave Hayes Date: Tue, 25 Mar 2008 22:55:38 +0000 Subject: [PATCH] * Allow nrelease/Makefile to build the local installer in usr.sbin onto a LiveCD for installation. * Tweak the installer shell scriptage to use the correct installer. * Create a share/installer directory for installer data (e.g. cmdnames.conf, fred.txt) * Patch the installer so it does not coredump, and identifies itself as the local installer. * Tweak usr.sbin/installer/Makefiles to allow patches to the installer to be automatically included in the build. Please test the new local installer! Thanks. :) --- nrelease/Makefile | 24 +++- nrelease/README | 5 +- nrelease/installer/etc/defaults/pfi.conf | 8 +- nrelease/installer/usr/local/bin/installer | 20 +++- share/installer/Makefile | 11 ++ share/installer/cmdnames.conf | 103 ++++++++++++++++++ usr.sbin/installer/Makefile | 3 +- usr.sbin/installer/dfuibe_installer/Makefile | 12 +- .../installer/dfuibe_installer/flow.c.patch | 13 +++ .../dfuibe_installer/fn_install.c.patch | 84 ++++++++++++++ usr.sbin/installer/dfuife_curses/Makefile | 6 +- usr.sbin/installer/libaura/Makefile | 7 +- usr.sbin/installer/libdfui/Makefile | 9 +- usr.sbin/installer/libinstaller/Makefile | 18 ++- .../installer/libinstaller/functions.c.patch | 13 +++ 15 files changed, 302 insertions(+), 34 deletions(-) create mode 100644 share/installer/Makefile create mode 100644 share/installer/cmdnames.conf create mode 100644 usr.sbin/installer/dfuibe_installer/flow.c.patch create mode 100644 usr.sbin/installer/dfuibe_installer/fn_install.c.patch create mode 100644 usr.sbin/installer/libinstaller/functions.c.patch diff --git a/nrelease/Makefile b/nrelease/Makefile index 67e45498b2..0931395f81 100644 --- a/nrelease/Makefile +++ b/nrelease/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/nrelease/Makefile,v 1.78 2008/03/09 21:09:25 swildner Exp $ +# $DragonFly: src/nrelease/Makefile,v 1.79 2008/03/25 22:55:38 dave Exp $ # ######################################################################### @@ -14,6 +14,7 @@ installer_fetch: warning fetch .if make(installer_release) || make(installer_quickrel) || make(installer_realquickrel) || make(installer_fetch) WITH_INSTALLER= +WITH_LOCAL_INSTALLER= .endif # New method e.g. 'make installer fetch'. A series of enhancement @@ -34,6 +35,7 @@ WITH_GUI= .endif .if make(installer) WITH_INSTALLER= +WITH_LOCAL_INSTALLER= .endif ######################################################################### @@ -90,16 +92,18 @@ PKGSRC_PACKAGES+= modular-xorg-apps \ ROOTSKELS+= ${.CURDIR}/gui .endif -.if defined(WITH_INSTALLER) +.if defined(WITH_INSTALLER) || defined(WITH_LOCAL_INSTALLER) +.if !defined(WITH_LOCAL_INSTALLER) # note: the old dfuibe_install and curses depend on the old gettext and # must be removed for the old gettext to be removed. The new dfuibe install # and curses are named the same as the old. # OLD_PKGSRC_PACKAGES+= dfuibe_installer-1.1.6 gettext-lib-0.14.5 \ - dfuibe_installer-1.1.7nb1 dfuife_curses-1.5 +# dfuibe_installer-1.1.7nb1 dfuife_curses-1.5 PKGSRC_PACKAGES+= dfuibe_installer-1.1.7nb1.tgz dfuife_curses-1.5.tgz PKGSRC_PACKAGES+= gettext-lib-0.14.6.tgz gettext-tools-0.14.6nb1.tgz PKGSRC_PACKAGES+= libaura-3.1.tgz libdfui-4.2.tgz libinstaller-5.1.tgz +.endif ROOTSKELS+= ${.CURDIR}/installer .endif @@ -117,13 +121,13 @@ KERNEL_CCVER ?= ${CCVER} # BASE ISO TARGETS # ######################################################################### -release: check clean buildworld1 buildkernel1 \ +release: localinstaller check clean buildworld1 buildkernel1 \ buildiso syssrcs customizeiso mklocatedb mkiso -quickrel: check clean buildworld2 buildkernel2 \ +quickrel: localinstaller check clean buildworld2 buildkernel2 \ buildiso syssrcs customizeiso mklocatedb mkiso -realquickrel: check clean buildiso syssrcs customizeiso mklocatedb mkiso +realquickrel: localinstaller check clean buildiso syssrcs customizeiso mklocatedb mkiso quick: quickrel @@ -132,6 +136,10 @@ realquick: realquickrel ######################################################################### # CORE SUPPORT TARGETS # ######################################################################### +localinstaller: +.if defined(WITH_LOCAL_INSTALLER) + cd ${.CURDIR}/../usr.sbin/installer; make +.endif check: .if !exists(${PKGBIN_PKG_ADD}) @@ -186,6 +194,10 @@ buildiso: if [ ! -d ${ISOROOT} ]; then mkdir -p ${ISOROOT}; fi if [ ! -d ${NRLOBJDIR}/nrelease ]; then mkdir -p ${NRLOBJDIR}/nrelease; fi ( cd ${.CURDIR}/..; make DESTDIR=${ISOROOT} installworld ) +.if defined(WITH_LOCAL_INSTALLER) + ( cd ${.CURDIR}/../usr.sbin/installer; make DESTDIR=${ISOROOT} install ) + ( cd ${.CURDIR}/../share/installer; make DESTDIR=${ISOROOT} install ) +.endif ( cd ${.CURDIR}/../etc; MAKEOBJDIRPREFIX=${NRLOBJDIR}/nrelease \ make -m ${.CURDIR}/../share/mk DESTDIR=${ISOROOT} distribution ) chroot ${ISOROOT} /usr/bin/newaliases diff --git a/nrelease/README b/nrelease/README index c9dd6a1678..9d5de0358f 100644 --- a/nrelease/README +++ b/nrelease/README @@ -1,4 +1,4 @@ -$DragonFly: src/nrelease/Attic/README,v 1.3 2007/05/13 22:25:41 swildner Exp $ +$DragonFly: src/nrelease/Attic/README,v 1.4 2008/03/25 22:55:38 dave Exp $ The DragonFly framework for building ISO image (nrelease) ========================================================= @@ -20,7 +20,8 @@ PKGSRC_DB db location used by the bootstrap kit PKGSRC_PREFIX localbase used by the bootstrap kit PKGSRC_RSYNC_SRC where to fetch packages from during make fetch -WITH_INSTALLER if defined, the BSD installer is added to the target +WITH_INSTALLER if defined, the BSD installer is added to the target from pkgsrc +WITH_LOCAL_INSTALLER if defined, the BSD installer is added to the target from /usr/src The default values match the packages from packages.stura.uni-rostock.de. diff --git a/nrelease/installer/etc/defaults/pfi.conf b/nrelease/installer/etc/defaults/pfi.conf index 8db6eb6857..ec8de374ce 100644 --- a/nrelease/installer/etc/defaults/pfi.conf +++ b/nrelease/installer/etc/defaults/pfi.conf @@ -1,6 +1,6 @@ ####################################################################### # $Id: pfi.conf,v 1.7 2005/02/24 23:23:15 cpressey Exp $ -# $DragonFly: src/nrelease/installer/etc/defaults/pfi.conf,v 1.7 2007/05/13 22:25:41 swildner Exp $ +# $DragonFly: src/nrelease/installer/etc/defaults/pfi.conf,v 1.8 2008/03/25 22:55:38 dave Exp $ # Defaults for pfi.conf. # A space-separated list of what services to restart when we are done @@ -21,7 +21,11 @@ pfi_frontend="curses" # "/usr/pkg/sbin/dfuibe_installer", the traditional C backend, # but can be changed to start an alternate backend. -pfi_backend="/usr/pkg/sbin/dfuibe_installer" +if [ -f /usr/sbin/dfuibe_installer ]; then + pfi_backend="/usr/sbin/dfuibe_installer" +else + pfi_backend="/usr/pkg/sbin/dfuibe_installer" +fi # When using the curses frontend: # Set the amount of time, in milliseconds, which must pass after diff --git a/nrelease/installer/usr/local/bin/installer b/nrelease/installer/usr/local/bin/installer index 3894edea14..a816db7b9a 100755 --- a/nrelease/installer/usr/local/bin/installer +++ b/nrelease/installer/usr/local/bin/installer @@ -2,7 +2,17 @@ # installer - start installer frontend and backend as per pfi config. # $Id: installer,v 1.20 2005/04/13 03:32:16 cpressey Exp $ -# $DragonFly: src/nrelease/installer/usr/local/bin/installer,v 1.10 2005/12/10 14:47:05 joerg Exp $ +# $DragonFly: src/nrelease/installer/usr/local/bin/installer,v 1.11 2008/03/25 22:55:38 dave Exp $ + +### CONFIG ### +# Pick up the correct installer target, use local first if we have it +if [ -f /usr/sbin/dfuife_curses ]; then + FRONTEND=/usr/sbin/dfuife_curses + FRED=/usr/share/installer/fred.txt +else + FRONTEND=/usr/pkg/sbin/dfuife_curses + FRED=/usr/pkg/share/dfuife_curses/fred.txt +fi ### SUBS ### @@ -72,10 +82,10 @@ installer_start() background_backend $RENDEZVOUS $pfi_dfui_transport & sleep 1 ESCDELAY=$pfi_curses_escdelay \ - /usr/pkg/sbin/dfuife_curses \ + ${FRONTEND} \ -r $RENDEZVOUS \ -t $pfi_dfui_transport \ - -b /usr/pkg/share/dfuife_curses/fred.txt \ + -b /usr/share/dfuife_curses/fred.txt \ 2>/dev/null pfi_frontend=none fi @@ -95,10 +105,10 @@ installer_start() # Frontend is already running. else ESCDELAY=$pfi_curses_escdelay \ - /usr/pkg/sbin/dfuife_curses \ + $FRONTEND \ -r $RENDEZVOUS \ -t $pfi_dfui_transport \ - -b /usr/pkg/share/dfuife_curses/fred.txt \ + -b $FRED \ 2>/dev/ttyv0 /dev/ttyv1 & fi rm -f /tmp/ps.txt diff --git a/share/installer/Makefile b/share/installer/Makefile new file mode 100644 index 0000000000..e181ca0722 --- /dev/null +++ b/share/installer/Makefile @@ -0,0 +1,11 @@ +# $DragonFly: src/share/installer/Makefile,v 1.1 2008/03/25 22:55:38 dave Exp $ + +INSTALLER_DIR= ${.CURDIR}/../../contrib/bsdinstaller-1.1.6 +DDIR= ${DESTDIR}/usr/share/installer + +beforeinstall: + if [ ! -d ${DDIR} ]; then mkdir ${DDIR}; fi + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 744 cmdnames.conf ${DDIR}/cmdnames.conf + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 744 ${INSTALLER_DIR}/src/frontends/ncurses/fred.txt ${DDIR}/fred.txt + +.include diff --git a/share/installer/cmdnames.conf b/share/installer/cmdnames.conf new file mode 100644 index 0000000000..47a0b7467f --- /dev/null +++ b/share/installer/cmdnames.conf @@ -0,0 +1,103 @@ +# Command names for DragonFly installer backend. +# $Id: cmdnames.conf,v 1.15 2005/04/08 02:29:17 cpressey Exp $ +# $DragonFly: src/share/installer/cmdnames.conf,v 1.1 2008/03/25 22:55:38 dave 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/pkg/bin/pkg_add +PKG_DELETE=usr/pkg/bin/pkg_delete +PKG_CREATE=usr/pkg/bin/pkg_create +PKG_INFO=usr/pkg/bin/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/usr.sbin/installer/Makefile b/usr.sbin/installer/Makefile index 7b74c4e425..0cd33ec0a4 100644 --- a/usr.sbin/installer/Makefile +++ b/usr.sbin/installer/Makefile @@ -1,6 +1,7 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 -# $DragonFly: src/usr.sbin/installer/Makefile,v 1.1 2008/03/12 01:34:49 dave Exp $ +# $DragonFly: src/usr.sbin/installer/Makefile,v 1.2 2008/03/25 22:55:38 dave Exp $ SUBDIR= libaura libdfui libinstaller dfuife_curses dfuibe_installer +CFLAGS+= -g .include diff --git a/usr.sbin/installer/dfuibe_installer/Makefile b/usr.sbin/installer/dfuibe_installer/Makefile index 2b1b6efcf6..cd2e73b79b 100644 --- a/usr.sbin/installer/dfuibe_installer/Makefile +++ b/usr.sbin/installer/dfuibe_installer/Makefile @@ -1,15 +1,15 @@ # -# $DragonFly: src/usr.sbin/installer/dfuibe_installer/Makefile,v 1.1 2008/03/12 01:34:49 dave Exp $ +# $DragonFly: src/usr.sbin/installer/dfuibe_installer/Makefile,v 1.2 2008/03/25 22:55:38 dave Exp $ BSDINS_DIR=${.CURDIR}/../../../contrib/bsdinstaller-1.1.6 BSDINS_SRC=${BSDINS_DIR}/src -PATCHES= +CONTRIBDIR=${BSDINS_SRC}/backend/installer +.PATH: ${CONTRIBDIR} -.PATH: ${BSDINS_SRC}/backend/installer +PATCHES= fn_install.c.patch flow.c.patch BINDIR= /usr/sbin - PROG= dfuibe_installer MAN= SRCS= flow.c fn_diagnostic.c fn_install.c fn_zonetab.c \ @@ -18,7 +18,7 @@ SRCS= flow.c fn_diagnostic.c fn_install.c fn_zonetab.c \ BINOWN= root BINGRP= wheel -CFLAGS+= -I${BSDINS_SRC}/backend/installer -I. +CFLAGS+= -I${CONTRIBDIR} -I. -g # This madness is because the installer sources reference aura includes # as rather than @@ -34,6 +34,8 @@ installer.h: ${LN} -sf ${BSDINS_SRC}/lib/libinstaller installer /usr/bin/touch installer.h +CLEANFILES+= aura.h aura dfui.h dfui installer.h installer + .if exists(${.OBJDIR}/../libaura) LIBAURADIR:= ${.OBJDIR}/../libaura .else diff --git a/usr.sbin/installer/dfuibe_installer/flow.c.patch b/usr.sbin/installer/dfuibe_installer/flow.c.patch new file mode 100644 index 0000000000..4975a017a5 --- /dev/null +++ b/usr.sbin/installer/dfuibe_installer/flow.c.patch @@ -0,0 +1,13 @@ +$DragonFly: src/usr.sbin/installer/dfuibe_installer/Attic/flow.c.patch,v 1.1 2008/03/25 22:55:38 dave Exp $ + +--- flow.c.orig Mon Mar 24 12:14:11 2008 ++++ flow.c Mon Mar 24 12:14:47 2008 +@@ -179,7 +179,7 @@ + _("Welcome to %s"), OPERATING_SYSTEM_NAME); + + snprintf(msg_buf[1], sizeof(msg_buf[1]), +- _("Welcome to the %s Live CD." ++ _("Welcome to the %s Live CD (using local installer)." + "\n\n" + "%s is an efficient and elegant BSD " + "Unix-derived operating system. For more information, see %s" diff --git a/usr.sbin/installer/dfuibe_installer/fn_install.c.patch b/usr.sbin/installer/dfuibe_installer/fn_install.c.patch new file mode 100644 index 0000000000..5471d7e96f --- /dev/null +++ b/usr.sbin/installer/dfuibe_installer/fn_install.c.patch @@ -0,0 +1,84 @@ +$DragonFly: src/usr.sbin/installer/dfuibe_installer/Attic/fn_install.c.patch,v 1.1 2008/03/25 22:55:38 dave Exp $ + +--- fn_install.c.orig Sun Feb 6 22:46:20 2005 ++++ fn_install.c Tue Apr 18 12:43:48 2006 +@@ -34,7 +34,7 @@ + /* + * fn_install.c + * Installer Function : Install OS Files. +- * $Id: fn_install.c,v 1.71 2005/02/07 06:46:20 cpressey Exp $ ++ * $Id: fn_install.c,v 1.74 2006/04/18 19:43:48 joerg Exp $ + */ + + #include +@@ -212,7 +231,7 @@ + */ + + for (i = 0; cp_src[i] != NULL && cp_src[i][0] != '\0'; i++) { +- char *src, *dest, *dn; ++ char *src, *dest, *dn, *tmp_dest; + + dest = cp_src[i]; + +@@ -229,14 +248,15 @@ + /* + * Create intermediate directories, if needed. + */ +- dn = dirname(dest); ++ tmp_dest = aura_strdup(dest); ++ dn = dirname(tmp_dest); + if (is_dir("%s%s", a->os_root, &dn[1]) && + !is_dir("%smnt%s", a->os_root, dn)) { + command_add(cmds, "%s%s -p %smnt%s", + a->os_root, cmd_name(a, "MKDIR"), + a->os_root, dn); + } +- aura_free(dn, "directory name"); ++ aura_free(tmp_dest, "directory name"); + + /* + * If a directory by the same name but with the suffix +@@ -260,7 +280,6 @@ + a->os_root, src, + a->os_root, dest); + command_set_log_mode(cmd, COMMAND_LOG_QUIET); +- aura_free(src, "source directory name"); + } + } + +@@ -388,7 +407,7 @@ + * This allows the resulting file tree to be customized. + */ + for (i = 0; cp_src[i] != NULL && cp_src[i][0] != '\0'; i++) { +- char *src, *dest, *dn; ++ char *src, *dest, *dn, *tmp_dest; + + src = cp_src[i]; + dest = cp_src[i]; +@@ -397,14 +416,15 @@ + * Get the directory that the desired thing to + * copy resides in. + */ +- dn = dirname(dest); ++ tmp_dest = aura_strdup(dest); ++ dn = dirname(tmp_dest); + + /* + * If this dir doesn't exist in PRISTINE_DIR + * on the install media, just skip it. + */ + if (!is_dir("%s%s%s", a->os_root, PRISTINE_DIR, dn)) { +- aura_free(dn, _("directory name")); ++ aura_free(tmp_dest, _("directory name")); + continue; + } + +@@ -416,7 +436,7 @@ + a->os_root, cmd_name(a, "MKDIR"), + a->os_root, dn); + } +- aura_free(dn, "directory name"); ++ aura_free(tmp_dest, "directory name"); + + /* + * Cpdup the chosen file or directory onto the HDD. diff --git a/usr.sbin/installer/dfuife_curses/Makefile b/usr.sbin/installer/dfuife_curses/Makefile index 079e0db91e..7ef1c459bf 100644 --- a/usr.sbin/installer/dfuife_curses/Makefile +++ b/usr.sbin/installer/dfuife_curses/Makefile @@ -1,5 +1,5 @@ # -# $DragonFly: src/usr.sbin/installer/dfuife_curses/Makefile,v 1.1 2008/03/12 01:34:49 dave Exp $ +# $DragonFly: src/usr.sbin/installer/dfuife_curses/Makefile,v 1.2 2008/03/25 22:55:38 dave Exp $ BSDINS_DIR=${.CURDIR}/../../../contrib/bsdinstaller-1.1.6 BSDINS_SRC=${BSDINS_DIR}/src @@ -17,7 +17,7 @@ SRCS= curses_bar.c curses_form.c curses_util.c curses_widget.c curses_xlat.c mai BINOWN= root BINGRP= wheel -CFLAGS+= -I${BSDINS_SRC}/frontends/ncurses -I. +CFLAGS+= -I${BSDINS_SRC}/frontends/ncurses -I. -g DPADD+= ${LIBPANEL} ${LIBNCURSES} LDADD+= -lpanel -lncurses @@ -36,6 +36,8 @@ installer.h: ${LN} -sf ${BSDINS_SRC}/lib/libinstaller installer /usr/bin/touch installer.h +CLEANFILES+= aura.h aura dfui.h dfui installer.h installer + .if exists(${.OBJDIR}/../libaura) LIBAURADIR:= ${.OBJDIR}/../libaura .else diff --git a/usr.sbin/installer/libaura/Makefile b/usr.sbin/installer/libaura/Makefile index bda1d28ae8..71e182f486 100644 --- a/usr.sbin/installer/libaura/Makefile +++ b/usr.sbin/installer/libaura/Makefile @@ -1,10 +1,11 @@ -# $DragonFly: src/usr.sbin/installer/libaura/Makefile,v 1.1 2008/03/12 01:34:49 dave Exp $ +# $DragonFly: src/usr.sbin/installer/libaura/Makefile,v 1.2 2008/03/25 22:55:38 dave Exp $ BSDINS_DIR=${.CURDIR}/../../../contrib/bsdinstaller-1.1.6 BSDINS_SRC=${BSDINS_DIR}/src -.PATH: ${BSDINS_SRC}/lib/libaura +CONTRIBDIR= ${BSDINS_SRC}/lib/libaura +.PATH: ${CONTRIBDIR} -CFLAGS+=-I${BSDINS_SRC}/lib/libaura +CFLAGS+=-I${CONTRIBDIR} -g LIB= aura diff --git a/usr.sbin/installer/libdfui/Makefile b/usr.sbin/installer/libdfui/Makefile index f1ba868d4e..e70376fec8 100644 --- a/usr.sbin/installer/libdfui/Makefile +++ b/usr.sbin/installer/libdfui/Makefile @@ -1,10 +1,12 @@ -# $DragonFly: src/usr.sbin/installer/libdfui/Makefile,v 1.1 2008/03/12 01:34:49 dave Exp $ +# $DragonFly: src/usr.sbin/installer/libdfui/Makefile,v 1.2 2008/03/25 22:55:38 dave Exp $ BSDINS_DIR=${.CURDIR}/../../../contrib/bsdinstaller-1.1.6 BSDINS_SRC=${BSDINS_DIR}/src -.PATH: ${BSDINS_SRC}/lib/libdfui -CFLAGS+=-I${BSDINS_SRC}/lib/libdfui -I. +CONTRIBDIR=${BSDINS_SRC}/lib/libdfui +.PATH: ${CONTRIBDIR} + +CFLAGS+=-I${CONTRIBDIR} -I. -g LIB= dfui @@ -17,6 +19,7 @@ aura.h: ${LN} -sf ${BSDINS_SRC}/lib/libaura aura /usr/bin/touch aura.h +CLEANFILES+= aura.h aura INTERNALLIB= true .include diff --git a/usr.sbin/installer/libinstaller/Makefile b/usr.sbin/installer/libinstaller/Makefile index 2bbdbe1cb9..ede81d08c9 100644 --- a/usr.sbin/installer/libinstaller/Makefile +++ b/usr.sbin/installer/libinstaller/Makefile @@ -1,15 +1,22 @@ -# $DragonFly: src/usr.sbin/installer/libinstaller/Makefile,v 1.1 2008/03/12 01:34:49 dave Exp $ +# $DragonFly: src/usr.sbin/installer/libinstaller/Makefile,v 1.2 2008/03/25 22:55:38 dave Exp $ BSDINS_DIR=${.CURDIR}/../../../contrib/bsdinstaller-1.1.6 BSDINS_SRC=${BSDINS_DIR}/src -.PATH: ${BSDINS_SRC}/lib/libinstaller -CFLAGS+=-I${BSDINS_SRC}/lib/libdfui -I. +CONTRIBDIR= ${BSDINS_SRC}/lib/libinstaller +.PATH: ${CONTRIBDIR} + +PATCHES= functions.c.patch + +CFLAGS+= -I${BSDINS_SRC}/lib/libdfui -I${CONTRIBDIR} -I. -g LIB= installer -SRCS+= commands.c confed.c diskutil.c functions.c mount.c package.c survey.c uiutil.c \ - aura.h dfui.h +SRCS+= commands.c confed.c diskutil.c functions.c mount.c package.c survey.c uiutil.c +SRCS+= aura.h dfui.h +SRCS+= ${PATCHES} + +INCS+= commands.h confed.h diskutil.h functions.h package.h sysids.h uiutil.h # This madness is because the installer sources reference aura includes # as rather than @@ -21,6 +28,7 @@ dfui.h: ${LN} -sf ${BSDINS_SRC}/lib/libdfui dfui /usr/bin/touch dfui.h +CLEANFILES+= aura.h dfui.h aura dfui INTERNALLIB= true DPADD+= ${.CURDIR}/../libaura/libaura.a ${.CURDIR}/../libdfui/libdfui.a diff --git a/usr.sbin/installer/libinstaller/functions.c.patch b/usr.sbin/installer/libinstaller/functions.c.patch new file mode 100644 index 0000000000..95bee8f4df --- /dev/null +++ b/usr.sbin/installer/libinstaller/functions.c.patch @@ -0,0 +1,13 @@ +$DragonFly: src/usr.sbin/installer/libinstaller/Attic/functions.c.patch,v 1.1 2008/03/25 22:55:38 dave Exp $ + +--- functions.c.orig 2008-03-23 20:22:52 -0700 ++++ functions.c 2008-03-23 20:23:09 -0700 +@@ -113,7 +113,7 @@ + a->temp_files = aura_dict_new(23, AURA_DICT_HASH); + a->cmd_names = config_vars_new(); + if (!config_vars_read(a, a->cmd_names, CONFIG_TYPE_SH, +- "usr/local/share/dfuibe_installer/cmdnames.conf")) { ++ "usr/share/installer/cmdnames.conf")) { + i_log(a, "! ERROR: Couldn't read cmdnames config file"); + i_fn_args_free(a); + return(NULL); -- 2.41.0