|
| 1 | +Source: konflux |
| 2 | +================ |
| 3 | + |
| 4 | +The ``konflux`` push source allows the loading of content from local JSON files |
| 5 | +organized by advisory. This source is designed for use with Konflux-generated |
| 6 | +advisory metadata and does not require network access or external API calls. |
| 7 | + |
| 8 | +Supported content types: |
| 9 | + |
| 10 | +* RPMs |
| 11 | +* Advisories |
| 12 | + |
| 13 | +The source is designed to be extensible and can support additional content types |
| 14 | +(such as modules, container images, etc.) in the future as needed. |
| 15 | + |
| 16 | +konflux source URLs |
| 17 | +------------------- |
| 18 | + |
| 19 | +The base form of a konflux source URL is: |
| 20 | + |
| 21 | +``konflux:base-directory?advisories=RHXA-XXXX:0001[,RHXA-XXXX:0002[,...]]`` |
| 22 | + |
| 23 | +For example, referencing a single advisory would look like: |
| 24 | + |
| 25 | +``konflux:/path/to/konflux/data?advisories=RHSA-2020:0509`` |
| 26 | + |
| 27 | +Multiple advisories can be specified with a comma-separated list: |
| 28 | + |
| 29 | +``konflux:/path/to/konflux/data?advisories=RHSA-2020:0509,RHSA-2020:0510`` |
| 30 | + |
| 31 | +The base directory should contain subdirectories named after each advisory ID. |
| 32 | +Each advisory subdirectory must contain: |
| 33 | + |
| 34 | +* ``advisory_cdn_metadata.json`` - Advisory metadata (title, severity, references, packages, etc.) |
| 35 | +* ``advisory_cdn_filelist.json`` - RPM file list with checksums, signing keys, and repository destinations |
| 36 | + |
| 37 | +Directory structure |
| 38 | +................... |
| 39 | + |
| 40 | +Example directory structure:: |
| 41 | + |
| 42 | + /path/to/konflux/data/ |
| 43 | + ├── RHSA-2020:0509/ |
| 44 | + │ ├── advisory_cdn_metadata.json |
| 45 | + │ └── advisory_cdn_filelist.json |
| 46 | + └── RHSA-2020:0510/ |
| 47 | + ├── advisory_cdn_metadata.json |
| 48 | + └── advisory_cdn_filelist.json |
| 49 | + |
| 50 | +File format |
| 51 | +........... |
| 52 | + |
| 53 | +**advisory_cdn_metadata.json** |
| 54 | + |
| 55 | +This file contains advisory metadata in the standard Errata Tool format, including: |
| 56 | + |
| 57 | +* Advisory ID, title, description, severity |
| 58 | +* Package list with checksums |
| 59 | +* References (CVEs, Bugzilla links, etc.) |
| 60 | +* Release information |
| 61 | + |
| 62 | +**advisory_cdn_filelist.json** |
| 63 | + |
| 64 | +This file contains build and RPM information:: |
| 65 | + |
| 66 | + { |
| 67 | + "build-nvr": { |
| 68 | + "rpms": { |
| 69 | + "rpm-filename.rpm": ["repo1", "repo2", ...] |
| 70 | + }, |
| 71 | + "checksums": { |
| 72 | + "md5": { |
| 73 | + "rpm-filename.rpm": "checksum-value" |
| 74 | + }, |
| 75 | + "sha256": { |
| 76 | + "rpm-filename.rpm": "checksum-value" |
| 77 | + } |
| 78 | + }, |
| 79 | + "sig_key": "signing-key-id" |
| 80 | + } |
| 81 | + } |
| 82 | + |
| 83 | +Differences from `ErrataSource` |
| 84 | +............................... |
| 85 | + |
| 86 | +Unlike the `ErrataSource`, the `KonfluxSource`: |
| 87 | + |
| 88 | +* Reads from local JSON files rather than querying the Errata API |
| 89 | +* Does not require Koji integration |
| 90 | +* Does not currently support filtering by architecture (this use case may be supported in the future) |
| 91 | +* Currently produces RPMs and advisories (additional content types such as modules and container images can be supported in the future) |
| 92 | +* RPM push items have ``src=None`` (no local RPM files, only metadata) |
| 93 | + |
| 94 | +Python API reference |
| 95 | +-------------------- |
| 96 | + |
| 97 | +.. autoclass:: pushsource.KonfluxSource |
| 98 | + :members: |
| 99 | + :special-members: __init__ |
0 commit comments