DNF5.CONF-VENDORPOLICY-V1_0(5)

NAME
dnf5.conf-vendorpolicy-v1_0 - DNF5 Vendor Change Policy File Reference - v1.0

DESCRIPTION

This document describes the structure and syntax of the DNF5 Vendor Change Policy configuration files using version 1.0 format.

For general information about vendor change policy files, see DNF5 Vendor Change Policy File Reference <#dnf5-vendor-change-policy-label>.

FILE STRUCTURE

  Required Fields

version
    String

    Configuration file format version.

    For this format, must be set to "1.0".

    This field is mandatory and must be specified at the top level of the TOML file.

    Example:

        version = '1.0'

    Note: For the configuration file to have any effect on vendor change policy, it must define vendor mappings using one of the allowed configurations (see below).

    If the file contains no vendor lists, it will be loaded and its version will be validated, but it will not define any rules and will not affect vendor manager behavior.

  Vendor Mapping Definition

The file can use one of the following vendor definition methods. Only one method can be used.

Option 1: Separate Lists (outgoing + incoming)

[[outgoing_vendors]]
    Array of tables

    List of vendors from which changes are allowed (outgoing package vendors).

[[incoming_vendors]]
    Array of tables

    List of vendors to which changes are allowed (incoming package vendors).

    Note: outgoing_vendors and incoming_vendors must be either both present or both missing.

    Important: A vendor change during package replacement is allowed only if both conditions are met simultaneously:

•   The vendor of the outgoing (installed) package is listed in outgoing_vendors

•   The vendor of the incoming (new) package is listed in incoming_vendors

    Option 2: Equivalent Vendors

[[equivalent_vendors]]
    Array of tables

    List of vendors that are mutually equivalent. Changes are allowed in both directions between all vendors in this list.

    Note: Cannot combine equivalent_vendors with outgoing_vendors or incoming_vendors. However, equivalent_vendors is actually a shorthand notation. It is equivalent to listing the same vendors in both outgoing_vendors and incoming_vendors.

  Vendor Entry Fields

Each entry in [[outgoing_vendors]], [[incoming_vendors]], or [[equivalent_vendors]] can contain the following fields:

vendor
    String

    Required field.

    Vendor name or pattern for matching.

comparator
    String

    Optional field.

    The matching method to use when comparing vendor strings.

    Default: "EXACT"

    Supported values:

•   "EXACT" - exact match (case-sensitive)

•   "IEXACT" - exact match (case-insensitive)

•   "GLOB" - glob pattern (case-sensitive)

•   "IGLOB" - glob pattern (case-insensitive)

•   "REGEX" - regular expression (case-sensitive)

•   "IREGEX" - regular expression (case-insensitive)

•   "CONTAINS" - contains string (case-sensitive)

•   "ICONTAINS" - contains string (case-insensitive)

•   "STARTSWITH" - starts with (case-sensitive)

•   "ISTARTSWITH" - starts with (case-insensitive)

•   "ENDSWITH" - ends with (case-sensitive)

•   "IENDSWITH" - ends with (case-insensitive)

•   "NOT_EXACT", "NOT_IEXACT", "NOT_GLOB", "NOT_IGLOB", "NOT_CONTAINS", "NOT_ICONTAINS" - negated variants

exclude
    Boolean

    Optional field.

    If true, the vendor is excluded from the rule. This is useful for defining exceptions to more general rules. Rules (vendor entries) are processed in the order they are defined. This means that an exclude rule must appear before the rules from which the vendor should be excluded.

    Default: false

EXAMPLES

  Example 1: Allow change from "VendorA" to "VendorB"

This example shows the minimal required configuration, allowing a change from "VendorA" to "VendorB", but not the reverse.

    version = '1.0'
    [[outgoing_vendors]]
    vendor = 'VendorA'
    [[incoming_vendors]]
    vendor = 'VendorB'

  Example 2: Allow change from any vendor to "My Trusted Vendor"

This example shows allowing a change from any vendor to "My Trusted Vendor", but not the reverse (requires explicit rule for allowing all vendors).

    version = '1.0'
    [[outgoing_vendors]]
    vendor = ''
    comparator = 'CONTAINS'
    [[incoming_vendors]]
    vendor = 'My Trusted Vendor'

  Example 3: Equivalent vendors

This example shows vendors that are mutually equivalent, allowing changes in both directions.

    version = '1.0'
    # All following vendors are mutually equivalent
    [[equivalent_vendors]]
    vendor = 'Fedora Project'
    [[equivalent_vendors]]
    vendor = 'Red Hat'
    comparator = 'ISTARTSWITH'
    [[equivalent_vendors]]
    vendor = 'CentOS'
    comparator = 'ISTARTSWITH'

  Example 4: Equivalent vendors with an exclusion

This example shows a vendor policy for SUSE-related vendors with an exclusion for openSUSE Build Service.

    version = '1.0'
    # All following vendors are mutually equivalent except excluded ones
    [[equivalent_vendors]]
    vendor = 'openSUSE Build Service'
    comparator = 'ISTARTSWITH'
    exclude = true
    [[equivalent_vendors]]
    vendor = 'SUSE'
    comparator = 'ISTARTSWITH'
    [[equivalent_vendors]]
    vendor = 'openSUSE'
    comparator = 'ISTARTSWITH'

SEE ALSO

•   DNF5 Vendor Change Policy File Reference <#dnf5-vendor-change-policy-label>

•   DNF5 Vendor Change Policy File Reference - v1.1 <#dnf5-vendor-change-policy-v1-1-label>

•   dnf5.conf(5), DNF5 Configuration Reference <#dnf5-conf-label>

Author
See AUTHORS.md in dnf5 source distribution.

Copyright
Contributors to the dnf5 project.