I highly recommend reviewing the build scripts located in $RIDMETA.
If no packages are specified, some flags will default to using @all.
The main environment variable is $RIDHOME. It defaults to /rid, but another sane default is /opt/rid.
Other important variables include:
$RIDMETA # where metafiles (buildscripts) are stored
$RIDPKGSJSON # a json caching info for all packages
$RIDSOURCES # where source tarballs are stored
Rid assumes the existence of /etc/env for certain packages. On my system, /etc/env contains global aliases, functions, and environment variables. /etc/profile and /etc/bashrc both source it.
Rid also has its own env file, which it sources before building packages.
Sets are stored in $RIDHOME/sets; rid expands them into a list of packages. Recursive sets are supported. Sets are invoked with @set, where 'set' is the name of a file in $RIDSETS. A set is a new-line delimited list of packages stored in a file.
The glfs-net set looks like this:
$ cd $RIDHOME/sets
$ cat glfs-net
libtasn1
nspr
nss
p11-kit
make-ca
libunistring
libidn2
libpsl
curl
wget
git
By default, rid allows for typos in package names, and will search for the intended package. This can be disabled by setting behavior/search_threshold to 0 in the config.
Rid is configured in $RIDHOME/config.toml
.
Rid has the following flags:
-i, --install
-I, --install-with-dependencies
-r, --remove
-R, --remove-with-dependencies
-u, --update
-U, --update-with-dependencies
-d, --dependencies
-D, --dependants
-p, --prune
-g, --get
-s, --search
-l, --list
-o, --outdated
-n, --news
-c, --cache
-k, --check-upstream
--validate-links
-S, --sync
-v, --verbose
-q, --quiet
-f, --force
-h, --help Print help
-V, --version Print version
Detailed examples exist in examples/
. Run them with cargo run --example
<example>.
Rid executes $RIDHOME/bin/mint which interacts with meta files. Mint sources the meta files and evaluates directions their directions based on flags passed. Meta files contain variables and functions for installation, updates, and removal.
The default repository is 'main'. It may be overridden with the REPO environment variable.
/rid/bin/wr is a utility for templating and writing meta files.
$NAME # package name
$VERS # package version, defined globally in $RIDPKGSVERS
$LINK # tarball download link
$DOWN # extra download links
$UPST # package upstream link (used for parsing upstream versions)
$VCMD # version command (often imperfect defaults exist for most $UPST repos)
$NEWS # news/tips for a package
$DESC # package description
$DEPS # dependencies for a package
idir() # install directions
rdir() # removal directions
udir() # update directions
9999 # nightly/latest
0 # package has no relevant version