← All Man Pages

kryx-src(8)

unified CRUX/KryX source build, linting, and release-staging machine

NAME#

kryx-src - unified CRUX/KryX source build, linting, and release-staging machine

SYNOPSIS#

kryx-src command [options] [args...]

DESCRIPTION#

kryx-src is a standalone static Go source-building and release-staging companion to kpm(8), inspired by Void Linux's xbps-src. It shares kpm's internal Pkgfile parser, builder, package database, and repository indexer while adding a canonical port registry that resolves ports uniformly by directory path, basename, declared Pkgfile name=, or collection prefix, across both multi-collection trees and single-port repositories.

PORTS DIRECTORY RESOLUTION#

kryx-src never hardcodes or blindly requires /usr/ports (making it safe for containerized/Docker CI builds). The ports tree path is resolved in strict priority order:

1.
Explicit CLI flag: --ports-dir path (or -P path, or --ports path)
2.
Environment variable: $KRYX_PORTS_DIR or $KPM_PORTS_DIR
3.
Active configuration file ([paths] ports_dir in kpm.ini) when the directory exists on disk
4.
Workspace auto-detection in the current working directory: ./Pkgfile, ./.kryx/Pkgfile, ./ports, or collection directories (./core, ./opt, ./xorg, ./contrib, ./rolling)
5.
Fallback to /usr/ports only if the directory exists on disk; otherwise kryx-src exits with an actionable error.

The resolved path is exported as KRYX_PORTS_DIR and KPM_PORTS_DIR to child build processes.

COMMANDS#

pkg [options] target ... (alias: build)
Expand target arguments (port path, basename, package name, collection name, or all), optionally resolve recursive runtime and make dependencies in topological order (--deps), satisfy uninstalled dependencies binary-first from index.json (or from source with --source-deps), and compile target archives into --out-dir.
plan [--ports-dir dir] [--max-ports n] [--chunk-size n] [--compact] target ...
Generate a bounded topological GitHub Actions matrix JSON plan.
lint [--ports-dir dir] [--strict] [target ...] (alias: check)
Validate Pkgfile recipes across a ports tree, detecting missing required fields, directory-vs-name mismatches, duplicate package names within a collection, missing dependency targets, and dependency cycles.
list [--ports-dir dir] [--json] [target ...] (alias: ls)
List discovered ports with their relative directory path, package name (when it differs from the directory basename), and full version.
stage [options] (alias: index)
Scan --packages for CRUX .pkg.tar.<ext> archives, enrich metadata from --ports-dir, merge into --index, and optionally copy archives into --upload-dir with GitHub-Releases-safe filenames (# replaced by .).
sign --key privkey [--signify] [--file index.json] [--out index.json.sig]
Generate a detached Ed25519 or OpenBSD signify(1)-compatible signature for index.json.
rewrite-urls --index path --assets-json file [--packages dir]
Update download URLs in index.json using the JSON payload returned by gh release view --json assets and verify that every built archive resolves to an uploaded asset URL.

EXAMPLES#

kryx-src lint --ports-dir /workspace/ports
kryx-src plan --ports-dir /workspace/ports --compact rolling/kpm
kryx-src pkg --ports-dir ./ports --work-root /tmp/work --out-dir ./dist/packages --deps --force linux-6.18
kryx-src stage --packages ./dist/packages --ports-dir ./ports --index ./stage/index.json --upload-dir ./stage/upload
kryx-src sign --signify --key ./release.sec --file ./stage/index.json
kryx-src rewrite-urls --index ./stage/index.json --assets-json ./stage/assets.json --packages ./dist/packages

SEE ALSO#

kpm(8), kpm-index(8), gports(8)