prt-get/doc/prt-get.conf.5

188 lines
6.2 KiB
Groff

.\" man page for prt-get.conf
.\" Johannes Winkelmann, jw@tks6.net
.PU
.TH prt-get.conf 5
.SH "NAME"
.LP
prt-get.conf - Configuration file for prt-get
.SH "DESCRIPTION"
This file, by default
.IR /etc/prt-get.conf ,
is read by prt-get and prt-cache (see prt-get(8) and prt-cache(8))
.LP
It might look like this:
.IP
.nf
###
# prt-get.conf
# root directories
prtdir /usr/ports/core
prtdir /usr/ports/opt
prtdir /usr/ports/contrib
prtdir /usr/ports/unofficial
# use mutt and yafc from local build directory
prtdir /home/jw/build:mutt, yafc
# change default location of cache file
cachefile /tmp/port-cache
# write a log file
writelog enabled
logmode append
logfile /tmp/log/%n.log
# show compact readme information
readme compact
.fi
.LP
This example configures a few values: the location where to look
for the ports, the location of the cache file, some log options, and
how to notify the user about README files.
If you don't specify the
cache file, the default location is
.B /var/lib/pkg/prt-get.cache
.LP
Every line can contain one configuration option. The format of each line
is
.B <key> <value>.
The keys that accept arbitrary strings as their value are
.B prtdir,
.B cachefile,
.B logfile,
and the
.B *command
keys (see below). Every other key must be given a value from a predetermined
set (e.g., yes|no).
The value for
.B prtdir
is a directory; the value for
.B cachefile
is the file to be used as cache.
.SH Boolean keys
.B runscripts
if set to yes, execute pre- and post-install scripts
.B preferhigher
if set to yes, prt-get will parse version strings and prefer the
higher one, even if the one found in the ports tree is lower. Will
influence diff, quickdiff and sysup
.B useregex
if set to yes, prt-get will interpret search and filter patterns in
list, listinst, printf, search, dsearch and fsearch as regular
expressions.
.B softdeps
if set to yes, during an update operation prt-get will perform a greedy search
of the dependency graph, visiting any \fBinstalled\fP optional dependency of
the ports specified on the command line and recursing until either a leaf
node is found (port that doesn't depend on anything else) or a cycle is
created. If a cycle is \fBnot\fP created by following a soft dependency,
then this dependency relationship is added to the list of edges, and
topological sort of the resulting graph can proceed as usual. The default is
\fBsoftdeps no\fP, which means prt-get will only consider hard dependencies
when walking the directed graph.
.SH Overriding default commands
.B makecommand,
.B addcommand,
.B removecommand,
and
.B runscriptcommand
can be given to override the defaults ('pkgmk' for the makecommand, 'pkgadd'
for the addcommand, 'pkgrm' for the removecommand and 'sh' for the
interpreter of pre- and post-install scripts). These are expert options
which should not be used in general; when used the wrong way, they can
completely break prt-get's original functionality.
.SH Keys that control logging
.B writelog
which can be set to 'enabled' or 'disabled'
.B logmode
which can be set to 'append' or 'overwrite'
.B rmlog_on_success
which can be set to 'yes' or 'no'; when set to yes, log files of
successful builds will be removed
.B logfile
a template for the path where logs get saved. All occurences of %n in
logfile are replaced with the port name and all occurences of %p are
replaced with the port's path, e.g. for port gcc in core, %p would be
.B /usr/ports/core
and %n would be
.B gcc.
This allows you to have separate log files per port.
Separate log files for each version and release can be achieved
using the placeholders %v and %r, respectively. But if you want to
enable \fBrmlog_on_uninst\fP, it is best to avoid %p, %v, and %r
when specifying \fBlogfile\fP (as explained below).
.B rmlog_on_uninst
which can be set to 'yes' or 'no'; when set to yes, uninstalling a
package will also try to delete its build log. Replacements in the template
\fBlogfile\fP will be made using the \fIcurrent values\fP from the database
of installed packages, and from the active repositories. If log files exist
with different values of %p, %v, or %r than what the database and repositories
provide, then the pattern substitutions will fail to match the names of those
logs, and this feature will be a no-op. For example, suppose you specify
the logfile pattern \(dq%p/.buildlogs/%n-%v-%r.log\(dq, and you have a package
installed on your system through many versions, or after it has been
moved from opt to contrib. Uninstalling that package would leave behind all the
build logs except the latest. This pattern is also fragile with respect to
repository purges; if one of your installed ports is dropped from the official
repos, then either \(dq%p\(dq will expand to the path of your personal overlay
(you did make a copy, right?), or it will not expand at all! See the EXAMPLES
section of \fBprt\-get(8)\fP for an alternative way to tidy up your directory
of build logs.
.B readme
can be set to 'disabled', to suppress the notification after
installing a port with a README file; 'compact', to collect all the READMEs
into one post-transaction output; or 'verbose', to print separate
information about each port with a README file. See
.B prt-get(8)
and especially the readme command how to read those README files using
prt-get.
.LP
The order of the prtdir options is important: if a port is in multiple
directories, prt-get will use the one found first (directories listed
first have precedence).
.LP
If you want to restrict the ports used from one prtdir, you can
append a comma separated list of ports to be used after the path,
using a colon (':') character to separate the two components
.B path:package1, package2,...
Note that this slows down prt-get a lot if you list a lot of packages.
If you become aware of speed problems due to this feature, create a separate
ports directory instead and fill it with symlinks to the ports you want.
.LP
You can write comments after a '#' character. If you have '#'
characters in your paths, there's no way to escape them (likewise there is
no way to escape ':' characters). Complain to the author if this is a
problem :-)
.SH "AUTHORS"
Johannes Winkelmann <jw@tks6.net>, John McQuah <jmcquah at disroot dot org>
.SH "SEE ALSO"
prt-get(8), pkgmk(8) pkgadd(8), ports(8)