Commit Graph

314 Commits

Author SHA1 Message Date
martin 7ca7eecae1 Make sure all menus have a translatable exit option (or none at all). 2019-11-16 20:26:59 +00:00
martin f6972e2244 Make the bootblock selection menu more sane, pointed out by maxv 2019-11-16 18:08:59 +00:00
martin 05e0fd7496 knf style adjustments 2019-11-16 18:08:36 +00:00
martin 9aa61cd2ab Fix table of bios geomatries 2019-11-16 17:53:02 +00:00
joerg 18bfe0dbc7 Drop unused variable. 2019-11-16 15:50:45 +00:00
martin d1379acfcf Fix missing newlines in bios match display, pointed out by maxv. 2019-11-14 19:26:58 +00:00
martin b76c9f8f6f Make tar extraction flags depend on our usage of pax-as-tar or bsdtar. 2019-11-14 13:58:22 +00:00
martin be173c6428 Drop MBR and cloning support on crunched install media. 2019-11-13 18:58:09 +00:00
martin 485d530922 Make cloning support optional, so we can save some space on very small
install media.
2019-11-13 18:57:26 +00:00
martin f6c1538729 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)
2019-11-12 18:04:37 +00:00
martin f77b58b179 Add options to the various partitioning stages that allow cloning of
alien partitions (optionally including data).
2019-11-12 16:33:14 +00:00
martin 86b7cda9e0 After RELEASEMACHINEDIR has the right defaults now, simplify subdir settings
and do not hardcode any architecture exceptions.
2019-10-31 09:44:13 +00:00
martin 4327f8a536 In non-MBR specific files, #ifdef all tests for MBR for architectures
that do not even compile in MBR support.
2019-10-26 07:32:52 +00:00
martin f96c1808ac On device where we do not want a MBR (raid, xbd) skip the MBR partitioning
scheme when trying to read partitions from disk. The generic reader will
fall back to disklabel then.
2019-10-25 12:49:58 +00:00
martin 6a81eb289c Honor the "no_mbr" flag (used especially for raid and xbd devices) 2019-10-25 12:24:34 +00:00
martin f033e6150f When we fail to setup for "all of the disk for NetBSD" report
failure, instead of silently aborting the install.
2019-10-24 18:17:08 +00:00
kamil 1c5b1926dd Fix polish translation for sysinst
PR install/53870 by Guest01
PR install/53871 by Guest01

patch by Krzysztof Lasocki
2019-10-23 18:08:31 +00:00
martin e1c382678c Skip unwanted (zero sized) partitions. 2019-10-21 16:10:54 +00:00
martin 10ffbb5073 When translating (internal) indices to device names, properly deal with
gaps in partition allocations (e.g. no swap partition).
2019-10-21 16:09:59 +00:00
martin df91044bef Remove a hardcoded assumption that for BIOS boot we always will have
the first partition as root - in mixed EFI/BIOS setups this might not
be true (and in general the user is free to define arbitrary orders).
Pointed out by Robert Nestor.
2019-10-21 14:07:42 +00:00
maxv 3d07030363 Sentence begins with capital letter ("yes or no?"). Also add a few french
sentences, to make it less awful, but not complete. Not tested.
2019-10-17 08:54:50 +00:00
mrg de11d87641 introduce some common variables for use in GCC warning disables:
GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
2019-10-13 07:28:04 +00:00
mrg 056b9b215b remove, not comment, the partman.c option 2019-10-06 00:07:11 +00:00
mrg b6c33b696c avoid calling snprintf/strlcat with an input parameter the same
as the output.  from martin@.  fixes gcc 8 restrict warnings.
2019-10-06 00:05:10 +00:00
mrg ea2cbdfdaf add a size_t len to get_iso9660_volname() so it can properly do
bounds checking.

ok martin@
2019-10-04 21:36:02 +00:00
mrg 628b66af12 turn off various warnings for various things:
- file has looks bogus maybe-uninitialized
- llvm triggers an attribute violation:
  ScheduleDAGInstrs.cpp:1430:14: error: declaration of
    'llvm::raw_ostream& llvm::operator<<(llvm::raw_ostream&, const llvm::ILPValue&)'
    with attribute 'noinline' follows inline declaration [-Werror=attributes]
- ntp and pkg_install have obvious restrict violations, should be
  fixed but i'm avoiding patching upstream code in this pass
- tftp has an array bounds that doesn't seem real issue
- sysinst's partman.c has major problem with passing the same
  string as source and dest in snprintf, as a way to strcat
  with formatting which trip restrict violations.  non trivial
  to fix so for now the warning is elided.
- Xext's XEVI.c has similar issue as partman.c

