Commit Graph

465 Commits

Author SHA1 Message Date
Chantara Tith bd892fd2d6 Construct PartitionTable and Partition in LvmDevice 2016-08-15 17:20:50 +01:00
Chantara Tith 103b5343d6 Initial work on LvmDevice 2016-08-15 17:20:50 +01:00
Chantara Tith fcc8a7c992 Initial Device separation 2016-08-15 17:20:50 +01:00
Chantara Tith f53cc1b55c Cache lvm2_pv and luks result in finding external tool 2016-08-15 17:20:50 +01:00
Chantara Tith 6360260fae Add support for reading LVM PV info 2016-08-15 17:20:50 +01:00
Chantara Tith 0af98556ac Implement lvm PV resizing 2016-08-15 17:20:50 +01:00
Chantara Tith 0a6de0c2f0 Set VG name as PV mount point 2016-08-15 17:20:50 +01:00
Andrius Štikonas c96682d022 Do not exclude read only devices by default. 2016-08-12 16:47:52 +01:00
Andrius Štikonas b0dccc1c36 Also enable LUKS for F2FS and nilfs2 filesystems. 2016-08-08 02:03:45 +01:00
Andrius Štikonas 4d25524e91 Add support for resizing online. 2016-08-08 02:01:35 +01:00
l10n daemon script 4bb370bffc 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-08-06 09:57:16 +00:00
Andrius Štikonas 0f33fe07c9 Fix coverity issues and some other minor simplifications. 2016-08-05 13:55:56 +01:00
Andrius Štikonas ea99bcc76f Correctly report used space of FAT partitions whose dirty bit is set.
BUG: 366313
2016-08-02 21:41:09 +01:00
l10n daemon script 465aec251d 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-08-01 09:52:41 +00:00
l10n daemon script 63881893e1 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-07-31 09:28:45 +00:00
Andrius Štikonas 0e9298baf8 Revert "Add KAuth helper to detectFileSystem."
This reverts commit 71921cf500.
2016-07-29 18:15:28 +01:00
Andrius Štikonas 918cf2ffa4 Use more compact syntax for passing and returning kauth helper arguments. 2016-07-29 14:19:12 +01:00
l10n daemon script c30a83a5b9 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-07-29 09:28:55 +00:00
Andrius Štikonas a8b35c56a3 Fix btrfs support. 2016-07-27 20:55:35 +01:00
l10n daemon script e18dc61196 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-07-27 09:27:38 +00:00
l10n daemon script 0b39056431 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-07-26 10:44:10 +00:00
Andrius Štikonas 71921cf500 Add KAuth helper to detectFileSystem. 2016-07-25 16:33:49 +01:00
l10n daemon script cb7a3d26c5 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-07-25 09:52:46 +00:00
Andrius Štikonas c4b28aa91f Revert "Use udevadm for detecting file system type."
udevadm seems to suffer from race conditions and sometimes returns exit code 4.

