257.44. kauth-6.31.0
KDE Frameworks: execute actions as a privileged user through polkit
6.31.0-1 · LGPL-2.1-or-later · 2.0 SBU · 549.2 KiB, 32 files · 43_toolkits, 111 of 344 · ports/core/kf6/kauth
Homepage: https://invent.kde.org/frameworks/kauth
Why it is in KDOS. The comment above the 61 ports from karchive to kfilemetadata in script/phases/43_toolkits/packages.d/kf6.txt:
The libraries KDE applications are built on, without Plasma.
KAuth lets a KDE program run one action as root without running as root itself: the program asks for a named action, polkit decides whether the user may perform it, and a small helper program, started on the system bus, performs it and reports back. kauth-policy-gen writes the polkit policy file for a program’s actions at build time. ktexteditor saves files the user does not own through it, and so do the system settings pages that change machine configuration.
Depends on: cmake, ninja, extra-cmake-modules, qt6-qtbase, kcoreaddons, kwindowsystem, polkit-qt6.
Required by (18): k3b, kalarm, kcron, kde-inotify-survey, kdenetwork-filesharing, kdeplasma-addons, kinfocenter, ktexteditor, kwalletmanager, kwin, libksysguard, plasma-desktop, plasma-disks, plasma-setup, plasma-workspace, powerdevil, sddm-kcm, systemsettings.
Sources: kauth-6.31.0.tar.xz (2.2 MiB). Every step kpkg takes applies to this port.
Install: script/chroot/exec.sh bash -c 'source script/phases/43_toolkits/phase.env && kpkg install kauth'
build.sh:
cmake -S . -B build -G Ninja \
-D CMAKE_INSTALL_PREFIX=/usr \
-D KDE_INSTALL_LIBDIR=lib \
-D CMAKE_BUILD_TYPE=Release \
-D KDE_INSTALL_USE_QT_SYS_PATHS=ON \
-D KF_SKIP_PO_PROCESSING=ON \
-D BUILD_TESTING=OFF \
-D KAUTH_BACKEND_NAME=PolkitQt6-1 \
-D KAUTH_HELPER_BACKEND_NAME=DBus \
-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
[ -n "$(find "$PKG" -name kauth_backend_plugin.so)" ] || {
echo 'kauth: the polkit backend was not built' >&2
exit 1
}
-D KAUTH_BACKEND_NAME=PolkitQt6-1— Build the polkit backend, through polkit-qt6. Left unset, upstream picks polkit only when the configure finds it and otherwise builds theFAKEbackend, which refuses every action, with no error; named, a missing polkit-qt6 still falls back toFAKEwith a warning, which is whybuild.shchecks after the install thatkauth_backend_plugin.sois in the package and fails the build if it is not.-D KAUTH_HELPER_BACKEND_NAME=DBus— Build the helper side over D-Bus: the helper is a system-bus service started by D-Bus activation for each action, the only helper backend upstream has on Linux.-D KF_SKIP_PO_PROCESSING=ON— Build none of the Qt translation catalogues underpoqm/, whichecm_install_po_files_as_qm()would compile into.qmfiles. The strings in the source are English, and the package-wide English-only rule (see Size and language policy) would remove every catalogue in another language.
Libraries: libKF6AuthCore.so.
Directories: /usr/include/KF6/KAuth, /usr/include/KF6/KAuthCore, /usr/lib/cmake/KF6Auth, /usr/lib/qt6/plugins/kf6/kauth, /usr/share/kf6/kauth, /usr/share/licenses/kauth.
The polkit backend requires kwindowsystem, which passes the asking window to the polkit agent so its dialog opens over it.