Commit Graph

1037 Commits

Author SHA1 Message Date
Andrius Štikonas 85396708f4 Use Qt::SplitBehavior
Old version QString::SplitBehavious is now deprecated.
2020-10-13 01:23:29 +01:00
Andrius Štikonas d3ebabb6cb Move find_package to top level CMakeLists.txt. 2020-10-13 00:10:03 +01:00
Andrius Štikonas cf5ff51832 Remove unused applicationinterface DBus interface. 2020-10-12 21:49:07 +01:00
Andrius Štikonas e085ba9ed9 Do not link to KAuth. But there is still a build time dependency on kauth-policy-gen. 2020-10-12 20:23:37 +01:00
Andrius Štikonas 6cff70567b Fix signals between helper and client. 2020-10-12 20:23:37 +01:00
Andrius Štikonas cd4d9b1985 Rename helper interfaces. 2020-10-12 20:23:37 +01:00
Andrius Štikonas a2ee82e021 Simplify createFile function, it was checking for authorization twice. 2020-10-12 20:23:37 +01:00
Andrius Štikonas 2dff59260c Remove exit call from the helper. It is no longer used.
BUG: 412887
2020-10-12 20:23:04 +01:00
Andrius Štikonas 89bd4eb6c7 Store successful polkit authentication requests.
We need this to avoid multiple authentication requests when applying
long operations.

Otherwise, the user will have to authenticate after each job,
which can mean up to 4 password dialogs for some longer operations.
2020-10-12 20:22:48 +01:00
Andrius Štikonas 424c8f0bf0 Update comment describing kpmcore_externalcommandhelper. 2020-10-12 20:18:55 +01:00
David Edmundson f646b507ae Fix a crash. 2020-10-12 20:18:55 +01:00
Andrius Štikonas 296f281ffb WIP: cleanup polkit port: licenses, dead code and kauth removal, add TODO about signals. 2020-10-12 20:18:55 +01:00
David Edmundson edfabb90dc WIP: port to polkit 2020-10-12 20:18:55 +01:00
Adriaan de Groot 08c1acb6b4 Missing include (clang/FreeBSD triggers this) 2020-10-10 21:59:57 +02:00
Andrius Štikonas 7ecdaf3ac8 Fix resizing of fat partitions.
Workaround a bug in fatresize (or libparted) where resizing to
partition length failed. Instead try to resize to length - 1.

