Commit Graph

1162 Commits

Author SHA1 Message Date
Andrius Štikonas efb970ba11 Add a missing features.h include. 2020-02-08 22:01:24 +00:00
l10n daemon script b7306d2d19 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"
2020-02-07 05:43:45 +01:00
Arnaud Ferraris d24191ebd8 Add support for filesystem-specific features
In some cases, it may be necessary to create a filesystem with specific features
enabled/disabled.

This PR makes it possible to create filesystems this way. It does so
by introducing a new m_Features member variable and the createWithFeatures()
function to the FileSystem base class. The latter function is implemented
for the btrfs, ext2/3/4 and FAT filesystems.

Additionnally, the CreateFileSystemJob has been modified to enable
creating/formatting filesystems with specific features enabled.

Differential Revision: https://phabricator.kde.org/D21903
CCBUG: 342178
2020-01-12 11:58:32 +00:00
l10n daemon script 50697be784 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"
2019-12-08 05:22:07 +01:00
Andrius Štikonas dfce039421 Only trigger udev events for block device subsystem.
Triggerring other subsystems is not necessary and occasionally
results in triggering unrelated bugs.

BUG: 413973
2019-12-02 22:01:10 +00:00
Yuri Chornoivan ca2180f526 Fix minor typo 2019-11-22 15:45:18 +02:00
Yuri Chornoivan 1a7b673792 Fix minor issues found by EBN 2019-11-22 15:45:12 +02:00
Yuri Chornoivan 2980b21b8d Update references 2019-11-22 15:45:04 +02:00
Andrius Štikonas bb7bf3ca03 Make FileSystemFactory::init reentrant.
BUG: 413927
2019-11-18 22:45:58 +02:00
Andrius Štikonas 2c7b3f2bfa Fix resizing of encrypted partitions.
BUG: 413883
2019-11-18 21:16:05 +02:00
Andrius Štikonas 13beb99319 Use partx instead of blockdev to update partition table in the kernel.
CCBUG: 413883
2019-11-18 20:42:36 +02:00
l10n daemon script c4c6ca18ba 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"
2019-11-12 05:31:35 +01:00
Andrius Štikonas 1c771436d4 Merge branch '4.0' 2019-11-07 22:13:39 +00:00
l10n daemon script 5eae2e1625 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"
2019-11-04 05:16:18 +01:00
Andrius Štikonas 59c9ba2f8d Set MBR partition type of FAT32 partitions to 0x0c.
BUG: 412959
2019-10-15 21:37:58 +01:00
Andrius Štikonas 40b65438f0 Do not align partitions if they are mounted.
Moving data when partitions are mounted is almost guaranteed to cause data loss.

BUG: 412575
2019-10-05 12:08:20 +01:00
Caio Jordão Carvalho d062cf50fb Including Caio's middle name in aboutData 2019-10-05 12:07:46 +01:00
Andrius Štikonas df235a7751 Make S.M.A.R.T. disk temperature label show only integers.
BUG: 411226
2019-10-05 12:07:28 +01:00
Shubham Jangra a264a28237 Reduce temperature's precision from six decimal places to two
Summary: BUG: 411226

Test Plan: I couldn't test it since my device does not support SMART

Reviewers: stikonas

Reviewed By: stikonas

Subscribers: #kde_partition_manager

Tags: #kde_partition_manager

Differential Revision: https://phabricator.kde.org/D23572
2019-10-05 12:07:20 +01:00
Andrius Štikonas 6f17476b75 Run udevadm settle once more after udevadm trigger.
CCBUG: 412204
2019-10-05 12:03:35 +01:00
Andrius Štikonas 0b5e5040eb Do not align partitions if they are mounted.
Moving data when partitions are mounted is almost guaranteed to cause data loss.

BUG: 412575
2019-10-05 11:52:59 +01:00
Andrius Štikonas 76ca72eccd Revert "Create a timer to wait for system to free resources"
This reverts commit 2627d476f4.
2019-09-26 23:47:34 +01:00
Andrius Štikonas 467ea50aeb Run udevadm settle once more after udevadm trigger.
CCBUG: 412204
2019-09-25 22:33:35 +01:00
Caio Jordão Carvalho 35dabdeb1c Including Caio's middle name in aboutData 2019-09-17 23:59:06 +00:00
Andrius Štikonas 4b0261230d Make S.M.A.R.T. disk temperature label show only integers.
BUG: 411226
2019-09-07 11:51:05 +01:00
Shubham Jangra 78f29ae8b5 Reduce temperature's precision from six decimal places to two
Summary: BUG: 411226

Test Plan: I couldn't test it since my device does not support SMART

Reviewers: stikonas

Reviewed By: stikonas

Subscribers: #kde_partition_manager

Tags: #kde_partition_manager

Differential Revision: https://phabricator.kde.org/D23572
2019-09-01 23:11:43 +05:30
l10n daemon script 60bba03afa 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"
2019-08-07 05:01:03 +02:00
l10n daemon script f40762a220 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"
2019-07-27 05:10:32 +02:00
l10n daemon script a97162fb04 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"
2019-07-12 05:13:22 +02:00
Shubham Jangra 6ea88cc737 Add QString include 2019-06-12 22:18:08 +05:30
Shubham Jangra d1a82f65d4 Revert "Remove redundant includes and refactor"
This reverts commit 4229b02fd2.
2019-06-12 22:11:11 +05:30
Shubham Jangra 4229b02fd2 Remove redundant includes and refactor 2019-06-10 23:07:06 +05:30
Shubham Jangra 2627d476f4 Create a timer to wait for system to free resources
Reviewers: stikonas

