3685 Commits (5c4f2423f8a14befa5ad6bf58dd82b055e82235e)

Author SHA1 Message Date
Adriaan de Groot 92d9c9491a [partition] Reduce lambda-happiness
- Make some methods that are called mostly as slots, actual slots,
   instead of going through extra lambdas.
 - Use QOverload<>::of for disambiguation instead of homebrew casts.
7 years ago
Adriaan de Groot 4d8acdf425 [welcome] Code-formatting
- Update copyright headers
 - Apply calamaresstyle
7 years ago
Adriaan de Groot 54ba0aaf13 [welcome] Use convenience function
- Introduce a hasDetails() for RequirementEntry, which is just
   a short-cut, but makes code more readable.
7 years ago
Adriaan de Groot bfb5a4efb9 [welcome] Chase file renaming
- Rename classes inside
 - Rename include guards
7 years ago
Adriaan de Groot 1240f63a39 [welcome] Rename files to reflect their purpose 7 years ago
Adriaan de Groot ba9a6981b3 [welcome] Fix SEGV
- In the retranslate function, need to check if the waiting
   widget still exists.
 - Tighten up lifetime of the CheckerWidget.
7 years ago
Adriaan de Groot 7cfaba2d53 [partition] In logging, name device nicely
- Provide a convenience method that names a Partition* with the
   best human-readable name we can find (worst-case, spit out a
   pointer representation which will at least help figure out
   the identity of the Partition*).
7 years ago
Adriaan de Groot 33bd6c67c0 [welcome] Without libparted, don't even check size available 7 years ago
Adriaan de Groot 8cf3c217f7 Merge branch 'requirements-checking' 7 years ago
Adriaan de Groot 9889bd6cbe [welcome] Be louder when libparted is disabled 7 years ago
Adriaan de Groot c3d13e3451 [libcalamaresui] Add documentation to ViewStep methods 7 years ago
Adriaan de Groot 64ca9d0d5a [libcalamaresui] Document multi-page support. 7 years ago
Adriaan de Groot cece01e3c5 [partition] Simplify next() 7 years ago
Adriaan de Groot 6071489788 [libcalamaresui] Provide default implementations of next() and back()
- These methods are used for multi-page view-steps, which are rare.
   For all the others, just drop the empty implementation and defer
   to the base class.
7 years ago
Adriaan de Groot 08565b5f17 [libcalamaresui] Remove the signal done() from ViewStep
- The signal is emitted, generally from next(), but not actually used.
7 years ago
Adriaan de Groot 40a7082bfc [libcalamaresui] Handle no-requirements-to-check case
- If there's no requirements at all, none of the watchers
   will call finished(), so do it once extra.
7 years ago
Adriaan de Groot 987cf36f51 [welcome] Use convenience types 7 years ago
Adriaan de Groot 8a8ec01380 [welcome] Don't enable next early
- Next was enabled early; presumably to cover the case that no requirements
   were checked and the requirements checker never emitted an update signal.
   Drop that since the module manager is now responsible for doing that checking.
7 years ago
Adriaan de Groot fbb513eee3 [partition] Remove artificial delay
- The sleep(3) was meant as a debugging aid for the multi-threaded
   part of requirements checking.
7 years ago
Adriaan de Groot 0ad115732e [libcalamaresui] Report elapsed time as well.
- While waiting on modules, report the elapsed time in seconds
   based on the number of progress-ticks that have passed.
7 years ago
Adriaan de Groot 5ddf7b980b [libcalamaresui] Report progress also while waiting
- Ping the progress every 1.2 seconds, so the user sees more than
   just the throbber.
7 years ago
Adriaan de Groot 452b51304d [welcome] Update next button when checking is complete 7 years ago
Adriaan de Groot 40de1bd2eb [partition] Give requirement entry a description
- The description is used in the Details dialog when the
   requirements fail. This one should be visible.
7 years ago
Adriaan de Groot 2092ec3c9a [partition] Drop some re-parenting trickery
- Can't re-parent across threads easily
 - If device is made by immutableDeviceCopy(), then it's still owned by the
   PartitionCoreModule; giving it away to the widget is not a good idea.
7 years ago
Adriaan de Groot ac652a2bc1 [libcalamaresui] Report module-name in italics 7 years ago
Adriaan de Groot 41fecf341b [libcalamaresui] Avoid metatype warnings at runtime
- Register the types with the Qt type system. This is needed
   because we're passing them as signal and slot parameters
   across threads.
7 years ago
Adriaan de Groot f1aa22d9e8 [libcalamaresui] Sort signals chronologically 7 years ago
Adriaan de Groot c508e3ed4d [welcome] Show progress during requirements checking 7 years ago
Adriaan de Groot b169281b69 [libcalamaresui] Use convenience type 7 years ago
Adriaan de Groot 2cdfe35430 [welcome] Avoid threading warnings
- The NAM is being created from a method call on the GeneralRequirements
   object in the requirements-checking thread, while the GR object itself
   was created in a different thread. This cross-thread parenting
   produces a warning, and we don't need the parent relationship here
   anyway.
