- The default window title in the designer file wasn't a good string
to translate. Use one of the titles instanced from elsewhere.
- The window titles set in subclasses were not translatable.
FIXES#1092
When using the default partition layout (only a `/` partition), the
filesystem used was ext4, ignoring the `defaultFileSystemType`
configuration option.
This commit fixes this bug, so that any supported filesystem can now be
used for the default partitioning scheme.
Fixes#1093
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
- Move the actual checking into a separate object with some lifecycle-
management signals.
- Right now this is still single-threaded and blocking, so no net gain.
- Strings like "{} the {} with {}" are terrible for translators:
- no context
- no possibility to re-order grammatical units
- substituting in English parts-of-speech is going to make a mess
- Write the strings out with explicitly named substitutions,
no part-of-speech substitution, and better formatting.
- Add a (superfluous, since they don't have their own signals or slots)
Q_OBJECT macro to the VG jobs, to silence a Transifex warning (this
does make sure that the tool knows about the context for the translated
messages)
-----BEGIN PGP SIGNATURE-----
iHUEABEIAB0WIQTnwx6uJD15hBW87wASjwCHPgWvHQUCXGLH4QAKCRASjwCHPgWv
HeCzAP4/cwoZOBtOFAdDy6IlolCC42wAyTdW8NOrA8A7jNmETAD/bIsYGRlVEQeG
i9CW7IgRLRjlSM+hJPVYY8GYbF3k0Us=
=0y3i
-----END PGP SIGNATURE-----
Merge tag 'v3.2.4' of https://github.com/calamares/calamares into development
Release v3.2.4
- The test wants to read settings.conf, but by default it's run
from way inside the build dir, where there is no such file.
Go looking for one (but not too far).
- Part of the tests checks that the example configuration
is not empty. So uncomment the example. (Distro's should
not be installing the example configs, and this one in
particular needs to be customized).
- Store changes to the selected swap-choice when the combobox changes
- Use that member instead of dereferencing the combobox
This avoids nullptr crashes when the combobox isn't even created
(e.g. when there is only one swap choice).
- drop the localized comparisons; that's just confusing
- warn when no default FS is set (then use ext4)
- fix case-insensitive fallback; it used fsType, which was
set to Unknown in the for loop.
- Make the explanations about 3 times as wide as the text-boxes
that they are explaining. This is partly moot because the
text-boxes have fixed pixel sizes in the designer file, but keep
it flexible for now.
- Using the assignment-operator just generates blank lines.
- Using QLog with a log-level avoids the cDebug()-style special
handling of warnings and errors (useless here, but may as well
fix code style).
When using the `rawfs` module for copying data, it may be useful to
save the source device used for later checks or actions. This commit
therefore adds a `source` field to each corresponding partition entry in
global storage, so that this information can be retrieved later during
the installation process.
Another small improvement is that global storage is now modified only
once (it was previously modified as many times as there were entries
processed by the `rawfs` module).
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
When choosing `systemd-boot` as the bootloader, numerous problems
occurred:
- the kernel and initrd were not copied to the EFI System Partition,
and therefore could not be reached by the bootloader
- the fallback entry used the default initramfs image instead of the
fallback image
`systemd-boot` provides the `kernel-install` utility, which
automatically copies the kernel + initramfs to the EFI partition, and
creates the corresponding bootloader entry.
Unfortunately, `kernel-install` cannot be used here as the module is not
executed in a chroot. As setting up one only for running a single
command would be overkill, this patch re-creates what `kernel-install`
usually does:
- copy the kernel and initramfs to their own subdirectory at the root of
the EFI partition
- create the corresponding entry configuration file
To this end, the `systemd-boot` installation code in the `bootloader`
module has been largely refactored, including removing a few duplicate
LOCs.
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
In its current state, the 'rawfs' module requires the source partition
to be identified either by its mount point or device name, but using a
symlink to either one (e.g '/dev/disk/by-uuid/...') would fail.
This patch fetches the real path of source partition, allowing the use
of symlinks.
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
When setting the size of a partition without indicating the unit, two
problems occur:
- the size is parsed as an integer, not as a string, hence the
configuration parsing fails
- the size parser doesn't recognize the fact that the size has no units
and defaults to 100%
This patch fixes the configuration parsing as well as the size string
parsing.
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
When a partition doesn't have a minimum size in the partition layout
configuration, it defaults to using 100% of the available space.
This patch fixes this error by setting the minimum partition size to 0
when the attribute has been omitted.
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
- Write out Int, Double
- Special-case empty lists
- Do objects (not lists of objects) correctly
Now passes the tests for all the example config files.
- The code in loadYaml was refactored out of the module-descriptor
loading code, but the variable names in the implementation were
not changed and still strangely specific to the prior task.
- Add global- and job-configurations for test runs.
- Add a driver script that sets up some assumptions on the host
system so that the tests can complete.
- The idea is that these tests together get a decent code-coverage
for the module.
- This is a driver script for running testmodule.py multiple times
with different global- and job-configurations.
- Usage: testpythonrun.sh <modulename>
- Run the script from the build-directory. It uses files from the
tests/ (source) subdirectory to drive the test runs.
- Only need to get the list of supported filesystems *once*,
not for each and every filesystem that is going to be unpacked.
- Be more Python-idiomatic.
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.