1507 Commits (fac0c90de18cc41247b1bf6c5bb786c9689cac0d)

Author SHA1 Message Date
Gaël PORTAY 3967cfe0eb [partition] Group EFI things together 5 years ago
Gaël PORTAY a1d45122eb [partition] Update partition.conf 5 years ago
Gaël PORTAY dad9587c3e [partition] Allow a configurable swap Partition name
This commit adds the new configuration `swapPartitionName` to the file
partition.conf.

This option sets the partition name to the swap partition that is
created. If this option is unset, the partition is left unnamed.
5 years ago
Gaël PORTAY f03ae06deb [partition] Rename execute to createPartitions 5 years ago
Gaël PORTAY f2bfe2bd6a [partition] Fix coding style 5 years ago
Gaël PORTAY cd725fbb4b Fix missing SPDX-FileCopyrightText in header 5 years ago
Gaël PORTAY 2007335865 [partition] Rename the KPMCore Partition local to part 5 years ago
Gaël PORTAY 32c1f81fbf [partition] Rename iterator in for loop to entry 5 years ago
Gaël PORTAY 3016b93c8f [partition] Simplify the method execute
- Rename the "size" locals using "sectors" in their name. Size may be
  confusing or not enough specific as it can be interpreted a size in
  Byte.
    partSizeMap -> partSectorsMap,
    totalSize -> totalSectors,
    availablesize -> availableSectors,
    size -> sectors,
    minSize -> minSectors
    maxSize -> maxSectors
- Create a the new local currentSector to iterate over the sectors;
  instead of using the parameter firstSector.
- Remove the variable end that does not help much; too many variable
  already. Expand its expression instead.
5 years ago
Gaël PORTAY 81bec68b3d [partition] Introduce new constructors for PartitionEntry
- Introduces new constructors for PartitionEntry: copy constructory and
  constructor with all attributes.
- Use the new constructor in method addEntry().
5 years ago
Gaël PORTAY 3f2dd516d3 [partition] Simplify the retrieval of the size attributes
- The variant helper toString() takes a default value since commit
  c9f942ad6 ([libcalamares] Add default value to variant helpers).
- Set the default value to 0 and simplify the retreival of size values
  by calling the helper toString() and removing the temporary variables.
5 years ago
Gaël PORTAY db7cf74034 [partition] Remove the call the method contains
- The variant helper getString() calls contains() already.
5 years ago
Gaël PORTAY d6ea30b23e [partition] Move initLayout logic to object PartitionLayout
- The logic of the method initLayout belongs to the object
  PartitionLayout. Move logic to that object.
- Use a single method initLayout in object PartitionCoreModule.
- Member m_partLayout in object PartitionCoreModule is no longer
  allocated.
5 years ago
Gaël PORTAY eae1e90dce [partition] Remove unused PartitionLayout constructor
- The constructor PartitionLayout with PartitionEntry appears to be
  unused since its always. Drop it!
5 years ago
Gaël PORTAY f2960366c8 [partition] Remove unused addEntry method
- The method addEntry with PartitionEntry appears to be unused since its
  always. Drop it!
5 years ago
Adriaan de Groot 478c394d99 [partition] Don't needlessly expose a test symbol 5 years ago
Adriaan de Groot 84936a95fc [libcalamaresui] Warnings-- for Qt 5.15 deprecations
Introduce a GUI-oriented compatibility header that introduces aliases
for some enum values that are deprecated in Qt 5.15
5 years ago
Adriaan de Groot 27f6eaaf75 [partition] Remove unused variables 5 years ago
Adriaan de Groot 89b1f8d96b [partition] Warnings-- in tests related to virtual destructors 5 years ago
Adriaan de Groot 01b75ef4b5 [partition] Use C++-style cast 5 years ago
Adriaan de Groot 6605e11394 [partition] Warnings-- in test: don't expose internal variable 5 years ago
Adriaan de Groot d7e64de24a [partition] Adjust docs to function
- @params referring to things that don't exist
- @brief that is 3 lines long
5 years ago
Adriaan de Groot eb8e95bb87 [partition] Warnings--, explain why we're using a void* 5 years ago
Adriaan de Groot 9910b23152 [partition] Avoid uninitialized variable
- if the partition size is invalid, then warn about it but do
  not print the (uninitialized) size of the partition.
- shuffle code to continue earlier, allowing the "good path"
  code to be out-dented.
