Source: errata

The errata push source allows the loading of content from an instance of Errata Tool (or “ET”).

Supported content types:

  • RPMs

  • Container images

  • Advisories

  • Virtual machine images

errata source URLs

The base form of an errata source URL is:

errata:errata-tool-url?errata=RHXA-XXXX:0001[,RHXA-XXXX:0002[,...]]

For example, referencing a single advisory would look like:

errata:https://errata.example.com?errata=RHBA-2020:1234

The provided Errata Tool URL should be the base URL of the service, and not any specific API endpoint.

Setting the koji source

In order to obtain metadata about RPMs, the errata source needs to be configured to point at the same koji environment as used by the connected ET environment. This can be done by providing a partial URL for a koji source in the koji_source parameter (leave parameters for selecting content, such as rpm, blank - the errata source will fill them in as needed).

For example, if our ET environment is connected to Fedora Koji, we could configure this as:

errata:https://errata.example.com?errata=RHBA-2020:1234&koji_source=koji:https://koji.fedoraproject.org/kojihub

Although it is technically possible to configure the koji source behavior using any of the parameters documented in Source: koji, in practice this results in unwieldy URLs with multiple levels of URL encoding. Thus it’s recommended that developers integrating this library with their services should preconfigure commonly used koji sources, so that they can be referred to by a short identifier.

For example, if the fedkoji source has been configured as explained in Binding partially-configured backends, the source can be referred to more succintly as in:

errata:https://errata.example.com?errata=RHBA-2020:1234&koji_source=fedkoji

Python API reference

class pushsource.ErrataSource(url, errata, koji_source=None, rpm_filter_arch=None, legacy_container_repos=False, keytab_path=None, principal=None, threads=4, timeout=14400)[source]

Uses an advisory from Errata Tool as the source of push items.

__init__(url, errata, koji_source=None, rpm_filter_arch=None, legacy_container_repos=False, keytab_path=None, principal=None, threads=4, timeout=14400)[source]

Create a new source.

Parameters:
  • url (src) – Base URL of Errata Tool, e.g. “http://errata.example.com”, “https://errata.example.com:8123”.

  • errata (str, list[str]) – Advisory ID(s) to be used as push item source. If a single string is given, multiple IDs may be comma-separated.

  • koji_source (str) – URL of a koji source associated with this Errata Tool instance.

  • rpm_filter_arch (str, list[str]) – If provided, only RPMs for these given arch(es) will be produced; e.g. “x86_64”, “src” and “noarch”.

  • legacy_container_repos (bool) –

    If True, any container push items generated by this source will use a legacy format for repository IDs.

    This is intended to better support certain legacy code and will be removed when no longer needed. Only use this if you know that you need it.

  • keytab_path (str) – Kerberos keytab path for authenticating with Errata HTTP API.

  • principal (str) – Kerberos principal for authenticating with Errata HTTP API.

  • threads (int) – Number of threads used for concurrent queries to Errata Tool and koji.

  • timeout (int) – Number of seconds after which an error is raised, if no progress is made during queries to Errata Tool.