← All Man Pages

kpm-index(8)

CRUX Linux binary-first package manager and repository indexer

kpm-index(8) is documented jointly in kpm.8 (shown below).

NAME#

kpm, kpm-index - CRUX Linux binary-first package manager and repository indexer

SYNOPSIS#

kpm [global options] command [options] [args...]

kpm-index [--index path] [--packages dir] [--ports dir] [--base-url url] [--arch arch] [--prune]

DESCRIPTION#

kpm is a standalone Go package manager for standard CRUX Linux installations. It consolidates binary package synchronization, installation, upgrades, Pkgfile source builds, search, querying, and package removal under a single command-line interface while remaining directly compatible with CRUX pkgutils.

kpm operates directly on the standard CRUX package database (/var/lib/pkg/db), honors directory-level flock(2) locking on /var/lib/pkg, commits database updates atomically using .incomplete_transaction and .backup files, evaluates /etc/pkgadd.conf rules (including /var/lib/pkg/rejected/ handling), and invokes /sbin/ldconfig when /etc/ld.so.conf is present. It introduces no conflicting binaries, database formats, or directory layouts against stock pkgmk(8), pkgadd(8), pkgrm(8), or pkginfo(8).

Package installation and system updates are strictly binary-first against the remote JSON repository index (index.json), defaulting to the kryx-linux/ports release tag rolling-x86_64. If no prebuilt binary exists in index.json for a requested package, kpm install and kpm update never trigger an automatic source build; instead, they report that no binary is available and instruct the user to run kpm build.

Local CRUX ports trees (defaulting to /usr/ports) are kept in place and parsed directly. Build settings such as parallel jobs, compiler flags, source cache paths, and archive compression are configured manually in /etc/kpm.ini.

kpm-index is the companion repository indexer used (typically in CI/release workflows) to scan CRUX <name>#<version>-<release>.pkg.tar.<ext> archives, compute SHA-256 digests and sizes, optionally enrich entries from a CRUX ports tree, and generate or update index.json.

COMMANDS#

All commands accept global options (-c/--config, -r/--root, --color, --no-color) before the subcommand name. Each subcommand has short aliases for quick typing: sy (sync), up (update), in/i (install), bld/b (build), se/s (search), ls/l (list), rm/r/uninstall (remove), and h (help).

sync [--ports] [collection ...]
Download the remote index.json from [repo] index_url and atomically save it to <cache_dir>/index.json. When --ports is supplied, also synchronize local CRUX ports collections by executing matching drivers in ports_drivers_dir (default /etc/ports/drivers) against collection configuration files in ports_conf_dir (default /etc/ports), with PORTS_DIR exported to the driver environment. Optional collection arguments restrict port synchronization to those named collections.
update [-f|--force] [--no-sync] [--dry-run] [package ...]
Upgrade installed packages binary-first. Unless --no-sync is specified, index.json is synchronized first. Installed packages (or only the named package arguments) are compared against the latest matching entries in index.json; packages whose installed version differs are downloaded, SHA-256 verified, and upgraded using CRUX pkgadd(8) upgrade rules. If an installed package has no binary in index.json but has a different version in the local ports tree, kpm prints a notice instructing the user to run kpm build package without compiling it automatically.
install [-u|--upgrade] [-f|--force] [--deps] package|file ...
Install one or more packages strictly binary-first. Arguments that match the CRUX archive naming pattern <name>#<version>-<release>.pkg.tar.<ext> and exist on disk are installed directly as local package files. All other arguments are resolved against the locally synced index.json. Before modifying the system, kpm verifies that every requested package (and any missing dependencies when --deps is enabled) is present in index.json for the configured architecture. If any binary is absent, kpm prints no binary available for <pkg> ...; run: kpm build <pkg> and exits with status 1 without building. Available binaries are cached in <cache_dir>/bin/, verified against their SHA-256 digest, and installed with CRUX pkgadd(8) conflict, rule, rollback, and ldconfig semantics.
build [options] port ...
Locate each named port (either name or collection/name) in place under ports_dir and compile it from its Pkgfile using the [build] and [paths] settings from kpm.ini. Missing remote sources are downloaded into source_cache, verified against .signature and/or .md5sum, unpacked into <work_dir>/<name>/src, built via bash into <work_dir>/<name>/pkg, optionally stripped and manpage-compressed, archived via bsdtar --format=gnutar into package_dir as <name>#<version>-<release>.pkg.tar.<compression>, and verified against .footprint. If the target archive is already newer than the Pkgfile and all source files, the build is skipped as up to date unless --force or --update-footprint is given.
search [--installed] [--ports] [--binaries] query ...
Perform a case-insensitive substring search on package names and descriptions across the synced binary index, local ports tree, and installed package database. Multiple query tokens are joined with spaces. Output is compact single-line short form sorted alphabetically:
<name> <version> [<status>] - <description>

