After 1.5 years in development I would like to announce a new version of KDE Partition Manager and KPMcore library.

The main highlight of this release is that GUI does not need to run as root user. Instead we use KAuth framework (note that in the future we plan to use lower level Polkit API directly but this work is not started yet). GUI runing as unprivileged user also makes our Wayland port work perfectly fine. As part of porting Partition Manager to KAuth we also did the following ports:

  • KPMcore backend was ported away from libparted to sfdisk (part of util-linux). Many thanks to util-linux maintainer Karel Zak who promptly fixed most of the sfdisk bugs that I noticed during porting.
  • Caio Jordão Carvalho ported S.M.A.R.T. code away form unmaintained libatasmart to smartmontools.

These two ports make KPMcore and KDE Partition Manager more portable. In the near future we might see port to FreeBSD.

Other changes include:

  • Better support for LUKS2. Now we can resize LUKS2 containers as long as they don’t use advanced features like dm-integrity. At the moment KDE Partition Manager still creates LUKS1 encrypted partitions (LUKS2 creation is not exposed in the GUI) but KPMcore has code to create LUKS2 encrypted partitions, so other users of KPMcore library (like Calamares installer) will be able to implement LUKS2 creation using KPMcore 4.0.
  • Detection support for Apple’s APFS filesystem and Microsoft’s Bitlocker.
  • Many of the KPMcore classes now use d-pointers, which in the future releases will help us to maintain binary compatibility (ABI) a bit better.
  • We now use more modern C++ features. This won’t be visible to users but it’s always good to have a more maintainable codebase.
  • Some bugfixes, in particular related to LVM.

List of all changes can be found in commit log at

https://invent.kde.org/kde/kpmcore

https://invent.kde.org/kde/partitionmanager

Downloads:

https://download.kde.org/stable/kpmcore/4.0.0/src/

https://download.kde.org/stable/partitionmanager/4.0.0/src/

Become a patron Donate using Liberapay Bitcoin: bc1qe2dfqjwgse5v6cl6rhtk352ru90t0hnve45f2c

KDE Partition Manager 3.3 is now ready. It includes some improvements for Btrfs, F2FS, NTFS file systems. I even landed the first bits of new LUKS2 on-disk format support, now KDE Partition Manager can display LUKS2 labels. More LUKS2 work will follow in KPM 3.4. There were changes in how LVM devices are detected. So now Calamares installer should be able to see LVM logical volumes. Once my pull request lands, Calamares should also support partitioning operations on LVM logical volumes (although Calamares would need more work before installation and booting from root file system on LVM works. I tested Calamares with KPMcore 3.3 and it successfully installed rootfs in LVM volume and successfully booted). KPMcore library now only depends on Tier 1 Frameworks instead of Tier 3 (although, we will later require Tier 2).

Most of the work is now done in sfdisk branch.  Currently, the only functional KDE Partition Manager backend uses libparted but sfdisk backend is now fully working (I would say RC quality). I would have merged in already but it requires util-linux 2.32 which is not yet released.

Yet another branch on top of sfdisk is KAuth branch which allows KPM to run as unprivileged user and uses Polkit when necessary to gain root rights. Everything except SMART support is working. To get SMART working too we would have to port away from (unmaintained) libatasmart to calling smartctl. Feel free to help! It should be fairly easy task but somebody has to do the work. Other than that you can already perform all partitioning operations using KAuth with one caveat. Right now KPM calls KAuth helper many times while performing partitioning operations. It can happen that KAuth authorization will expire in the meantime (KAuth remembers it for about 5 minutes) and KAuth will request a user to enter root password. If the user enters correct password, operation would finish. However, if authorization is not granted we may end up with half completed operation. And of course we don’t want to leave partition half moved, the data will almost surely be lost (half-resized partition is probably okay…). I suppose we can fix this by refactoring KPM operation runner, so that it calls KAuth helper just once with a list of all commands that have to be run. Unfortunately, this KPM Operation Runner refactoring might be bigger than what I would like, as significant changes would be necessary in partition data copying code. Maybe GSoC project then… Or ar there any better ideas on how to prevent KAuth authorization dialog in the middle of partitioning operations?

You can grab tarballs from standard locations on download.kde.org server.