Reviewed By: stikonas

Differential Revision: https://phabricator.kde.org/D21696
2019-06-09 22:41:13 +05:30
Shubham Jangra ef20244be5 Add support for Minix(Mini Unix) Filesystem
Reviewers: stikonas, cjlcarvalho

Reviewed By: stikonas

Subscribers: cjlcarvalho, #kde_partition_manager

Tags: #kde_partition_manager

Differential Revision: https://phabricator.kde.org/D21652
2019-06-09 00:01:30 +05:30
Shubham Jangra 6f7cea6b27 Quit application if bus is not connected, interface not registered
Reviewers: stikonas, cjlcarvalho

Reviewed By: stikonas

Subscribers: #kde_partition_manager

Tags: #kde_partition_manager

Differential Revision: https://phabricator.kde.org/D21616
2019-06-08 15:43:24 +05:30
Andrius Štikonas ba48851d34 Merge branch '4.0' 2019-06-07 19:12:07 +01:00
Shubham Jangra 67795a08ab Fix uninitialized variable warning 2019-06-07 09:39:29 +05:30
Harald Sitter 9b45e25f81 manually quit kauth's mainloop
Summary:
kauth helpers have a qcoreapplication started which auto-terminates after
10 seconds of idle time. this would be an added time out on top of our
life time management that is not necessary. to prevent this additional
delay simply quit the qapplication directly.

this makes helper termination almost instantaneous even when the dbus
client disappears due to crash or SIGINT, and largely removes the
need to call stopHelper altogether.

BUG: 408245

Test Plan:
both partitionmanager and calamares instantly quit the helper no matter how the client process gets terminated

other than that everything seems to work as before

Reviewers: stikonas

Differential Revision: https://phabricator.kde.org/D21559
2019-06-05 18:34:35 +01:00
Andrius Štikonas 6a3b1e02b6 smart: obtain disk size in blocks.
Also drop pre 7.0 support as any earlier version was not supported.
2019-06-05 18:32:11 +01:00
Harald Sitter 5413150c67 manually quit kauth's mainloop
Summary:
kauth helpers have a qcoreapplication started which auto-terminates after
10 seconds of idle time. this would be an added time out on top of our
life time management that is not necessary. to prevent this additional
delay simply quit the qapplication directly.

this makes helper termination almost instantaneous even when the dbus
client disappears due to crash or SIGINT, and largely removes the
need to call stopHelper altogether.

BUG: 408245

Test Plan:
both partitionmanager and calamares instantly quit the helper no matter how the client process gets terminated

other than that everything seems to work as before

Reviewers: stikonas

Differential Revision: https://phabricator.kde.org/D21559
2019-06-03 15:08:10 +02:00
Shubham Jangra f481109417 Do not move further if system bus is not connected
Reviewers: stikonas, cjlcarvalho

Reviewed By: stikonas

Differential Revision: https://phabricator.kde.org/D21506
2019-05-30 23:27:50 +05:30
Shubham Jangra 68cf1efd6b Notify user when they enter non whitelisted command
Reviewers: stikonas, cjlcarvalho

Reviewed By: stikonas

Subscribers: #kde_partition_manager

Tags: #kde_partition_manager

Differential Revision: https://phabricator.kde.org/D21504
2019-05-30 23:27:04 +05:30
Shubham Jangra 3184cbcee3 Remove extra semicolon 2019-05-30 22:47:17 +05:30
Valerii Malov 9565ef61ab Add support for smartmontools 7.0 user_capacity json output
Summary:
smartmontools 7.0 reports user capacity as an object that contains bytes and blocks value, instead of being an int that just contains bytes
This should fix incorrect calculation of bad blocks threshold and incorrect display of "Overall" status

Test Plan:
run partitionmanager on a system that has smartmontools 7, open smart status
overall status should be reported correctly

Reviewers: stikonas

Reviewed By: stikonas

Differential Revision: https://phabricator.kde.org/D21311
2019-05-23 17:43:44 +03:00
Shubham Jangra a7532d4041 Scrap Public Key Cryptography code based on QCA as QDbus is secure enough
Summary: QDbus already provides enough security to the calls made by the application to the helper. Hence no need to encrypt, sign the requests of the application and verify their integrity at the helper side.

Reviewers: stikonas, cjlcarvalho

Reviewed By: stikonas

Subscribers: #kde_partition_manager

Tags: #kde_partition_manager

Differential Revision: https://phabricator.kde.org/D21275
2019-05-19 22:53:13 +05:30
Shubham Jangra 07b2ce3054 Remove superflous variables
Reviewers: stikonas

Reviewed By: stikonas

Subscribers: #kde_partition_manager

Tags: #kde_partition_manager

Differential Revision: https://phabricator.kde.org/D21272
2019-05-18 18:54:20 +05:30
Shubham Jangra 73a21e6739 Simplify test conditions
Reviewers: stikonas, cjlcarvalho

Reviewed By: stikonas

Subscribers: #kde_partition_manager

Tags: #kde_partition_manager

