Commit Graph

580 Commits

Author SHA1 Message Date
Andrius Štikonas 63b5c8c34c Suspend Plasma removable device automounting.
Before doing operations, we connect to DBus session of the original user
and stop kded module for device automounting.

BUG: 368175
2017-06-07 19:21:59 +02:00
Andrius Štikonas 3228fa081a Use qAsConst in ranged based for loops. 2017-06-04 22:26:24 +01: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
Andrius Štikonas 5f0d1cd72b Port qSort. 2017-05-03 19:24:20 +01:00
Christian Morlok b10577e1c7 Fix creation of encrypted volumes
We can't rely on the order of lsblk. Check for the type=crypt instead.

BUG: 379205
2017-04-25 19:08:14 +01:00
Andrius Štikonas ff714f2f0e Fix online label support.
Some filesystems require mountpoint while some deviceNode to change file system
label only. So split writeLabel action into online and offline actions.
2017-04-09 17:49:55 +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
Andrius Štikonas 7c901593b2 Use slightly more descriptive variable names. 2017-02-05 15:50:56 +00: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 b5b3af4b22 Use qCeil to set used sectors for luks file systems.
When using LUKS encrypted LVM logical volumes sector size is large and
we cannot assume that result of division is integer. Without this, number of
used extents can be underestimated by one.
2017-01-26 17:40:41 +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
Andrius Štikonas 0bb267830d Fix a bug (that could result in data loss) where left handle of partition resize widget was not actually disabled. 2016-12-31 12:34:38 +02: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
Teo Mrnjavac 30ac4bb6ab [Coverity] Initialize all members.
CID 147251
2016-12-13 16:46:36 +01:00
Teo Mrnjavac dcf972b779 [Coverity] Initialize all members.
CID 154913
2016-12-13 16:40:47 +01:00
Teo Mrnjavac a20d81c345 [Coverity] Initialize all members.
CID 154914
2016-12-13 16:36:36 +01:00
Andrius Štikonas cbe21e7ef9 Fix online resize of encrypted volumes. 2016-12-06 21:42:44 +00:00
Andrius Štikonas cc8a2558eb Fix one forgotten instance of fsck.msdos -> fsck.fat. 2016-12-06 01:45:22 +00:00
Teo Mrnjavac a749d1c84d Handle parent change in Partition copy constructor. 2016-12-01 19:00:39 +01:00
Andrius Štikonas 2e960d5c00 Make initLUKS function non-static. 2016-11-30 17:18:51 +00:00
Teo Mrnjavac 52b356e45f Make sure to always also read outerUuid. 2016-11-30 17:44:03 +01:00
Teo Mrnjavac 39ec355b70 Remove obsolete headers. 2016-11-30 16:42:03 +01:00
Teo Mrnjavac 5e40017238 Add FS::luks::outerUuid(). 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 e0afdeb6cb Move sorting comparison function to lambda. 2016-11-19 01:39:10 +00:00
Andrius Štikonas 6926046edb Sort LVM LV volumes alphabetically. 2016-11-19 01:36:15 +00:00
Friedrich W. H. Kossebau da0b939bf6 Use generic commits.kde.org for homepage instead of now outdated quickgit.kde.org 2016-11-16 18:36:51 +01:00
Teo Mrnjavac eb3b90ec9e Handle cryptsetup luksUUID failure. 2016-11-16 15:20:54 +01:00
Andrius Štikonas 3c58349561 Make sure KDiskFreeSpaceInfo is never used for swap. 2016-11-15 17:00:59 +00:00
Andrius Štikonas a78e6f986e Disable pasting into LVM VG. It does not yet work. 2016-11-10 14:52:02 +00:00
Andrius Štikonas 0c8035f667 Improve wording in comments a bit. 2016-11-10 14:37:48 +00:00
Andrius Štikonas f9d9d8912b Disable copying LVM LVs. It does not yet work. 2016-11-10 14:29:38 +00:00
Andrius Štikonas ee49c05d60 Remove ResizeVolumeGroup operation from operation stack if it has no jobs. 2016-11-07 18:56:26 +00:00
Andrius Štikonas ca0def38f7 Add a comment. 2016-11-07 17:49:30 +00:00
Andrius Štikonas 4ed3ce6267 Check if fileSystem pointer is nullptr before trying to read used space
Hopefully it fixes the following crashes as well:
BUG: 364863
BUG: 365872
2016-11-07 17:45:22 +00:00
Andrius Štikonas f948569fef Pass --force to vgremove in order to allow removing deactivated volume groups. 2016-11-05 21:48:30 +00:00
Andrius Štikonas d0ed72fd20 Fix a typo in LVM VG Operation description. 2016-11-05 20:34:52 +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 eb0c32e9dc Improve checking whether LVM VG can be removed.
E.g. if we remove all LVM LVs without applying operations then LVM VG removal
should be possible.

