Amiga Unix — 68040 · 68060

Manual pages › Character sets, environment, package files (5)

conffile(5)

package configuration files that keep your edits across upgrades

Package: APKG, added for amigaux.

conffile - package configuration files that keep your edits across upgrades

A conffile is a configuration file that a package ships with a default and that the administrator edits in place, such as /etc/apkg.conf or a daemon's own configuration. A package marks it as an editable object of class conffile in its pkgmap(5) (e conffile /etc/rsyncd.conf), and carries the two class action scripts i.conffile and r.conffile. They run under every pkgadd(1M) and pkgrm(1M), the stock ones included, and under apkg(1).

Most of the system's own settings do not need this: a package ships its defaults in a file it owns, and your changes go in a separate file that no package owns (as module parameters do in modreg.local.d). Conffiles are for files that have to be edited where they are.

For each conffile, i.conffile compares three things: the file on disk, the new default in the package, and the baseline - a copy of the default the package shipped last time, kept in /var/sadm/conffiles/pkginst/path.

•
No file and no baseline (first install): the default is installed.
•
The file equals the new default, or still equals the old baseline (you never edited it): the new default is installed, silently.
•
The file differs from both (you edited it, or something other than the package wrote it): your file is kept. The new default is written beside it as file.new, the file is listed in /var/sadm/conffiles/PENDING, and pkgadd prints
file: kept your version; the new default is file.new
If the package's default has not changed since the last install, an edited file is simply kept, with no message and no new .new file.
•
The file is gone but its baseline exists (you removed it): the package puts its default back and says so. The package tools require every file a package owns to exist after the install, so a removed conffile cannot stay removed.

In every case the new default becomes the baseline.

Compare the two, for example with diff(1):

diff /etc/apkg.conf /etc/apkg.conf.new

Then either keep your file and delete the .new file, or move the .new file over yours (and carry your changes into it). The next install or upgrade of the package notices either choice: a file equal to the new default leaves PENDING and loses its stale .new. apkg lists the pending files after each transaction.

A plain pkgchk(1M) reports a conffile you replaced by hand until the package database is told about it, with installf -c conffile pkginst path e and then installf -f pkginst; pkgchk -n skips editable files and is always the clean post-install check.

r.conffile removes a conffile you never edited, together with its baseline. A file you edited is kept, with its baseline, and pkgrm says so; it then belongs to no package. A conffile that another package also owns (amix-base takes over some of core's files) is left to that package whatever its contents; only the baseline goes, and pkgrm says so. Any .new file and its PENDING line are removed in both cases. Installing the package again finds the kept file and its baseline, and the rules above apply.

Removing a package therefore deletes every conffile of it you never edited. A package the system cannot boot without carries APKG_ESSENTIAL=yes in its pkginfo, and apkg(1) refuses to remove it; the stock pkgrm does not look at the mark.

/var/sadm/conffiles/pkginst/path
the baseline: the default the package last shipped for path
/var/sadm/conffiles/PENDING
one “pkginst path” line per conffile whose new default waits in path.new
the new default beside a kept file

apkg(1), pkgadd(1M), pkgrm(1M), pkgchk(1M), installf(1M), apkg.conf(5), admin(5), pkgmap(5)

The scripts use only Bourne sh(1) and core commands (cp, cmp, mkdir, rm, rmdir, mv, expr), so a package keeps your file under any installer. One conffile has one owning package.

October 2026 apkg 0.3.4