Commit our installer patches to contrib/ (that has already been committed to).
authorSascha Wildner <swildner@dragonflybsd.org>
Fri, 29 Aug 2008 20:41:01 +0000 (20:41 +0000)
committerSascha Wildner <swildner@dragonflybsd.org>
Fri, 29 Aug 2008 20:41:01 +0000 (20:41 +0000)
contrib/bsdinstaller-1.1.6/src/backend/installer/fn_install.c
contrib/bsdinstaller-1.1.6/src/lib/libinstaller/functions.c
contrib/bsdinstaller-1.1.6/src/lib/libinstaller/survey.c
usr.sbin/installer/dfuibe_installer/Makefile
usr.sbin/installer/dfuibe_installer/fn_install.c.patch [deleted file]
usr.sbin/installer/libinstaller/Makefile
usr.sbin/installer/libinstaller/functions.c.patch [deleted file]
usr.sbin/installer/libinstaller/survey.c.patch [deleted file]

index aa9a41f..463c46f 100644 (file)
@@ -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 <libgen.h>
@@ -212,7 +212,7 @@ fn_install_os(struct i_fn_args *a)
         */
 
        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 +229,15 @@ fn_install_os(struct i_fn_args *a)
                /*
                 * 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 +261,6 @@ fn_install_os(struct i_fn_args *a)
                            a->os_root, src,
                            a->os_root, dest);
                        command_set_log_mode(cmd, COMMAND_LOG_QUIET);
-                       aura_free(src, "source directory name");
                }
        }
 
@@ -388,7 +388,7 @@ fn_install_os(struct i_fn_args *a)
         * 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 +397,15 @@ fn_install_os(struct i_fn_args *a)
                 * 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 +417,7 @@ fn_install_os(struct i_fn_args *a)
                            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.
index 0b7d8b8..cda0ff9 100644 (file)
@@ -113,7 +113,7 @@ i_fn_args_new(const char *os_root, const char *def_tmp_dir, int transport, const
        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);
index b0c0300..77da750 100644 (file)
@@ -201,10 +201,12 @@ survey_storage(struct i_fn_args *a)
                        continue;
 
                /*
-                * If the disk is a memory disk or CD-ROM, skip it.
+                * If the disk is a memory disk, floppy or CD-ROM, skip it.
                 */
                if (strncmp(disk, "md", 2) == 0 ||
-                   strncmp(disk, "cd", 2) == 0)
+                   strncmp(disk, "cd", 2) == 0 ||
+                   strncmp(disk, "acd", 3) == 0 ||
+                   strncmp(disk, "fd", 2) == 0)
                        continue;
 
                aura_dict_store(di, disk, strlen(disk) + 1, "", 1);
index b4f55ec..b935e9e 100644 (file)
@@ -1,5 +1,5 @@
 #
-# $DragonFly: src/usr.sbin/installer/dfuibe_installer/Makefile,v 1.3 2008/07/13 10:55:05 swildner Exp $
+# $DragonFly: src/usr.sbin/installer/dfuibe_installer/Makefile,v 1.4 2008/08/29 20:41:01 swildner Exp $
 
 BSDINS_DIR=${.CURDIR}/../../../contrib/bsdinstaller-1.1.6
 BSDINS_SRC=${BSDINS_DIR}/src
@@ -7,14 +7,12 @@ BSDINS_SRC=${BSDINS_DIR}/src
 CONTRIBDIR=${BSDINS_SRC}/backend/installer
 .PATH: ${CONTRIBDIR}
 
-PATCHES=       fn_install.c.patch
-
 BINDIR=        /usr/sbin
 PROG=  dfuibe_installer
 MAN=    
 SRCS=  flow.c fn_diagnostic.c fn_install.c fn_zonetab.c \
         fn_configure.c fn_disk.c fn_subpart.c main.c \
-       aura.h dfui.h installer.h ${PATCHES}
+       aura.h dfui.h installer.h
 BINOWN=        root
 BINGRP=        wheel
 
diff --git a/usr.sbin/installer/dfuibe_installer/fn_install.c.patch b/usr.sbin/installer/dfuibe_installer/fn_install.c.patch
deleted file mode 100644 (file)
index 5471d7e..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-$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 <libgen.h>
-@@ -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.
index 8855815..1f7e993 100644 (file)
@@ -1,4 +1,4 @@
-# $DragonFly: src/usr.sbin/installer/libinstaller/Makefile,v 1.3 2008/07/14 23:57:10 swildner Exp $
+# $DragonFly: src/usr.sbin/installer/libinstaller/Makefile,v 1.4 2008/08/29 20:41:01 swildner Exp $
 
 BSDINS_DIR=${.CURDIR}/../../../contrib/bsdinstaller-1.1.6
 BSDINS_SRC=${BSDINS_DIR}/src
@@ -6,15 +6,12 @@ BSDINS_SRC=${BSDINS_DIR}/src
 CONTRIBDIR=    ${BSDINS_SRC}/lib/libinstaller
 .PATH: ${CONTRIBDIR}
 
-PATCHES=       functions.c.patch survey.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 
 SRCS+= aura.h dfui.h
-SRCS+= ${PATCHES}
 
 INCS+= commands.h confed.h diskutil.h functions.h package.h sysids.h uiutil.h
 
diff --git a/usr.sbin/installer/libinstaller/functions.c.patch b/usr.sbin/installer/libinstaller/functions.c.patch
deleted file mode 100644 (file)
index 95bee8f..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-$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);
diff --git a/usr.sbin/installer/libinstaller/survey.c.patch b/usr.sbin/installer/libinstaller/survey.c.patch
deleted file mode 100644 (file)
index 11274fa..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-$DragonFly: src/usr.sbin/installer/libinstaller/Attic/survey.c.patch,v 1.1 2008/07/14 23:57:10 swildner Exp $
-
-Index: survey.c
-===================================================================
-RCS file: /home/dcvs/src/contrib/bsdinstaller-1.1.6/src/lib/libinstaller/survey.c,v
-retrieving revision 1.1.1.1
-diff -u -r1.1.1.1 survey.c
---- survey.c   12 Mar 2008 22:15:55 -0000      1.1.1.1
-+++ survey.c   14 Jul 2008 22:29:54 -0000
-@@ -201,10 +201,12 @@
-                       continue;
-               /*
--               * If the disk is a memory disk or CD-ROM, skip it.
-+               * If the disk is a memory disk, floppy or CD-ROM, skip it.
-                */
-               if (strncmp(disk, "md", 2) == 0 ||
--                  strncmp(disk, "cd", 2) == 0)
-+                  strncmp(disk, "cd", 2) == 0 ||
-+                  strncmp(disk, "acd", 3) == 0 ||
-+                  strncmp(disk, "fd", 2) == 0)
-                       continue;
-               aura_dict_store(di, disk, strlen(disk) + 1, "", 1);