This still does not take into account inactive LVM volumes.
2016-11-05 15:33:20 +00:00
Andrius Štikonas 5c2d485b32 Delete partition table in LVM VG remove operation. 2016-11-05 13:10:30 +00:00
Andrius Štikonas d6c375f959 Update copyrights. 2016-11-04 14:20:11 +00:00
Andrius Štikonas 6ebe0acf56 Spelling fix. 2016-11-04 00:49:42 +00:00
Andrius Štikonas 6717ea913d Fix resize volume group job description. 2016-11-03 22:15:43 +00:00
Andrius Štikonas 58cec6040f Fix create volume group job description. 2016-11-03 22:08:32 +00:00
Andrius Štikonas bb8514e859 Fix handling of encrypted LVM physical volumes. 2016-11-03 14:21:18 +00:00
Andrius Štikonas e47dd74635 Convert Partition*->QPointer<Partition> in LvmPV class. 2016-11-03 13:39:16 +00:00
Andrius Štikonas 5d2bb2f8af Store list of physical volumes in a global variable. 2016-11-03 13:26:14 +00:00
Andrius Štikonas 36202cc1ad Replace complicated QPair type with custom LvmPV class. 2016-11-02 23:06:55 +00:00
Andrius Štikonas 5182c037db Fix resizing of LVM VGs when LVM PV is encrypted. 2016-10-30 13:36:01 +00:00
Andrius Štikonas 724574e436 Fix creation of LVM VGs when LVM PV is encrypted. 2016-10-30 03:24:01 +00:00
Andrius Štikonas 0827eda687 Do not run the same check twice.
Spotted by Kevin_Kofler.
2016-10-30 02:54:10 +00:00
Andrius Štikonas e103c65b73 Always force LUKS password (in case crypsetup is compiled with libpwquality). 2016-10-30 02:41:24 +00:00
Andrius Štikonas 98d0ea309b Fix include header: QDebug->QTextStream. 2016-10-30 02:37:48 +00:00
Andrius Štikonas 3272cd3f5f Do not allow deactivating LUKS containers containing active LVM physical volumes. 2016-10-30 02:31:46 +00:00
Andrius Štikonas 2414b69be1 mkfs.fat exists with code 1 when it is run without any arguments. 2016-10-30 01:15:08 +00:00
Andrius Štikonas e765316f9e Mark LVM PV as mounted if it is part of Volume Group.
* Add support for online LVM PV resize and check actions.
* Fix support for online actions inside LUKS container.
2016-10-30 01:47:29 +01:00
Andrius Štikonas b539f835b1 Revert KAuth support. At the moment it causes more problems than helps. 2016-10-29 19:45:33 +01:00
Andrius Štikonas 898c9a7333 mkfs.msdos->mkfs.fat 2016-10-28 22:07:52 +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 559fad9803 Show mount point for swap as "none".
This also silences QFileInfo warning from KMountPoint.
2016-10-03 00:14:46 +01:00
Andrius Štikonas ee6e4469ca Remove unused function. 2016-09-24 23:05:15 +01:00
Andrius Štikonas 28fa6ac5a4 Add support for GTP partition labels. 2016-09-24 22:15:15 +01:00
Andrius Štikonas 9c7db501bf Use cached values for resizing volume groups. 2016-09-24 21:09:11 +01:00
Andrius Štikonas aa5daf0378 Use symlinks to hfsplus (diskdev_cmds) commands.
Some distributions rename those commands to mkfs.hfsplus and fsck.hfsplus.