This reverts commit 5ea32b446c.
2016-07-24 21:36:56 +01:00
Andrius Štikonas 5ea32b446c Use udevadm for detecting file system type. 2016-07-24 15:18:27 +01:00
Andrius Štikonas 78df451ea0 Add forgotten file. 2016-07-24 10:08:05 +01:00
Andrius Štikonas 2e9166d2d4 Improve comment of major device numbers.
Exclude read-only block devices.
2016-07-23 22:01:38 +01:00
Andrius Štikonas c8e9c72d88 Look for more type of block devices. 2016-07-22 15:53:15 +01:00
Andrius Štikonas b5d1529370 excludeReadOnly->excludeLoop. 2016-07-22 13:18:34 +01:00
Andrius Štikonas 4a0b8f8efb Use lsblk to detect devices. 2016-07-22 12:56:59 +01:00
Andrius Štikonas e64a82ff19 Use KAuth to get privileges needed for detecting partitions. 2016-07-22 12:00:01 +01:00
Andrius Štikonas 99886f32fc Add more warning tags. 2016-07-18 12:50:52 +01:00
Andrius Štikonas 39e419a36e Use <warning> KUIT tags. 2016-07-18 12:21:06 +01:00
Andrius Štikonas 3a2b78e143 Improve semantic markup of translations. 2016-07-17 23:41:00 +01:00
Andrius Štikonas 9d040e6081 Use reverse iterator. 2016-07-08 00:57:16 +01:00
Andrius Štikonas 4ba9971de9 Do not use obsolete type. 2016-07-06 20:44:32 +01:00
Andrius Štikonas e437da6091 Also check whether HFS+ shrink support is available. 2016-06-12 16:15:18 +01:00
Andrius Štikonas 2514f7d8f4 Use diskdev_cmds instead of obsolete hfsplusutils for HFS+ file systems. 2016-06-12 13:33:04 +01:00
Andrius Štikonas b6911285dc Adjust maximum capacity for fat32, jfs and reiserfs. 2016-06-09 22:07:23 +01:00
Andrius Štikonas 35c7f9749e Also reduce max capacity for ext2 and ext3 file systems. 2016-06-09 19:46:21 +01:00
Andrius Štikonas 3756ec45da Reduce maximum capacity of FAT16 file systems by 1 MiB. 2016-06-09 19:22:56 +01:00
Andrius Štikonas 5e982b5b1e Fix memory leaks. 2016-06-02 13:46:16 +01:00
Andrius Štikonas 09711cdf1d Whitespace fixes. 2016-06-01 21:00:31 +01:00
Andrius Štikonas 8ae2ea3006 Make sure file system is not mounted before deleting it.
Sometimes user might try to mount manually and then delete partition
without refreshing state in KPM.
2016-05-26 18:47:34 +01:00
Andrius Štikonas 0c70c66aae Disable MountPointDialog for swap, lvm pv and unknown partitions. 2016-05-24 17:26:12 +01:00
Andrius Štikonas 3d57b3211a Convert remaining signals to the new syntax. 2016-05-24 01:37:15 +01:00
Andrius Štikonas 9de7341985 Use lsblk --list instead of lsblk --raw. Makes unicode mapper names work. 2016-05-23 12:00:33 +01:00
Andrius Štikonas 6e4c330410 Do not run moc on classes where it is not necessary. 2016-05-22 23:53:17 +01:00
Andrius Štikonas b4a13599aa Libpartedbackend can also use KDiskFreeSpaceInfo for mounted luks partitions. 2016-05-22 00:52:07 +01:00
Andrius Štikonas 35a4798672 Add some support to get used space info for mounted LUKS partitions using KDiskFreeSpaceInfo. 2016-05-22 00:48:55 +01:00
Andrius Štikonas f820c8d764 Adjust minimal filesystem size for luks partitions. 2016-05-20 20:13:11 +01:00
Andrius Štikonas 7e8ee77edf Make luks helper functions non-static. 2016-05-20 19:38:12 +01:00
Andrius Štikonas 12bc2329a2 Used space is larger for luks volumes due to payload. 2016-05-20 19:17:52 +01:00
Andrius Štikonas 4278172f35 Iterate over operation stack backwards.
BUG: 363216
2016-05-19 16:40:20 +01:00
Andrius Štikonas 96eaf6abae Fix overwriting partitions.
BUG: 362956
2016-05-19 12:11:58 +01:00
Andrius Štikonas da550fb534 Fix null pointer dereference. 2016-05-19 01:53:30 +01:00
Andrius Štikonas 349b59574f Q_OBJECT macro is not necessary for ExternalCommand. 2016-05-18 22:32:33 +01:00
Andrius Štikonas 45654e5e83 Convert to new syntax and slots syntax. 2016-05-18 19:54:36 +01:00
Andrius Štikonas 8d178a2a86 Update doxygen variable. 2016-05-18 19:35:37 +01:00
Andrius Štikonas fdfc47cf8f Leave LUKS cmdSupport variables static for now. 2016-05-18 17:39:28 +01:00
Andrius Štikonas 6f8a2c7016 Also disable decryption of luks partition if it is copied in the operation stack. 2016-05-18 15:45:00 +01:00
Andrius Štikonas 063c50aec6 Add a method to check whether partition is part of operationStack. 2016-05-18 14:56:13 +01:00
Andrius Štikonas ffa24e4451 Revert "Disable OperationStack merging of operations for luks partitions."
This is no longer necessary now that copying/resizing of new luks partitions is
forbidden.
This reverts commit aec564f1a2.
2016-05-18 13:58:08 +01:00
Andrius Štikonas 9c2f187ed9 Disable copying newly created Luks partitions. 2016-05-18 13:51:38 +01:00
Andrius Štikonas b896a2abf3 Do not allow to resize/mode newly created luks partitions. 2016-05-18 13:46:59 +01:00
Andrius Štikonas aec564f1a2 Disable OperationStack merging of operations for luks partitions. 2016-05-18 13:13:51 +01:00
Andrius Štikonas 541e89a476 Fix moving unmovable partitions bug in partition resize widget. 2016-05-18 12:30:44 +01:00
Andrius Štikonas 7914e0aa98 Improve luks::supportCopy and luks::supportSetLabel. 2016-05-18 02:04:33 +01:00
Andrius Štikonas ecbbdb3b1d Do not allow moving open luks volumes. 2016-05-18 00:46:08 +01:00
Andrius Štikonas 47cb6752ba Use batch mode of cryptsetup to format luks volume. 2016-05-18 00:44:15 +01:00
Andrius Štikonas e5d72b7d11 Set miinimal capacity for btrfs filesystems back to 256 MiB.
mkfs.btrfs can make smaller filesystems but other tools, e.g.
btrfs filesystem resize do not work well on small partitions.
2016-05-17 22:02:21 +01:00
Andrius Štikonas a610e24686 Move luks init code to constructor. 2016-05-17 19:05:17 +01:00
Andrius Štikonas 142ff07938 Remove reduntant virtual keywords. 2016-05-17 18:01:31 +01:00
Andrius Štikonas 094042cc75 Fix luks operations. 2016-05-17 17:38:17 +01:00
Andrius Štikonas 5d28790152 Simplify Luks support tool (and do not init Luks filesystem). 2016-05-17 17:35:49 +01:00
Andrius Štikonas 927a6421fe Make FileSystem::init virtual instead of static. 2016-05-17 16:33:52 +01:00
Andrius Štikonas e64e536797 Revert "Remove Luks from FileSystemFactory."
This reverts commit 98d515e826.
2016-05-17 15:30:40 +01:00
Andrius Štikonas 98d515e826 Remove Luks from FileSystemFactory. 2016-05-17 15:04:50 +01:00
Teo Mrnjavac 677bae18e5 Unbreak build fix. 2016-05-16 15:57:27 +02:00
Teo Mrnjavac 9d6438f0af Fix build on clang. 2016-05-16 15:54:29 +02:00
Andrius Štikonas 6d82fc0964 Document new function variables. 2016-05-13 23:18:24 +01:00
Andrius Štikonas c6c31dc5c0 Use long options for mount. 2016-05-13 23:13:22 +01:00
Andrius Štikonas 1dfe304fd2 Restore back functionality of unmounting all mount points. 2016-05-13 23:08:58 +01:00
Chantara Tith b653b5b6e3 move mount logic from Partition to FileSystem 2016-05-13 23:00:27 +01:00
Chantara Tith 2a12571d44 move unmount logic from Partition to FileSystem 2016-05-13 23:00:27 +01:00
Andrius Štikonas 3bfb0b4b5b Restore optimized luks::mapperName function.
It seems that crashes are not our fault but rather of frameworkintegration.
2016-05-13 00:58:00 +01:00
Andrius Štikonas 9b5c33696c Show error message if shrinking innerFS inside luks fails. 2016-05-12 16:48:32 +01:00
Andrius Štikonas 7e8cfaf25c Convert QRegExp->QRegularExpression in Partition class. 2016-05-12 16:46:25 +01:00
Andrius Štikonas 1ea4f4976d Revert "Revert "Port away from QRegExp to QRegularExpression.""
This reverts commit c291af2c83.
2016-05-12 16:45:13 +01:00
Andrius Štikonas 82243234e3 We no longer need to fill partition sizes. KPMCore now tracks max fs size (including inside luks). 2016-05-11 23:00:37 +01:00
Andrius Štikonas c291af2c83 Revert "Port away from QRegExp to QRegularExpression."
This reverts commit bb2de6cd56.

