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

156.17. qrupdate-1.2.0

QR and Cholesky factorisation updates — Octave's qrupdate, cholupdate and friends

Version 1.2.0, release 1
Shelf sci-libs — Numerical and scientific-data libraries, and the unprefixed core Python science stack
Phase 41_system (System), 894 of 1047 in build order
Licence GPL-3.0-or-later
Homepage https://github.com/mpimd-csc/qrupdate-ng
Build time 0.1 SBU
Installed size 461.0 KiB in 13 files
Recipe ports/core/sci-libs/qrupdate/kpkgbuild

About

qrupdate is a Fortran library of fast updates to QR, Cholesky and LU factorisations: after a rank-one change, or a row or column inserted or deleted, it recomputes the factors from the old ones instead of from scratch. octave links it for its qrupdate, cholupdate, qrinsert, qrdelete and related functions. The source is qrupdate-ng, a maintained fork of Jaroslav Hajek’s original library with a CMake build. It installs the same libqrupdate, so Octave’s configure finds it as -lqrupdate; it calls BLAS and LAPACK, which here are openblas.

Sources

Dependencies

Depends on: cmake, ninja, gcc, openblas.

Required by (1): octave.

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/41_system/phase.env && kpkg install qrupdate'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/sci-libs/qrupdate.

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/sci-libs/qrupdate
echo '452f1fe58ca5ad42f8bb6e11a86c28f94baf852a38699ddd44c00d11ae0b7c0b  qrupdate-1.2.0.tar.gz' | 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/qrupdate
SRC=$SRC_ROOT/qrupdate-1.2.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf qrupdate-1.2.0.tar.gz -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/pc-openblas.patch"

cmake -S . -B build -G Ninja \
	-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DCMAKE_INSTALL_LIBDIR=lib \
	-DBUILD_SHARED_LIBS=ON \
	-DBLA_VENDOR=OpenBLAS \
	-DINTEGER8=OFF \
	-DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON
cmake --build build
DESTDIR=$PKG cmake --install build

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

Contents

Installed libraries: libqrupdate.a, libqrupdate.so.

Installed directories: /usr/include/qrupdate, /usr/lib/cmake/qrupdate, /usr/share/licenses/qrupdate.

Short descriptions

qrupdate.pc The qrupdate library

Notes

BUILD_STATIC_LIBS is an option of its own in qrupdate-ng, on by default, and the recipe leaves it alone, so the package installs libqrupdate.a beside the shared library.