where <status> is a comma-separated combination of installed, bin, and port.

list [--ports | --binaries | --files target | --owner regex | --diff] [collection ...]
Query installed packages, local ports, or binary index entries. At most one mode flag may be supplied:
(default, no flag)
List installed packages from <root>/var/lib/pkg/db as <name> <version> (equivalent to pkginfo -i).
--ports [collection ...]
List available ports under ports_dir as <collection>/<port> (equivalent to ports -l). Positional collection arguments override [paths] collections for this invocation.
--binaries
List available binary packages from synced index.json as <pkgname> <latest>.
--files package|archive
List files owned by an installed package or contained in a local CRUX archive file (equivalent to pkginfo -l).
--owner regex
Search all installed package file paths (prefixed with /) against regular expression regex and print a Package File table (equivalent to pkginfo -o).
--diff
Display version differences between installed packages and available binaries (or local ports when no binary is indexed) as a Source Name Available Installed table.
remove package ...
uninstall package ... rm package ... Remove one or more installed packages using CRUX pkgrm(8) policy. Requires root privileges, acquires an exclusive lock on <root>/var/lib/pkg, preserves files still referenced by any other installed package, removes remaining files and empty directories in reverse lexicographical order, runs /sbin/ldconfig -r <root> if <root>/etc/ld.so.conf exists, and commits the updated database atomically.
help
Print usage summary and exit 0.
version
Print the kpm version string and exit 0.

KPM-INDEX#

kpm-index builds or updates the JSON binary repository index consumed by kpm sync and kpm install. It scans --packages for all CRUX archives matching *.pkg.tar.{gz,bz2,xz,lz,zst} whose filenames follow <name>#<version>-<release>.pkg.tar.<ext>. Unrecognized archive names produce a warning on standard error and are skipped.

