Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/usr.sbin/sysinst Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/200825e98e29
branches:  netbsd-9
changeset: 843519:200825e98e29
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Sun Nov 17 13:45:26 2019 +0000

description:
Pull up following revision(s) (requested by martin in ticket #436):
        usr.sbin/sysinst/disks.c: revision 1.55
        usr.sbin/sysinst/msg.mi.en: revision 1.24
        usr.sbin/sysinst/mbr.c: revision 1.22
        usr.sbin/sysinst/disks.c: revision 1.56
        usr.sbin/sysinst/msg.mi.en: revision 1.25
        usr.sbin/sysinst/disks.c: revision 1.57
        usr.sbin/sysinst/arch/playstation2/msg.md.pl: revision 1.3
        usr.sbin/sysinst/Makefile.inc: revision 1.30
        usr.sbin/sysinst/configmenu.c: revision 1.11
        usr.sbin/sysinst/util.c: revision 1.35
        usr.sbin/sysinst/gpt.c: revision 1.12
        usr.sbin/sysinst/util.c: revision 1.36
        usr.sbin/sysinst/arch/playstation2/msg.md.de: revision 1.3
        usr.sbin/sysinst/arch/i386/menus.md: revision 1.3
        usr.sbin/sysinst/util.c: revision 1.37
        usr.sbin/sysinst/part_edit.c: revision 1.11
        usr.sbin/sysinst/arch/i386/msg.md.en: revision 1.2
        usr.sbin/sysinst/util.c: revision 1.38
        usr.sbin/sysinst/part_edit.c: revision 1.12
        usr.sbin/sysinst/arch/i386/msg.md.en: revision 1.3
        usr.sbin/sysinst/util.c: revision 1.39
        usr.sbin/sysinst/part_edit.c: revision 1.13
        usr.sbin/sysinst/arch/i386/msg.md.en: revision 1.4
        usr.sbin/sysinst/disklabel.c: revision 1.15
        usr.sbin/sysinst/bsddisklabel.c: revision 1.30
        usr.sbin/sysinst/arch/i386/msg.md.es: revision 1.2
        usr.sbin/sysinst/bsddisklabel.c: revision 1.31
        usr.sbin/sysinst/arch/i386/msg.md.es: revision 1.3
        usr.sbin/sysinst/arch/i386/msg.md.es: revision 1.4
        usr.sbin/sysinst/mbr.h: revision 1.4
        usr.sbin/sysinst/main.c: revision 1.18
        usr.sbin/sysinst/partman.c: revision 1.44
        usr.sbin/sysinst/msg.mi.de: revision 1.17
        usr.sbin/sysinst/arch/i386/msg.md.fr: revision 1.2
        usr.sbin/sysinst/msg.mi.de: revision 1.18
        usr.sbin/sysinst/arch/i386/msg.md.fr: revision 1.3
        usr.sbin/sysinst/arch/playstation2/msg.md.en: revision 1.3
        usr.sbin/sysinst/arch/i386/msg.md.fr: revision 1.4
        usr.sbin/sysinst/arch/amd64/md.c: revision 1.2
        usr.sbin/sysinst/arch/ews4800mips/Makefile: revision 1.3
        usr.sbin/sysinst/arch/playstation2/msg.md.es: revision 1.3
        usr.sbin/sysinst/label.c: revision 1.13
        usr.sbin/sysinst/Makefile.inc: revision 1.29
        usr.sbin/sysinst/label.c: revision 1.14
        usr.sbin/sysinst/util.c: revision 1.40
        usr.sbin/sysinst/partitions.c: revision 1.5
        usr.sbin/sysinst/arch/amd64/md.h: revision 1.8
        usr.sbin/sysinst/msg.mi.es: revision 1.18
        usr.sbin/sysinst/net.c: revision 1.34
        usr.sbin/sysinst/msg.mi.es: revision 1.19
        usr.sbin/sysinst/arch/i386/msg.md.pl: revision 1.2
        usr.sbin/sysinst/arch/i386/md.c: revision 1.22
        usr.sbin/sysinst/msg.mi.fr: revision 1.22
        usr.sbin/sysinst/arch/playstation2/msg.md.fr: revision 1.3
        usr.sbin/sysinst/arch/i386/msg.md.pl: revision 1.3
        usr.sbin/sysinst/arch/i386/md.c: revision 1.23
        usr.sbin/sysinst/msg.mi.pl: revision 1.25
        usr.sbin/sysinst/msg.mi.fr: revision 1.23
        usr.sbin/sysinst/arch/i386/msg.md.pl: revision 1.4
        usr.sbin/sysinst/arch/i386/md.c: revision 1.24
        usr.sbin/sysinst/partitions.h: revision 1.8
        usr.sbin/sysinst/msg.mi.pl: revision 1.26
        usr.sbin/sysinst/arch/i386/msg.md.de: revision 1.2
        usr.sbin/sysinst/arch/i386/msg.md.de: revision 1.3
        usr.sbin/sysinst/arch/i386/msg.md.de: revision 1.4
        usr.sbin/sysinst/run.c: revision 1.13
        usr.sbin/sysinst/defs.h: revision 1.46
        usr.sbin/sysinst/install.c: revision 1.12
        usr.sbin/sysinst/defs.h: revision 1.47
        usr.sbin/sysinst/install.c: revision 1.13
        usr.sbin/sysinst/defs.h: revision 1.48
Add options to the various partitioning stages that allow cloning of
alien partitions (optionally including data).
PR 54467: we trust our own sets, extract them with -P to allow symlink
redirection (especially for updates and chroot services - back out
once a better solution for those is implemented)
Make cloning support optional, so we can save some space on very small
install media.
Drop MBR and cloning support on crunched install media.
Make tar extraction flags depend on our usage of pax-as-tar or bsdtar.
Fix missing newlines in bios match display, pointed out by maxv.
Drop unused variable.
Fix table of bios geomatries
knf style adjustments
Make the bootblock selection menu more sane, pointed out by maxv
Make sure all menus have a translatable exit option (or none at all).
On amd64 support installation with a KASLR kernel, via "custom install"
and selecting the GENERIC_KASLR kernel set.
Setup /prekern and boot.cfg accordingly.

diffstat:

 usr.sbin/sysinst/Makefile.inc                |    9 +-
 usr.sbin/sysinst/arch/amd64/md.c             |   19 +-
 usr.sbin/sysinst/arch/amd64/md.h             |    7 +-
 usr.sbin/sysinst/arch/ews4800mips/Makefile   |    4 +-
 usr.sbin/sysinst/arch/i386/md.c              |   20 +-
 usr.sbin/sysinst/arch/i386/menus.md          |    9 +-
 usr.sbin/sysinst/arch/i386/msg.md.de         |   13 +-
 usr.sbin/sysinst/arch/i386/msg.md.en         |   11 +-
 usr.sbin/sysinst/arch/i386/msg.md.es         |   11 +-
 usr.sbin/sysinst/arch/i386/msg.md.fr         |   11 +-
 usr.sbin/sysinst/arch/i386/msg.md.pl         |   13 +-
 usr.sbin/sysinst/arch/playstation2/msg.md.de |    6 +-
 usr.sbin/sysinst/arch/playstation2/msg.md.en |   10 +-
 usr.sbin/sysinst/arch/playstation2/msg.md.es |    8 +-
 usr.sbin/sysinst/arch/playstation2/msg.md.fr |   10 +-
 usr.sbin/sysinst/arch/playstation2/msg.md.pl |   10 +-
 usr.sbin/sysinst/bsddisklabel.c              |  269 +++++++++++++-
 usr.sbin/sysinst/configmenu.c                |    4 +-
 usr.sbin/sysinst/defs.h                      |   52 ++-
 usr.sbin/sysinst/disklabel.c                 |   15 +-
 usr.sbin/sysinst/disks.c                     |  477 ++++++++++++++++++++++++++-
 usr.sbin/sysinst/gpt.c                       |  141 ++++++-
 usr.sbin/sysinst/install.c                   |   27 +-
 usr.sbin/sysinst/label.c                     |  247 +++++++++++++-
 usr.sbin/sysinst/main.c                      |    4 +-
 usr.sbin/sysinst/mbr.c                       |  232 ++++++++++++-
 usr.sbin/sysinst/mbr.h                       |    6 +-
 usr.sbin/sysinst/msg.mi.de                   |   21 +-
 usr.sbin/sysinst/msg.mi.en                   |   21 +-
 usr.sbin/sysinst/msg.mi.es                   |   20 +-
 usr.sbin/sysinst/msg.mi.fr                   |   19 +-
 usr.sbin/sysinst/msg.mi.pl                   |   19 +-
 usr.sbin/sysinst/net.c                       |    4 +-
 usr.sbin/sysinst/part_edit.c                 |  205 ++++++++++-
 usr.sbin/sysinst/partitions.c                |   42 ++-
 usr.sbin/sysinst/partitions.h                |   32 +-
 usr.sbin/sysinst/partman.c                   |   21 +-
 usr.sbin/sysinst/run.c                       |    4 +-
 usr.sbin/sysinst/util.c                      |   92 +++-
 39 files changed, 1902 insertions(+), 243 deletions(-)

diffs (truncated from 3588 to 300 lines):

diff -r 8d6ec624dc39 -r 200825e98e29 usr.sbin/sysinst/Makefile.inc
--- a/usr.sbin/sysinst/Makefile.inc     Sun Nov 17 13:36:18 2019 +0000
+++ b/usr.sbin/sysinst/Makefile.inc     Sun Nov 17 13:45:26 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.22 2019/06/20 15:59:40 christos Exp $
+#      $NetBSD: Makefile.inc,v 1.22.2.1 2019/11/17 13:45:26 msaitoh Exp $
 #
 # Makefile for sysinst
 
@@ -43,6 +43,9 @@
 CPPFLAGS+=     -DHAVE_MBR
 SRCS+= mbr.c
 .endif
+.if ${NO_CLONES:Uno} == "yes"
+CPPFLAGS+=     -DNO_CLONES
+.endif
 
 MSG_MD?=       msg.md.${SYSINSTLANG}
 MENUS_MD?=     menus.md.${SYSINSTLANG}
@@ -65,6 +68,10 @@
 
 SETS_TAR_SUFF=${"${USE_XZ_SETS:Uno}"!="no":?"tar.xz":"tgz"}
 
+.if ${MKBSDTAR:Uno} == "no"
+CPPFLAGS+=     -DUSING_PAXASTAR
+.endif
+
 CATALOGDIR=    /usr/share/sysinst/catalog
 CPPFLAGS+=     -I. -I${.CURDIR}/../.. -I${.CURDIR} \
                -I${.CURDIR}/../../../../sbin/fsck \
diff -r 8d6ec624dc39 -r 200825e98e29 usr.sbin/sysinst/arch/amd64/md.c
--- a/usr.sbin/sysinst/arch/amd64/md.c  Sun Nov 17 13:36:18 2019 +0000
+++ b/usr.sbin/sysinst/arch/amd64/md.c  Sun Nov 17 13:45:26 2019 +0000
@@ -1,5 +1,22 @@
-/*     $NetBSD: md.c,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
+/*     $NetBSD: md.c,v 1.1.30.1 2019/11/17 13:45:26 msaitoh Exp $ */
 
 /* md.c -- Machine specific code for amd64 */
 
 #include "../i386/md.c"
+
+void   amd64_md_boot_cfg_finalize(const char *path);
+
+void
+amd64_md_boot_cfg_finalize(const char *path)
+{
+       char buf[MAXPATHLEN];
+
+       if (get_kernel_set() != SET_KERNEL_2)
+               return;
+
+       run_program(RUN_CHROOT|RUN_FATAL,
+           "sh -c 'sed -e \"s:;boot:;pkboot:\" "
+           "< %s > %s.1", path, path);
+       snprintf(buf, sizeof buf, "%s.1", path);
+       mv_within_target_or_die(buf, path);
+}
diff -r 8d6ec624dc39 -r 200825e98e29 usr.sbin/sysinst/arch/amd64/md.h
--- a/usr.sbin/sysinst/arch/amd64/md.h  Sun Nov 17 13:36:18 2019 +0000
+++ b/usr.sbin/sysinst/arch/amd64/md.h  Sun Nov 17 13:45:26 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.h,v 1.6.2.1 2019/11/17 07:04:37 martin Exp $        */
+/*     $NetBSD: md.h,v 1.6.2.2 2019/11/17 13:45:26 msaitoh Exp $       */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -85,6 +85,7 @@
  * from floppy.
  */
 #define SET_KERNEL_1_NAME      "kern-GENERIC"
+#define        SET_KERNEL_2_NAME       "kern-GENERIC_KASLR"
 
 #define SET_KERNEL_GENERIC     SET_KERNEL_1
 
@@ -117,9 +118,13 @@
  */
 void x86_md_part_defaults(struct pm_devs*, struct part_usage_info**,
             size_t *num_usage_infos);
+
 #define MD_PART_DEFAULTS(A,B,C)        x86_md_part_defaults(A,&(B),&(C))
 
 /* no need to install bootblock if installing for UEFI */
 bool x86_md_need_bootblock(struct install_partition_desc *install);
 #define        MD_NEED_BOOTBLOCK(A)    x86_md_need_bootblock(A)
 
+/* post-process boot.cfg for KASLR if that kernel has been selected */
+void amd64_md_boot_cfg_finalize(const char*);
+#define        MD_BOOT_CFG_FINALIZE(P) amd64_md_boot_cfg_finalize(P)
diff -r 8d6ec624dc39 -r 200825e98e29 usr.sbin/sysinst/arch/ews4800mips/Makefile
--- a/usr.sbin/sysinst/arch/ews4800mips/Makefile        Sun Nov 17 13:36:18 2019 +0000
+++ b/usr.sbin/sysinst/arch/ews4800mips/Makefile        Sun Nov 17 13:45:26 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.2 2019/06/13 06:34:31 martin Exp $
+#      $NetBSD: Makefile,v 1.2.2.1 2019/11/17 13:45:26 msaitoh Exp $
 #
 # Makefile for ews4800mips
 #
@@ -8,6 +8,8 @@
 .ifdef SMALLPROG
 NOPARTMAN=     yes
 NO_GPT=                yes
+NO_MBR=                yes
+NO_CLONES=     yes
 .endif
 
 .include "../../Makefile.inc"
diff -r 8d6ec624dc39 -r 200825e98e29 usr.sbin/sysinst/arch/i386/md.c
--- a/usr.sbin/sysinst/arch/i386/md.c   Sun Nov 17 13:36:18 2019 +0000
+++ b/usr.sbin/sysinst/arch/i386/md.c   Sun Nov 17 13:45:26 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.20.2.1 2019/08/18 13:19:52 msaitoh Exp $ */
+/*     $NetBSD: md.c,v 1.20.2.2 2019/11/17 13:45:26 msaitoh Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -256,11 +256,12 @@
                 * Too hard to double check, so just 'know' the device numbers.
                 */
                len = sizeof condev;
-               if (sysctl(conmib, __arraycount(conmib), &condev, &len, NULL, 0) != -1
-                   && (condev & ~3) == 0x800) {
+               if (sysctl(conmib, __arraycount(conmib), &condev, &len, NULL,
+                   0) != -1 && (condev & ~3) == 0x800) {
                        /* Motherboard serial port */
                        boottype.bp_consdev = (condev & 3) + 1;
-                       /* Defaulting the baud rate to that of stdin should suffice */
+                       /* Defaulting the baud rate to that of stdin should
+                          suffice */
                        if (tcgetattr(0, &t) != -1)
                                boottype.bp_conspeed = t.c_ispeed;
                }
@@ -375,6 +376,13 @@
 int
 md_post_newfs(struct install_partition_desc *install)
 {
+#if defined(__amd64__)
+       int ret;
+
+       ret = cp_to_target("/usr/mdec/prekern", "/prekern");
+       if (ret)
+               return ret;
+#endif
 
        return uefi_boot ? md_post_newfs_uefi(install)
            : md_post_newfs_bios(install);
@@ -895,7 +903,7 @@
                if (info.nat_type->generic_ptype != boot->type)
                        continue;
                boot->flags &= ~PUIFLAG_ADD_OUTER;
-               boot->flags |= PUIFLG_IS_OUTER|PUIFLAG_ADD_INNER;
+               boot->flags |= PUIFLG_IS_OUTER|PUIFLG_ADD_INNER;
                boot->size = info.size;
                boot->cur_start = info.start;
                boot->cur_flags = info.flags;
@@ -910,5 +918,3 @@
 
        return !uefi_boot;
 }
-
-
diff -r 8d6ec624dc39 -r 200825e98e29 usr.sbin/sysinst/arch/i386/menus.md
--- a/usr.sbin/sysinst/arch/i386/menus.md       Sun Nov 17 13:36:18 2019 +0000
+++ b/usr.sbin/sysinst/arch/i386/menus.md       Sun Nov 17 13:45:26 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: menus.md,v 1.2 2019/06/20 00:43:56 christos Exp $      */
+/*     $NetBSD: menus.md,v 1.2.2.1 2019/11/17 13:45:26 msaitoh Exp $   */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -34,7 +34,8 @@
 
 /* Menu definitions for sysinst. i386 version, machine dependent. */
 
-menu getboottype, title MSG_Bootblocks_selection, y=10, exit, no clear;
+menu getboottype, title MSG_Bootblocks_selection, y=10, exit, no clear,
+       exitstring MSG_Continue;
        display action { msg_display(MSG_getboottype);
                switch (((struct x86_boot_params *)arg)->bp_consdev) {
                default:
@@ -52,7 +53,7 @@
                        msg_display_add(MSG_console_unchanged);
                        break;
                }};
-       option MSG_Use_normal_bootblocks, action
+       option MSG_Use_normal_bootblocks, exit, action
            {((struct x86_boot_params *)arg)->bp_consdev = 0; m->cursel = 7;};
        option MSG_Use_serial_com0, action
            {((struct x86_boot_params *)arg)->bp_consdev = 1; m->cursel = 5;};
@@ -63,7 +64,7 @@
        option MSG_Use_serial_com3, action
            {((struct x86_boot_params *)arg)->bp_consdev = 4; m->cursel = 5;};
        option MSG_serial_baud_rate, sub menu consolebaud;
-       option MSG_Use_existing_bootblocks, action
+       option MSG_Use_existing_bootblocks, exit, action
            {((struct x86_boot_params *)arg)->bp_consdev = ~0; m->cursel = 7;};
 
 menu consolebaud, title MSG_serial_baud_rate, x=40, y=13;
diff -r 8d6ec624dc39 -r 200825e98e29 usr.sbin/sysinst/arch/i386/msg.md.de
--- a/usr.sbin/sysinst/arch/i386/msg.md.de      Sun Nov 17 13:36:18 2019 +0000
+++ b/usr.sbin/sysinst/arch/i386/msg.md.de      Sun Nov 17 13:45:26 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msg.md.de,v 1.1 2014/07/26 19:30:45 dholland Exp $     */
+/*     $NetBSD: msg.md.de,v 1.1.24.1 2019/11/17 13:45:26 msaitoh Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -82,8 +82,8 @@
 }
 
 message onebiosmatch_header
-{BIOS # Zylinder Köpfe Sektoren Anzahl Sektoren  GB
------- -------- ----- -------- --------------- ---
+{BIOS # Zylinder Köpfe Sektoren Anzahl Sektoren   GB 
+------ -------- ----- -------- --------------- ---- 
 }
 
 message onebiosmatch_row
@@ -97,13 +97,13 @@
 {Benutzen Sie eine dieser Festplatten}
 
 message biosmultmatch
-{Diese Festplatte entspricht der folgenden BIOS Disk:
+{Diese Festplatte entspricht den folgenden BIOS Disks:
 
 }
 
 message biosmultmatch_header
-{   BIOS # Zylinder Köpfe Sektoren Anzahl Sektoren  GB
-   ------ -------- ----- -------- --------------- ---
+{   BIOS # Zylinder Köpfe Sektoren  Anzahl Sektoren   GB 
+   ------ -------- ----- -------- ---------------- ---- 
 }
 
 message biosmultmatch_row
@@ -165,3 +165,4 @@
 NetBSD Bootcodes updaten?}
 
 message set_kernel_1   {Kernel (GENERIC)}
+message set_kernel_2   {Kernel (GENERIC_KASLR)}
diff -r 8d6ec624dc39 -r 200825e98e29 usr.sbin/sysinst/arch/i386/msg.md.en
--- a/usr.sbin/sysinst/arch/i386/msg.md.en      Sun Nov 17 13:36:18 2019 +0000
+++ b/usr.sbin/sysinst/arch/i386/msg.md.en      Sun Nov 17 13:45:26 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msg.md.en,v 1.1 2014/07/26 19:30:45 dholland Exp $     */
+/*     $NetBSD: msg.md.en,v 1.1.24.1 2019/11/17 13:45:26 msaitoh Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -82,8 +82,8 @@
 }
 
 message onebiosmatch_header
-{BIOS # cylinders heads sectors total sectors  GB
------- --------- ----- ------- ------------- ---
+{BIOS # cylinders heads sectors total sectors   GB 
+------ --------- ----- ------- ------------- ---- 
 }
 
 message onebiosmatch_row
@@ -102,8 +102,8 @@
 }
 
 message biosmultmatch_header
-{   BIOS # cylinders heads sectors total sectors   GB
-   ------ --------- ----- ------- ------------- ----
+{   BIOS # cylinders heads sectors total sectors   GB 
+   ------ --------- ----- ------- ------------- ---- 
 }
 
 message biosmultmatch_row
@@ -161,3 +161,4 @@
 the latest version of the NetBSD bootcode?}
 
 message set_kernel_1   {Kernel (GENERIC)}
+message set_kernel_2   {Kernel (GENERIC_KASLR)}
diff -r 8d6ec624dc39 -r 200825e98e29 usr.sbin/sysinst/arch/i386/msg.md.es
--- a/usr.sbin/sysinst/arch/i386/msg.md.es      Sun Nov 17 13:36:18 2019 +0000
+++ b/usr.sbin/sysinst/arch/i386/msg.md.es      Sun Nov 17 13:45:26 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msg.md.es,v 1.1 2014/07/26 19:30:45 dholland Exp $     */
+/*     $NetBSD: msg.md.es,v 1.1.24.1 2019/11/17 13:45:26 msaitoh Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -82,8 +82,8 @@
 }
 
 message onebiosmatch_header
-{BIOS # cilindros cabez sectors sect. totales GB
------- --------- ----- ------- ------------- ---
+{BIOS # cilindros cabez sectors sect. totales   GB 
+------ --------- ----- ------- ------------- ---- 
 }
 
 message onebiosmatch_row
@@ -102,8 +102,8 @@
 }
 
 message biosmultmatch_header
-{   BIOS # cilindros cabez sectors sect totales  GB



Home | Main Index | Thread Index | Old Index