PKGADD.CONF(5) File Formats Manual PKGADD.CONF(5)

pkgadd.confconfiguration file for pkgadd

/etc/pkgadd.conf

This manual page describes the format of the pkgadd.conf file. This file can be used to alter the way pkgadd(8) upgrade and/or install the package.

file contain rules, that are built out of three fragments: Event, Pattern and Action. The Event describes in what kind of situation this rule applies. Currently there are two types of events: UPGRADE and INSTALL. UPGRADE rules are applied when a package is installed over an existing version, and INSTALL rules are applied in any case. The Pattern is a regular expression. The Action applicable to both the UPGRADE and INSTALL event is and . More than one rule of the same Event type is allowed, in which case the first rule will have the lowest priority and the last rule will have the highest priority.

For example:

UPGRADE ^etc/.*$ NO
UPGRADE ^var/log/.*$ NO
UPGRADE ^etc/X11/.*$ YES
UPGRADE ^etc/X11/XF86Config$ NO

The above example will cause pkgadd(8) to never upgrade anything in /etc or /var/log (subdirectories included), except files in /etc/X11 (subdirectories included), unless it is the files /etc/X11/XF86Config. The default rule is to upgrade/install everything, rules in this file are exceptions to that rule.

: The Pattern should never contain an initial slash (‘/’) since you are referring to the files in the package, not the files on the disk.

If pkgadd(8) finds that a specific file should not be upgraded it will install it under /var/lib/pkg/rejected/. The user is then free to examine/use/remove that file manually or use rejmerge(8) to manage rejected files.

/etc/pkgadd.conf
Configuration file for pkgadd(8).
/var/lib/pkg/db
Database of currently installed packages.
/var/lib/pkg/rejected/
Directory where rejected files are stored.

What follows is a sample configuration file which may, or may not match your environment:

#
# /etc/pkgadd.conf: pkgadd(8) configuration
#
# See pkgadd.conf(5) for more information.
#

# <Event>      <Pattern>                  <Action>

# Default rule (implicit)
#UPGRADE       ^.*$                       YES

UPGRADE        ^var/log/.*$               NO
UPGRADE        ^var/spool/cron/.*$        NO
UPGRADE        ^var/run/utmp$             NO

UPGRADE        ^etc/rc.*$                 YES
UPGRADE        ^etc/rc\.conf$             NO

# End of file.

All lines which begin with the "#" character are comments and will not be parsed. The first three rules will cause pkgadd(8) to never upgrade anything in /var/log (subdirectories included), never upgrade anything in /var/spool/cron and never upgrade /var/run/utmp file. The last two rules will cause pkgadd(8) to upgrade any /etc/rc* files, except /etc/rc.conf system settings.

pkgadd(8)

February 19, 2024 Zeppe-Lin