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
akonadi-26.08.2.tar.xz(1.7 MiB)
sha25685746817161152a3c887c32caabaf2163396796f2ad8fc3ac638e2c91f4b0fbd
upstream: https://download.kde.org/stable/release-service/26.08.2/src/akonadi-26.08.2.tar.xz
archive copy: sources-3/pim--akonadi-26.08.2.tar.xz
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:
-Wl,-z,stack-size=1048576— Give every thread of the programs this port links a 1 MiB stack. The server walks mail threads recursively, and musl’s default thread stack, 128 KiB, overflows on a long thread and crashesakonadiserver. musl takes the size from the executable’sPT_GNU_STACKheader, which this linker flag writes; Alpine builds the same port with it.-D DATABASE_BACKEND=SQLITE— Store the data in SQLite. It is upstream’s default, and the one backend KDOS can run: the server reaches SQLite through Qt’sQSQLITEdriver, which qt6-qtbase builds against the system sqlite, and there is no MariaDB or MySQL port. Passing it keeps a change of upstream’s default from switching the backend without notice.-D INSTALL_APPARMOR=OFF— Install no AppArmor profiles. Upstream’s default writes four under/etc/apparmor.d, for a security module KDOS does not use.-D BUILD_PYTHON_BINDINGS=OFF— Build no Python bindings. Upstream’s default is on, and the configure then requires Shiboken6 and PySide6, which are not ports.-D BUILD_DESIGNERPLUGIN=OFF— No Qt Designer plugin for the Akonadi widgets. It is a tool for people writing PIM programs, and Qt Designer is not independs.-D BUILD_TOOLS=OFF— Build none of upstream’s test tools:akonaditest, theknuttest resource andakonadi_test_searchplugin. On, they install with the rest, and the test search plugin lands in the directory the server loads its search plugins from.-D CMAKE_REQUIRE_FIND_PACKAGE_LibXml2=ON— Make libxml2 a requirement. Upstream finds it as optional and buildsKPim6AkonadiXml, the library that reads and writes Akonadi’s XML collection format, without schema validation otherwise.-D KF_SKIP_PO_PROCESSING=ON— Builds none of the interface translations, which kpkg’s English-only rule would remove from the package anyway (see Size and language policy).
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.