Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

269.1. akonadi-26.08.2

KDE PIM storage service: the Akonadi server, its agent framework and its client libraries

Version 26.08.2, release 1
Shelf pim — Personal information: calendars, contacts, tasks, time tracking, notes and genealogy
Phase 43_toolkits (Toolkits), 207 of 344 in build order
Licence LGPL-2.0-or-later AND LGPL-2.1-or-later AND GPL-2.0-or-later AND (GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL) AND (LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL) AND LGPL-2.0-only AND BSD-2-Clause AND BSD-3-Clause AND CC0-1.0 AND MIT
Homepage https://invent.kde.org/pim/akonadi
Build time 11.0 SBU
Installed size 17.9 MiB in 398 files
Recipe ports/core/pim/akonadi/kpkgbuild

About

Akonadi is the storage service under the KDE PIM applications. akonadiserver keeps every mail folder, address book and calendar in one database and serves it to clients over a private socket; akonadi_control starts the server and the agents (the resources that talk to IMAP, CalDAV or a local file, and the indexers) and restarts them when they fail. The port also carries the client libraries every PIM program links (KPim6AkonadiCore, …Widgets, …AgentBase, …Xml, the QML module org.kde.akonadi) and akonadictl, which starts, stops and checks the server from a shell.

Sources

Dependencies

Depends on: cmake, ninja, extra-cmake-modules, qt6-qtbase, qt6-qtdeclarative, kconfig, kconfigwidgets, kcoreaddons, ki18n, kiconthemes, kitemmodels, kwidgetsaddons, kxmlgui, kcrash, kcolorscheme, xz, shared-mime-info, libxslt, libxml2, kirigami, kirigami-addons.

Required by (25): akonadi-calendar, akonadi-calendar-tools, akonadi-contacts, akonadi-import-wizard, akonadi-mime, akonadi-search, akonadiconsole, calendarsupport, eventviews, incidenceeditor, kaddressbook, kalarm, kdepim-addons, kdepim-runtime, kmail, kmail-account-wizard, korganizer, mailcommon, mailimporter, mbox-importer, merkuro, messagelib, pim-data-exporter, pimcommon, zanshin.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/43_toolkits/phase.env && kpkg install akonadi'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/pim/akonadi.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/pim/akonadi
echo '85746817161152a3c887c32caabaf2163396796f2ad8fc3ac638e2c91f4b0fbd  akonadi-26.08.2.tar.xz' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/akonadi
SRC=$SRC_ROOT/akonadi-26.08.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf akonadi-26.08.2.tar.xz -C "$SRC" --strip-components=1

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

export LDFLAGS="$LDFLAGS -Wl,-z,stack-size=1048576"

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 BUILD_TESTING=OFF \
	-D KF_SKIP_PO_PROCESSING=ON \
	-D DATABASE_BACKEND=SQLITE \
	-D INSTALL_APPARMOR=OFF \
	-D BUILD_PYTHON_BINDINGS=OFF \
	-D BUILD_DESIGNERPLUGIN=OFF \
	-D BUILD_TOOLS=OFF \
	-D CMAKE_REQUIRE_FIND_PACKAGE_LibXml2=ON \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
rm -rf "$PKG/usr/lib/systemd"

The switches, and why each is set:

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/akonadi, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf akonadi-26.08.2-1.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/akonadi, and runs the triggers its paths call for.

Contents

Installed programs: akonadi-db-migrator, akonadi2xml, akonadi_agent_launcher, akonadi_agent_server, akonadi_control, akonadi_rds, akonadiagentconfigdialog, akonadictl, akonadiselftest, akonadiserver, asapcat.

Installed libraries: libKPim6AkonadiAgentBase.so, libKPim6AkonadiAgentWidgetBase.so, libKPim6AkonadiCore.so, libKPim6AkonadiPrivate.so, libKPim6AkonadiWidgets.so, libKPim6AkonadiXml.so.

Installed directories: /etc/xdg/akonadi, /usr/include/KPim6/Akonadi, /usr/include/KPim6/AkonadiAgentBase, /usr/include/KPim6/AkonadiAgentWidgetBase, /usr/include/KPim6/AkonadiCore, /usr/include/KPim6/AkonadiWidgets, /usr/include/KPim6/AkonadiXml, /usr/lib/cmake/KPim6Akonadi, /usr/share/licenses/akonadi.

Notes

The install puts a systemd user unit, akonadi_control.service, under /usr/lib/systemd; build.sh removes the directory, since KDOS has no systemd (see No systemd). The server is started without it: the D-Bus service file org.freedesktop.Akonadi.Control.service names akonadi_control in its Exec= line, so the session bus starts it the first time a PIM program asks for it. Nothing in the default session asks, because Thunderbird is the default mail, calendar and contacts program, so no Akonadi server runs until somebody opens KMail, KOrganizer, KAddressBook or Merkuro.

The two files the install puts under /etc/xdg/akonadi, mysql-global.conf and mysql-global-mobile.conf, are the server’s MySQL settings. They ship with every backend and are read only when the backend is MySQL, so on KDOS nothing reads them.

xsltproc from libxslt generates the server’s database schema code and D-Bus interfaces at build time, and the configure stops without it. The MIME types the server stores are registered through shared-mime-info.

The two desktop entries, org.kde.akonadi.desktop and org.kde.akonadi.configdialog.desktop, are both NoDisplay=true: the first names the PIM suite for notifications, the second is the agent configuration dialog the applications open. The QML module imports kirigami and kirigami-addons at run time, which is why both are in depends.

musl has no malloc_trim(); the configure checks for it with check_symbol_exists and the server leaves out the call that returns freed memory to the system after a large sync.