5 years ago
Adriaan de Groot 687a795b71 [partition] Warnings-- by initialization order 5 years ago
Adriaan de Groot 44a11bd93b [partition] Initialize in the initializer list, if possible 5 years ago
Adriaan de Groot 51b47862cd [partition] Mark destructors `override`
This reduces compiler warnings related to virtual-overriding
functions: all the destructors are virtual.
5 years ago
Gaël PORTAY d91683eec6 [partition] Fix message user if no option available
The button m_eraseButton is not tested while the button
m_somethingElseButton is tested twice.
5 years ago
Adriaan de Groot 27dc81f8b9 [partition] Fix typo in debug message, reported by Kevin Kofler 5 years ago
Adriaan de Groot 36396d0cfd [partition] Adjust message and fix debug message 5 years ago
Yuri Chornoivan 1448a9b9a1
Add missing space 5 years ago
Adriaan de Groot a955791766 Apply coding style globally again 5 years ago
Adriaan de Groot 1df4239c02
Merge pull request #1436 from gportay/osprober-strip-extra-file-after-at-sign
[partition] Strip extra file after the at sign
5 years ago
Gaël PORTAY 2b1e516ec1 [partition] Strip extra file after the at sign
- os-proper may return an extra file after the device:
  /dev/sda1:Ubuntu 19.10 (19.10):Ubuntu:linux
  /dev/sdb1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
5 years ago
Gaël PORTAY 2bbbb68838 [partition] Add setting for requiredPartitionTableType 5 years ago
Gaël PORTAY 70f8beb931 [partition] Add setting for defaultPartitionTableType 5 years ago
Adriaan de Groot 9486ee6fbf
Merge pull request #1524 from gportay/partition-message-user-if-no-option-available
[partition] Message user if no option available
5 years ago
Adriaan de Groot 40aa0fcaba CMake: add a helper module for finding KPMcore
I think we had this (kind of) module a long time ago and it was
removed for over-complicating things; re-introduce one now that
KPMcore is used in 3 different places and all would benefit
from consistent API handling / defines.
5 years ago
Adriaan de Groot db537535ee [partition] Support KPMCore 3.3 in tests 5 years ago
Adriaan de Groot f28d28a455 [partition] Ignore KPMCore 4 beta versions 5 years ago
Adriaan de Groot 88b1d36009 Merge branch 'issues-1166' into calamares
FIXES #1166
5 years ago
Corentin Noël a7bd1040c5 [partition] Add tests for Layout-constrained partionning 5 years ago
Adriaan de Groot 77e2701365 [partition] Coding style
- various clang-format versions battle for supremacy
5 years ago
Adriaan de Groot b4cbf73e2d Merge branch 'calamares' into issues-1166 5 years ago
Adriaan de Groot 0b3a6baeea [fstab] If swap is "file" then create it here
- handle swapfiles when writing /etc/fstab in the target system
  - special-case mountpoint
  - since swapfiles are not a partition, take the setting out
    of partitionChoices
- create the physical swapfile as well (there's no other place
  where it would make sense)
5 years ago
Adriaan de Groot 029c3f1c74 [partition] Write the install choices to Global Storage 5 years ago
Adriaan de Groot 92a874dae7 [partition] move the swap-choice to Config 5 years ago
Corentin Noël 08138f5a41 [partition] Reduce direct dependency of PartUtils on PartitionCoreModule 5 years ago
Gaël PORTAY 79740c77a3 [partition] Message user if no option available 5 years ago
Adriaan de Groot 6e30a7b8f6 [partition] Move is-manual-partitioning-allowed to the Config object 5 years ago
Adriaan de Groot f79fbd4105 [partition] Add swap choice to config object 5 years ago
Adriaan de Groot 0f4fe6294c [partition] Migrate type for SwapChoice to Config object 5 years ago
Adriaan de Groot 881661e94b [partition] Migrate InstallChoice to the Config object 5 years ago
Corentin Noël 0293015b09 [partition] Fix regression in partition size assignment
In some cases, the partition size was set to zero as the maxSize isn't always defined.
5 years ago
Adriaan de Groot 010526ee2a [partition] Coding style 5 years ago
Adriaan de Groot b41e4624c9 [partition] Move 'selected installation option' to Config 5 years ago
Adriaan de Groot 10d194d693 [partition] Simplify button-selection 5 years ago
Adriaan de Groot a92cb32cef [partition] set the right buttons if an action is pre-selected 5 years ago
Adriaan de Groot b518ef7dfe [partition] Select initial swap choice 5 years ago
Adriaan de Groot 9f0f600aa4 [partition] Remove the 'swapfile-unsupported' message 5 years ago
Adriaan de Groot 3bb5adcfca [partition] Simplify *efiSystemPartition* settings 5 years ago
Adriaan de Groot f155c8351b [partition] Only one setting for partitionLayout is supported 5 years ago
Adriaan de Groot b6dd23a384 Merge branch 'calamares' into issues-1166 5 years ago
Adriaan de Groot ffed7b6d71 [partition] Warnings-- over QButtonGroup
- this was deprecated in 5.15 and an alternative introduced also
  in 5.15, so it's a pain in the butt for backwards-compatibility.