Differential Revision: https://phabricator.kde.org/D21241
2019-05-17 23:03:15 +05:30
Shubham Jangra 997f425030 Remove redundant include
Reviewers: stikonas, cjlcarvalho

Reviewed By: stikonas

Subscribers: #kde_partition_manager

Tags: #kde_partition_manager

Differential Revision: https://phabricator.kde.org/D21251
2019-05-17 23:00:58 +05:30
Antonio Rojas 8238c94447 Don't hardcode dbus policy install dir
Install the policy files to the cmake provided locations instead of hardcoding the path to /etc/dbus-1

Differential Revision: https://phabricator.kde.org/D21162
2019-05-12 22:32:58 +02:00
Andrius Štikonas 4b6a26f0f8 Fix setting partition path when restoring partitions.
BUG: 399791
2019-05-10 02:12:07 +01:00
Andrius Štikonas e1c2ed7567
Update copyright year in about dialog. 2019-05-01 00:36:56 +01:00
Andrius Štikonas dd0adbec42
Remove unused include. 2019-04-06 17:36:25 +01:00
Shubham Jangra 5e4efa89ec Fix typo and constantify arguments
Reviewers: stikonas, cjlcarvalho, #kde_partition_manager

Reviewed By: cjlcarvalho

Subscribers: #kde_partition_manager

Tags: #kde_partition_manager

Differential Revision: https://phabricator.kde.org/D20269
2019-04-05 11:45:08 -06:00
Caio Carvalho 43da873c36 Fixing device scanning process 2019-04-03 15:37:47 -06:00
Shubham Jangra 281289dfbb Constantify nonce and some cleanup
Reviewers: stikonas, #kde_partition_manager, cjlcarvalho

Reviewed By: stikonas, #kde_partition_manager, cjlcarvalho

Subscribers: varunp, tctara, teo, abhijeet2096, caiovosilva, cjlcarvalho, #kde_partition_manager

Tags: #kde_partition_manager

Differential Revision: https://phabricator.kde.org/D20108
2019-03-29 12:00:13 -06:00
Shubham Jangra 4986b514b5 Fix typo
Reviewers: stikonas, cjlcarvalho, #kde_partition_manager

Reviewed By: cjlcarvalho, #kde_partition_manager

Subscribers: #kde_partition_manager

Tags: #kde_partition_manager

Differential Revision: https://phabricator.kde.org/D20110
2019-03-29 11:55:10 -06:00
Shubham Jangra 9c5b582ed0 Constantify function parameters
Summary: Even though constantifying these parameters won't change anything(since they are being passed by value), it is done to assure they conform to rest of the coding style

Reviewers: stikonas, cjlcarvalho, #kde_partition_manager

Reviewed By: cjlcarvalho

Subscribers: #kde_partition_manager

Tags: #kde_partition_manager

Differential Revision: https://phabricator.kde.org/D20106
2019-03-29 11:52:55 -06:00
Shubham Jangra c78b35eb41 Do not use C data type
Summary: unsigned long long is a "C" data type

Reviewers: stikonas, cjlcarvalho

Reviewed By: cjlcarvalho

Subscribers: #kde_partition_manager

Tags: #kde_partition_manager

Differential Revision: https://phabricator.kde.org/D20076
2019-03-27 10:15:10 -06:00
l10n daemon script e8d6f7bab6 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"
2019-03-05 05:54:54 +01:00
Andrius Štikonas 92065f7a23
Add a function to convert QStringList of flag names to flags.
CCBUG: 400331
2019-02-28 00:15:26 +00:00
l10n daemon script 8139d5c295 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"
2019-02-25 05:46:38 +01:00
l10n daemon script 7b93571787 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"
2019-02-24 05:28:36 +01:00
Andrius Štikonas 015f44f535
Merge branch 'aacid/kpmcore-uses_authcore' 2019-02-15 23:40:38 +00:00
Albert Astals Cid 90a6563291 Use KF5::AuthCore instead of KF5::Auth
It's a much smaller library and provides everything we need
2019-02-16 00:25:37 +01:00
Albert Astals Cid 7f6fa41bce Mark override members as such 2019-02-16 00:17:48 +01:00
Andrius Štikonas ecb78121f3
Allow moving partitions of unknown type.
This usually be safe. There is a theoretical chance that some
unknown OS fails to boot, but I'm not aware of any such cases.

BUG: 404398
2019-02-15 19:16:07 +00:00
Andrius Štikonas 39a5645c38 Explicitely specify underlying type for Capacity enums. 2019-02-10 01:43:05 +00:00
Andrius Štikonas 723b05107d
Use strongly typed enum for Capacity:Unit. 2019-02-10 00:49:36 +00:00
Andrius Štikonas 28e1308ec5
Switch to scoped name PartitionTable::Flag::
Deprecated old style enum PartitionTable::FlagName.
This will allow to switch to scoped enum class in some future version.
2019-02-09 18:04:44 +00:00
Andrius Štikonas 3df5acb9e3
Add scanDevices function that uses flags instead of bools.
Add and option to scan for loopback devices.
2019-02-09 15:40:06 +00:00
Andrius Štikonas bfa6a327af
Also print command input if KPMCORE_DEBUG is set. 2019-02-09 13:39:33 +00:00
l10n daemon script c8e401bc07 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"
2019-01-30 05:38:23 +01:00
Andrius Štikonas 5a163f8bee Detect MBR Extended LBA partitions. 2019-01-24 18:45:55 +00:00
Andrius Štikonas 559c326be7 Add detection support for Apple File System (APFS). 2019-01-13 17:34:05 +00:00
Andrius Štikonas e749b01b8e Fix a typo in filesystem support dialog.
BitLocker was mixed up with btrfs.

