Commit Graph

1216 Commits

Author SHA1 Message Date
Tomaz Canabrava 6c14ddb043 Add new job to change permission of the newly created partition 2021-12-28 15:07:35 +00:00
Andrius Štikonas 68c8fecffd Simplify code using K_PLUGIN_CLASS_WITH_JSON macro.
Also move kpmcore plugins into separate namespace.
2021-12-24 18:58:41 +00:00
Andrius Štikonas a5bdd5a4eb Switch to ntfsinfo to read NTFS usage.
BUG: 447248
2021-12-24 00:03:05 +00:00
Andrius Štikonas 31921c59fa Fix broken fstab when mount point includes space.
fstab column width was calculated before spaces were escaped which would
result in no space between mount point and file system type columns.

BUG: 446218
2021-12-04 23:31:02 +00:00
Tomaz Canabrava 65f986dc29 Add method to query if polkit is installed correctly
The std::cout and qDebugs on the external command helper is
not visible to the user as it runs in another process via dbus
this is highly annoying if you want to be able to discover what's
wrong on the command line.

A method that checks if the file is in the right place should be
called by the users of this library
2021-11-29 11:16:33 -03:00
Albert Astals Cid 259f562698 Add CI 2021-11-28 12:55:05 +01:00
Harald Sitter c79f5831ff add metainfo file
requirement to get generated on api.kde.org
2021-11-24 10:31:41 +00:00
Harald Sitter b3d0cfccaf set cmake interface dir on the target
this carries through into the Targets.cmake file we install which in
turn means that the imported target for the consumer defines its include
directory. this removes the need to manually add the include dir

also updated the readme accordingly
2021-11-23 10:14:58 +01:00
Ben Cooksley d9339e4833 Add additional dependencies of KPMCore 2021-11-21 16:40:25 +13:00
Ben Cooksley 702b30ee3a Add CI definitions for the seed job 2021-11-21 16:24:08 +13:00
l10n daemon script 172b76fe9b GIT_SILENT made messages (after extraction) 2021-11-20 00:30:09 +00:00
Andrius Štikonas e9fc875c5e Fix seek error when filling device with random data or zeroes. 2021-11-12 01:02:34 +00:00
l10n daemon script a9998425fd 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"
2021-11-09 01:23:12 +00:00
l10n daemon script 74218e12d6 GIT_SILENT made messages (after extraction) 2021-11-09 00:19:35 +00:00
Heiko Becker 644db18c75 GIT_SILENT Upgrade release service version to 22.03.70. 2021-11-08 20:59:42 +01:00
Andrius Štikonas 282cfdcde1 Do not destroy zfs pool when removing zfs partition.
This can be dangerous, e.g. if partition is part of raid set.
So better be more cautious and in some cases fail to remove partition
than lose data.
2021-10-30 21:13:09 +01:00
Andrius Štikonas 6f2be13f68 Bump minimal cmake version to 3.16 2021-09-29 17:56:45 +01:00
l10n daemon script 2734c58069 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"
2021-09-08 01:30:14 +00:00
l10n daemon script d31f1733b6 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"
2021-09-06 01:28:56 +00:00
Artem Grinev 00e6b77c29 Initialize all fields in Partition 2021-08-29 00:16:57 +04:00
Artem Grinev f4664671d6 Clear attributes on new partition creation 2021-08-27 02:37:19 +04:00
Albert Astals Cid c47ee6cae7 GIT_SILENT Upgrade release service version to 21.11.70. 2021-07-10 20:29:09 +02:00
l10n daemon script 4c32c38655 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"
2021-07-08 01:22:49 +00:00
l10n daemon script b3050dc894 GIT_SILENT made messages (after extraction) 2021-07-08 00:20:41 +00:00
l10n daemon script f0188249e8 GIT_SILENT made messages (after extraction) 2021-05-17 00:27:08 +00:00
l10n daemon script ce39e14904 GIT_SILENT made messages (after extraction) 2021-03-27 02:33:43 +01:00
Yaroslav Sidlovsky 8746ef72fd Fix smartctl exit status success check
According to the smartctl man page:
```
EXIT STATUS
The  exit  statuses of smartctl are defined by a bitmask.  If all is well with the disk, the exit status (return value) of smartctl is 0 (all bits turned off).  If a problem occurs, or an error, potential error, or fault is detected, then a non-zero status is
returned.  In this case, the eight different bits in the exit status have the following meanings for ATA disks; some of these values may also be returned for SCSI disks.

Bit 0: Command line did not parse.

Bit 1: Device open failed, device did not return an IDENTIFY DEVICE structure, or device is in a low-power mode (see '-n' option above).

Bit 2: Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure (see '-b' option above).

Bit 3: SMART status check returned "DISK FAILING".

Bit 4: We found prefail Attributes <= threshold.

Bit 5: SMART status check returned "DISK OK" but we found that some (usage or prefail) Attributes have been <= threshold at some time in the past.

Bit 6: The device error log contains records of errors.

Bit 7: The device self-test log contains records of errors.  [ATA only] Failed self-tests outdated by a newer successful extended self-test are ignored.
```

