SPS · log · files · refs · tags · releases · people · languages · GitHub · file
man/pkconf.1
3582 bytes at 2909919 · GitHub
.TH PKCONF 1 "2026-09-22" "SPS 1.0" "SPS Commands"
.SH NAME
pkconf \- reconcile protected configuration files with packaged defaults
.SH SYNOPSIS
.nf
pkconf [--backup] [PACKAGE]
pkconf --list [--raw] [PACKAGE]
pkconf --diff PATH
pkconf --accept [--backup] PATH...
pkconf --keep PATH...
pkconf --accept-all [--backup] [PACKAGE]
pkconf --keep-all [PACKAGE]
.fi
.SH DESCRIPTION
An upgrade never overwrites a protected configuration file that the
administrator has changed. Instead
.BR pkin (1)
keeps the local file and writes the new packaged default beside it as
.I .sps-new
(or
.IR .sps-new.VERSION-RELEASE ).
.PP
.BR "sget config-status" (1)
reports that situation and is deliberately read-only.
.B pkconf
is the command that acts on it, the way
.BR rejmerge (8)
does for CRUX and
.BR etc-update (1)
does for Gentoo.
.PP
With no options
.B pkconf
walks every pending packaged default and prompts for each one. An optional
.I PACKAGE
limits the review to the files owned by that package.
.PP
Accepting a packaged default installs it over the local file and removes the
sibling. Because
.BR pkin (1)
already recorded the new package's digest for that path, the file then matches
its record again and
.BR pkcheck (1)
reports the package clean. Keeping the local file only removes the sibling; the
path stays locally modified, which remains the honest state.
.SH OPTIONS
.TP
.B --list
List pending packaged defaults and exit without changing anything.
.TP
.B --raw
With
.BR --list ,
print sorted tab-separated records: package, package-relative path,
.I clean
or
.IR modified ,
and the packaged default's absolute path.
.TP
.B --diff " PATH"
Print
.B diff -u
between the live local file and the packaged default. The plain path, the
.I .sps-new
sibling, and the versioned spelling all select the same file.
.TP
.B --accept " PATH..."
Install the packaged default for each named path.
.TP
.B --keep " PATH..."
Discard the packaged default for each named path and keep the local file.
.TP
.B --accept-all
Install every pending packaged default without prompting.
.TP
.B --keep-all
Discard every pending packaged default without prompting.
.TP
.B --backup
Before replacing a local file, copy it to
.IR PATH .sps-bak .
.SH INTERACTIVE KEYS
.TP
.B d
Show a unified diff of the local file against the packaged default.
.TP
.B n
Install the packaged default.
.TP
.B k
Keep the local file and remove the packaged default.
.TP
.B e
Open a scratch copy in
.B $VISUAL
or
.BR $EDITOR ,
then write the result over the local file and remove the packaged default. The
edit happens on a copy, so abandoning it damages neither file.
.TP
.B s
Skip this file and leave both copies in place.
.TP
.B q
Stop reviewing and report what was done.
.SH ENVIRONMENT
.TP
.B SPS_PRESERVE
Comma-separated list of package-relative path prefixes that are protected. The
default is
.BR etc .
When it is
.BR none ,
.B pkconf
exits with a usage error because nothing is protected.
.TP
.B SPS_ROOT
Alternate filesystem root. Paths given on the command line may be written with
or without that prefix.
.SH FILES
.TP
.I $SPS_DB/installed/NAME/hashes
The recorded digest for every regular file a package owns. A protected path
whose live file no longer matches this digest is the locally modified case.
.TP
.I $SPS_DB/history
Each accept, keep, and merge is appended here.
.SH EXIT STATUS
Returns 0 on success, 2 for usage errors or when
.B SPS_PRESERVE
is
.BR none ,
3 when a named path has no pending packaged default, and 11 for database
failures.
.SH SEE ALSO
.BR sget (1),
.BR pkin (1),
.BR pkcheck (1),
.BR sps.conf (5)