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

333.2. qownnotes-26.9.13

Plain-text Markdown notes with a live preview, to-do lists and optional Nextcloud sync

Version 26.9.13, release 1
Shelf pim — Personal information: calendars, contacts, tasks, time tracking, notes and genealogy
Phase 44_apps (Applications), 324 of 422 in build order
Licence GPL-2.0-only AND MIT AND BSD-2-Clause AND BSD-3-Clause AND LGPL-2.1-or-later AND LGPL-3.0-only AND Apache-2.0 AND GPL-3.0-only WITH Qt-GPL-exception-1.0
Homepage https://www.qownnotes.org/
Build time 47.6 SBU
Installed size 15.6 MiB in 13 files
Recipe ports/core/pim/qownnotes/kpkgbuild

About

QOwnNotes is a Qt 6 note-taking program that keeps notes as plain Markdown files in a folder, with a live HTML preview, to-do lists, and optional synchronisation with a Nextcloud or ownCloud server. Passwords for those servers are kept in the Secret Service through libsecret.

Sources

Dependencies

Depends on: cmake, ninja, qt6-qtbase, qt6-qtsvg, qt6-qtdeclarative, qt6-qttools, qt6-qtwebsockets, qt6-qtwayland, libsecret.

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 qownnotes'

What kpkg does

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

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/qownnotes
echo '0a017596de225309757728d38255ef9427eade4be0596d1eab642dc70773478d  qownnotes-26.9.13.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/qownnotes
SRC=$SRC_ROOT/qownnotes-26.9.13
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf qownnotes-26.9.13.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/no-telemetry-no-update-check.patch"

cmake -S . -B build -G Ninja \
	-D CMAKE_POLICY_VERSION_MINIMUM=3.5 \
	-D CMAKE_BUILD_TYPE=Release \
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D QON_QT6_BUILD=ON \
	-D BUILD_WITH_SYSTEM_BOTAN=OFF \
	-D BUILD_WITH_LIBGIT2=OFF \
	-D BUILD_WITH_ASPELL=OFF \
	-D USE_QLITEHTML=ON \
	-Wno-dev
grep -q '^LIBSECRET_FOUND:INTERNAL=1' build/CMakeCache.txt || {
	echo 'qownnotes: libsecret-1 was not found; passwords could not be stored' >&2
	exit 1
}
cmake --build build
DESTDIR=$PKG cmake --install build

rm -rf "$PKG/usr/share/QOwnNotes/translations"

rm -f "$PKG/usr/share/applications/PBE.QOwnNotes.desktop"
cat > "$PKG/usr/share/applications/PBE.QOwnNotes.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=QOwnNotes
GenericName=Markdown Notes
Comment=Plain-text Markdown notes with a live preview
Exec=QOwnNotes
Icon=QOwnNotes
Terminal=false
StartupNotify=true
StartupWMClass=PBE.QOwnNotes
Categories=Qt;Utility;TextEditor;
Keywords=markdown;notes;todo;journal;nextcloud;owncloud;
DESKTOP
chmod 644 "$PKG/usr/share/applications/PBE.QOwnNotes.desktop"

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

Contents

Installed programs: QOwnNotes.

Installed directories: /usr/share/QOwnNotes, /usr/share/licenses/qownnotes.

Notes

QtKeychain, FakeVim, litehtml, md4c and the rest under libraries/ are compiled from those copies; apart from Botan, the build has no switch to take any of them from the system.

libsecret is looked up with no switch, and without it QtKeychain cannot reach the Secret Service, so passwords could not be stored. build.sh checks LIBSECRET_FOUND in CMakeCache.txt after the configuration and stops the build if it is missing.

The translations under /usr/share/QOwnNotes/translations are removed: English is the source text of the interface.

build.sh replaces upstream’s desktop entry. setDesktopFileName makes the Wayland app id PBE.QOwnNotes, not upstream’s QOwnNotes, and the new entry names it in StartupWMClass.