7 years ago
Adriaan de Groot e50c2bcb44 [grubcfg] REVERT d775cee4cf
This is causing issue #1073 and needs further thought.
7 years ago
Adriaan de Groot a19d81e38c [welcome] Chase renaming of files
- Rename the classes to match
 - Drop some unused includes
7 years ago
Adriaan de Groot c1cd88d5fa [welcome] Rename files before class-rename 7 years ago
Adriaan de Groot 6090a464f8 [libcalamaresui] Switch requirementschecking to threaded mode
- Use QFuture and QFutureWatcher to spawn threads that do the actual
   checking of the requirements; collect results and report on
   them as they come in.
7 years ago
Adriaan de Groot e366e7d83a [displaymanager] It's not fatal to have no DM
- If a distro provides an install-scenario that doesn't provide a DM,
   (e.g. via netinstall) then that should be ok; if there **is** a DM
   it should be configured.

FIXES: #1095
7 years ago
Adriaan de Groot be5abf08dc
Merge pull request #1094 from a-wai/fix-default-fs
[partition] Fix default fs

FIXES: #1093
7 years ago
Arnaud Ferraris 74ead4c7ba [partition] improve filesystem search operation
Due to changes to the FileSsytem::typeForName() function, more
processing is needed to deal with locales and different cases.
This is done by refactoring the findFS() function, initially located in
the PartitionViewStep class, and making it available to the whole module.

Additionnally, more checks have been implemented regarding the use of
global storage in the PartitionLayout class, and the filesystem types
now use the correct FileSystem::Type, as requested.

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
7 years ago
Adriaan de Groot cd92b8dd5e [libcalamares] Simplify logging code
- log() was never called with a non-default value for toDisk,
   so simplify to true. Keep the if() around to indicate block scope.
7 years ago
Arnaud Ferraris 5084c44b54 [partition] fix naming of PartitionLayout class member variables
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
7 years ago
Adriaan de Groot 79c20b8fbd [partition] Fix user-visible strings
- 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
7 years ago
Arnaud Ferraris 586cb63ef5 [partition] use configured default filesystem type instead of ext4
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>
7 years ago
Adriaan de Groot 3ea6c6cfbe [users] Rename badly-named variable 7 years ago
Adriaan de Groot c678cd80b4 [libcalamaresui] Refactor Requirements-Checking
- 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.
7 years ago
Dan Simmons 651b52ead9 Fix spelling typo 7 years ago
Adriaan de Groot bbb9ff0cbf [libcalamaresui] Remove useless #define 7 years ago
Adriaan de Groot ff10e1301d [libcalamaresui] Fix struct/class mismatch 7 years ago
Adriaan de Groot 18efcf2200 [welcome] Drop unnecessary parameter 7 years ago
Adriaan de Groot 5aa4e52452 [libcalamaresui] Improve debug-logging 7 years ago
Adriaan de Groot 946c5a493f [services-*] Fix translations
- 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.
7 years ago
Adriaan de Groot d33752c66c [libcalamaresui] Refactor Requirements classes
- improve naming of member variables
 - expand documentation
7 years ago
Adriaan de Groot 43eae0bc47 Merge branch 'master' into requirements-checking 7 years ago
Adriaan de Groot 723358e145 [partition] Reduce Transifex warnings
- 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)
7 years ago
Adriaan de Groot 6fbc467795 [partition] Reduce Transifex warnings
- the string here has no context (no QObject-derived class that
   it is called in) so use the static method instead.
7 years ago
Adriaan de Groot b7c77e7323 [services-systemd] Make user-visible messages translatable 7 years ago
Adriaan de Groot 544c1b708c [services-openrc] Make user-visible messages translatable 7 years ago
Adriaan de Groot c9f89e2929 [modules] Translate name of services-* modules. 7 years ago
Adriaan de Groot 4178d5841c [modules] Enable translations on some Python modules
- Python modules should have human-readable names, which
   means that the description should be translated in `pretty_name()`
7 years ago
Adriaan de Groot 0f80a6295b [libcalamares] Reduce warnings about trailing ; 7 years ago
Adriaan de Groot 496f9fdaf1 [libcalamares] Fix tests
- 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).
7 years ago
Adriaan de Groot 9b36783961 [rawfs] Add example configuration
- 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).
7 years ago
Adriaan de Groot f825a63bfe [fsresizer] Fix tests
- Test used 127% as value; this is now considered an invalid
   percentage (greater than 100%) and yields different values.
7 years ago
Adriaan de Groot 2a8960cd0f [partition] Ensure combobox pre-selects consistently
- Match the selected item in the combobox with a given default,
   which should be whatever is selected from the available set of
   choices.