5 years ago
Adriaan de Groot 2878c474c5 Warnings-- (~T() override)
Change all the places that had
	virtual ~T() override
to the less redundant form without override.
5 years ago
Adriaan de Groot ac0b2092f2 [partition] Remove superfluous logging 5 years ago
Adriaan de Groot e37c7da60d [partition] Introduce dummy argument to LVM jobs
- Give LVM jobs a dummy argument Device* so that they
  fit the functionality of makeJob for partitioning.
  For those jobs that already take an LVMDevice*, this should
  be the self-same device, but that isn't checked.
5 years ago
Adriaan de Groot 1f77441333 [partition] add job-removal to the support classes 5 years ago
Corentin Noël 75fd1dd114 [partition] Correctly handle percentage-define partitions
* Use the minSize when the target storage is smaller than the sum of sizes
 * Percentage-defined partitions should be computed after setting hard-defined ones

This fixes issues when 0 byte partitions were created when the disk is too small.
Also fixes an issue with percent-defined partitions being forced to be defined at the end of the disk.
5 years ago
Adriaan de Groot e94c17e331 Merge branch 'calamares' into issues-1166 5 years ago
Adriaan de Groot 1cd9b93a22 REUSE: Giant boilerplate cleanup
- point to main Calamares site in the 'part of' headers instead
  of to github (this is the "this file is part of Calamares"
  opening line for most files).
- remove boilerplate from all source files, CMake modules and completions,
  this is the 3-paragraph summary of the GPL-3.0-or-later, which has
  a meaning entirely covered by the SPDX tag.
5 years ago
Adriaan de Groot 30a85668b7 REUSE: (GPL-3.0-or-later) C++ modules 5 years ago
Adriaan de Groot 1b23520f20 REUSE: (CC0-1.0) module descriptors and configuration files
In spite of there being considerable documentation sometimes in the
config file, we go with CC0 because we don't want the notion of
'derived work' of a config file.

The example `settings.conf` is also CC0. Add some docs to
it while we're at it.
5 years ago
Adriaan de Groot 95ceb1e8c7 REUSE: (BSD-2-Clause) all CMakeLists
The build instructions are not that interesting, it's a toss-up
between CC0 and BSD-2, but because other CMake bits are BSD-2-Clause,
apply that to more CMakeLists. The copyright date isn't all that
accurate, but these are just inconsequential files.

While here, tidy up and get rid of some useless intermediates.
5 years ago
Adriaan de Groot 965bc3b0b4 REUSE: use <author> tag in .ui for license info
The .ui files are all GPL-3.0-or-later style, but it's
slightly difficult to keep licensing information in them:
it's XML, so an XML comment might work, but there's no
guarantee that safe/load will preserve them.

Put the SPDX tags in the <author> tag, so that it's visible
in Qt Designer.
5 years ago
Adriaan de Groot 86f66e8f16 REUSE: (GPL-3.0-or-later) all the schema files
- these are vaguely derived from the schema's written by
  artoo@manjaro.org, but totally re-done for JSON-Schema
5 years ago
Adriaan de Groot 08ea51a344 [partition] Fix tests after removal of single-job-enqueue 5 years ago
Adriaan de Groot 23b507ae8e [partition] Chase constness, makeJob() 5 years ago
Adriaan de Groot 20b477d063 [partition] Distinguish jobs with updatePreview() 5 years ago
Adriaan de Groot 6e31d9de4b [partition] Name deviceInfo consistently, auto*
- use auto* for pointer type where we already say "device info" twice
5 years ago
Adriaan de Groot 22ba3cc62d [partition] Make private struct type private
- no need for the definition to be in public header, move to implementation
- while here, sort the members and private methods
- add a makeJob() to add jobs to the queue
5 years ago
Adriaan de Groot c2929e93b3 [partition] Start sanitizing the Jobs on a Device
- having a struct with an obtuse API for adding jobs-that-need-to-happen-
  to-this-device is just not good for maintainability.
