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

102.9. john-1.9.0.jumbo1

John the Ripper password hash cracker

Version 1.9.0.jumbo1, release 2
Shelf security — Security applications: GnuPG and front-ends, password and secret managers, certificates, scanners, forensics and audit
Phase 41_system (System), 933 of 1047 in build order
Licence GPL-2.0-or-later
Homepage https://www.openwall.com/john/
Build time 6.8 SBU
Installed size 90.2 MiB in 529 files
Recipe ports/core/security/john/kpkgbuild

About

John the Ripper, in its community “jumbo” edition, is a password hash cracker. With its *2john converters it reads the hash out of a LUKS header, a KeePass database, an encrypted PDF, ZIP or 7-Zip archive, an SSH key or /etc/shadow, and then tests candidate passwords against it, which answers how long a password of your own would hold. The package ships upstream’s small default password.lst and no other wordlist. Its GPU formats run through OpenCL when a device is present.

John chooses its SIMD code only when it is compiled, so build.sh builds it five times, once per instruction-set level, and installs the five as a chain that hands over at start-up to the best one the processor can run. This is the per-level form of the rule in Every port.

Why it is in KDOS

The comment above it in script/phases/41_system/packages.d/security.txt:

Reads a hash out of a LUKS header, a KeePass database, an encrypted PDF or ZIP, or /etc/shadow, and answers "how long would this take" — about your own material. No breach corpus is shipped.

Sources

Dependencies

Depends on: autoconf, pkgconf, openssl, zlib, bzip2, gmp, libpcap, opencl-headers, ocl-icd.

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

What kpkg does

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

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/john
echo '16bfecad0cddad146564abb76b6e6b28a71653670c2799d60ca4035db5f3b9c4  john-1.9.0.jumbo1.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/john
SRC=$SRC_ROOT/john-1.9.0.jumbo1
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf john-1.9.0.jumbo1.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 recipe’s helpers _tag and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

patch -p1 -i "$PORT_SRC/blake2-align.patch"

patch -p1 -i "$PORT_SRC/opencl-topology.patch"

patch -p1 -i "$PORT_SRC/cpu-fallback-first.patch"
patch -p1 -i "$PORT_SRC/cprepair-ldflags.patch"

export CFLAGS="$CFLAGS -fcommon"

cd src
_opts=(--prefix=/usr --disable-native-tests --disable-mpi --enable-pcap --enable-opencl)

_base_cflags="$CFLAGS"
for _lvl in avx512bw:john avx2:john-non-avx512bw xop:john-non-avx2 avx:john-non-xop; do
	CFLAGS="$_base_cflags -DCPU_FALLBACK" ./configure "${_opts[@]}" \
		--enable-simd="${_lvl%%:*}"
	make clean
	make
	mv ../run/john ../run/.simd-"${_lvl#*:}"
done
CFLAGS="$_base_cflags" ./configure "${_opts[@]}"
make clean
make
mv ../run/john ../run/john-non-avx
for _f in ../run/.simd-*; do
	mv "$_f" ../run/"${_f#../run/.simd-}"
done

install -dm755 $PKG/usr/share/john $PKG/usr/bin
cd ../run
rm -f $(grep -l '^#!.*python2' *.py)

for f in *; do
	if [ -L "$f" ]; then
		ln -s "$(readlink "$f")" $PKG/usr/bin/"$f"
	elif [ -f "$f" ] && [ "$(head -c4 "$f")" = $'\x7fELF' ]; then
		install -m755 "$f" $PKG/usr/bin/"$f"
	else
		cp -a "$f" $PKG/usr/share/john/
	fi
done

rm -rf $PKG/usr/share/john/ztex

install -Dm644 "$SRC/doc/COPYING" $PKG/usr/share/licenses/$name/COPYING
install -Dm644 "$SRC/doc/LICENSE" $PKG/usr/share/licenses/$name/LICENSE

for f in *2john*; do
	[ -e $PKG/usr/bin/"$f" ] && continue
	[ "$(head -c2 "$f")" = '#!' ] || continue
	chmod 755 $PKG/usr/share/john/"$f"
	ln -s ../share/john/"$f" $PKG/usr/bin/"$f"
done

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/john, 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 john-1.9.0.jumbo1-2.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/john, and runs the triggers its paths call for.

Contents

Installed programs: 7z2john.pl, DPAPImk2john.py, SIPdump, adxcsouf2john.py, aem2john.py, aix2john.pl, aix2john.py, andotp2john.py, androidbackup2john.py, androidfde2john.py, ansible2john.py, apex2john.py, applenotes2john.py, aruba2john.py, axcrypt2john.py, base64conv, bestcrypt2john.py, bitcoin2john.py, bitlocker2john, bitshares2john.py, bks2john.py, blockchain2john.py, calc_stat, cisco2john.pl, cprepair, cracf2john.py, dashlane2john.py, deepsound2john.py, diskcryptor2john.py, dmg2john, dmg2john.py, eapmd5tojohn, ecryptfs2john.py, ejabberd2john.py, electrum2john.py, encfs2john.py, enpass2john.py, ethereum2john.py, filezilla2john.py, geli2john.py, genmkvpwd, gpg2john, hccap2john, hccapx2john.py, htdigest2john.py, ibmiscanner2john.py, ikescan2john.py, itunes_backup2john.pl, iwork2john.py, john, john-non-avx, john-non-avx2, john-non-avx512bw, john-non-xop, kdcdump2john.py, keepass2john, keychain2john.py, keyring2john.py, keystore2john.py, kirbi2john.py, known_hosts2john.py, kwallet2john.py, lastpass2john.py, ldif2john.pl, libreoffice2john.py, lion2john-alt.pl, lion2john.pl, lotus2john.py, luks2john.py, mac2john-alt.py, mac2john.py, mcafee_epo2john.py, mkvcalcproba, monero2john.py, money2john.py, mozilla2john.py, multibit2john.py, neo2john.py, office2john.py, openbsd_softraid2john.py, openssl2john.py, padlock2john.py, pcap2john.py, pdf2john.pl, pem2john.py, pfx2john.py, pgpdisk2john.py, pgpsda2john.py, pgpwde2john.py, prosody2john.py, ps_token2john.py, pse2john.py, putty2john, pwsafe2john.py, racf2john, radius2john.pl, radius2john.py, rar2john, raw2dyna, sap2john.pl, signal2john.py, sipdump2john.py, ssh2john.py, sspr2john.py, staroffice2john.py, strip2john.py, telegram2john.py, tezos2john.py, tgtsnarf, truecrypt2john.py, uaf2john, unafs, undrop, unique, unshadow, vdi2john.pl, vmx2john.py, vncpcap2john, wpapcap2john, zip2john.

Installed directories: /usr/share/john, /usr/share/licenses/john.

Notes

The baseline build is the last one made. The helper programs it leaves in run/ (calc_stat, SIPdump, the *2john converters written in C) are the only copies shipped, and being SSE2 builds they run on any x86-64. The loop parks each SIMD john as .simd-<name> so the next make clean does not delete it, and renames the five into place at the end. A new level must use a name x86-64.h expects, or nothing ever execs it.

The install sorts run/ by kind: ELF programs and the links to john go to /usr/bin, and everything else (scripts, the Python modules they import, data) to /usr/share/john. The Python scripts that declare python2 are deleted first, since the tree has no Python 2. Each scripted *2john converter then gets a link in /usr/bin, so ssh2john.py is a command.

run/ztex holds prebuilt FPGA bitstreams and a USB controller image for the ZTEX 1.15y board. --enable-ztex is not passed, so nothing in the package can load them, and build.sh removes them.