cpk

CRUX Package Keeper (cpk)

CRUX Package Keeper is a toolset designed to efficiently manage packages and their sources in CRUX environments.

Features

Motivation

In CRUX, binary packages (.pkg.tar.gz, .pkg.tar.bz2, .pkg.tar.xz) are intentionally minimal. While this design keeps packages lightweight, it also comes with some drawbacks:

Because of these limitations, binary packages alone are not fully self-descriptive. Installing them without access to the corresponding port source may reduce portability and reliability, as important contextual information is missing.

cpk addresses these issues by embedding the complete port source within the package and extending the package format to include the target architecture in its name. This makes packages:

Relation to pkgutils

cpk is not a replacement for pkgutils but an extension built on top of it. All low-level package management tasks (installation, removal, querying, etc.) are still handled by pkgadd, pkgrm, pkginfo, pkgmk and related tools from pkgutils.

What cpk adds on top is:

In short, pkgutils does the heavy lifting, while cpk provides the missing context and metadata.

Basic Usage

CRUX Package Keeper - package management tool for CRUX Linux

Usage:
  cpk <command> [options]
  cpk help <command>   Show detailed help for a specific command

Commands:
  update      Update the index of available packages
  info        Show information about installed or available packages
  deps        Show package dependencies
  search      Search for packages by name or keyword
  list        List all installed packages
  diff        Show differences between installed and available packages
  verify      Verify integrity of package source files
  build       Build a package from source files
  install     Install or upgrade packages on the system
  add         Alias for install
  uninstall   Remove packages from the system
  del         Alias for uninstall
  rm          Alias for uninstall
  upgrade     Upgrade all installed packages to the latest versions
  clean       Clean up package source files and temporary directories
  index       Create a CPKINDEX file for a local repository
  archive     Create .cpk archive(s) from a directory containing ports
  help        Show this help message or detailed help for a command
  version     Show version information

General Options:
  -c, --config <file>      Set an alternative configuration file (default: /etc/cpk.conf)
  -r, --root <path>        Set an alternative installation root (default: /)
  -C, --color              Show colorized output messages
  -v, --verbose            Show verbose output messages
  -h, --help               Print this help information

For detailed help on a specific command, use cpk help <command>. For example:

Command Reference

cpk update

Usage: (no arguments)

cpk info <package> [--field]

Usage: one required argument (package name), optional field filter

cpk deps <package>

Usage: one argument (package name)

cpk search <term>

Usage: one argument (substring to match)

cpk list

Usage: (no arguments)

cpk diff

Usage: (no arguments)

cpk verify <package>

Usage: one argument (package name or key)

cpk build <package>

Usage: one argument (package name or key)

cpk install <package> [--upgrade]

cpk install <path/to/package.cpk> [--upgrade]

cpk add <package> [--upgrade]

cpk add <path/to/package.cpk> [--upgrade]

Usage: one required argument (package name or path to .cpk file), optional --upgrade flag

cpk uninstall <package>

cpk del <package>

cpk rm <package>

Usage: one argument (package name)

cpk upgrade [<package>...]

Usage: zero or more package names

cpk clean

Usage: (no arguments)

cpk index <repo>

Usage: one argument (local repository path)

cpk archive <portsdir> <repo>

Usage: two arguments ( )

Contributing

If you want to contribute to this project, feel free to fork the repository, make your changes, and submit a pull request. Contributions from the community are always welcome! See the CONTRIBUTING file for details.

License

This project is licensed under the GPL-3.0 License. See the LICENSE file for details.