Commit Graph

134 Commits

Author SHA1 Message Date
Andrius Štikonas 4bf5bb467f Fix conversion to/from QString/QByteArray
BUG: 384321
2017-12-03 12:37:21 +00:00
Andrius Štikonas 72dfbe480a Replace readSectors/writeSectors backend functions.
New alternatives use QByteArray to store data and use bytes, not sectors.
2017-10-28 18:07:44 +01:00
Andrius Štikonas 2760f02fbf Move LVM device scanning code.
Now it's the backend's responsibility to find LVM devices.
All LVM scanning code was moved into LvmDevice::scanSystemLVM helper,
so that it is very easy to plug LVM into backend.

LVM devices are now intentionally not detected in Dummy Backend.
2017-10-06 03:17:51 +01:00
Andrius Štikonas 1713f66872 Fix reading partition label. 2017-09-17 13:06:31 +01:00
Andrius Štikonas 17e6c32633 Fix more implicit type conversion warnings. 2017-09-11 13:41:03 +01:00
Andrius Štikonas 5433294a5b Fix more minor clang issues. 2017-09-11 00:29:30 +01:00
Andrius Štikonas f7e5f7c7bf Rename KPMcore include guards.
clang in -Weverything mode does not like double underscore.
2017-09-10 20:12:52 +01:00
Andrius Štikonas 2404689dd0 Port away from KDiskFreeSpaceInfo to QStorageInfo. 2017-09-08 18:35:30 +01:00
Andrius Štikonas 5a83e741cb Add support for detecting ISO9660 file systems.
BUG: 364476
2017-09-08 11:42:12 +01:00
Andrius Štikonas 6ad873223e udf: set MBR partition id to 0x07. 2017-09-03 21:24:15 +01:00
Andrius Štikonas 7dba4b8245 Record sector size in FileSystem class. 2017-09-03 15:37:14 +01:00
Pali Rohár feec00f4e7 Add basic support for UDF filesystem
For reading UDF label and UUID is needed blkid >= 2.30. For creating new
UDF filesystem is needed mkudffs binary from the udftools package.

When creating new UDF fileystem, revision 2.01 for hard disk media is used.
Therefore it is not possible to use it for optical (or other) medias.

Problems:
* Check for min and max capacity is incorrect as it depends on logical
  (sector) size of the disk.
* Check for max label length is incorrect too as it depends on characters
  itself in label.
* Specifying label is not working yet as FileSystem::create() does not get
  label parameter.
* UDF filesystem should be used on unpartitioned disk, without MBR or GPT
  and spanning whole disk, but KDE Partition Manager does not support it.
* When MBR is used, MBR partition id should be 0x07, but currently it is
  incorrect 0x83. See: https://serverfault.com/a/829172 (same for GPT)
2017-08-31 10:12:44 +01:00
Andrius Štikonas 037380228d QRegularExpression->QJson
lsblk LUKS mapping point parsing now uses json.
2017-07-04 14:42:39 +01:00
Andrius Štikonas 311a171307 Use QtJson to parse lsblk output. 2017-06-28 14:11:43 +01:00
Harald Sitter 984a4e9ace fix device RO check
Summary:
- mark deviceNode const
- copy it as deviceName
- mutate deviceName by removing `/dev/`
- use the new deviceName for the read-only check

this makes sure we emit the unmodified deviceNode (e.g. /dev/vda) rather
than the name (e.g. vda). unbreaks for example calamares which doesn't
know what to do with "vda".

CCBUG: 378607

Test Plan:
- without fix clamares fails to list devices
- with the fix calamares lists devices

Reviewers: stikonas

Reviewed By: stikonas

Differential Revision: https://phabricator.kde.org/D6414
2017-06-28 13:51:27 +02:00
Andrius Štikonas a35702e911 Use lsblk's TYPE=disk when scanning for devices.
The previous way relied on kernel device numbers but this gets ugly, especially
in cases when device number is not assigned such as virtio disks.

