Skip to content

Configuration Options

Oliver Kurth edited this page Oct 20, 2023 · 13 revisions

Configuration Options

The config file resides in /etc/tdnf/tdnf.conf. A typical configuration looks like this:

[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=true
repodir=/etc/yum.repos.d
cachedir=/var/cache/tdnf

cachedir

Type: string

Default: /var/cache/tdnf

The location of the cache directory. This is the directory where metadata are stored, and RPMs will be temporarily stored when they are downloaded.

clean_requirements_on_remove

Type: boolean

Default: false

Implemented since 3.3.1.

Determines whether automatically installed dependencies will also be removed when a package is removed.

distroarchpkg

Type: string

Default: x86_64

The architecture of the distribution.

distroverpkg

Type: string

Default: system-release

excludepkgs

Type: list

Default: none

List of packages to be excluded from any operations. Packages in this list will not be installed, updated or downgraded.

gpgcheck

Type: boolean

Default: false

Determines whether packages will be checked for their gpg signature.

installonly_limit

Type: integer

Currently not implemented!

Number of concurrently install only packages.

keepcache

Type: boolean

Default: false

Whether to keep downloaded packages after installation.

minversions

Type: list

Default: none

List of packages with versions. Packages will never be downgraded below that version. Example: minversions=tdnf=3.1.5 foo=1.2.3. This can also be configured with files in the directory minversions.d in the same directory as the config file (so usually /etc/tdnf/minversions.d), with the the extension .conf. Example:

mkdir -p /etc/tdnf/minversions.d
echo tdnf=3.1.5 > /etc/tdnf/minversions.d/tdnf.conf

plugins

Type: boolean

If set, plugins are enabled. This is needed for plugins since they are disabled by default.

pluginpath

Type: string

Default: /usr/lib/tdnf-plugins (or modified on build time with SYSTEM_LIBDIR)

The path for plugins.

pluginconfpath

Type: string

Default: /etc/tdnf/pluginconf.d

Path for the plugin configurations.

proxy

Type: string

Default: none

Set this to a proxy, if any.

proxy_password

Type: string

Default: none

The proxy password, if any.

proxy_username

Type: string

Default: none

The proxy user name, if any.

repodir

Type: string

Default: /etc/yum.repos.d

The location where the .repo files reside.

Configuration in sub directories

There are also configurations in sub directories under /etc/tdnf.

Package Locks

Package locks are configured in /etc/tdnf/locks.d in files with the extension .conf. There can be multiple files with multiple lines each with one package name per line.

A "locked" package can not be removed, upgraded or downgraded. It has no effect when it is not installed, and can be installed. After it is installed however it will be locked.

For example, to lock the current linux package, do:

mkdir -p /etc/tdnf/locks.d
echo linux > /etc/tdnf/locks.d/linux.conf

Note that the file name needs to have the extension .conf or it will be ignored.

Minimal Versions

Minimal versions are configured in /etc/tdnf/minversions.d. There can be multiple files with multiple lines each with one package spec name per line. The package spec must include a version, seprated from the name with `=``. Example:

# cat /etc/tdnf/minversions.d/rpm.conf 
rpm-libs=4.16.1.3-1

This can be configured in the main configuration file as well, see minversions.