Closed
Conversation
This branch fixes a bug in the generate_rocky_config.py script related to version filtering when generating Rocky Linux repository configurations. The Specific Change, The script now supports flexible version matching when filtering repositories: - Major-only filtering (e.g., --version 9): Matches any minor version within that major version (9.0, 9.1, 9.2, 9.6, etc.) - Full version filtering (e.g., --version 9.6): Requires exact match to the specified major.minor version Why This Change Is Needed The Problem, Red Hat's advisory format varies across RHEL versions: - RHEL 8 & 9: Red Hat advisories typically don't include minor versions (they just reference "RHEL 8" or "RHEL 9") - RHEL 10+: Red Hat now includes minor versions in advisories (e.g., "RHEL 10.2", "RHEL 10.3") This creates a version matching issue in Apollo's mirror configuration system: 1. The supported_products_rh_mirrors table defines which Red Hat advisories to match against Rocky Linux versions 2. The table has match_major_version and match_minor_version columns to control matching For 3. RHEL 8/9, match_minor_version should be NULL (matches any minor version) 4. For RHEL 10+, match_minor_version should be set (matches specific minor versions) Without this fix: - If you run generate_rocky_config.py --version 9 against a Rocky 9.6 mirror, it would fail to include repos because it expected an exact version match - This makes it impossible to generate configs that match the "major version only" pattern needed for RHEL 8/9 mirroring With thisfix: - Using --version 9 correctly generates configs with NULL match_minor_version (matches RHEL 9.x advisories) - Using --version 9.6 generates configs with match_minor_version = 6 (for RHEL 10+ style matching) How It Fits Into Apollo; Apollo's Advisory Mirroring Workflow: 1. Ingestion: The rhworker polls Red Hat for new advisories (RHSA, RHBA, RHEA) 2. Matching: Apollo uses supported_products_rh_mirrors to determine which Rocky Linux products each Red Hat advisory applies to and matches by variant (RHEL), major version, minor version (if specified), and architecture 3. Package Mapping: The rpmworker finds equivalent packages in Rocky repos and generates Rocky advisories 4. Config Generation: The generate_rocky_config.py script creates/updates the supported_products_rpm_repomds and supported_products_rh_mirrors tables
ead860f to
671e464
Compare
Collaborator
Author
|
This is included with #69 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Red Hat includes the minor version for Rocky 10 advisories meaning we need to include the minor version in our repo config tables for Rocky 10. Red Hat 8 and 9 don't seem to include the minor version so our config should also NOT contain minor versions. This allows for generation to correctly NOT include minor versions.