This was causing a crash when restoring partitions.
2016-05-11 22:31:33 +01:00
Andrius Štikonas 4fc3f321dd Revert "Better to use deleteLater with QObjects."
This reverts commit 3ec80be2a1.

This was causing a crash when changing filesystem (reformatting).
2016-05-11 22:17:38 +01:00
Andrius Štikonas 24ae2bf079 Do not allow restoring to the partition containing open luks volume. 2016-05-11 19:36:06 +01:00
Andrius Štikonas 513bbdac4c Convert FS::luks static cmdSupport members to non-static. 2016-05-11 18:01:21 +01:00
Andrius Štikonas 7c137c36c6 Disable copying open luks volumes. 2016-05-11 15:19:51 +01:00
Andrius Štikonas 4aeea8b143 Remove accidentally committed debug code. 2016-05-11 14:58:06 +01:00
Andrius Štikonas a7c9acd518 Move luks label handlingfrom libpartedbackend to FS::luks. 2016-05-11 11:53:15 +01:00
Andrius Štikonas 19f5ce0b28 Remove curly braces when generating a new LUKS UUID. 2016-05-11 02:16:24 +01:00
Burkhard Lück ea69f4b8af load translation catalog for thje library 2016-05-10 15:20:11 +02:00
Andrius Štikonas 0031f84315 Do not allow setting LUKS labels when crypt is closed. 2016-05-10 02:20:37 +01:00
Andrius Štikonas 64b0cf4c77 Unbreak non ASCII passphrases. 2016-05-09 11:07:31 +01:00
Andrius Štikonas 785aa7edf4 Avoid piping LUKS passphrase.
Also remove piping support from ExternalCommand.
It's unlikely that it will be useful enough. There were no more users of this
after luks open was migrated to QProcess::write.
2016-05-09 00:42:01 +01:00
Andrius Štikonas bb2de6cd56 Port away from QRegExp to QRegularExpression. 2016-05-08 00:22:22 +01:00
Andrius Štikonas 29c6578351 Fix nilfs reporting missing tools. 2016-05-08 00:21:22 +01:00
Andrius Štikonas 5c32921fcd Make log message more user friendly. 2016-05-07 01:11:59 +01:00
Andrius Štikonas 7e7d9e2a9a Use long style command line parameters. 2016-05-06 22:47:56 +01:00
Andrius Štikonas d7f941af58 Silence a warning. 2016-05-06 22:42:01 +01:00
Andrius Štikonas 464b3060fb Remove remaining ../ from #includes. 2016-05-06 22:36:24 +01:00
Andrius Štikonas dc421db5c3 Move FS detection code back to backends. 2016-05-06 19:14:01 +01:00
Andrius Štikonas 0ec83e4e32 Merge branch 'luks-decorator' 2016-05-06 18:16:36 +01:00
Teo Mrnjavac d584c70696 Passphrase accessor. 2016-05-06 16:50:23 +02:00
Andrius Štikonas 3ede101167 Fix a typo: mount->umount. 2016-05-06 14:34:40 +01:00
Teo Mrnjavac 6013b5887c Always use outer UUID for mapper name. 2016-05-05 14:15:57 +02:00
Andrius Štikonas 0bd44b94dc Use trimmed() instead of simplified(). 2016-05-05 12:46:27 +01:00
Andrius Štikonas 57e0b03438 Remove unused parameter. 2016-05-04 23:02:20 +01:00
Andrius Štikonas 440aa74dcf List .cpp files for cmake instead of globbing them. 2016-05-04 22:14:38 +01:00
Andrius Štikonas 27af037bb4 Use lsblk to determine mounted status. 2016-05-04 21:51:04 +01:00
Teo Mrnjavac 1cb464c6b0 Use the detected FS type directly. 2016-05-04 18:27:59 +02:00
Andrius Štikonas d7413b7708 Remove workaround for ancient parted 2.1. 2016-05-01 14:32:00 +01:00
Andrius Štikonas a1026d20be Use KPasswordDialog to open LUKS containers. 2016-05-01 14:17:06 +01:00
Andrius Štikonas f1210d0aa7 Pass LUKS payload length to cryptsetup --size.
Before we were passing the length of the whole LUKS partition. After shrinking
LUKS partitions blkid would not recognize them.
2016-04-30 13:48:09 +01:00
Andrius Štikonas a115961f04 Calculate the size of innerFS when growing LUKS volumes. 2016-04-29 20:25:14 +01:00
Andrius Štikonas 314742f40a Use long options for cryptstup. 2016-04-29 19:49:06 +01:00
Andrius Štikonas 4ff7ada40b Fix size vs sector number when resizing LUKS. 2016-04-29 18:12:34 +01:00
Andrius Štikonas 7cd1fd6eb7 Initial LUKS shrink support. 2016-04-29 17:56:39 +01:00
Andrius Štikonas 91c36c3d20 Adjust minCapacity for btrfs and luks. After all, it seems 40 MiB doesn't work. 2016-04-29 17:09:41 +01:00
Andrius Štikonas 47a1594705 Slightly improve setting used sectors. 2016-04-29 15:33:26 +01:00
Andrius Štikonas e2f21360bb Add support for reading used capacity of innerFS.
Also make sure labels, used capacity and UUID are properly updated when
opening or closing luks volumes."
2016-04-29 14:27:01 +01:00
Andrius Štikonas 85aca763a2 Pass a pointer to the parent widget to decrypt dialog. 2016-04-29 12:36:24 +01:00
Andrius Štikonas 4df97ec3e7 Fix detection of closed luks volumes (broken by new mapperName function). 2016-04-28 23:25:01 +01:00
Andrius Štikonas aa02ae7b1c When cryptsetup is missing complain about it, not support tools of innerFS. 2016-04-28 22:47:58 +01:00
Andrius Štikonas 6b772f3332 Optimize luks::mapperName function.
Now it uses lsblk to find out mapper node.
It also makes opened luks volumes to be properly detected when no cryptsetup
is found, e.g. crypt is opened in initramfs.
2016-04-28 22:38:38 +01:00
Andrius Štikonas 25e28a0e16 Only enable deactivation of LUKS volume if cryptsetup is found. 2016-04-28 21:56:03 +01:00
Andrius Štikonas ea4b945ebb Add override keyword to virtual functions. 2016-04-27 21:54:02 +01:00
Andrius Štikonas f7e62d93f9 Merge branch 'master' into luks-decorator 2016-04-27 16:34:02 +01:00
Andrius Štikonas e5641bf7f5 Minimal capacity of F2FS filesystems is 30MiB. 2016-04-27 16:09:14 +01:00
Teo Mrnjavac 83787cbdfc Make the parent in Partition a QPointer.
This also reverts commit dc9e9651ac.
2016-04-27 16:58:17 +02:00
Teo Mrnjavac dc9e9651ac Use a QPointer for Partition in DeleteOperation to avoid double-delete. 2016-04-27 16:41:34 +02:00
Teo Mrnjavac 3ec80be2a1 Better to use deleteLater with QObjects. 2016-04-27 15:36:07 +02:00
Andrius Štikonas e96c13b2bb Disable opening crypt if cryptsetup is not found. 2016-04-27 14:29:48 +01:00
Andrius Štikonas 51ef8013b1 Fix luks supportToolFound logic. 2016-04-27 14:22:00 +01:00
Andrius Štikonas 6bcbe14169 Add support for detecting support tools of innerFS. 2016-04-27 13:52:23 +01:00
Andrius Štikonas e3bb8a335c Return error if creating innerFS fails. 2016-04-27 00:50:51 +01:00
Andrius Štikonas 9920828f81 Reduce minimal btrfs partition capacity. 2016-04-27 00:32:27 +01:00
Andrius Štikonas 9c31d45229 Slightly reorder functions in luks.cpp to match other filesystems. 2016-04-27 00:29:01 +01:00
Andrius Štikonas 26047b35ef Fix copy-paste typo. 2016-04-27 00:10:28 +01:00
Andrius Štikonas 16757048c5 Fix whitespace. 2016-04-26 14:46:02 +01:00
Andrius Štikonas f787af70fc btrfs-debug-tree is not used anymore. 2016-04-26 13:54:16 +01:00
Andrius Štikonas 1ee315303c Do not use QStringLiteral for empty strings. 2016-04-26 13:53:25 +01:00
Andrius Štikonas dff128264c Revert "Optimize QString->QStringLiteral."
This reverts commit df33b21b0d.
2016-04-26 13:50:44 +01:00
Andrius Štikonas df33b21b0d Optimize QString->QStringLiteral. 2016-04-26 13:46:02 +01:00
Andrius Štikonas d87ac7dc20 Add support for checking innerFS. 2016-04-26 13:26:40 +01:00
Teo Mrnjavac d5438ba007 Make LUKS grow/shrink support depend on open/closed state and inner FS. 2016-04-26 13:36:07 +02:00
Teo Mrnjavac 7ff137233a Disallow partition delete operation if the FS is cryptOpen. 2016-04-26 11:51:12 +02:00
Andrius Štikonas 12c03cfeff Clear LUKS label when closing crypt. 2016-04-24 21:51:49 +01:00
Andrius Štikonas 96ceadd3be Use open/close instead of luksOpen/luksClose. 2016-04-22 16:24:30 +01:00
Teo Mrnjavac 8e3e9309ed suggestedMapperName as a separate method. 2016-04-22 16:48:45 +02:00
Andrius Štikonas f7ff5f2d30 Fix a bug that prevented resizing nilfs2 partitions. 2016-04-22 13:47:58 +01:00
Andrius Štikonas a412564b00 Simplify NTFS writeUUID code. Rely on external ntfslabel command. 2016-04-22 13:30:19 +01:00
Andrius Štikonas 433cb5651b Enable growing luks->reiserfs. 2016-04-22 13:23:57 +01:00
Andrius Štikonas 2e7055aa69 Merge branch 'master' into luks-decorator 2016-04-21 23:03:28 +01:00
Andrius Štikonas 7306c86241 Silence a warning about unused variable. 2016-04-21 22:50:19 +01:00
Andrius Štikonas 16f76b1623 Remove unnecessary "this->". 2016-04-21 22:48:58 +01:00
Andrius Štikonas eb4e985933 Use C++11 initialization instead of << for readability. 2016-04-21 22:48:05 +01:00
Andrius Štikonas 33c049926f
Add initial support for reading and writing innerFS labels. 2016-04-21 21:19:49 +01:00
Andrius Štikonas 8c1dd32baa
Remove luksName from DecryptLuksDialog. 2016-04-21 18:02:57 +01:00
Teo Mrnjavac 27d5ff82e6 Cache the passphrase in a LUKS open session. 2016-04-21 18:36:04 +02:00
Andrius Štikonas d126f04886
Add initial support for growing LUKS volumes.
Added support for filling btrfs, ext and swap partitions.
2016-04-21 17:22:48 +01:00
Teo Mrnjavac 7edc601a36 Allow the UI to set a passphrase before creation instead of asking. 2016-04-21 17:05:27 +02:00
Andrius Štikonas 01c9b9f881
Use long command line options when possible. 2016-04-20 16:30:23 +01:00
Andrius Štikonas e48abb1794
Set libparted name for Reiser4 to be reiserfs.
libparted does not support reiser4 filesystems, so formatting returned an error.
2016-04-20 16:03:10 +01:00
Andrius Štikonas 5f87ba705f
Add --force flag when creating reiser4 filesystems. 2016-04-20 15:25:17 +01:00
Andrius Štikonas 1ee17c38e3
Clobber first 129 sectors of partition when deleting it. 2016-04-20 15:07:21 +01:00
Andrius Štikonas 46c3536a4c
Use UUID of LUKS partition for mapper name. 2016-04-19 17:10:59 +01:00
Teo Mrnjavac 26026b6232 PartitionRole::LUKS is now PartitionRole::Luks. 2016-04-19 16:46:18 +02:00
Andrius Štikonas 58e9876307
Rename qglobal.h to QtGlobal 2016-04-18 17:14:31 +01:00
Teo Mrnjavac b4a57db54d Update copyright and strings. 2016-04-15 15:43:21 +02:00
Teo Mrnjavac e1383df143 Assume the inner FS is already set when creating LUKS FS.
An open LUKS FS now reports the type of its inner FS.
Build a list of "LUKS-encryptable" filesystem types.
2016-04-15 15:33:32 +02:00
Teo Mrnjavac 4c8b531bf4 Set the LUKS role if LUKS detected. 2016-04-15 15:11:51 +02:00
Teo Mrnjavac 12e7da5b1c Add LUKS role. Both open and closed LUKS "filesystems" should use this. 2016-04-15 15:10:14 +02:00
Teo Mrnjavac 9970fb7b1d Make sure to create the inner fs when detecting. 2016-04-13 18:32:21 +02:00
Teo Mrnjavac 7993257541 Inner fs mount checks must use mapper name. 2016-04-13 17:01:53 +02:00
Teo Mrnjavac 3f10c8e2d5 We don't need the dash because ExternalCommand already does the piping. 2016-04-13 15:56:07 +02:00
Teo Mrnjavac c41f843aff Actually create inner fs. 2016-04-13 15:55:35 +02:00
Teo Mrnjavac 1b79099760 Preliminary LUKS create support. 2016-04-12 11:26:07 +02:00
Teo Mrnjavac 1aff54c047 Use C++11 initialization instead of << for readability. 2016-04-07 16:13:29 +02:00
Teo Mrnjavac 49cde487cc Check if the mapper node is mounted. 2016-04-06 18:13:18 +02:00
Teo Mrnjavac 45311941ca Add mounted state accessors to FS::luks. 2016-04-06 18:13:18 +02:00
Teo Mrnjavac 0a8a5887df Bring back LUKS code which was previously merged+reverted.
Revert "Revert merge of branch luks-decorator."
This reverts commit efd3179d95.
Messages:
FS::luks is now a decorator for an actual FS composed inside.
Implement cryptOpen/cryptClose/mount/unmount operations.
detectFileSystem, which only uses blkid, is now in FileSystem.cpp.
FileSystem::mount now requires a mountPoint.
Use umount -A to immediately umount all mount points in unmountCmds.
Add override keywords, TODO: add them everywhere.
LibPartedBackend no longer links against libblkid.
Fix LUKS handling in LibPartedBackend::scanDevicePartitions.
Allow detecting FS::Type by path, and remove libparted workaround.
FS detection now only uses blkid (from util-linux).
2016-03-31 18:43:38 +02:00
Andrius Štikonas 7f44e71298 Use KIO version instead. 2016-03-29 20:55:56 +03:00
Teo Mrnjavac ccf1880efa Do not filter out PED_DEVICE_UNKNOWN devices as if they were read-only.
This is necessary because libparted still reports NVME devices as
PED_DEVICE_UNKNOWN.
2016-03-15 18:06:30 +01:00
Andrius Štikonas e3477347e1 Fix updating NTFS UUID.
For some reason dd did not work properly, use QFile instead.
2016-03-11 00:31:30 +00:00
Andrius Štikonas ca5bc8000b Merge branch 'more-parted-flags' 2016-03-08 20:48:09 +00:00
Teo Mrnjavac 3c2f383b8e Define underlying type for enums so they can be forward-declared. 2016-03-03 16:03:41 +01:00
Andrius Štikonas 41f9dc36dd Cleanup unused include. 2016-03-03 10:17:41 +01:00
Andrius Štikonas e0c23f443b Update copyright. 2016-03-02 19:00:31 +00:00
Teo Mrnjavac 852c8c8516 Bring partition flags support up to current libparted level.
This doesn't quite support all the types listed by fdisk as described
in bug 359819 since we are limited by what's exposed by libparted, but
it covers the most important ones.
BUG: 359819
2016-03-02 11:43:27 +01:00
Andrius Štikonas a0592de93a Cleanup unused include. 2016-02-29 17:58:25 +00:00
Andrius Štikonas 828a4060cc Add forgotten files. 2016-02-25 23:46:31 +00:00
Andrius Štikonas dc75c7a11f Add basic support for F2FS. 2016-02-25 23:29:33 +00:00
Andrius Štikonas d9f87b1031 Simplify prettyName logic. We already check for empty name in the constructor. 2016-02-25 22:24:46 +00:00
Andrius Štikonas b25d7c19de Make Partition Manager device selector more user friendly:
Show Device name – Capacity (Device node)

