Commit Graph

298 Commits

Author SHA1 Message Date
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
martin
48cbcc51da If we can not fit a planned partition, retry with a bit more slope
in size.
2019-08-01 17:50:16 +00:00
martin
c8d0c58880 PR 54423: complete initialization of install info for user defined partitions 2019-08-01 17:49:12 +00:00
martin
fcf26eb921 PR 54423: fix handling of user defined partitions 2019-08-01 16:48:06 +00:00
martin
6de470330d Do not strip the trailing / on root mounts when evaluation "last mounted
on". Fix some /dev/ and raw vs. block device confusion on system upgrades.
2019-08-01 16:32:06 +00:00
martin
4c36c108f4 If available, show additional names of foreign partitions in the
size menu. Makes installing on machines with other OSes installed
a lot less confusing.
2019-07-28 16:30:36 +00:00
martin
ed312f011f When merging existing partitions into the planned installation partitions,
keep the separation between the original planned partitions and the
pre-exiting partitions.
Also do not call found partitions "outer" if they are not (but could be)
2019-07-28 16:03:00 +00:00
martin
5b07b744fb Deal with partition types we don't know anything about. 2019-07-28 13:17:46 +00:00
martin
62056b8490 Strip trailing / from last mounted strings.
No idea how they happen, but for cgd root (init.root = "/altroot")
they have been reported to exist.
2019-07-26 08:18:47 +00:00
martin
dc86c1ae8b Gracefully get out of extended partitioning if the user did not create
any partitions at all.
2019-07-25 19:01:08 +00:00
martin
5aa2dd134b Do not free() an array embedded in another structure 2019-07-25 18:55:40 +00:00
martin
7e7989f74b Fix a few calloc() calls with wrong arg order (harmless, but for consistency) 2019-07-25 13:16:35 +00:00
martin
e32f4c09dc When re-discovering a disk where we have free the partitions, read
the current partitions again (they might have changed).
2019-07-25 13:11:15 +00:00
martin
7edc37a722 Whenever offering "current system" as target, also offer the last disk
we found (not one less - oops).
2019-07-24 14:35:02 +00:00
roy
511782436c Work with bsdtar as pointed out by kamil@ 2019-07-24 10:22:04 +00:00
msaitoh
d4a37f7caf Fix typo in comment (s/alreay/already/). 2019-07-24 02:38:29 +00:00
msaitoh
532016140e Fix typo in comment (s/partion/partition/). 2019-07-24 02:37:17 +00:00