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
jfsutils-1.1.15.tar.gz(526.5 KiB)
sha256244a15f64015ce3ea17e49bdf6e1a0fb4f9af92b82fa9e05aa64cb30b5f07a4d
upstream: https://jfs.sourceforge.net/project/pub/jfsutils-1.1.15.tar.gz
archive copy: sources-2/filesystem--jfsutils-1.1.15.tar.gz
Dependencies
Depends on: util-linux.
Required by (2): gparted, kpmcore.
Patches
build.sh applies these; kpkg applies nothing by itself.
fflush-stdout.patch— Flushes standard output aftermkfs.jfsprints its “Continue? (Y/N)” prompt, so the prompt appears before the program waits for the answer instead of sitting in the buffer.format-security.patch— Passes the message text infscklogandlogdumptoprintfas an argument (printf("%s", msg)) rather than as the format string. As a format, any%in the text is read as a conversion andprintfreads arguments that were never passed;-Wformat-securitywarns about every such call.gcc-10.patch— Debian’s patch, from the source itsOrigin:line names: marks the global variables infscklog/display.candlibfs/logredo.cstatic, and makesmntcntanexterndeclaration. Several files define the same names, which links only under-fcommon; GCC 10 and later default to-fno-commonand stop with “multiple definition”.gnu-basename.patch— Definesbasename()as a macro, infsck/fsck_message.candfscklog/fscklog.c, that returns the part of a path after its last/. The code calls it onconstfile names in the manner of glibc’s GNUbasename, which<string.h>declares under_GNU_SOURCE; musl has only the POSIXbasenamein<libgen.h>, which may modify its argument.jfsutils-include-sysmacros.patch— Includes<sys/sysmacros.h>inlibfs/devices.c, wheremajor()andminor()are declared;<sys/types.h>does not provide them.missing-stdinth.patch— Includes<stdint.h>infscklog/extract.c, for the fixed-width integer types it uses.musl-fix-includes.patch— Includes<paths.h>inlibfs/fssubs.cunconditionally rather than only on systems withgetmntinfo(). Its<mntent.h>code opens_PATH_MNTTAB, which glibc’s<mntent.h>brings in through<paths.h>and musl’s does not.
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.