BUG: 429028
2021-03-17 16:03:32 +03:00
Albert Astals Cid ad35460628 GIT_SILENT Upgrade release service version to 21.07.70. 2021-03-13 22:28:27 +01:00
l10n daemon script c06a188d0e GIT_SILENT made messages (after extraction) 2021-03-03 03:33:29 +01:00
Guillaume Girol 0094461f60 lvm without arguments has returncode 3 2021-02-27 12:00:00 +00:00
Andrius Štikonas ad888767bb Use QStringLiteral. 2021-02-23 21:39:41 +00:00
Oxalica -- eea84fb605 Fix out of bounds read when parsing fstab.
Some fstab files only have 3 fields and mount options are completely omitted.
2021-02-22 16:45:48 +00:00
Andrius Štikonas 36dfae351f Add initial support for dosfstools 4.2.
Empty labels are not allowed anymore.
One can reset them with -r flag but that is not supported in older
dosfstools. So for now we just manually set label to NO_LABEL.

BUG: 432941
2021-02-19 17:51:43 +00:00
Michael Weghorn 813e574001 Wipe existing signatures when creating partition table
As the sfdisk man page says on the option '--wipe' that
specifies whether or not to wipe signatures in order
to avoid collisions:

> When this option is not given, the default is auto,
> in which case signatures are wiped only when in interactive mode

but sfdisk is not run in interactive mode here, since
stdin does not refer to a terminal, and the sfdisk
man page says:

> It [i.e. sfdisk] runs in interactive mode if executed on terminal
> (stdin refers to a terminal).

Therefore, explicitly pass the '--wipe=always' option to
sfdisk so that old signatures are wiped when a new partition
table is created.

Bug: 431628
2021-01-15 09:53:20 +01:00
Andrius Štikonas 31706cffdc Fix out of bounds read when parsing fstab.
BUG: 429191
2021-01-07 01:25:12 +00:00
Andrius Štikonas 06f15334ec Add support for exfatprogs
Bug: 430907
2020-12-28 17:50:07 +00:00
l10n daemon script 338811601b GIT_SILENT made messages (after extraction) 2020-12-07 02:39:36 +01:00
Andrius Štikonas a06d4ba0f7 Return QByteArray instead of bool in readData. 2020-11-29 23:34:29 +00:00
Andrius Štikonas 73da1bc514 Only allow using ReadData on block devices. 2020-11-29 23:24:49 +00:00
Andrius Štikonas b0e5fa66c4 Add an explicit ReadData method to polkit helper instead of relying on copyblocks with empty target device. 2020-11-29 23:14:08 +00:00
Andrius Štikonas 502ebc0474 Remove declaration of non-existing method. 2020-11-29 22:42:19 +00:00
Andrius Štikonas 04a095a542 Simplify find syntax. 2020-11-29 13:49:50 +00:00
Andrius Štikonas 5da47c26e9 Replace array with unordered set for better performance. 2020-11-29 13:48:07 +00:00
Andrius Štikonas 551654de0d Also rename source/targetFirstByte ot offsets in function declarations. 2020-11-29 13:08:53 +00:00
Andrius Štikonas d34b617272 Rename source/targetFirstByte to source/targetOffset.
Add some diagrams explaining difference between
source/targetOffsets and read/writeOffset.
2020-11-29 01:54:48 +00:00
Andrius Štikonas ee0a1e1b41 Add a limit on the amount of data that can be passed back via DBus. 2020-11-29 01:08:43 +00:00
Andrius Štikonas c556f39064 Add a limit on blocksize to prevent out-of-memory situation. 2020-11-29 00:58:55 +00:00
Andrius Štikonas 9dd38744c5 Add a comment about auth_admin_keep. 2020-11-29 00:50:57 +00:00
Andrius Štikonas 4fa91d75f3 externalcommandhelper: Do not commit suicide when attempting to run non whitelisted command.
Simply returning failure should be sufficient.
2020-11-26 23:35:52 +00:00
Andrius Štikonas 32d146eed3 externalcommandhelper: Make copy direction an enum. 2020-11-26 23:26:31 +00:00