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 ports(8), pkgmk(8), pkgadd(8) and
of course 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
git(1) - Update outdated packages
- Uninstall installed packages
Like said before, unlike prt-get(8), prt reimplements pkgmk(8)/pkgadd(8)
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 core/openssl to
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 prtdir.
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 foo/bar to
baz/bar.
The prt syntax is inspired by prt-get(8), git(8) and 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
https://github.com/onodera-punpun/crux-ports/blob/master/prt/Pkgfile
Make sure to check /etc/prt/config.toml after installation and edit values to
fit your needs and setup.
If you use fish a cd wrapper for prt loc will also be installed, and some
handy completions.
- Implement
dependscommand. - Implement
diffcommand. - Implement
infocommand. (This always prints something, even when not in a port directory...) - Implement
graphcommand. - Implement
installcommand. - Implement
listcommand. - Implement
loccommand. - Implement
patchcommand. - Implement
provcommand. - Implement
pullcommand. - Implement
sysupcommand. - Implement
uninstallcommand.
- Convert
pkgmkget_filenamefunction to Go. (so uhh,pkgmkdoes something with "absolute paths", do I need this as well?) - Convert
pkgmkget_basenamefunction to Go. - Convert
pkgmkcheck_pkgfilefunction to Go. - Convert
pkgmkcheck_directoryfunction to Go. - Convert
pkgmkcheck_filefunction to Go. - Convert
pkgmkdownload_filefunction to Go. (curlis still used, is there some pure Go implementation?) - Convert
pkgmkdownload_sourcefunction to Go. - Convert
pkgmkunpack_sourcefunction to Go. (somePkgfiles create their own unpack functions, I still need to detect and use those.) - Convert
pkgmkmake_md5sumfunction to Go. - Convert
pkgmkmake_footprintfunction to Go. - Convert
pkgmkcheck_md5sumfunction to Go. - Convert
pkgmkcheck_signaturefunction to Go. (signifyis still used, is there some pure Go implementation?) - Convert
pkgmkmake_signaturefunction to Go. - Convert
pkgmkstrip_filesfunction to Go. - Convert
pkgmkcompress_manpagesfunction to Go. - Convert
pkgmkcheck_footprintfunction to Go. - Convert
pkgmkmake_work_dirfunction to Go. - Convert
pkgmkremove_work_dirfunction to Go. - Convert
pkgmkinstall_packagefunction to Go. - Convert
pkgmkcleanfunction to Go. (not going to implement, there isrm)
- Write fish
cdpfunction. - 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.
Camille Scholtz