This project is currently in early alpha stage!
prt - CRUX port utility written in Go, aiming to replace prt-get, ports, and some pkgutils (on my machine)
prt command [arguments]
prt is like
prt-get(8) a port/package management utility which provides
additional functionality to the CRUX pkgutils. In addition to that it also
strives to replace the CRUX pkgutils in Go. It works with the local ports tree
and is therefore fully compatible with
prt-get(8). It offers the following features:
- Listing dependencies of ports recursively, with an optional flag to print using tree view.
- Generating graphs of port dependencies
- Listing outdated package, by comparing port versions with the installed version
- Easily printing port information such as the maintainer, version, release, et cetera
- Install ports and their dependencies with a single command
- List ports, with optional flags to also only list installed ports, print with repo information or to print with additional version information
- Print the location of a port
- Searching through files ports provide, with an optional flag to only search through installed ports
- Pull in ports using
- Update outdated packages
- Uninstall installed packages
Like said before, unlike
prt-get(8), prt reimplements
fully in Go. This is mostly for more control. Like
prt-get it does provide
some nice extra functionality such as listing and installing dependencies,
getting the location of a port, aliasing ports (for example
6c37-dropin/libressl), and ordering ports with the same name depending on how
"important" the repo is the port resides in.
There are a few differences, for example, unlike
prt-get(8) you need to be in
the port's directory for most commands to work, like how
pkgmk(8) works. This
has a few advantages, for example you can quickly download a port anywhere on
the filesystem, and install it and its dependencies using
prt install. Because
prt-get depinst needs a port name, you can only install ports that are
located in a predefined
Another difference with
prt-get(8) is that prt does not use a cache file,
while still being nearly as fast or faster in some cases.
Aliasing is also handeled a bit different.
prt-get(8) aliases ports based on
name, but prt on name and repo. This makes it possible to alias
The prt syntax is inspired by
go(8), and thus uses
so called commands which always have to be the first non-option argument passed.
The commands are:
depends list dependencies recursively,
diff list outdated packages
info print port information
install build and install ports and their dependencies
list list porst and packages
loc print port locations
prov search ports for files
pull pull in ports
sysup update outdated packages
uninstall uninstall packages
help print help and exit
Make sure to check
/etc/prt/config.toml after installation and edit values to
fit your needs and setup.
If you use
cd wrapper for
prt loc will also be installed, and some
infocommand. (This always prints something, even when not in a port directory...)
get_filenamefunction to Go. (so uhh,
pkgmkdoes something with "absolute paths", do I need this as well?)
get_basenamefunction to Go.
check_pkgfilefunction to Go.
check_directoryfunction to Go.
check_filefunction to Go.
download_filefunction to Go. (
curlis still used, is there some pure Go implementation?)
download_sourcefunction to Go.
unpack_sourcefunction to Go. (some
Pkgfiles create their own unpack functions, I still need to detect and use those.)
make_md5sumfunction to Go.
make_footprintfunction to Go.
check_md5sumfunction to Go.
check_signaturefunction to Go. (
signifyis still used, is there some pure Go implementation?)
make_signaturefunction to Go.
strip_filesfunction to Go.
compress_manpagesfunction to Go.
check_footprintfunction to Go.
make_work_dirfunction to Go.
remove_work_dirfunction to Go.
install_packagefunction to Go.
cleanfunction to Go. (not going to implement, there is
- Write fish
- Write bash
cdpfunction. (need to actually test this)
- Write fish completions.
- Write bash completions.
- Write tests.
- Make errors pretty and consistent.
- Test environment variables.
- Write README and man pages. (needs some updates with changes)
- Check for missing config values.