BUG: 378607
2017-06-22 03:11:58 +01:00
Andrius Štikonas fda1e219de Add more major device numbers for virtio.
BUG: 378607
2017-06-20 15:51:13 +01:00
l10n daemon script cb1f76d018 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-06-11 04:31:47 +02:00
Andrius Štikonas d2ce014589 Use range based for instead of Q_FOREACH.
Bump Qt version requirements to 5.7.0
2017-06-01 11:16:09 +01:00
Andrius Štikonas e43d6645e4 Replace VLA with new[]. 2017-06-01 01:36:38 +01:00
Alexander Schlarb 427e37a047 Prevent the libparted backend from exposing "null devices"
REVIEW: 129968
BUG: 375394
2017-02-25 13:45:22 +00:00
Teo Mrnjavac 876a3932fd Do not filter out KVM virtual disks in LibPartedBackend::scanDevices. 2017-02-17 11:55:15 +01:00
l10n daemon script 610710e7f4 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-02-05 06:03:02 +01:00
l10n daemon script 0f41f40b1f SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-02-04 06:20:00 +01:00
Andrius Štikonas 16c12ddb9e Both swap and LVM PV should not use KDiskFreeSpaceInfo. 2017-01-26 18:07:28 +00:00
Andrius Štikonas 901d01185f Do not set LUKS logical sector size to 512.
This breaks used space reporting for LUKS encrypted LVM LV.
2017-01-25 18:21:25 +01:00
Andrius Štikonas f8ba25fdfa Improve used space detection to use fs utils when not mounted. 2017-01-05 17:27:17 +00:00
l10n daemon script 2fcc37dfb6 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-12-20 12:47:43 +01:00
Andrius Štikonas d899de94c3 Do not link to KAuth. 2016-12-18 19:44:57 +00:00
l10n daemon script c63567b524 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-12-15 06:24:36 +01:00
Andrius Štikonas 2e960d5c00 Make initLUKS function non-static. 2016-11-30 17:18:51 +00:00
Teo Mrnjavac 39ec355b70 Remove obsolete headers. 2016-11-30 16:42:03 +01:00
Andrius Štikonas e42020dc9b Disable loop devices for now.
BUG: https://calamares.io/bugs/browse/CAL-416

After the release we can break API and add option to include/exclude them.
2016-11-25 15:31:09 +00:00
Andrius Štikonas 3c58349561 Make sure KDiskFreeSpaceInfo is never used for swap. 2016-11-15 17:00:59 +00:00
Andrius Štikonas e3214a1b48 Do not call KDiskFreeSpaceInfo::freeSpaceInfo without a non-empty mount point. 2016-11-05 20:29:31 +00:00
Andrius Štikonas b539f835b1 Revert KAuth support. At the moment it causes more problems than helps. 2016-10-29 19:45:33 +01:00
l10n daemon script 1e1bee501f SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-10-07 09:29:49 +00:00
Andrius Štikonas 28fa6ac5a4 Add support for GTP partition labels. 2016-09-24 22:15:15 +01:00
Chantara Tith 874900fe72 Move initLUKS from helpers to FS::luks. 2016-09-12 23:49:20 +07:00
Chantara Tith bcd6156628 Reduce code duplication in handling mountPoint/mount/diskSpace. 2016-09-12 17:23:19 +07:00
l10n daemon script 1995a8de84 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-09-10 10:01:41 +00:00
Andrius Štikonas b3e82d7c75 Cache LUKS specific variables during initial scan. 2016-09-04 23:32:00 +01:00
Andrius Štikonas 4889a0ef34 Remove some TODO comments. 2016-08-31 20:37:32 +01:00
Andrius Štikonas 5ab60c6dfa Enable used space reporting for swap.
BUG: 367473
2016-08-29 12:12:57 +01:00
Andrius Štikonas ef2c85e60f Silence clang warning + some other small changes.
Fix a typo in a comment
2016-08-24 23:01:36 +01:00
Andrius Štikonas 84488896ab Silence kcoreaddons cmake warnings. 2016-08-22 20:51:33 +02:00
Andrius Štikonas 4de925735e Convert some for loops into for ranged based loops. 2016-08-15 17:20:50 +01:00
Andrius Štikonas ca2e46a6e0 More work on C++11 for loops. 2016-08-15 17:20:50 +01:00
Chantara Tith 87e9bf9cb5 House-cleaning, removing finished TODO and FIXME tasks. 2016-08-15 17:20:50 +01:00
Chantara Tith 12a74b4a2b Use VG as PV mount point. 2016-08-15 17:20:50 +01:00