292.1. fastfetch-2.68.1
System information tool, with the KDOS banner config
The build-state snapshot was taken from 2.68.1-2; this recipe is 2.68.1-3, so the size, time and contents below describe the earlier build.
| Version | 2.68.1, release 3 |
| Shelf | sysmon — Process, resource and system-information monitors |
| Phase | 44_apps (Applications), 384 of 422 in build order |
| Licence | MIT |
| Homepage | https://github.com/fastfetch-cli/fastfetch |
| Build time | 1.3 SBU |
| Installed size | 3.9 MiB in 45 files |
| Recipe | ports/core/sysmon/fastfetch/kpkgbuild |
About
fastfetch prints a summary of the system beside a logo: the distribution, kernel, uptime, shell, display, desktop, CPU, GPU, memory, disks and more. On KDOS it also supplies the information column of the login banner, which kdos-banner draws from fastfetch --logo none beside its own logo. The recipe’s second source, config.jsonc, is the KDOS layout of that column, installed as /etc/xdg/fastfetch/config.jsonc.
Sources
fastfetch-2.68.1.tar.gz(1.6 MiB)
sha256c268cfcd230cc7ed5447fb34ed21bf4977315c7104356a39388b6ba784ad11b0
upstream: https://github.com/fastfetch-cli/fastfetch/archive/refs/tags/2.68.1.tar.gz
archive copy: sources-4/sysmon--fastfetch-2.68.1.tar.gzconfig.jsonc
sha256435f5ab81c60787018a073095999f5aad2ae24ed62d95e1c32b0ecd231796e06
Dependencies
Depends on: cmake, pciutils, dbus, libdrm, wayland, glib, sqlite, vulkan-headers, vulkan-loader, libva, libglvnd, imagemagick, chafa, zlib, libpulse, ddcutil, elfutils, lua54.
Required by: no port names it.
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/44_apps/phase.env && kpkg install fastfetch'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/sysmon/fastfetch.
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/sysmon/fastfetch
echo 'c268cfcd230cc7ed5447fb34ed21bf4977315c7104356a39388b6ba784ad11b0 fastfetch-2.68.1.tar.gz' | sha256sum -c -
echo '435f5ab81c60787018a073095999f5aad2ae24ed62d95e1c32b0ecd231796e06 config.jsonc' | 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/fastfetch
SRC=$SRC_ROOT/fastfetch-2.68.1
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf fastfetch-2.68.1.tar.gz -C "$SRC" --strip-components=1
cp config.jsonc "$SRC"
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:
mkdir -p build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DENABLE_XCB_RANDR=OFF \
-DENABLE_XRANDR=OFF \
-DENABLE_VAX11=OFF \
-DENABLE_GLX=OFF \
-DENABLE_WAYLAND=ON \
-DENABLE_VULKAN=ON \
-DENABLE_DRM=ON \
-DENABLE_VADRM=ON \
-DENABLE_GIO=ON \
-DENABLE_DBUS=ON \
-DENABLE_SQLITE3=ON \
-DENABLE_EGL=ON \
-DENABLE_IMAGEMAGICK7=ON \
-DENABLE_CHAFA=ON \
-DENABLE_ZLIB=ON \
-DENABLE_PULSE=ON \
-DENABLE_DDCUTIL=ON \
-DENABLE_ELF=ON \
-DENABLE_LUA=ON \
-DLUA_INCLUDE_DIR=/usr/include/lua5.4 \
-DLUA_LIBRARY=/usr/lib/liblua5.4.so \
-DENABLE_VDPAU=OFF \
-DENABLE_DCONF=OFF \
-DENABLE_EET=OFF \
-DENABLE_RPM=OFF \
-DENABLE_IMAGEMAGICK6=OFF \
-DENABLE_QUICKJS=OFF \
-DENABLE_OPENCL=OFF \
-DENABLE_SYSTEM_YYJSON=OFF \
-DBUILD_TESTS=OFF
make
make DESTDIR=$PKG install
cd ..
install -Dm644 $SRC/config.jsonc $PKG/etc/xdg/fastfetch/config.jsonc
The switches, and why each is set:
-DENABLE_XCB_RANDR=OFF— and-DENABLE_XRANDR=OFF: fastfetch’s X display-server probes,src/detection/displayserver/linux/xcb.candxlib.c, are compiled always, but their code sits inside#ifdef FF_HAVE_XCB_RANDRand#ifdef FF_HAVE_XRANDR, which only these switches define. Off, the display is reported through the Wayland probe alone and no X library is needed.-DENABLE_VAX11=OFF— and-DENABLE_GLX=OFF: the same for libva’s X11 backend and GLX, the X paths of the video-codec and OpenGL detection; VA-API is still queried over DRM and OpenGL through EGL.-DENABLE_WAYLAND=ON— and every otherENABLE_*=ON: Vulkan, DRM, VA-API over DRM, GIO, D-Bus, SQLite, EGL, ImageMagick 7, chafa, zlib, PulseAudio, ddcutil, libelf and Lua. These are upstream’s defaults on Linux, named so the recipe states which libraries the binary is built for. A switch whose library is missing only printsLibrary: missing: <NAME>and builds without it, so the switch does not make the library present; each one turned on has its port independs. fastfetch opens almost all of these libraries withdlopen()at run time, so the build needs only their headers and pkg-config files.-DLUA_INCLUDE_DIR=/usr/include/lua5.4— and-DLUA_LIBRARY=/usr/lib/liblua5.4.so: build the Lua scripting against lua54. fastfetch opens Lua at run time by the nameliblua5.<minor>.so, which only lua54 installs; the lua port names its libraryliblua.so, so scripting built against its headers could never load.-DENABLE_VDPAU=OFF— andENABLE_DCONF,ENABLE_EET,ENABLE_RPM,ENABLE_IMAGEMAGICK6,ENABLE_QUICKJS,ENABLE_OPENCL: off. VDPAU, EET, RPM, ImageMagick 6 and QuickJS are not ports. dconf and the OpenCL loader ocl-icd are ports, and their switches are off all the same, so fastfetch reports no dconf settings and no OpenCL devices.-DENABLE_SYSTEM_YYJSON=OFF— use the copy of the yyjson JSON library embedded in fastfetch’s tree; yyjson is not a port. This is upstream’s default.-DBUILD_TESTS=OFF— no test programs, upstream’s default.
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/fastfetch, 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 fastfetch-2.68.1-3.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/fastfetch, and runs the triggers its paths call for.
Contents
Installed programs: fastfetch, flashfetch.
Installed directories: /etc/xdg/fastfetch, /usr/share/fastfetch, /usr/share/licenses/fastfetch.
Short descriptions
fastfetch |
A fast and feature-rich system information tool similar to neofetch |
Notes
config.jsonc is a source of the recipe with its own sha256 = line, so editing it changes the recipe and rebuilds the port. It lays out the information column for the login banner and for a bare fastfetch; the banner itself runs fastfetch with --logo none and places the logo beside the output. fastfetch reads /etc/xdg/fastfetch/config.jsonc only when the user has no ~/.config/fastfetch/config.jsonc, and /etc/skel (fs/etc/skel in the source tree) gives every new account its own copy of the layout. A change to the banner’s layout is therefore made in both files, or new accounts keep the old one.