BUG: 369288
2016-09-24 17:10:16 +01:00
Andrius Štikonas 07ed3d97cf Add a template to easily access inner filesystem inside LUKS. 2016-09-22 13:15:20 +01:00
Andrius Štikonas 23bf7585ed Small typo in a comment. 2016-09-20 22:56:48 +01:00
Andrius Štikonas 5e4b16b7fe Add a context to UI string. 2016-09-18 11:55:35 +01:00
Andrius Štikonas fce53d2392 Use more cached values in ResizeVolumeGroupOperation. 2016-09-18 02:47:24 +01:00
Andrius Štikonas ef7680030c Remove some no longer necessary functions. 2016-09-18 02:40:30 +01:00
Andrius Štikonas 28478ee0ad More conversion from QStringList to QList<const Partition*>. 2016-09-18 01:53:42 +01:00
Andrius Štikonas c41b008dc1 Remove obsolete note. 2016-09-17 01:23:04 +01:00
Andrius Štikonas 5592c05ef3 Mark luks sector size to be constexpr. 2016-09-12 19:43:58 +01:00
Chantara Tith 874900fe72 Move initLUKS from helpers to FS::luks. 2016-09-12 23:49:20 +07:00
Chantara Tith c70945b116 Change LUKS default logicalSectorSize to 512 2016-09-12 23:44:17 +07:00
Chantara Tith bcd6156628 Reduce code duplication in handling mountPoint/mount/diskSpace. 2016-09-12 17:23:19 +07:00
Andrius Štikonas 123369f78b Store the list of LVM Physical Volumes in operationStack.
This is necessary in order to make LVM LV formatted as LVM PV work.
2016-09-10 22:10:25 +01: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
Teo Mrnjavac 05e6ea82a3 Make copy constructor public. 2016-09-08 18:13:05 +02:00
Andrius Štikonas 70a9a0dd9a More optimizations for LVM. 2016-09-08 01:42:04 +01:00
Teo Mrnjavac 882886c1d4 Copy constructor for PartitionTable. 2016-09-07 17:36:53 +02:00
Teo Mrnjavac 25b8cc0a42 core/smartattribute.h must be included in smartstatus.h for deep copy. 2016-09-07 17:36:20 +02:00
Teo Mrnjavac ea9e079ee8 Add copy constructor to Device. 2016-09-07 17:35:35 +02:00
Andrius Štikonas 7c0a32758e Do not check for cryptsetup executable so often. 2016-09-07 15:14:25 +01:00
Andrius Štikonas 8f77c6d679 Construct list of LVM PVs from our own device list instead of using pvs. 2016-09-07 14:36:25 +01:00
Andrius Štikonas d197b9b06e Optimize LUKS scanning. 2016-09-06 18:21:17 +01:00
Andrius Štikonas b95fe45d66 Fix a bug when creating a luks encrypted partition. 2016-09-06 00:25:59 +01:00
Andrius Štikonas 4b9f34b109 Do not allow mounting/umounting LVM PVs. 2016-09-06 00:14:44 +01:00
Andrius Štikonas c480d80273 Make LvmDevice::LVPathList public. 2016-09-05 17:28:54 +01:00
Andrius Štikonas 5e5178b3af Initial work on storing LVM variables during initial scan. 2016-09-05 14:48:36 +01:00
Andrius Štikonas ec05aa36da Remove accidentally comitted debug code. 2016-09-05 12:56:12 +01:00
Andrius Štikonas d83ec394b1 Make Filesystem::create non-const. 2016-09-05 12:10:56 +01:00
Andrius Štikonas b3e82d7c75 Cache LUKS specific variables during initial scan. 2016-09-04 23:32:00 +01:00
Andrius Štikonas b5b5ac9cb4 getPESize does not have to be static. 2016-09-04 11:55:49 +01:00
Andrius Štikonas 68539ad97a Remove some comments about data loss.
lvresize --force should not cause data loss when reducing because we reduce file system first.
vgextend --yes is about overwriting number of metadata copies, so it shouldn't cause data loss either.
2016-09-01 22:22:46 +01:00
Andrius Štikonas cd4a6314e7 Simplify QStringList->QString conversion. 2016-09-01 22:05:35 +01:00
Andrius Štikonas 4889a0ef34 Remove some TODO comments. 2016-08-31 20:37:32 +01:00
Andrius Štikonas 56533022cb Simplify if-return code a bit. 2016-08-31 20:14:21 +01:00
Andrius Štikonas a1ebb5205b Round used sectors up in lvm device scanner. 2016-08-29 13:03:26 +01:00
Andrius Štikonas 5ab60c6dfa Enable used space reporting for swap.
BUG: 367473
2016-08-29 12:12:57 +01:00
Andrius Štikonas 742905ef7f Support setting labels online. 2016-08-26 21:16:14 +01:00
Andrius Štikonas c84ff5b957 Use swaplabel for swap labels. 2016-08-26 18:31:14 +01:00
Andrius Štikonas a598ad9fd1 Fix shown license. 2016-08-26 18:18:01 +01:00
Andrius Štikonas 6ec0215205 Improve LVM job wording. 2016-08-26 13:29:24 +01:00
Andrius Štikonas c2cf7c4845 Add more KUIT string contexts. 2016-08-25 00:22:15 +01:00
Andrius Štikonas 3b9cc6b0a4 Add aboutData for KPMcore. 2016-08-25 00:14:51 +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
Anthony Fieroni ac16bd6185 [smart] SSD attribute names
REVIEW: 128710

Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
2016-08-21 07:44:31 +03:00
Andrius Štikonas 90e40af590 @dev -> @param. 2016-08-15 17:20:50 +01:00
Chantara Tith 28dd42839d More documentations. 2016-08-15 17:20:50 +01:00
Chantara Tith a8139278db Add deactivatable check to deactivate VG operation. 2016-08-15 17:20:50 +01:00
Andrius Štikonas 3eda1d79c6 Make sure to activate all LVM LVs on start. 2016-08-15 17:20:50 +01:00
Chantara Tith eb3910679c Add all LVM devices to the bottom of the devices list. 2016-08-15 17:20:50 +01:00
Chantara Tith fabde86139 Remove device's partitionTable when deactivated. 2016-08-15 17:20:50 +01:00
Andrius Štikonas 8a3c11774c Make variable names slightly more consistent thruoght kmpcore.
Add more doxygen comments.
2016-08-15 17:20:50 +01:00
Andrius Štikonas 69647e816e Simplify QStringList->QString conversion. 2016-08-15 17:20:50 +01:00
Andrius Štikonas 47837843c5 Simplify construction of PV list. 2016-08-15 17:20:50 +01:00
Chantara Tith 426a9385cd Remove unused includes. 2016-08-15 17:20:50 +01:00
Chantara Tith 69536b1129 Remove unused parameters from LvmDevice. 2016-08-15 17:20:50 +01:00
Chantara Tith 6fd0c7a0db API changes, Refactor and Raname to a consistant interface. 2016-08-15 17:20:50 +01:00
Andrius Štikonas 4de925735e Convert some for loops into for ranged based loops. 2016-08-15 17:20:50 +01:00
Andrius Štikonas 40ff0861a8 Convert most of the remaining foreach cases. 2016-08-15 17:20:50 +01:00
Andrius Štikonas 9c524c40fe Fix a compilation error in KPM. 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
Andrius Štikonas 16a2d063e3 More work on C++11 for loops. 2016-08-15 17:20:50 +01:00
Andrius Štikonas 799d213530 Make getFreePV const. 2016-08-15 17:20:50 +01:00
Andrius Štikonas a10c8d3aaa Convert to C++11 for loop where it is safe (avoid detaching Qt objects). 2016-08-15 17:20:50 +01:00
Andrius Štikonas 9ed640084d Fix broken include guard. 2016-08-15 17:20:50 +01:00
Andrius Štikonas cadb80e264 Show the describtion of resize LVM VG as one line. 2016-08-15 17:20:50 +01:00
Andrius Štikonas da081d2f29 Add --force to lvm pvcreate in case there are some old file system signatures. 2016-08-15 17:20:50 +01:00
Chantara Tith 25bbce4975 A small dirty hack to keep track of all the PVs that to be added to any VG. 2016-08-15 17:20:50 +01:00
Chantara Tith 6915187fb2 Add activating LVM LV and VG. 2016-08-15 17:20:50 +01:00
Chantara Tith 3b26d39d3c Add deactivating VG operation. 2016-08-15 17:20:50 +01:00
Chantara Tith d033dc9827 Add deactivating VG and LV jobs. 2016-08-15 17:20:50 +01:00
Chantara Tith ca2bbb27d7 Add deactivating LVM LV and VG. 2016-08-15 17:20:50 +01:00
Chantara Tith 5befd7484e Decouple VG scan and system scan. 2016-08-15 17:20:50 +01:00
Chantara Tith 77ff25e160 Move LVM deviceNodeList and LvPathList to public. 2016-08-15 17:20:50 +01:00
Chantara Tith 4b7289fa0d Add UUID for LV filesystem. 2016-08-15 17:20:50 +01:00
Chantara Tith 67ca8f7d63 Store device pointer for RemoveVolumeGroupOperation for preview uses. 2016-08-15 17:20:50 +01:00
Chantara Tith f115383d8c Resizing Volume Group preview. 2016-08-15 17:20:50 +01:00
Chantara Tith 467759d0a9 Set partitionTable Last/First sector setter as public. 2016-08-15 17:20:50 +01:00
Chantara Tith 53b154fe16 Add internal storage to LVM Device to keep track of its LVs and PVs. 2016-08-15 17:20:50 +01:00
Andrius Štikonas 81a35f0ffd Improve resizing of LVM PVs. 2016-08-15 17:20:50 +01:00