- break the build by making things private.
5 years ago
Adriaan de Groot c63d4ad2cc [partition] Enable 'file' swap choice
SEE #1166
5 years ago
Adriaan de Groot 41ce42cd4b [partition] Drop InstallChoice enum from Page
- The enum for install choice was copied into PartitionActions and
  used in the Config object; its definition does not belong in the UI.
- Chase the renamings required.
5 years ago
Adriaan de Groot e21a2f0676 [partition] Add InitialInstallChoice to Config
- add an option to select what button should be selected when the
  partitioning module is started; TODO: the actual functionality is
  **not** implemented.
- drop the previously suggested name, which didn't get beyond the
  comments-in-the-config-file stage (but which intended to do the
  same things as this one)
- add option to schema already, even if it's not implemented.

See #1297

FIXUP conf
5 years ago
Adriaan de Groot 380e2b3613 [partition] Fix up schema file 5 years ago
Adriaan de Groot fec8361ed5 [partition] Drop "convenience" functions
- the functions are used just once
- thin wrappers for named-enum methods that are just as convenient
5 years ago
Adriaan de Groot 824dac62d8 [partition] ChoicePage to use Config object 5 years ago
Adriaan de Groot d103c42091 [partition] Fix build now swapChoices lives in config 5 years ago
Adriaan de Groot baabcc5bb4 Merge branch 'calamares' into issue-1297 5 years ago
Adriaan de Groot 33fd5a1fad [partition] Report a valid choice if a partition is selected 5 years ago
Adriaan de Groot ef4c2666e1 [partition] Update icons on all state changes
The encryption widget (passphrase for disk encryption) should show
ok / warning / error whenever the state changes; this avoids
it showing up first with **no** icon (it should show a warning
when both passphrases are empty).
5 years ago
Adriaan de Groot 0eb1f002db [partition] defuse is-next-enabled
Both the KPMCore and the ChoicePage -- asynchronously -- were connected
to the nextStatusChanged() signal. So if the core said next was true,
that could end up communicated to the ViewManager, enabling the *next*
button in the UI.

Changing to the *erase* page generally triggers a KPMCore reload,
which later emits a `hasRootMountPointChanged()` signal, once the
layout is applied and the disk gets a root mount point. So we'd
get a `true` from KPMCore, which -- because it was connected directly
to the signal to the VM -- would override any other considerations.

Hook up both signals to an intermediate slot that just recalculates
whether the next button should be enabled, based on the state
both of the Choice page and whatever else.
5 years ago
Adriaan de Groot f1c4caba48 [partition] Refactor checking next-enabled
- move the calculations to an own method (so it can use
  early-return and log things to explain why next is disabled)
5 years ago
Adriaan de Groot 43cd415d9a [partition] Switch to 'modern' Error/ok icons 5 years ago
apt-ghetto 2b3cc17782 Revert Manual Partition instructions
With PR calamares/calamares#1357 the label of the "Manual partitioning" option
was changed, which introduced several downsides:
  * The label is shown for UEFI and for BIOS installations.
  * The mountpoint of the ESP is and should be distro specific.
  * The label always mentioned GPT, which is irrelevant.
  * The label should explain, what the option does, and not, what
    problems can occur under certain circumstances.
5 years ago
Adriaan de Groot 724b92ee60 [partition] Drop documentation of vanished parameter 5 years ago
Adriaan de Groot 240c703549 [partition] Don't leak the PM core object 5 years ago
Adriaan de Groot 7f1a59f02b [partition] Fix typo 5 years ago
Adriaan de Groot 313531bc4b [partition] Remove unused parameter
- there are no consumers for checking-the-capacity-of-the-drive

This parameter was introduced in 3cd18fd285 as "preparatory work"
but never completed. The architecture of the PartitionCoreModule
makes it very difficult to get the necessary parameters to
the right place, and it would probably be better to put
a SortFilterProxyModel in front of a partitioning model anyway.

Since the display code can already filter on size, just drop this one.
5 years ago