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

102.5. libvslvm-20260901

Linux LVM2 volume-system library, vslvminfo and vslvmmount — reads logical volumes inside an image

Version 20260901, release 1
Shelf security — Security applications: GnuPG and front-ends, password and secret managers, certificates, scanners, forensics and audit
Phase 41_system (System), 929 of 1047 in build order
Licence LGPL-3.0-or-later
Homepage https://github.com/libyal/libvslvm
Build time 2.1 SBU
Installed size 1.5 MiB in 18 files
Recipe ports/core/security/libvslvm/kpkgbuild

About

libvslvm reads the Linux Logical Volume Manager (LVM2) format from an image or device: the volume group metadata on a physical volume and the logical volumes inside it. The package holds the library, vslvminfo, which lists the volume group and its volumes, and vslvmmount, which presents each logical volume as a raw file through FUSE. sleuthkit links it to find and read the file systems on logical volumes inside a disk image. Upstream’s README lists what it does not read: more than one physical volume, more than one segment, non-linear stripes, and snapshots. It is a libyal library, built the same way as libewf, libvhdi and libvmdk.

Sources

Dependencies

Depends on: pkgconf, libbfio, fuse.

Required by (1): sleuthkit.

Optional, off in KDOS

These switches in build.sh turn off a feature whose library is a port here. The recipe may turn each off on purpose, or because the library was not yet a port when the recipe was written; this list cannot tell which.

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

What kpkg does

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

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

./configure \
	--prefix=/usr \
	--libdir=/usr/lib \
	--disable-static \
	--disable-nls \
	--disable-rpath \
	--disable-python \
	--enable-multi-threading-support \
	--with-pthread \
	--with-libbfio \
	--with-libfuse \
	--with-libcerror=no \
	--with-libcthreads=no \
	--with-libcdata=no \
	--with-libclocale=no \
	--with-libcnotify=no \
	--with-libcsplit=no \
	--with-libuna=no \
	--with-libcfile=no \
	--with-libcpath=no \
	--with-libfcache=no \
	--with-libfvalue=no \
	--with-libfdata=no

for have in HAVE_MULTI_THREAD_SUPPORT HAVE_LIBBFIO HAVE_LIBFUSE3; do
	if ! grep -q "^#define $have 1" common/config.h; then
		echo "libvslvm: configure did not find $have" >&2
		exit 1
	fi
done

make
make DESTDIR=$PKG install

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

Contents

Installed programs: vslvminfo, vslvmmount.

Installed libraries: libvslvm.so.

Installed directories: /usr/include/libvslvm, /usr/share/licenses/libvslvm.

Short descriptions

vslvminfo determines information about a Linux Logical Volume Manager (LVM) volume \
vslvmmount mounts a Linux Logical Volume Manager (LVM) volume system
libvslvm.pc Library to access the Linux Logical Volume Manager (LVM) volume system

Notes

The loop after configure reads common/config.h and stops the build unless multi-threading, libbfio and libfuse 3 were all found. configure treats each as optional and would otherwise build without it and say nothing.