rpmconf - Man Page

This tool searches for .rpmnew, .rpmsave and .rpmorig files and asks you what to do with them: keep the current version, replace with the previous version, or review the diff.

Examples (TL;DR)

Synopsis

    

rpmconf [ options ... ] 

    

 [ -a, --all ] 

    

 [ -o<package>, --owner=<package> ] 

    

 [ -f<type> --frontend=<type> ] 

    

 [ --root <ROOT> ] 

    

 [ -c, --clean ] 

    

 [ -d, --debug ] 

    

 [ -D, --diff ] 

    

 [ -t, --test ] 

    

 [ -u, --unattended [<MODE>] ] 

    

 [ -x, --exclude <DIRECTORY> ] 

    

 [ -Z ]

Description

Rpmconf will search for all config file of given package (or all installed packages) and will check if coresponding .rpmsave, .rpmnew or .rpmorig files exist. If so, you will be asked if you want to keep the current version, revert to the previous version, or diff the two files. The unwanted file is then deleted.

Additionally, rpmconf can also handle application configuration, if the application supports rpmconf. The application must have an executable file present in /usr/share/rpmconf/. The file must have the same name as package itself and the package must own that file. The executable must be idempotent, i.e. subsequent executions should have no effect. Ideally it should be a Puppet/Chef/Ansible/CFengine manifest.

Options

-a,  --all

Check configuration files of all packages.

-o<package>, --owner=<package>

Check only configuration files of given package.

-f<type>, --frontend=<type>

Define which frontend should be used for merging. Valid options are: vimdiff, gvimdiff, diffuse, kdiff3, meld, sdiff and env. When set to env, the command to use is taken from the environment variable $MERGE. The default is env.

-c,  --clean

Find all .rpmnew and .rpmsave files in /etc and /var directories. List all files belonging to installed packages, then write all files which are orphaned and ask if it is safe to delete them.

-d,  --debug

Dry run. Instead of executing an action (move or delete a file) the filename will be echoed to standard output. However, the executable for merging of configuration files will still be executed. Beware that this option is position-sensitive: only actions specified after --debug are dry-run, e.g. --all --debug --clean will run --clean in dry run mode but not --all.

-D,  --diff

Non-interactive diff mode. This option works with --owner and --all. Useful to audit config files after package upgrades.

--root ROOT

Specifies an alternative installroot, relative to where all packages are installed.

-t,  --test

Just test existence of files to merge. If there is some file to merge then rpmconf will print it and exit with status code 5. If there are none to merge, then exit with status code 0.

-u [<MODE>], --unattended [<MODE>]

Unattended mode. Do not prompt user, but perform actions based on MODE. Valid options are: use_maintainer, use_your, default. use_maintainer replaces existing configuration files with .rpmnew files and deletes leftover .rpmsave and .rpmorig files. use_your deletes .rpmnew files and replaces existing configuration files with .rpmsave files. default does use_your for .rpmnew files and use_maintainer for .rpmsave files, as are the default prompts in interactive mode. Specifying MODE is optional, default is used by default.

-V,  --version

Display rpmconf version. This option expects that this script is installed as rpm package.

-x,  --exclude [DIRECTORY [DIRECTORY ...]]

Exclude DIRECTORY from checking. Applies only for -c.

-Z

Display the SELinux contexts of the old and new files. Note: if you choose to install .rpmsave version. It is copied to the original filename, therefore its SELinux context is reset to the default value specified by SELinux policy.

See Also

rpm(8)

Authors

Miroslav Suchý <msuchy@redhat.com>

Referenced By

dnf-rpmconf(8), fedora-upgrade(8).

20 July 2024 Version 0.2