In some cases, we might want to copy a filesystem as if we were using a
simple 'dd' command, in order to create an exact copy, down to the block
level.
This can be useful in particular when working with dm-verity for
checking the rootfs integrity: that way, we can make a direct copy of
the rootfs and its verity partition and keep the system usable.
This patch adds a new 'rawfs' module to calamares, making possible to
block-copy a filesystem to a block device.
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
In some cases, e.g. when calamares is used as an "initial setup" tool,
we may want to user to go through all the configuration steps in order
to end up with a usable system.
Therefore, disabling the "Cancel" button can be useful in this case.
This commit adds an option to settings.conf which disables this button
when set to "true". If the option is not present in the settings file,
the default behavior ("Cancel" button enabled & visible) is enforced.
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
- A size of 64em has a value less than 1024, which is the minimum
size **in pixels**. The check doesn't make sense as-is and would
have to take the unit into account. Leave that to clients of
branding (e.g. CalamaresWindow, which already does this).
Keeping std::initializer_list around is fraught. Causes segfaults
because I'm not keeping the underlying temporary array around
properly. Switch to vectors because those initialize from the
underlying array.
TODO: look into making this sufficiently constexpr -- perhaps
just use std::array and make find() work on that.
For (all?) those cases where we have configuration with
a value followed by a unit, introduce a class that
uses the NamedEnum properties to make parsing and split-up easier.
- Use locale "C" for checking filesystem names
- Also check other possibilities and case-insensitive, to
be more forgiving of weird configurations (and localizations)