BUG:259679
2016-02-22 16:14:50 +00:00
Andrius Štikonas 227c77e801 Do not report free space for swap partitions.
Swap partitions have no mount path so KDiskFreeSpaceInfo shows
total free disk space available.

BUG:357363
2016-02-21 19:22:35 +00:00
Andrius Štikonas 20bb8eba7e Get btrfs used capacity from btrfs filesystem show --raw
It's output looks like:

Label: 'test'  uuid: d23f3138-c8ea-449e-9155-015ce4f6e2e6
        Total devices 1 FS bytes used 131072
        devid    1 size 981467136 used 252706816 path /dev/sdb1

FS bytes used number is actual data on btrfs volume. However,
to resize successfully we need to know actual space used by data
and metadata. That's why we read size from devid (i.e. 252706816).

Btrfs volumes can span over multiple devices, so we must make sure
that we are reading devid corresponding to the correct device node.

BUG: 353333
2016-02-18 13:39:09 +00:00
Andrius Štikonas 58013d54fe Never force installation in the system prefix when it's not needed 2016-01-31 14:45:34 +00:00
Andrius Štikonas b2aa3176ba Remove parted workaround.
FS detection now only uses blkid (from util-linux).
Bump minimum blkid (and therefore util-linux) version to 2.23.
2016-01-25 15:42:20 +00:00
l10n daemon script b6a6efc579 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"
2015-12-30 09:24:52 +00:00
Andrius Štikonas efd3179d95 Revert merge of branch luks-decorator. 2015-09-16 14:18:13 +01:00
Teo Mrnjavac 815cb3caad Add ismounted.c and related from util-linux.
These are supposed to be LGPL or GPL 2 or later. The licensing is
unclear but in util-linux the relevant files are treated as LGPL.
is_mounted is wrapped in helpers.h
Compared to libparted, this has the benefit of not requiring a
PedPartition object, and it's supposed to be reliable and
cross-platform.
2015-08-18 18:22:30 +02:00
Teo Mrnjavac 1135a36b68 Useless forward-declare is useless. 2015-08-18 18:13:49 +02:00
Teo Mrnjavac d8494a00a5 FS::luks is now a decorator for an actual FS composed inside.
Implement cryptOpen/cryptClose/mount/unmount operations.
detectFileSystem, which only uses blkid, is now in FileSystem.cpp.
FileSystem::mount now requires a mountPoint.
Use umount -A to immediately umount all mount points in unmountCmds.
Add override keywords, TODO: add them everywhere.
LibPartedBackend no longer links against libblkid.
Fix LUKS handling in LibPartedBackend::scanDevicePartitions.
2015-08-14 17:53:06 +02:00
Teo Mrnjavac 166728b820 Allow detecting FS::Type by path, and remove libparted workaround.
FS detection now only uses blkid (from util-linux).
2015-08-13 14:25:13 +02:00
Andrius Štikonas b0e6104e91 List .ui files instead of globbing them. 2015-08-05 12:35:17 +01:00
Teo Mrnjavac 5e7dff18ec Useless include is useless. 2015-08-04 18:32:07 +02:00
Teo Mrnjavac cdf57075f9 Support LUKS mounting. 2015-08-04 17:04:30 +02:00
Teo Mrnjavac 17eb5e51e5 Resurrect DecryptLuksDialog. 2015-08-04 16:43:23 +02:00
Teo Mrnjavac 7f1a340e47 Resurrect DecryptLuksDialogWidget. 2015-08-04 16:42:56 +02:00
Teo Mrnjavac 49dd31149f Glob for UI files in src/gui. 2015-08-04 16:42:10 +02:00
Teo Mrnjavac 504ac5a86c First check, then assert. 2015-07-23 17:55:17 +02:00
Teo Mrnjavac ab049467b7 First check, then assert. Also fix check syntax. 2015-07-23 17:52:22 +02:00
Teo Mrnjavac ac6591807a First check, then assert. 2015-07-23 17:49:05 +02:00
Teo Mrnjavac cd0f5d8778 Do not risk a division by zero. 2015-07-23 17:47:17 +02:00
Teo Mrnjavac 409bde6d1f Alignment. 2015-07-23 17:41:15 +02:00
Teo Mrnjavac c031d239e5 Do not forget breaks in switch (thanks to Coverity). 2015-07-23 17:36:55 +02:00
Teo Mrnjavac a683078b28 Allow excluding read-only devices from backend scan. 2015-07-23 16:42:09 +02:00
Teo Mrnjavac dd9c4eeb7e Check if ocfs2 create command starts. 2015-07-22 16:15:25 +02:00
Teo Mrnjavac cba82dea40 Useless check is useless. 2015-07-22 16:10:46 +02:00
Teo Mrnjavac de27f840bf Always use nullptr instead of NULL because it is type-safe. 2015-07-22 15:48:03 +02:00
Teo Mrnjavac c4bb654916 Do not dereference before null check. 2015-07-22 15:36:55 +02:00
Teo Mrnjavac e69c679fd9 Cast to quint64 early enough to not lose precision. 2015-07-22 15:28:47 +02:00
Teo Mrnjavac df01276a53 config.h is no more. 2015-07-21 12:44:59 +02:00
Teo Mrnjavac 5d19f9c55e Remove kcfg and kcfgc files. 2015-07-21 12:44:40 +02:00
Teo Mrnjavac 4e6655c356 Parameter intentionally unused, do not warn. 2015-07-20 17:11:40 +02:00
Teo Mrnjavac a50076f1bd Remove all references to KConfig from CMake. 2015-07-20 17:10:47 +02:00
Teo Mrnjavac 93d933c498 Have PartWidget color codes not use KConfig. 2015-07-17 13:36:23 +02:00
Teo Mrnjavac fda3c2c814 Use PartitionAlignment::sectorAlignment instead of KConfig. 2015-07-15 18:38:41 +02:00
Teo Mrnjavac f343f4c3b2 Make sectorAlignment a static setting in PartitionAlignment.
Also yank out cylinder alignment from sectorAlignment.
2015-07-15 18:37:30 +02:00
Teo Mrnjavac 0a4ac3065b By default we never align to cylinder boundaries because it's not 1987. 2015-07-14 18:41:44 +02:00
Andrius Štikonas 626f560e52 Format kpmcore code using KDE style. 2015-07-13 17:16:36 +03:00
Teo Mrnjavac c25bb0d923 Fix indentation. 2015-07-13 16:03:49 +02:00
Teo Mrnjavac 46946c7949 Specify type when creating a new partition. 2015-07-13 16:03:49 +02:00
Teo Mrnjavac 521d3efb39 Obsolete code is obsolete. 2015-07-13 16:03:49 +02:00
Teo Mrnjavac 38c8fc1efc Fix build again. 2015-07-13 16:03:49 +02:00
Teo Mrnjavac e2a7e4b230 Fix build. 2015-07-13 16:03:49 +02:00
Teo Mrnjavac fd8603f70c Do not use KConfig for the shred action. 2015-07-13 16:03:49 +02:00
Teo Mrnjavac eb1879774f Export Copy{Source,Target}Device classes. 2015-07-13 16:03:49 +02:00
Teo Mrnjavac 7fa51ae067 Make it possible to set partition sectors from the outside world 2015-07-13 16:03:49 +02:00
Teo Mrnjavac 3da87feba1 Make Device::setPartitionTable() public 2015-07-13 16:03:49 +02:00
Teo Mrnjavac 3bbce2865f Revert "Format kpmcore code using KDE style."
This reverts commit 21b569e499.
2015-07-13 16:03:36 +02:00
Andrius Štikonas 21b569e499 Format kpmcore code using KDE style. 2015-07-13 17:02:13 +03:00