everyone and GCC 8 gets these warnings turned off for now:

	-Wno-format-truncation
	-Wno-stringop-overflow
	-Wno-stringop-truncation
	-Wno-cast-function-type

as they trip a large amount of code.  most of them should be
investigated, but the few i looked at were not finding actually
real bugs, vs instances of poor coding, so skipping for now.
2019-10-04 09:47:27 +00:00
maya 50f7458533 Split out /rescue to its own set and adapt installers/images to add it.
This is meant to make updates safer: if something goes wrong with updating
base, we still have the old, standalone /rescue to recover from.
2019-10-02 11:15:59 +00:00
mrg 21303c93e9 convert HAVE_GCC == 7 to HAVE_GCC >= 7. 2019-09-29 23:44:58 +00:00
martin ff2c12f319 Remove dead (#if 0) code. 2019-08-28 15:19:05 +00:00
martin c62f035be3 When requesting no special FS sub type, default to FAT32 with LBA.
Fixes one part of PR 54490.
2019-08-27 17:23:24 +00:00
martin 32ccf04c1c Do not offer to upgared the "current system" if we are running off a CD
(i.e. / is mounted read-only)
2019-08-27 14:11:00 +00:00
martin 6f0d7230f9 Fix a bug when installing to pre-exising GPT partitions.
Handle GPT labels with spaces.
2019-08-26 12:14:06 +00:00
martin d7f55bad98 PR install/54480: when upgrading a system and re-mounting the target /
with proper options, and the installed system does not use NAME= syntax
in fstab(5), use the device name we used to get here, instead of the
name from fstab, it might be different to what the real system calls the
device (compact flash root showing up as wd0 native, but sd? on the
card reader used for updating it right now).

This is an abuse of the upgrade functionality and in general pretty dangerous
when multiple devices are used in the upgraded fstab (e.g. separate /usr),
and it used to work more by accident with the old code.

However, it is a quite usefull way to upgrade tiny systems with compact flash
root, and it used to work - so support it properly (as far as we can).
2019-08-20 06:38:17 +00:00
martin 6bccae72f0 Fix memory leak (found by MKSANITIZER=yes build). 2019-08-18 11:11:48 +00:00
martin 2b9b247d73 Oops, avoid double free. 2019-08-17 18:08:06 +00:00
martin 31a289cd68 Fix some memory leaks in error paths 2019-08-17 18:03:12 +00:00
martin 1b565566ff PR 54473: fix error prompt when a set file is missing 2019-08-17 17:51:19 +00:00
martin 3004d9767f Fix some "partition index" (as used in the abstract interface)
versus disklabel "partition letter" confusion.
2019-08-14 13:58:00 +00:00
martin b04f4d6257 On architectures that usually do MBR/disklabel, nevertheless deal with
pure/plain disklabel disks, and explicitly offer this as partitioning
option when bootability is not a concern.
2019-08-14 13:02:23 +00:00
martin 6fec679845 When we ask the user to select a partitioning scheme and they refuse
(that is: select "Exit" in the menu), abort installation.
2019-08-14 12:55:35 +00:00
martin 13f836ecb6 Provide some documentation for macros / defines used in the machine
dependent backend parts of sysinst.
2019-08-14 12:49:37 +00:00
martin 736e79ce31 Make sure to completely initialize dynamic menu entries. 2019-08-13 17:57:49 +00:00
martin 0dfd6624ca Do not even consider to fsck partitions where we do not know the file
system type. Add v7fs support.
2019-08-08 13:45:19 +00:00
martin 62c0076db0 Do not try to fsck partitions we are never going to mount.
Found by Andreas Gustafsson's baremetal test bed.
2019-08-08 11:41:16 +00:00
martin b8a71b5965 When creating the /etc/fstab for new installs, the sense of the "noauto"
flag was inverted (editor mishap?)
2019-08-07 10:12:32 +00:00
martin a7267d5357 Support upgrade of systems using NAME= syntax in /etc/fstab.
Make supported file system types dynamic - instead of hardcoding the
available types at compile time, check for available newfs_* helper
binaries in the actual install environment at runtime.
2019-08-07 10:08:04 +00:00
martin 6477ac5760 Fix copy&pasto: when we find a FFSv1 filesystem, properly record it
that way - so the correct bootblocks get installed on system upgrades.
2019-08-04 10:29:41 +00:00
martin 9b4c571a0a When reading an existing gpt, match the wedges already existing ons
on the parent device, so we can use them directly if we should proceed
with an unmodified partition table.
2019-08-03 14:00:42 +00:00
martin a8e7688bfa Properly handle partitions that we were requested to mount but not newfs. 2019-08-03 12:09:22 +00:00
martin 43d7f7864c Deal with missing labels when parsing gpt(8) output. 2019-08-02 10:44:22 +00:00