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

99.17. jfsutils-1.1.15

JFS filesystem utilities — mkfs.jfs, fsck.jfs, jfs_tune and the debugger

Version 1.1.15, release 1
Shelf filesystem — Filesystem utilities, FUSE, and network or encrypted filesystems
Phase 41_system (System), 520 of 1047 in build order
Licence GPL-2.0-or-later
Homepage https://jfs.sourceforge.net/
Build time 0.2 SBU
Installed size 1.7 MiB in 17 files
Recipe ports/core/filesystem/jfsutils/kpkgbuild

About

jfsutils is the user-space toolset for IBM’s JFS filesystem: mkfs.jfs (jfs_mkfs) to create one, fsck.jfs (jfs_fsck) to check and repair it, jfs_tune to change its parameters, jfs_debugfs, and jfs_fscklog and jfs_logdump to read the check log and the journal. gparted runs these tools for the JFS operations it offers. Each patch makes the source build with a current compiler or against musl, or fixes a small defect; build.sh applies them in the order its for loop names them.

Sources

Dependencies

Depends on: util-linux.

Required by (2): gparted, kpmcore.

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

What kpkg does

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

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/filesystem/jfsutils
echo '244a15f64015ce3ea17e49bdf6e1a0fb4f9af92b82fa9e05aa64cb30b5f07a4d  jfsutils-1.1.15.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/jfsutils
SRC=$SRC_ROOT/jfsutils-1.1.15
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf jfsutils-1.1.15.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:

for p in format-security musl-fix-includes jfsutils-include-sysmacros \
	missing-stdinth gcc-10 fflush-stdout gnu-basename; do
	patch -p1 -i "$PORT_SRC/$p.patch"
done

./configure --prefix=/usr --sbindir=/usr/sbin --mandir=/usr/share/man
make
make -j1 DESTDIR=$PKG install

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

Contents

Installed programs: fsck.jfs, jfs_debugfs, jfs_fsck, jfs_fscklog, jfs_logdump, jfs_mkfs, jfs_tune, mkfs.jfs.

Installed directories: /usr/share/licenses/jfsutils.

Short descriptions

fsck.jfs initiate replay of the JFS transaction log, and check and repair a JFS formatted device
jfs_debugfs shell-type JFS file system editor
jfs_fsck initiate replay of the JFS transaction log, and check and repair a JFS formatted device
jfs_fscklog extract a JFS fsck service log into a file and/or format and display the extracted file
jfs_logdump dump a JFS formatted device's journal log
jfs_mkfs create a JFS formatted partition
jfs_tune adjust tunable file system parameters on JFS
mkfs.jfs create a JFS formatted partition

Notes

configure stops unless <uuid/uuid.h> is present; it comes from libuuid in util-linux, the one entry in depends.

make -j1 DESTDIR=$PKG install runs the install serially; the build itself uses the tree’s parallel make.