BUG: 407834
2020-10-04 22:21:58 +01:00
Andrius Štikonas 4819eec59b Allow moving partitions with unknown file system.
BUG: 404398
2020-10-04 21:18:08 +01:00
Andrius Štikonas 924830ebbd When falling back to blkid for filesystem type detection, distinguish between FAT16/32.
CCBUG: 418253
2020-10-04 18:34:00 +01:00
Andrius Štikonas d396e56694 Add support for importing "PartitionTable" of whole device filesystems. 2020-10-04 15:20:58 +01:00
Andrius Štikonas 034311a7cc Add support for whole disk file systems.
BUG: 400652
2020-10-03 15:14:51 +01:00
Andrius Štikonas 0910875137 Do not delete partitions when we have no partition table. 2020-10-03 14:15:10 +01:00
Andrius Štikonas 9ca3a5740a Add information about PartitionTable::TableType::none. 2020-10-03 14:03:59 +01:00
Andrius Štikonas 779cc6cfb7 Split scanPartition function from scanDevicePartitions. 2020-10-03 13:25:05 +01:00
Andrius Štikonas de346177b5 Do not allow moving partitions without partition table. 2020-10-03 12:41:18 +01:00
Andrius Štikonas 81f8939cb1 Add a new type of partition table "none".
This would be useful for block devices without partition table.
2020-10-03 12:39:26 +01:00
Andrius Štikonas 26b352180b Reword a comment. 2020-10-03 12:38:40 +01:00
Andrius Štikonas 30bd4d62a9 Add blkid fallback for file system detection if udev method fails. 2020-10-02 23:12:33 +01:00
Andrius Štikonas ae05c031b7 Further splitting of detectFileSystem function. 2020-10-02 23:00:40 +01:00
Andrius Štikonas ba05f99720 Split detectFileSystem function in sfdiskbackend into two smaller functions. 2020-10-02 22:37:51 +01:00
Andrius Štikonas b97fd0eeaa rename jsonCommand variable to sfdiskJsonCommand. 2020-10-02 17:35:23 +01:00
Andrius Štikonas 0c25d1f9c4 Use QFile::decodeFileName for decoding device node names.
BUG: 384321
2020-10-01 23:51:59 +01:00
Andrius Štikonas d68ffeadef REUSE: SPDX style license headers for src/util. 2020-10-01 00:33:19 +01:00
Andrius Štikonas be4d032f8b REUSE: SPDX style license headers for src/plugins. 2020-09-30 23:58:54 +01:00
Andrius Štikonas 8b10771327 REUSE: SPDX style license headers for src/ops. 2020-09-30 23:28:47 +01:00
Andrius Štikonas f7eb6eec5d REUSE: SPDX license headers for src/jobs. 2020-09-29 23:55:11 +01:00
Andrius Štikonas b592dd1a74 REUSE: SPDX license headers for src/gui. 2020-09-29 00:01:24 +01:00
Andrius Štikonas 8534265421 REUSE: SPDX headers for src/fs/*. 2020-09-28 00:51:18 +01:00
Andrius Štikonas 11bb5799ec REUSE: SPDX license headers for backend and core folders. 2020-09-20 20:33:16 +01:00
Andrius Štikonas 51996bd3fa Switch Messages.sh license to MIT. 2020-09-18 11:45:35 +01:00
Andrius Štikonas fc826690b9 SPDX licenses for tests and CMakeLists.txt. 2020-09-17 02:15:16 +01:00
Andrius Štikonas c5c21849b9 Compile kpmcore with QT_NO_KEYWORDS. 2020-09-15 02:36:46 +01:00
Andrius Štikonas fbe54e21f3 Merge branch 'fstab' 2020-09-15 01:09:38 +01:00
Andrius Štikonas ba46ea64ba defaults option in fstab is not necessary, e.g. defaults,ro is the same as defaults. 2020-09-14 02:25:36 +01:00
Andrius Štikonas a928c62a7d Make fstab parsing slightly more readable. 2020-09-14 02:19:14 +01:00
Andrius Štikonas 1d195b00da Prettier formatting of fstab file. 2020-09-14 02:15:20 +01:00
Andrius Štikonas 1782a9d4bb Port away from deprecated QTime::elapsed. 2020-09-13 17:25:51 +01:00
Andrius Štikonas 2ed9953694 Simplify some External Command functions. 2020-09-11 20:27:24 +01:00
Andrius Štikonas 5b80c6045c Fix fstab editing functionality.
In the old code QByteArray fstabContents was actually empty.
Also, writeData function was opening file in append mode,
thus nothing was actually written.

Split writeData function into two:
  * one for block devices
  * another for writing fstab file

BUG: 417205
2020-09-10 23:54:23 +01:00
Adriaan de Groot 45bd205e79 Typofix: the function was half-renamed before the merge 2020-09-01 13:44:22 +02:00
Andrius Štikonas 997e8df183 Add a note about json fixes in util-linux 2.37 2020-08-28 22:41:43 +01:00
Adriaan de Groot 6aa9d93728 Workaround bad JSON output from sfdisk.
The output of `sfdisk --json /dev/sdb` is not necessarily
valid JSON. Then, no partition information is stored,
no first-valid-lba in particular. This leads to new partitions
being made from sector 0, which is invalid on a GPT table.

The workaround is to manually fix the known-broken JSON
from sfdisk. This is amply documented in a standalone
static function.

FIXES #425097
2020-08-24 22:53:54 +02:00