7 years ago
Adriaan de Groot 5f20eedb6e [partition] Use swap-choice member, not the combobox pointer
- 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).
7 years ago
Adriaan de Groot a4e6d4cd35 [partition] Rename combo box
- Too much confusion possible between the different members all
   named variations of *SwapChoice*
 - Update copyright years, too
7 years ago
Adriaan de Groot 335976e32c [partition] Improve defaultFS handling
- 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.
7 years ago
Adriaan de Groot faa3392cc5 Merge branch 'smooth-partition-crash' 7 years ago
Adriaan de Groot dff5afe227 [partition] Reduce refreshes when reverting 7 years ago
Adriaan de Groot b9fa0398c0 [partition] Disable one call to updateButtons()
- suggested by @abucodonosor, removing this one call seems
   to solve the data race for the device model.
7 years ago
Adriaan de Groot ebc9a00bcf [users] Massage text widths
- 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.
7 years ago
Adriaan de Groot 1adf4da736 [users] Small space between password explanation and checkboxes 7 years ago
Adriaan de Groot 6316173f1b [partition] More conservative handling of device pointers
- thanks @abucodonosor
7 years ago
Adriaan de Groot a6edb3ed34 [partition] Refactor PartitionEntry
- add a constructor that parses size and min
 - minor reduction in code duplication
7 years ago
Adriaan de Groot 5863300f67 [partition] Use const QString&
- minor code-layout and idiomatic-C++
7 years ago
Adriaan de Groot abf1f14604 [partition] Initialize members of PartitionEntry 7 years ago
Adriaan de Groot 04b4e37bd0 [partition] Don't display unsupported swap styles
- Suppress unsupported options while reading the config file.
7 years ago
Adriaan de Groot 0fdc737968 [partition] Fix logging output
- 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).
7 years ago
Adriaan de Groot 2fda5957f1 [partition] Complain about unsupported swap choices 7 years ago
Calamares CI 33ed176b2e i18n: [dummypythonqt] Automatic merge of Transifex translations 7 years ago
Adriaan de Groot 7711cb0ad3
Merge pull request #1080 from a-wai/fix-systemd-boot-install
[bootloader] Fix systemd-boot installation
7 years ago
Adriaan de Groot 273461a497 [partition] Be verbose about handling osprober results 7 years ago
Arnaud Ferraris 91430a3cdb [rawfs] Add rawfs source to the `partitions` entry in global storage
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>
7 years ago
Arnaud Ferraris a14968a646 [bootloader] Fix systemd-boot installation
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>
7 years ago
Adriaan de Groot 2c6ff26aaa [partition] Reduce warnings 7 years ago
Adriaan de Groot d3ac29d98c
Merge pull request #1077 from a-wai/partition-layout-fix-sizes
Fix partition layout sizes parsing
7 years ago
Arnaud Ferraris 32a5a796f7 [rawfs] Allow use of symlinks in configuration
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>
7 years ago
Arnaud Ferraris cf45d55b32 [partition] Fix parsing of partition size in partition layout
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>
7 years ago
Arnaud Ferraris 18bb71aceb [partition] Fix minimum size parsing in partition layout
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>
7 years ago
Adriaan de Groot fe0c57c7af [calamares] Make loadmodule --help consistent
- Name job.yaml consistently, call it "job settings document"
7 years ago
Adriaan de Groot 958d15fb71 [libcalamares] Improve saveYaml()
- 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.
7 years ago
Adriaan de Groot 3d6dd1202a [libcalamares] Extend tests to all example config files
- Do a `find ../src/ -name *.conf` to get files to load
 - Load and save all of them to check for correctness
7 years ago
Adriaan de Groot e25deffa74 [libcalamares] Implement most of dumpYaml
- Write out bools, strings, lists and maps; this is enough to
   read and reproduce settings.conf
 - Fix infinite loop in writeIndent()
7 years ago
Adriaan de Groot f72d6ca403 [libcalamares] Add very basic test for load/save YAML 7 years ago
Adriaan de Groot 8789b52cb1 Tests: add language and global-settings options
- The test-loader can be set to a specific language through the
   -l option (just like the Python one can) and can load a global
   configuration file.
7 years ago
Adriaan de Groot 5e1bcd9b4a [libcalamares] Stub of saveYaml
- This belongs alongside loadYaml, so place it in libcalamares
 - Doesn't actually save anything yet (it isn't used yet)
7 years ago
Adriaan de Groot 5efbf51ed3 [libcalamares] Improve naming in implementation
- 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.
7 years ago
Adriaan de Groot b3a7545217 [unpackfs] One more test case 7 years ago
Adriaan de Groot b44fd65986 [libcalamares] load/save globals in YAML format 7 years ago
Adriaan de Groot a36afc52df Tests: add command-line options to loadmodule
- The testing-application loadmodule gets -g and -j options
   for loading configurations (although -g is not implemented yet).
7 years ago
Adriaan de Groot aebe67fde7 [libcalamares] Improve debug message while looking for gettext 7 years ago
Adriaan de Groot d95193f646 [unpackfs] Translate and log other error messages 7 years ago