CRUX Package Keeper is a toolset designed to efficiently manage packages and their sources in CRUX environments.
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:
x86_64, arm64, armhf).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:
pkgname#1.0-1.x86_64.cpk, pkgname#1.0-1.arm64.cpk).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:
.cpk) that embeds port sources, metadata, and architecture information.cpk search, cpk deptree, cpk verify, cpk diff, etc.) that extend the functionality of pkgutils.In short, pkgutils does the heavy lifting, while cpk provides the missing context and metadata.
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
deptree Show recursive dependency tree for a package
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 CPKINDEX 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>.
cpk updateUsage: (no arguments)
CPK_HOME_DIR exists; otherwise prints an error.CPKINDEX from ${CPK_REPO_URL}/CPKINDEX into CPK_HOME_DIR.cpk info <package> [--field]Usage: one required argument (package name), optional field filter
CPKINDEX..cpk.info file directly from the repository (faster)..cpk.info is not available, falls back to downloading and extracting the .cpk archive and parsing the Pkgfile.--name, --version, --arch, --description, --url, --dependenciescpk info vim - Shows all package informationcpk info vim --version - Shows only the versioncpk info vim --dependencies - Shows only dependenciescpk deps <package>Usage: one argument (package name)
cpk info <package> --dependencies).CPKINDEX and displays its dependencies.cpk deptree <package>Usage: one argument (package name, pkgname#version-release, or path to a .cpk file)
prt-get deptree).CPKINDEX. Local .cpk paths use Pkgfile inside the archive.[i] when the package appears installed and [ ] otherwise.--> instead of repeating its subtree (shared or diamond dependencies).cpk search <term>Usage: one argument (substring to match)
CPKINDEX and searches for the given term; lists matching package names.cpk listUsage: (no arguments)
pkginfo -i to list installed packages on the system.cpk diffUsage: (no arguments)
pkginfo -i.CPKINDEX).cpk verify <package>Usage: one argument (package name or key)
pkgmk -do to ensure all source files are fetched..signature using public keys found under /etc/ports/.cpk build <package>Usage: one argument (package name or key)
pkgmk -d inside the source directory to build the package.cpk install <package> [--upgrade] [--no-deps]cpk install <path/to/package.cpk> [--upgrade] [--no-deps]cpk add <package> [--upgrade] [--no-deps]cpk add <path/to/package.cpk> [--upgrade] [--no-deps]Usage: one required argument (package name or path to .cpk), optional flags
.cpk file.add is an alias for install (same options and behavior).CPKINDEX recursively before installing the requested package. Local .cpk paths use Pkgfile. Use --no-deps to install only that package.--upgrade applies only to the package named on the command line, not to dependencies pulled in automatically.CPKINDEX (newest version, or an exact pkgname#version-release if you specify it)..cpk filename to extract package name, version, and architecture.--upgrade is specified; otherwise prints a warning.pkgadd -r <CPK_INSTALL_ROOT> [ -u ] <package_file> to install or upgrade.cpk install vim - Install from repository (dependencies first)cpk install vim --no-deps - Install only vimcpk install bash#5.2-1 - Install a specific version from the indexcpk install /tmp/mypackage#4.1.0-1.i686.cpk - Install from local filesudo cpk add /tmp/mypackage#4.1.0-1.i686.cpk - Same as install with sudocpk uninstall <package>cpk del <package>cpk rm <package>Usage: one argument (package name)
pkgrm -r <CPK_INSTALL_ROOT> <pkgname> to remove it.del and rm are aliases for uninstall.cpk upgrade [<package>...]Usage: zero or more package names
cpk install --upgrade when needed.cpk cleanUsage: (no arguments)
CPK_HOME_DIR and removes all files and directories except CPKINDEX.cpk index <repo>Usage: one argument (local repository path)
CPKINDEX from .cpk files in the repository directory.cpk archive <portsdir> <repo>Usage: two arguments (
<portsdir> for built packages (*.pkg.tar.gz, .bz2, .xz).name#version-release.pkg.tar.*).<repo>/<name>/<version-release> and creates .cpk archives.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.
This project is licensed under the GPL-3.0 License. See the LICENSE file for details.