CCBUG: 392892
2019-01-13 13:16:44 +00:00
Andrius Štikonas 708318a5ad Add BitLocker detection support.
CCBUG: 392892
2019-01-13 02:24:18 +00:00
Andrius Štikonas 9fa20fb1e2 Remove "mv" command from allowed external command list 2019-01-12 23:18:01 +00:00
l10n daemon script 77add45499 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"
2019-01-12 05:28:24 +01:00
Andrius Štikonas 055b1fe3e5 Make device model names prettier. 2019-01-12 00:24:26 +00:00
Andrius Štikonas ca07ad5ab0 Silence RAID warnings in master. 2019-01-12 00:05:59 +00:00
Andrius Štikonas e5a20926cd Fix device names spanning two lines. 2019-01-11 23:28:40 +00:00
l10n daemon script 734ae36705 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"
2019-01-02 05:38:52 +01:00
l10n daemon script 66ded3229d 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"
2019-01-01 05:26:53 +01:00
Anthony Fieroni faca8f7f0d S.M.A.R.T. attribute 178 is same as 179
smartctl --all /dev/sda
178 Used_Rsvd_Blk_Cnt_Chip  0x0013   100   100   010    Pre-fail  Always

Differential Revision: https://phabricator.kde.org/D17683
2018-12-19 23:18:49 +00:00
l10n daemon script 8d980b56ed 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"
2018-12-19 05:44:22 +01:00
Andrius Štikonas d4f3ac62ae Use drive-removable-media-usb icon for USB devices. 2018-12-06 01:23:27 +00:00
Andrius Štikonas 80f5a32dc0 Remove remaining cases of call to dd binary.
BUG: 398154
2018-11-29 22:32:07 +00:00
Andrius Štikonas 09e4d47e07 Do not use external process dd.
BUG: 398154
2018-11-25 20:50:22 +00:00
Caio Carvalho 0e4fca8de6 Getting lsblk kname in the cases where the model name isn't available
Summary:
lsblk command does not return model name as output in some specific cases, specially when you have a micro SD in your computer (perhaps it should happen with a normal SD card as well, but I haven't tested it).

So I included a verification in SfdiskBackend::scanDevice to check for kname in lsblk and use it as the name in these cases.

Reviewers: stikonas

Reviewed By: stikonas

Tags: #kde_partition_manager

Differential Revision: https://phabricator.kde.org/D16577
2018-11-24 21:46:34 -03:00
l10n daemon script b22be9ad9a 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"
2018-11-21 05:40:59 +01:00
l10n daemon script 53d84f3d34 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"
2018-11-14 06:03:26 +01:00
Andrius Štikonas 4f3a9db348 Print commands that are being run if KPMCORE_DEBUG is set 2018-11-12 00:22:24 +00:00
Andrius Štikonas 2007f2b8ea Allow copyblocks to be used together with small QByteArrays.
Add CopyTargetByteArray. CopySourceByteArray is not implemented yet.

This is only suitable for reading small amount of data such as GPT header
or FAT boot sector location. Not meant for copying whole partition because
data has to be transfered over DBus.

Differential Revision: https://phabricator.kde.org/D16487
2018-10-29 00:02:12 +00:00
l10n daemon script 9ca63ab501 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"
2018-10-24 05:56:19 +02:00
Andrius Štikonas f260247422 Simplify return value logic. 2018-10-21 23:59:39 +01:00
l10n daemon script 3c52bcf9ab 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"
2018-10-21 05:48:52 +02:00
Andrius Štikonas d17615532a Check if PartitionNode::insert returns success. 2018-10-19 20:18:39 +01:00
Andrius Štikonas b06af11357 Fix free space handling with LVM LVs.
The previous commit worked for resizing LVM.
However, it is better to do special handling of LVMs in
insert/removePreviewPartition.

BUG: 399772
2018-10-19 19:55:35 +01:00
l10n daemon script 9fa2d194ae 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"
2018-10-15 05:37:46 +02:00
Andrius Štikonas fe27ca6f29 Also update allocated PE number when resizing LVM LVs. 2018-10-14 01:11:57 +01:00
Andrius Štikonas 3e31ec1431 Fix free space handling when resizing LVM LVs.
BUG: 399772
2018-10-14 00:02:06 +01:00
l10n daemon script 5dc4986bc9 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"
2018-10-10 06:21:45 +02:00
l10n daemon script 911d43be57 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"
2018-10-07 06:01:12 +02:00
Andrius Štikonas 4080eef0ba Set FlagBoot = FlagEsp and deprecate it. 2018-09-01 21:27:05 +01:00
Andrius Štikonas f4cd7dd953 Use C++14 style deprecated attributes. 2018-09-01 18:52:15 +01:00
Andrius Štikonas 046f17fa68 sfdisk: Make FlagEsp alias for FlagBoot 2018-09-01 18:40:10 +01:00
Caio Carvalho 7853424a62 Use std::find instead of iterating to search in allowedCommands. 2018-08-24 12:14:49 -03:00
l10n daemon script f8cdf99606 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"
2018-08-24 05:42:47 +02:00
Andrius Štikonas b893a39223 Use the same executable name in findExternal and ExecuteCommand
Even if they are symlinked, only one name was whitelisted.
2018-08-23 21:45:30 +01:00
Andrius Štikonas ee8ee70df9 Use Separate output and error channels for sfdisk --json.
Without this, error output would make json invalid.
2018-08-22 00:30:13 +01:00
Simon Depiets e74fcb29e4 Fix parameters and markers in xi18n call
Reviewers: #kde_partition_manager

Subscribers: stikonas

Tags: #kde_partition_manager

Differential Revision: https://phabricator.kde.org/D14968
2018-08-21 17:18:02 +08:00
l10n daemon script cbaf62427f 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"
2018-08-18 05:42:22 +02:00
Caio Carvalho 84c742404d Check if command string is empty in ExternalCommand::start 2018-08-16 23:42:43 +02:00
Caio Carvalho 6c703e122a Checking if the command is not an empty string. 2018-08-16 23:42:21 +02:00
l10n daemon script e743156888 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"
2018-08-16 05:29:54 +02:00
Andrius Štikonas eb099bd477 Add command whitelist to kpmcore kauth helper. 2018-08-11 20:32:02 +01:00
Andrius Štikonas 449dc1f517 Revert "Do not link to externalcommand.h in kpmcore_externalcommand"
This reverts commit 29dcd08e70.
2018-08-08 13:35:30 +00:00
l10n daemon script c23fbc0c24 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"
2018-08-08 05:44:25 +02:00
l10n daemon script b0663ba1b5 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"
2018-08-07 05:44:32 +02:00
Andrius Štikonas 29dcd08e70 Do not link to externalcommand.h in kpmcore_externalcommand 2018-08-06 20:47:53 +01:00
Harald Sitter 87dc44dab8 use QDBusServiceWatcher instead of pinging the client
Summary:
the motivation here is to terminate the "server" helper when the client
disappears. dbus supports this use case natively via service registration
events which we can easily handle via QDBusServiceWatcher.
instead of repeatedly poking the client we'll simply monitor its dbus
service now. this is cheaper, less code and doesn't risk timing out
randomly.

Test Plan:
- on neon ISO build kpmcore & calamares & pm
- calamares manages to actually partition stuff
- partitionmanager also starts properly

- also the same again on the installed system.

Reviewers: stikonas, bshah

Reviewed By: bshah

Subscribers: bshah

Differential Revision: https://phabricator.kde.org/D14646
2018-08-06 15:46:11 +02:00
l10n daemon script 4f699fbc01 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"
2018-08-06 05:33:12 +02:00
Andrius Štikonas 872715f4e0 Switch DBus calls to classes generated from XML. 2018-08-05 21:15:33 +01:00
l10n daemon script c9258f74c0 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"
2018-08-05 05:29:30 +02:00
Andrius Štikonas a7b640da4c Delay creation of QEventLoop object until after QCoreApplication starts
Fixes: QEventLoop: Cannot be used without QApplication
2018-08-03 19:49:32 +01:00
l10n daemon script 67e943713b 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"
2018-08-03 05:37:12 +02:00
l10n daemon script 5103d1fcc0 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"
2018-08-02 05:28:03 +02:00
l10n daemon script 9515090157 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"
2018-08-01 05:50:40 +02:00
Andrius Štikonas 3524977006 Fix a typo in the comment. 2018-08-01 00:58:24 +01:00
l10n daemon script 0201171956 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"
2018-07-31 05:43:22 +02:00
Andrius Štikonas 4b022c33f0 Rename "Disk Device" to Device in a user visible string.
kpmcore's enum DiskDevice is not what end user might think is Disk.
E.g. USB flash drive would also be Disk Device for kpmcore purposes.
2018-07-30 19:15:09 +01:00
Andrius Štikonas d6beb862e6 Reword description of KAuth action. 2018-07-30 19:10:12 +01:00
l10n daemon script 184702fc1a 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"
2018-07-30 05:24:01 +02:00
l10n daemon script 0ee516b2f2 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"
2018-07-29 05:31:06 +02:00
l10n daemon script 9faece8d28 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"
2018-07-28 05:33:45 +02:00
l10n daemon script 4828645e18 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"
2018-07-27 05:33:54 +02:00
Andrius Štikonas 24d9d1bd73 Merge branch 'kauth' 2018-07-25 09:37:52 +00:00
Andrius Štikonas 4fcbb540e0 Fix unallocated space calculation in the presence of LVM RAID partitions.
BUG: 396776
2018-07-24 21:39:55 +01:00
Caio Carvalho 8b28001ae2 Pausing udev events during commit of RAID partition tables to map its logical partitions. 2018-07-24 03:12:02 -03:00
Andrius Štikonas 700dddb875 Do not reassemble RAID devices after partition table commit.
Reassembling RAID devices causes devices to disappear and
reappear with a different name.
2018-07-23 22:54:11 +01:00
Caio Carvalho 4b723be585 Adding LvmDevice::s_OrphanPVs shared list to store PVs paths that are member of VGs that will be deleted soon. 2018-07-23 13:34:40 -03:00
Andrius Štikonas 75bfd09c9c Fix detection of NTFS partitions
BUG: 396749
2018-07-22 12:42:10 +01:00
Andrius Štikonas 3d6aa8c333 Remove ExternalCommand::onFinished. 2018-07-21 21:29:36 +01:00
Andrius Štikonas 2579d04229 Remove ExternalCommand::waitFor.
This is no longer used with KAuth.
ExternalCommand::start now waits until command finishes.
2018-07-21 21:19:34 +01:00
Andrius Štikonas 938ec7fa8b Make ExternalCommandHelper::getNonce() reentrant.
Store previously generated values of nonce, and remove them from
the container when they are used.

BUG: 396312
2018-07-21 11:03:25 +01:00
Andrius Štikonas c50e04c9d1 Use cryptographic nonce instead of counters. 2018-07-20 21:12:13 +01:00
Andrius Štikonas 985b353146 Use QString::back(). 2018-07-18 23:23:34 +01:00
Andrius Štikonas 3f65e94659 Return false when external command helper reports failure. 2018-07-18 21:40:39 +01:00
Caio Carvalho 64419caa8d Add chunk size for RAID 1 arrays. 2018-07-16 15:39:47 -03:00
Caio Carvalho 9138e02726 Operations should check LvmDevice::s_DirtyPVs instead of check pending CreateVolumeGroupOperations to search for newly LVM PVs. 2018-07-15 19:41:44 -03:00
Caio Carvalho c1e393240b Using QFile instead of calling ExternalCommand to read /proc/mdstat and mdadm.conf files. 2018-07-15 19:38:33 -03:00
Caio Carvalho 2298d08c41 Adding support for detecting linux_raid_member file system. 2018-07-15 17:38:43 -03:00
Caio Carvalho 3fd221f794 Ranged-for in availableInConf const copy.
All the scanned devices should be added to devices list.
2018-07-15 16:36:43 -03:00
Caio Carvalho a508cfbc83 Avoiding pointer comparison. 2018-07-15 15:51:23 -03:00
Andrius Štikonas e5b63b0d6f Fix support for QProcess::ProcessChannelMode. 2018-07-15 17:37:29 +01:00
Caio Carvalho e761c131d0 Changing prettyName for RAID devices with Resync/Recovery status. 2018-07-15 13:21:12 -03:00
Caio Carvalho f3fac7eac7 Add SoftwareRAID::Status enum.
Check for RAID before modelCommand in SfdiskBackend::scanDevice.
2018-07-15 13:11:50 -03:00
Caio Carvalho fae6cd4d61 RAID 0 devices don't need to check for resync/recovery progress. 2018-07-15 12:10:19 -03:00
Caio Carvalho dff99ffcf5 Support RAID devices which are in resync/recovery process after its creation/assemble.
Revert modelCommand.output().trimmed().isEmpty() check in SfdiskBackend::scanDevice.
2018-07-15 12:06:54 -03:00
Caio Carvalho a0b9a93b6b Support inactive RAID devices. 2018-07-15 10:31:27 -03:00
Andrius Štikonas 5828e9daac Scan LVM devices after RAID.
This should allow us to find LVM PVs that are on RAID devices.
2018-07-15 13:03:07 +01:00
l10n daemon script 79a6f5a192 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"
2018-07-15 05:17:11 +02:00
Andrius Štikonas ce425ee04d Exit if the previous KAuth helper is still running. 2018-07-15 01:13:54 +01:00
Andrius Štikonas 9a8166fe65 Remove qDebug message.
It shouldn't be necessary now. Helper exits reliably.
2018-07-15 00:35:55 +01:00
Andrius Štikonas f572681684 Partially revert 252b108660.
That commit broke LVM support.
2018-07-15 00:28:38 +01:00
Andrius Štikonas 51780a6297 Stop KAuth helper if application crashes.
This is implemented by pinging application from KAuth helper via DBus.
If it is busy  then KAuth helper also waits for the current job to finish.
2018-07-15 00:09:39 +01:00
Andrius Štikonas 65ef6ab83d Fix error message.
It was incorrectly saying DBus session bus instead of system bus.
2018-07-14 21:36:13 +01:00
Andrius Štikonas 252b108660 Abort LVM scanning when lvdisplay command fails. 2018-07-14 13:19:15 +01:00
Caio Carvalho aa23ecdc3c Software RAID devices can be created containing '/' character after 'md'. (e.g. /dev/md/alpha0) 2018-07-13 19:33:08 -03:00
Caio Carvalho 6803d6bc67 Including RAID level in SoftwareRAID device pretty name. 2018-07-13 17:56:13 -03:00
Caio Carvalho b3e0dbe15a Adding full command option for detail and stop Software RAID. 2018-07-13 16:20:38 -03:00
Caio Carvalho d8602817f0 Adding reassemble method for SoftwareRAID. 2018-07-12 14:38:52 -03:00
Caio Carvalho 3f7c5ca722 Reassemble Software RAID when commit partition table. 2018-07-12 14:08:24 -03:00
Andrius Štikonas b11b73b1e5 Remove extra semicolon after Q_UNUSED. 2018-07-12 00:12:43 +01:00
Andrius Štikonas d51404c7f1 sfdisk: fix returned partition name
This makes it work with partitions such as /dev/mmcblk1p2
2018-07-11 23:36:20 +01:00
Caio Carvalho e2f88dbbf9 Including SoftwareRAID attributes getters. 2018-07-11 12:03:44 -03:00
Caio Carvalho a2d601d512 Checking for SoftwareRAID_Device type in partition table job. 2018-07-11 12:01:26 -03:00
Caio Carvalho ab7def5e7d Changing HardwareRAID_Device to FakeRAID_Device. 2018-07-11 11:57:56 -03:00
Caio Carvalho a8b7222350 Check for SoftwareRAID devices in CreateFileSystemJob. 2018-07-10 23:04:55 -03:00
Caio Carvalho ae8987b82c Sfdisk always creates RAID logical partitions with a 'p' character before partition number. 2018-07-10 23:03:21 -03:00
Caio Carvalho 6c27d99f2c Enabling to create and delete SoftwareRAID devices' partitions. 2018-07-10 20:03:59 -03:00
Caio Carvalho 04a5e2914d Correctly showing Software RAID device partition table. 2018-07-10 19:09:22 -03:00
Caio Carvalho c03c0ddc15 Including src/core/raid subdirectory. 2018-07-09 20:48:52 -03:00
Caio Carvalho 998b1292c0 SoftwareRAID initial implementation. 2018-07-09 20:01:34 -03:00
Andrius Štikonas 9e3386a53b Static cast should be sufficient here
In the line above we already check if partition type is luks
2018-07-08 11:02:34 +01:00
Andrius Štikonas 0dd5ac25fd Revert "Remove deprecated attribute for now."
This reverts commit 4bcf9288e6.
2018-06-16 19:35:09 +01:00
l10n daemon script 11954f1185 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"
2018-06-16 05:31:52 +02:00
Andrius Štikonas dc248c3011 Merge branch 'master' into kauth 2018-06-15 20:40:29 +01:00
Caio Carvalho 358957641b Including LVM VG device scan in scanDevice in SfdiskBackend and LibPartedBackend. It was scanning only for DiskDevices. 2018-06-11 18:33:11 -03:00
l10n daemon script 7497d509f4 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"
2018-06-07 05:41:48 +02:00
Caio Carvalho 9e6cf4063a - Refactoring LVM::pvList to be a class with static QList<LvmPV> attribute instead of extern instance.
- Moving LVM VG verification in canShrink, canMove, canGrow to isLVMPVinNewlyVG method at ResizeOperation.
- Don't grow LVM PVs that are being targeted by CreateVolumeGroupOperations.
2018-05-09 04:09:17 -03:00
Caio Carvalho 6b0af70ccd Avoiding segfault in DeleteOperation and ResizeOperation. 2018-05-07 22:56:24 -03:00
Caio Carvalho 1e95d01923 - Including vgName in CreateVolumeGroupOperation description.
- Don't delete LVM PVs that are being targeted by CreateVolumeGroupOperations.
- Don't shrink or move LVM PVs that are being targeted by CreateVolumeGroupOperations.
2018-05-07 21:55:49 -03:00
Caio Carvalho 34cfc63da4 Including CreateVolumeGroupOperation::targets(const Partition&) implementation. 2018-05-03 20:48:11 -03:00
Andrius Štikonas 40f59a4870 Rename LUKS open and close Labels to "Lock" and "Unlock"
BUG: 393409
2018-04-23 11:05:44 +03:00
l10n daemon script b3a8a3874f 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"
2018-04-23 05:26:25 +02:00
Andrius Štikonas dcfb9f181f Use more C++11 initializer lists. 2018-04-23 00:09:46 +03:00
Andrius Štikonas ea664bfffc Set polkit action icon to partitionmanager. 2018-04-21 21:34:24 +03:00
Andrius Štikonas 0d29dc8a6b Fix class/struct mismatch in forward declaration. 2018-04-18 21:46:15 +03:00
Andrius Štikonas a43d5bbc5b fatresize is libparted based, so does not support FAT12. 2018-04-16 11:32:29 +03:00
Andrius Štikonas 99c14ad074 Correctly report when excutable is not found. 2018-04-16 11:06:13 +03:00
Andrius Štikonas 5814c6c02a Allow setting KAuth parent widget. 2018-04-15 01:35:29 +03:00
Andrius Štikonas 4b1793f79b Update backend name in the docs. 2018-04-15 01:09:48 +03:00
Andrius Štikonas 145f54f18c Move KAuth helper setup code to ExternalCommand class.
Delay helper startup until it is actually required.
2018-04-14 23:55:05 +03:00
Andrius Štikonas ed59aac2c8 Show error when setting file system label fails. 2018-04-13 20:21:48 +03:00
Andrius Štikonas 07458efb91 Make sure system is informed about the change of file system label. 2018-04-13 15:54:51 +03:00
Andrius Štikonas a6100aaa37 Add an error message in case of invalid signature. 2018-04-13 14:26:44 +03:00
Andrius Štikonas 231bfbd331 Cryptographically sign copyblocks and exit KAuth helper calls. 2018-04-13 14:24:05 +03:00
Andrius Štikonas 6b558f49d8 Use blockdev --rereadpt instead of partx --update. 2018-04-13 13:08:43 +03:00
Andrius Štikonas 24e1e83152 Try to fix QString encoding issues in KAuth helper.
For now set text codec to UTF-8
Needs more investigation if locale of the GUI program is not UTF-8.
2018-04-13 02:44:12 +03:00
Andrius Štikonas 71b56d27a8 Keep Capacity::Unit a simple enum, otherwise KPM fails to compile. 2018-04-13 01:29:43 +03:00
Andrius Štikonas fc4133233b Revert "Try to workaround systemd automounting."
This reverts commit 9cc583e7d5.
2018-04-13 01:06:32 +03:00
Andrius Štikonas e0be8fae83 Initialize m_Counter variable on startup. 2018-04-13 00:51:08 +03:00
Andrius Štikonas 428ee5b6c8 First attempt at using RSA to sign requests to KAuth helper. 2018-04-13 00:43:12 +03:00
Andrius Štikonas 527734e9e8 Switch JobStatus enum to scoped enum. 2018-04-12 15:18:50 +03:00
Andrius Štikonas 4bcf9288e6 Remove deprecated attribute for now.
Not available on current Neon.
2018-04-12 15:16:49 +03:00
Andrius Štikonas 0263e45251 Merge branch 'master' into kauth 2018-04-12 13:48:06 +03:00
Andrius Štikonas 4773023f75 Add migration documentation for deprecated enum values. 2018-04-12 13:47:33 +03:00
Andrius Štikonas 221d7aded6 d-pointerize ExternalCommand class. 2018-04-12 00:47:40 +03:00
Andrius Štikonas 9e107c8136 Add forgotten files. 2018-04-11 15:14:17 +03:00
Andrius Štikonas db40442744 d-pointerize Operation class. 2018-04-11 03:52:46 +03:00
Andrius Štikonas 9cc583e7d5 Try to workaround systemd automounting. 2018-04-10 23:26:44 +03:00
Andrius Štikonas dda5ddd3e6 Fix more memory leaks in SmartDiskInformation. 2018-04-09 16:16:02 +01:00
Andrius Štikonas a9a637454a Fix a memory leak in SmartParser.
CC: caiojcarvalho@gmail.com
2018-04-09 16:07:44 +01:00
Andrius Štikonas 492e3beb18 Reuse SmartStatus::SelfTestStatus enum. 2018-04-09 15:37:46 +01:00
Andrius Štikonas b5d0b500cf Reuse SmartStatus::Overall enum for SmartDiskInformation. 2018-04-09 15:27:07 +01:00
Andrius Štikonas 622def3b56 Convert more enums to scoped enums. 2018-04-09 15:14:34 +01:00
Andrius Štikonas df449ac3d4 Mark old enum values as deprecated. 2018-04-09 13:42:36 +01:00
Andrius Štikonas ee2688d4d9 Merge branch 'master' into kauth 2018-04-09 12:44:14 +01:00
Andrius Štikonas f389306964 Make sure deprecated Partition::State enums have the same values as the new ones. 2018-04-09 12:32:46 +01:00
Andrius Štikonas b42b41bdea Add a shorter Partition::State enum names.
Will be converted to enum class later.
2018-04-09 03:46:05 +01:00
Andrius Štikonas 87f0d9d0a7 micro-optimization: QStringLiteral->QLatin1Char 2018-04-09 03:18:12 +01:00
Andrius Štikonas 844f7b3d59 LvmDevice: switch away from manual pointers. 2018-04-09 03:14:30 +01:00
Andrius Štikonas 3ccd04e675 Switch Device::Type enum to enum class. 2018-04-09 02:57:45 +01:00
Andrius Štikonas 1021e375b4 Create a new d-pointer when copying Device class.
Fixes a crash in Calamares
2018-04-09 02:45:24 +01:00
Andrius Štikonas 7e8bab3b4e d-pointerize LvmDevice class. 2018-04-09 02:40:24 +01:00
Andrius Štikonas df364bdc7c Reuse the d-pointer of the base class Device for the child class DiskDevice. 2018-04-09 00:35:06 +01:00
Andrius Štikonas 210dea15de Use smart pointer for SmartStatus.
Fixes a memory leak.
2018-04-08 14:58:02 +01:00
Andrius Štikonas a71be700ba d-pointerize Device class. 2018-04-08 14:45:59 +01:00
Andrius Štikonas 2e5f0fbcb2 d-pointerize FileSystem class. 2018-04-08 01:46:08 +01:00
Andrius Štikonas 17c8772240 Explicitely specify the scope of enum. 2018-04-07 19:54:30 +01:00
l10n daemon script 6eab8757b5 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"
2018-04-06 05:23:24 +02:00
Andrius Štikonas 876c037ebf Use strongly typed enum for SmartAttributeUnit. 2018-04-05 23:06:52 +01:00
Andrius Štikonas 63cea60ff1 Replace std::array with std::vector
Less efficient but helps with keeping ABI stable
2018-04-05 21:52:17 +01:00
Andrius Štikonas 54be18e8ad Deprecate cyllinder and head count. 2018-04-02 14:12:35 +01:00
Andrius Štikonas cfa853a931 d-pointerize DiskDevice class. 2018-04-02 13:46:53 +01:00
Andrius Štikonas 0b6d91bbdb Do not install some private smart include files. 2018-04-02 13:13:16 +01:00
Andrius Štikonas 398e9c3df5 d-pointerize FstabEntry class 2018-04-01 18:46:26 +01:00
Andrius Štikonas 7ed6657e30 Restore functionality of FileSystem::findExternal
This also fixes unused variable warnings
2018-03-31 23:49:37 +01:00
Andrius Štikonas a83cb256cb Finish d-pointerizing CoreBackend class. 2018-03-31 22:08:55 +01:00