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

296.2. keepassxc-2.7.12

Password manager — KeePass databases, TOTP, SSH agent, browser integration and the Secret Service

Version 2.7.12, release 1
Shelf security — Security applications: GnuPG and front-ends, password and secret managers, certificates, scanners, forensics and audit
Phase 44_apps (Applications), 360 of 422 in build order
Licence GPL-2.0-only OR GPL-3.0-only
Homepage https://keepassxc.org/
Build time 16.3 SBU
Installed size 27.2 MiB in 37 files
Recipe ports/core/security/keepassxc/kpkgbuild

About

KeePassXC is a password manager for KeePass (.kdbx) databases. Besides passwords it keeps one-time-password (TOTP) secrets, can hold SSH keys for a running SSH agent, fills logins into a browser through the keepassxc-browser extension, and can serve its database as the desktop’s Secret Service, the D-Bus API through which other programs store their own passwords. It is a Qt 5 program. It also ships keepassxc-cli and keepassxc-proxy, the browser extension’s native-messaging helper.

Sources

Dependencies

Depends on: cmake, ninja, qt5-qtbase, qt5-qtsvg, qt5-qttools, qt5-qtx11extras, qt5-qtwayland, libX11, libXi, libXtst, botan, argon2, zlib, minizip, qrencode, readline, pcsc-lite, libusb, asciidoctor.

Required by: no port names it.

Patches

build.sh applies these; kpkg applies nothing by itself.

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/44_apps/phase.env && kpkg install keepassxc'

What kpkg does

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

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/security/keepassxc
echo 'be34eeb297881adea4f894c7c6e4a1835bd7927f8043ddea495040df4792a7de  keepassxc-2.7.12.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/keepassxc
SRC=$SRC_ROOT/keepassxc-2.7.12
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf keepassxc-2.7.12.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:

patch -p1 -i "$PORT_SRC/app-id.patch"

cmake -S . -B build -G Ninja \
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D CMAKE_INSTALL_LIBDIR=lib \
	-D CMAKE_BUILD_TYPE=Release \
	-D KEEPASSXC_BUILD_TYPE=Release \
	-D WITH_TESTS=OFF \
	-D WITH_GUI_TESTS=OFF \
	-D WITH_XC_DOCS=ON \
	-D WITH_XC_UPDATECHECK=OFF \
	-D WITH_XC_NETWORKING=OFF \
	-D WITH_XC_FDOSECRETS=ON \
	-D WITH_XC_AUTOTYPE=ON \
	-D WITH_XC_X11=ON \
	-D WITH_XC_BROWSER=ON \
	-D WITH_XC_BROWSER_PASSKEYS=ON \
	-D WITH_XC_SSHAGENT=ON \
	-D WITH_XC_KEESHARE=ON \
	-D WITH_XC_YUBIKEY=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_Readline=ON \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build

find "$PKG/usr/share/keepassxc/translations" -name 'keepassxc_*.qm' \
	! -name 'keepassxc_en.qm' ! -name 'keepassxc_en_US.qm' ! -name 'keepassxc_en_GB.qm' \
	-delete

install -d "$PKG/usr/lib/mozilla/native-messaging-hosts"
cat > "$PKG/usr/lib/mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json" <<'JSON'
{
    "name": "org.keepassxc.keepassxc_browser",
    "description": "KeePassXC integration with native messaging support",
    "path": "/usr/bin/keepassxc-proxy",
    "type": "stdio",
    "allowed_extensions": [
        "keepassxc-browser@keepassxc.org"
    ]
}
JSON
chmod 644 "$PKG/usr/lib/mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json"

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/keepassxc, 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 keepassxc-2.7.12-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/keepassxc, and runs the triggers its paths call for.

Contents

Installed programs: keepassxc, keepassxc-cli, keepassxc-proxy.

Installed directories: /usr/lib/keepassxc, /usr/share/keepassxc, /usr/share/licenses/keepassxc.

Short descriptions

keepassxc a modern open-source password manager
keepassxc-cli command line interface for the KeePassXC password manager

Notes

build.sh deletes every translation catalogue under /usr/share/keepassxc/translations except the English ones. kpkg’s size and language policy removes the same catalogues from every package it makes, so the line does not change what ships.

It also writes /usr/lib/mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json, the system-wide native-messaging manifest Firefox reads, which names /usr/bin/keepassxc-proxy and allows only the keepassxc-browser extension. KeePassXC can write a per-user manifest from its own browser-integration settings; the system one means Firefox finds the proxy without that step.

KeePassXC draws its own light or dark style, with its own palette, unless its setting GUI/ApplicationTheme is classic; its default, auto, replaces the palette qt5ct gives every Qt 5 program, so the window would show KeePassXC’s grey in every accent. The account skeleton therefore ships ~/.config/keepassxc/keepassxc.ini with ApplicationTheme=classic (see Theming native applications). KeePassXC reads that file at start and writes it back with every setting changed in its own window.