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

106.8. wpa_supplicant-2.12

IEEE 802.1X / WPA/WPA2/WPA3 supplicant (Wi-Fi authentication backend for NetworkManager)

Version 2.12, release 1
Shelf network — Host network configuration and connection management: links, Wi-Fi, DHCP, DNS forwarding, time, modems, firewall and VPN
Phase 41_system (System), 647 of 1047 in build order
Licence BSD-3-Clause
Homepage https://w1.fi/wpa_supplicant/
Build time 0.5 SBU
Installed size 4.5 MiB in 11 files
Recipe ports/core/network/wpa_supplicant/kpkgbuild

About

wpa_supplicant authenticates a machine to a wireless network, and to a wired one that uses 802.1X: it runs the WPA/WPA2/WPA3 key handshakes and the EAP methods enterprise networks ask for. On KDOS it is the Wi-Fi back end of NetworkManager, which drives it over D-Bus; the bus starts it on first use (see How polkit and ModemManager are started for what that activation depends on). wpa_cli and wpa_passphrase are installed beside it.

Sources

Dependencies

Depends on: openssl, libnl, dbus, pkgconf, pcsc-lite.

Required by (1): networkmanager.

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

What kpkg does

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

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/network/wpa_supplicant
echo '08e23937e16d0155e55cab2b51f51fbe10d80a1aa91c4e15442645059b737ef6  wpa_supplicant-2.12.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/wpa_supplicant
SRC=$SRC_ROOT/wpa_supplicant-2.12
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf wpa_supplicant-2.12.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:

cd wpa_supplicant
cat > .config <<'EOF'
CONFIG_DRIVER_NL80211=y
CONFIG_DRIVER_WIRED=y
CONFIG_DRIVER_MACSEC_LINUX=y
CONFIG_MACSEC=y
CONFIG_LIBNL32=y
CONFIG_BACKEND=file
CONFIG_CTRL_IFACE=y
CONFIG_CTRL_IFACE_DBUS_NEW=y
CONFIG_CTRL_IFACE_DBUS_INTRO=y
CONFIG_DEBUG_FILE=y
CONFIG_DEBUG_SYSLOG=y
CONFIG_IEEE80211R=y
CONFIG_IEEE8021X_EAPOL=y
CONFIG_EAP_MD5=y
CONFIG_EAP_MSCHAPV2=y
CONFIG_EAP_TLS=y
CONFIG_EAP_PEAP=y
CONFIG_EAP_TTLS=y
CONFIG_EAP_GTC=y
CONFIG_EAP_OTP=y
CONFIG_EAP_LEAP=y
CONFIG_EAP_SIM=y
CONFIG_EAP_PSK=y
CONFIG_EAP_AKA=y
CONFIG_EAP_FAST=y
CONFIG_EAP_PWD=y
CONFIG_PKCS12=y
CONFIG_SMARTCARD=y
CONFIG_AP=y
CONFIG_P2P=y
CONFIG_HS20=y
CONFIG_INTERWORKING=y
CONFIG_TLS=openssl
CONFIG_BGSCAN_SIMPLE=y
CONFIG_BGSCAN_LEARN=y
CONFIG_SAE=y
CONFIG_OWE=y
CONFIG_SUITEB192=y
CONFIG_FILS=y
CONFIG_OCV=y
CONFIG_DPP=y
CONFIG_WEP=y
CONFIG_DPP2=y
CONFIG_WPS=y
CONFIG_IEEE80211AC=y
CONFIG_IEEE80211AX=y
CONFIG_IEEE80211BE=y
CONFIG_TDLS=y
CONFIG_IBSS_RSN=y
CONFIG_SAE_PK=y
CONFIG_WNM=y
CONFIG_MBO=y
CONFIG_PASN=y
CONFIG_MESH=y
CONFIG_EAP_TEAP=y
CONFIG_EAP_IKEV2=y
CONFIG_EAP_SAKE=y
CONFIG_EAP_GPSK=y
CONFIG_EAP_GPSK_SHA256=y
CONFIG_EAP_PAX=y
CONFIG_EAP_EKE=y
CONFIG_EAP_AKA_PRIME=y
CONFIG_EAP_TNC=y
CONFIG_PCSC=y
CONFIG_WPA_CLI_EDIT=y
CONFIG_ELOOP_POLL=y
EOF

make BINDIR=/usr/sbin LIBDIR=/usr/lib
install -Dm755 wpa_supplicant "$PKG/usr/sbin/wpa_supplicant"
install -Dm755 wpa_cli       "$PKG/usr/sbin/wpa_cli"
install -Dm755 wpa_passphrase "$PKG/usr/sbin/wpa_passphrase"
install -Dm644 dbus/fi.w1.wpa_supplicant1.service \
	"$PKG/usr/share/dbus-1/system-services/fi.w1.wpa_supplicant1.service"
install -Dm644 dbus/dbus-wpa_supplicant.conf \
	"$PKG/etc/dbus-1/system.d/wpa_supplicant.conf"
install -Dm644 doc/docbook/wpa_supplicant.8 doc/docbook/wpa_cli.8 \
	doc/docbook/wpa_passphrase.8 doc/docbook/wpa_background.8 \
	-t "$PKG/usr/share/man/man8"
install -Dm644 doc/docbook/wpa_supplicant.conf.5 -t "$PKG/usr/share/man/man5"

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

Contents

Installed programs: wpa_cli, wpa_passphrase, wpa_supplicant.

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

Short descriptions

wpa_cli WPA command line client
wpa_passphrase Generate a WPA PSK from an ASCII passphrase for a SSID
wpa_supplicant Wi-Fi Protected Access client and IEEE 802.1X supplicant

Notes

build.sh writes the whole .config; nothing from upstream’s defconfig applies, so a feature not on the list is not built.

make is given BINDIR=/usr/sbin because it substitutes that path into the D-Bus service file it generates, fi.w1.wpa_supplicant1.service, whose Exec= line the bus runs. Left at the default it would name /usr/local/sbin/wpa_supplicant, and activation would fail. Every file is installed by hand with install; of the files the makefile generates, the systemd units are the ones left out.