For each valid archive, kpm-index computes its SHA-256 checksum and byte size, constructs its download URL from --base-url using URL path escaping (encoding # as %23 so archive URLs are never truncated as URL fragments), optionally enriches description, depends, and collection from --ports, merges the entry into any existing index.json, sorts versions ascending using numeric-aware segment comparison, updates each package's latest pointer, and writes the resulting JSON atomically.

Index JSON Schema#

{
  "schema_version": 1,
  "packages": {
    "zlib": {
      "latest": "1.3.1-1",
      "versions": [
        {
          "pkgname": "zlib",
          "pkgver": "1.3.1",
          "pkgrel": "1",
          "arch": "x86_64",
          "filename": "zlib#1.3.1-1.pkg.tar.zst",
          "url": "https://github.com/kryx-linux/ports/releases/download/rolling-x86_64/zlib%231.3.1-1.pkg.tar.zst",
          "sha256": "<hex-sha256>",
          "size": 123456,
          "description": "Compression library",
          "depends": ["glibc"],
          "collection": "core"
        }
      ]
    }
  }
}

The fields description, depends, and collection are omitted when empty.

OPTIONS#

Global Options (kpm)#

Global options must precede the subcommand name.

-c, --config file
Use file as the INI configuration file instead of $KPM_CONFIG or /etc/kpm.ini. When specified explicitly, a missing file causes an error.
-r, --root path
Override [paths] root to operate on an alternative CRUX installation root (e.g., a mounted chroot or staging root).
--color mode
Control ANSI color output: auto (enable on interactive terminals unless NO_COLOR is set or TERM=dumb), always, or never (default: [ui] color or auto).
--no-color
Disable ANSI color output (equivalent to --color=never).
-v, --version
Print version information and exit 0.
-h, --help
Print usage summary and exit 0.

sync Options#

-p, --ports
In addition to downloading index.json, run CRUX port collection sync drivers in ports_drivers_dir.

update Options#

-f, --force
Overwrite conflicting files during binary upgrades (still honoring UPGRADE ... NO rules from pkgadd.conf).
-n, --no-sync
Use the already cached index.json without fetching the remote index first.
-d, --dry-run
Print available binary upgrades without downloading or modifying the system.
-v, --verbose
List all conflicting files without truncation on conflict errors.

install Options#

-u, --upgrade
Upgrade an already installed package. Required if the package is already present in /var/lib/pkg/db (unless --reinstall is used); rejected if the package is not yet installed.
-R, --reins, --reinstall
Reinstall package(s) even if already installed (upgrades in place when present, or performs a fresh install if absent).
-f, --force
Remove and overwrite conflicting files owned by other packages or already present on disk.
-d, --deps
Recursively resolve dependencies (from index.json depends or local Pkgfile headers), skip dependencies already installed, and install missing dependencies first from index.json.
-v, --verbose
List every conflicting file path on conflict errors instead of truncating output after the first 20 files.

Subcommand options may appear either before or after positional arguments (for example, kpm install zig --force and kpm install --force zig are equivalent); pass -- to end option parsing.

build Options#

-i, --install
Install each built target package after building (automatically upgrades if the package is already installed in the database).
-u, --upgrade
Upgrade each built target package after building (requires the package to be previously installed).
-R, --reins, --reinstall
Force rebuilding the target port(s) and reinstall them into root whether previously installed or not.
-f, --force
Force rebuilding target ports even if the target archive is up to date, and pass --force when installing.
-d, --deps
Resolve recursive Pkgfile runtime (# Depends on:) and build-only (# Make depends on:) dependencies in topological order. Already-installed dependencies are skipped. Uninstalled dependencies are installed into root before building downstream ports (using prebuilt binaries from synced index.json when available unless --source-deps is set, in which case only their runtime dependencies are needed; otherwise building them from ports_dir and installing the resulting archive). Binary-only dependencies present in index.json are supported even when absent from the local ports tree. Requested target ports are always built from source and only installed when -i/--install, -u/--upgrade, or -R/--reinstall is passed.
--sync
With -d/--deps, synchronize the remote binary index.json before resolving binary dependencies.
-S, --source-deps
With -d/--deps, always build missing dependencies from ports_dir instead of reusing prebuilt binaries from index.json.
-if, --ignore-footprint
Skip .footprint verification after creating the archive.
-in, --ignore-new
Allow NEW files during .footprint verification while still failing on MISSING files.
-uf, --update-footprint
Regenerate and overwrite .footprint in the port directory from the built archive.
-im, --ignore-md5sum
Skip .md5sum verification of source files.
-is, --ignore-signature
Skip .signature cryptographic verification.
-kw, --keep-work
Keep <work_dir>/<name> after the build completes or fails.
-ns, --no-strip
Disable ELF binary, shared library, and archive stripping.
-v, --verbose
List all conflicting files without truncation when installing packages.

search Options#

-i, --installed
Search only packages installed in <root>/var/lib/pkg/db.
-p, --ports
Search only ports in ports_dir.
-b, --binaries
Search only packages in synced index.json.

list Options#

-p, --ports
List ports under ports_dir in <collection>/<port> format.
-b, --binaries
List available binary packages from synced index.json.
-f, --files package|archive
List files belonging to an installed package or a local archive file.
-o, --owner regex
List installed packages owning files matching regular expression regex.
-d, --diff
List version differences between installed packages and binary/port sources.

kpm-index Options#

--index path
Path to the JSON index file to create or update (default: index.json).
--packages dir
Directory containing CRUX .pkg.tar.<ext> archives to index (default: .).
--ports-dir dir, --ports dir
Optional CRUX ports directory used to populate description, depends, makedepends, and collection fields on indexed entries (default: $KRYX_PORTS_DIR or $KPM_PORTS_DIR).
--base-url url
Optional http:// or https:// base URL prepended to percent-encoded archive filenames (default: empty, storing bare filenames in url).
--arch arch
Target architecture string recorded in entries (default: x86_64 on amd64 hosts, otherwise the Go architecture name).
--prune
Remove existing index entries whose archive filename is no longer present in --packages (default: false).
--sign-key privkey
Generate an OpenBSD signify(1)-compatible detached signature (<index>.sig) using a signify .sec or kryx-ed25519 private key.

CONFIGURATION#

kpm reads a manual INI configuration file (default /etc/kpm.ini). If no explicit config file is requested via --config or KPM_CONFIG and /etc/kpm.ini does not exist, built-in defaults are used. Lines beginning with # or ; are comments; inline comments preceded by whitespace are also stripped. Values may be enclosed in single or double quotes. Boolean keys accept true/yes/1/on and false/no/0/off. List keys accept comma- or whitespace-separated items.

[paths]#

Keys in [paths] are also accepted before any section header.

root
CRUX installation root directory (default: /).
ports_dir
Local CRUX ports tree path, used in place (default: /usr/ports).
collections
Priority-ordered list of port collections under ports_dir (default: core, opt, xorg, contrib). Leave empty to auto-discover all collections.
cache_dir
Base cache directory for index.json and downloaded binaries under bin/ (default: /var/cache/kpm).
source_cache (alias: source_dir)
Cache directory for downloaded upstream source files used by kpm build (default: /var/cache/kpm/sources).
package_dir
Output directory where kpm build writes compiled .pkg.tar.<ext> archives (default: /var/cache/kpm/packages).
work_dir
Temporary build work directory containing <name>/src and <name>/pkg (default: /var/cache/kpm/work).
pkgadd_conf
Path to CRUX pkgadd.conf(8) rule file (default: /etc/pkgadd.conf). If absent, the implicit default rule installs and upgrades all files.
ports_conf_dir
Directory containing CRUX port collection config files for kpm sync --ports (default: /etc/ports).
ports_drivers_dir
Directory containing executable CRUX port sync drivers (default: /etc/ports/drivers).

[repo]#

repository
GitHub repository slug hosting binary releases (default: kryx-linux/ports).
tag
Release tag containing index.json and binary assets (default: rolling-x86_64).
arch
Target architecture selected from index.json (default: x86_64; entries with arch empty or any also match).
index_url
Full http:// or https:// URL to index.json. If omitted while repository and tag are set, it is derived automatically from those values. Default:
https://github.com/kryx-linux/ports/releases/download/rolling-x86_64/index.json
timeout_seconds
HTTP timeout in seconds for syncing index.json and downloading binaries or sources (default: 120, minimum 1).

[build]#

jobs
Parallel build jobs exported as JOBS (default: host CPU count; kpm.ini.example sets 4).
cflags
C compiler flags exported as CFLAGS (default: -O2 -march=x86-64 -pipe).
cxxflags
C++ compiler flags exported as CXXFLAGS (defaults to the value of cflags if unset).
ldflags
Linker flags exported as LDFLAGS when non-empty (default: empty).
makeflags
Flags exported as MAKEFLAGS (defaults to -j<jobs> if unset).
compression
Archive compression mode for kpm build (default: zst). Supported values are gz, bz2, xz, lz, and zst.
source_mirrors
Optional space- or comma-separated mirror base URLs tried before upstream source URLs (default: empty).
download_sources
Download missing remote sources into source_cache (default: true).
strip
Strip unstripped ELF executables, shared objects, and static archives in $PKG while honoring .nostrip (default: true).
compress_manpages
Compress man pages under */man/man*/* with gzip -9 and update man page symlinks (default: true).
ignore_footprint
Skip .footprint verification (default: false).
ignore_new
Permit NEW files during .footprint verification (default: false).
ignore_md5sum
Skip .md5sum verification (default: false).
ignore_signature
Skip .signature verification via signify (default: true).
keep_work
Preserve <work_dir>/<name> after builds (default: false).
download_prog
Fallback downloader program for non-HTTP(S) schemes such as ftp:// (curl or wget; default: curl).
curl_opts, wget_opts
Extra options appended when invoking curl or wget (default: empty).

[ui]#

color
Default ANSI color mode: auto, always, or never (default: auto).

pkgadd.conf Rules#

kpm parses /etc/pkgadd.conf (or the path configured in [paths] pkgadd_conf) using the exact three-column CRUX format:

<EVENT> <REGEX> <YES|NO>

where EVENT is INSTALL or UPGRADE and the last matching rule takes precedence. Files excluded by INSTALL ... NO are omitted from both extraction and the package database. Existing files matched by UPGRADE ... NO are preserved on disk and the incoming version is extracted under <root>/var/lib/pkg/rejected/; if the rejected file has identical permissions and identical or empty contents, it is automatically pruned from rejected/.

PKGFILE FORMAT#

kpm build and kpm search parse standard CRUX Pkgfile recipes directly from the local ports tree.

Header Comments#

Leading # comment lines are parsed for metadata:

# Description: text
Short one-line package summary used by kpm search and kpm-index --ports.
# URL: url
Upstream project homepage.
# Maintainer: contact
Port maintainer information.
# Packager: contact
Original packager information.
# Depends on: pkg1 pkg2 ... (also accepts # Depends:)
Space- or comma-separated list of runtime dependencies used by kpm build --deps, kpm install --deps, and kpm-index --ports.
# Make depends on: pkg1 pkg2 ... (also accepts # Make depends:, # Makedepends:, # Build depends on:)
Optional, fully backward-compatible header listing build-time-only dependencies (such as compilers or code generators). Satisfied during kpm build --deps and kryx-src pkg --deps (binary-first from index.json when available, otherwise built from source), and recorded separately from runtime depends so kpm install --deps does not pull build-only tools onto end-user systems. Ports omitting this header continue to work identically to stock CRUX.

Required and Optional Shell Definitions#

Pkgfile recipes are evaluated in bash with LC_ALL=C.UTF-8:

name, version, release
Mandatory shell variables identifying the package name, upstream version, and CRUX release number.
source=(entry ...)
Optional bash array of source files. Entries beginning with http://, https://, ftp://, or file:// are fetched into source_cache; all other entries are resolved as local files in the port directory.
renames=(name|SKIP ...)
Optional bash array parallel to source, renaming downloaded files inside source_cache. Use SKIP to leave an entry unrenamed.
build()
Mandatory bash function executed with set -e and umask 022 in working directory $SRC, installing package files into $PKG.
unpack_source()
Optional bash function overriding the default source extraction step (which extracts tar/zip/rpm/7z archives with bsdtar -p -o -C "$SRC" -xf and copies non-archive files into $SRC).

Companion Port Files and Output Archive#

Integrity and packaging checks follow CRUX pkgmk(8) conventions using companion files in the port directory rather than in-file checksum arrays:

.md5sum
MD5 digests of source files checked before build() unless ignored.
.signature
Cryptographic signify signature covering Pkgfile, .footprint, and source files, verified when ignore_signature = false and --ignore-signature is not set.
.footprint
Expected sorted package file listing (normalizing lib/modules/<uname -r>/ to lib/modules/<kernel-version>/). If absent on first build, kpm build warns and creates a new .footprint.
.nostrip
Line-delimited patterns passed to grep -v -f to exclude files from ELF stripping.

Built archives are written to <package_dir>/<name>#<version>-<release>.pkg.tar.<compression> using bsdtar --format=gnutar (falling back to tar if bsdtar is absent).

ENVIRONMENT#

KPM_CONFIG
Path to the INI configuration file used when -c/--config is not passed on the command line. Setting KPM_CONFIG treats the configuration path as explicit (failing if the file cannot be read).
NO_COLOR
When set to any non-empty value, disables ANSI color output in auto color mode.
TERM
When set to dumb, disables ANSI color output in auto color mode.
PATH
Searched for helper utilities used during archive handling, builds, and verification: bash, bsdtar, tar, xz, zstd, lzip, gzip, strip, file, signify, curl, wget, and uname.

Exported to Child Processes#

During kpm sync --ports the variable PORTS_DIR is exported to each port driver. During kpm build the following variables are exported to the Pkgfile shell: SRC, PKG, PKGMK_ROOT, PKGMK_SOURCE_DIR, PKGMK_PACKAGE_DIR, PKGMK_WORK_DIR, JOBS, CFLAGS, CXXFLAGS, LDFLAGS (when configured), MAKEFLAGS, and LC_ALL=C.UTF-8.

FILES#

/etc/kpm.ini
Default manual INI configuration file.
/etc/pkgadd.conf
CRUX INSTALL and UPGRADE file handling rules.
/etc/ld.so.conf
Checked under <root> before executing /sbin/ldconfig -r <root>.
/etc/ports/, /etc/ports/drivers/
CRUX port collection definitions and executable drivers invoked by kpm sync --ports.
/usr/ports
Default local CRUX ports tree.
<root>/var/lib/pkg
Directory locked via non-blocking flock(2) (LOCK_SH for read-only commands, LOCK_EX for install, upgrade, and remove transactions).
<root>/var/lib/pkg/db
CRUX plain-text installed package database.
<root>/var/lib/pkg/db.incomplete_transaction
Temporary mode-0444 staging file synchronized with fsync(2) before atomic database replacement.
<root>/var/lib/pkg/db.backup
Hardlink backup of the previous database created immediately prior to renaming the committed transaction into place.
<root>/var/lib/pkg/rejected/
Directory storing upgraded files held back by UPGRADE ... NO rules when their content or permissions differ from the installed version.
/var/lib/kpm/world
Explicitly installed package list (locked alongside /var/lib/pkg) used by kpm info and kpm autoremove.
/var/lib/kpm/hold
Pinned/held packages skipped during kpm update (merged with [repo] hold in /etc/kpm.ini).
/var/cache/kpm/index.json
Locally cached binary repository index written by kpm sync.
/var/cache/kpm/bin/
Cache directory for downloaded, SHA-256 verified binary archives.
/var/cache/kpm/sources/
Cache directory for downloaded upstream source archives used by kpm build.
/var/cache/kpm/packages/
Default output directory for archives built with kpm build.
/var/cache/kpm/work/
Temporary build directory containing per-port src/ and pkg/ subdirectories.

ADVANCED COMMANDS#

kpm info pkg ...
Display full metadata (Name, Version, Collection, Description, URL, Installed status, Runtime Depends, Make Depends, and Required By reverse dependencies).
kpm autoremove [--dry-run]
Identify and remove orphaned dependency packages no longer required by any package listed in /var/lib/kpm/world.
kpm clean [--all] [--bin] [--sources] [--packages] [--keep N] [--dry-run]
Prune stale cached binary archives, partial downloads, locally built packages, and unused upstream sources while retaining installed/latest N versions by default.
kpm check [--broken] [--files] [pkg ...]
With --broken, scans installed ELF binaries and shared libraries natively in Go (equivalent to CRUX revdep) to report missing .so shared library dependencies and affected packages. With --files, verifies every file recorded in /var/lib/pkg/db exists on disk with expected types and permissions. Without flags, runs kpm doctor.
kpm hold [--list | pkg ...] / kpm unhold pkg ...
Pin or unpin packages in /var/lib/kpm/hold (also configurable via [repo] hold = pkg1, pkg2 in /etc/kpm.ini). Held packages are skipped by kpm update unless --ignore-hold is passed.
kpm install pkg=ver / kpm downgrade pkg[=ver]
Install a specific package version from index.json or /var/cache/kpm/bin/, or roll back an installed package to its previous available version.
kpm rejected [--list | --diff | --keep file|all | --upgrade file|all | --merge file|all]
Inspect, diff, keep, upgrade, or conflict-merge files in /var/lib/pkg/rejected/ (non-interactively or interactively via the shared rejmerge(8) backend).

When kpm is invoked via compatibility symlinks installed in /usr/bin (created by default via make install), it dispatches on argv[0] with 100% upstream CRUX flag, configuration, output, and exit-code parity:

pkgadd
Supports -u/--upgrade, -f/--force, -r/--root, -c/--config, -v, -h, and exact /etc/pkgadd.conf + /var/lib/pkg/rejected/ semantics.
pkgrm
Supports -r/--root, -v, -h, shared-file preservation, and reverse directory cleanup.
pkginfo
Supports -i/--installed, -l/--list, -o/--owner, -f/--footprint (archives and directories), -r/--root, -v, -h with exact stock CRUX output formatting.
pkgmk
Supports all 26 upstream flags (-i, -u, -r, -d, -do, -eo, -utd, -uf, -if, -in, -um, -im, -cm, -us, -cs, -is, -rs, -sk, -pk, -ns, -f, -c, -kw, -cf, -v, -h), /etc/pkgmk.conf and PKGMK_* environment variables, .32bit architecture detection, current-directory Pkgfile execution with no arguments, and upstream exit codes 1..10.
ports
Supports -u/--update [collection...], -l/--list, -d/--diff, -v, -h, and custom drivers in /etc/ports/drivers/.
rejmerge
Supports -r/--root, -v, -h, interactive permissions/diff/merge/file menus, and automatic empty directory cleanup.

EXIT STATUS#

kpm#

0
Command completed successfully.
1
Operational error (configuration load error, missing binary in index.json, HTTP, signature, or SHA-256 verification failure, database lock contention, file conflict without --force, reverse dependency refusal without --force, build or footprint failure, or missing root privileges for package installation/removal).
2
Command-line usage error (missing subcommand, unknown global option, or unknown subcommand).

kpm-index#

0
Repository index created or updated successfully.
1
Operational error (invalid --base-url, unreadable existing index, signing error, or filesystem write failure).
2
Invalid command-line flag syntax.

EXAMPLES#

Synchronize the remote binary index (with optional signature verification) and CRUX ports collections:

kpm sync
kpm sync --verify
kpm sync --ports core opt

Search across binaries, local ports, and installed packages, inspect full metadata, and list ports/installed packages:

kpm search zlib
kpm info zlib
kpm list --ports
kpm list --diff
kpm list --owner 'usr/bin/git$'

Install a binary package (or a pinned version) with its binary dependencies:

kpm install --deps git
kpm install zlib=1.3.1-1

When no binary exists in index.json, explicitly build and install the port from the local CRUX ports tree:

kpm build --deps --install myport

Preview and apply binary-first system upgrades, hold/unhold, downgrade, prune orphans, clean cache, and check ABI/file health:

kpm update --dry-run
kpm update
kpm hold linux
kpm downgrade foo
kpm remove myport
kpm autoremove --dry-run
kpm clean --keep 2
kpm check --broken
kpm check --files
kpm rejected --list

Install a package into an alternative CRUX root filesystem using a custom INI configuration:

kpm --config /etc/kpm.ini --root /mnt/crux install zlib

Generate, prune, and sign index.json for a rolling-x86_64 release using kpm-index:

kpm-index \
  --packages ./pkg \
  --ports-dir /usr/ports \
  --index ./pkg/index.json \
  --arch x86_64 \
  --base-url https://github.com/kryx-linux/ports/releases/download/rolling-x86_64 \
  --sign-key ./kryx-release.sec \
  --prune

AUTHORS#

Safwan Ehfaz Saad <ezke5>

SEE ALSO#

pkgmk(8), pkgadd(8), pkgrm(8), pkginfo(8), ports(8), rejmerge(8), kryx-src(8), gports(8)