Align package product_name with the major-stream product label - #97
Merged
Conversation
Point-release mirror names (Rocky Linux 9.6 aarch64) froze the minor
that was current at clone time, so packages.product_name and
affected_products.name diverged and 9.7 scanners dropped 9.6-labeled
fixes. Collapse {major}.{minor} in the display name, refresh existing
package rows on rematch, and default new mirror configs to the major.
Closes resf#71
rockythorn
approved these changes
Sep 1, 2026
Collaborator
There was a problem hiding this comment.
Review: Approve
Tests pass, no merge conflicts with main.
Verified
stream_product_name()correctly collapsesRocky Linux 9.6 aarch64→Rocky Linux 9 aarch64whenmatch_minor_versionis set- Names without a minor version (e.g.,
Rocky Linux 10 riscv64) are unchanged - Zero minor version (
10.0) correctly collapses to10 generate_rocky_config.pyupdated to default mirror names to major version when--versionincludes a dot- Stale
product_nameon existing packages is updated on rematch (not just new packages) bazel test //apollo/tests:test_rh_matcher_activitiespasses
Note for merge ordering
This PR, along with #89, #90, and #91, all modify rh_matcher_activities.py. They'll need sequential rebasing after the first one merges. This PR is the most independent of the four — it can merge in any position.
Since #89 needs a migration, #90 needs a BUILD fix, and #91 needs a Python 3.9 compat fix, this PR is the most merge-ready of the chain.
5 tasks
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.
Summary
packages[].product_namewasRocky Linux 9 aarch64whileaffected_products[].namewasRocky Linux 9.6 aarch64(distro-tools#71). Point-release mirror names froze the minor that was current at clone time, so 9.7 scanners dropped 9.6-labeled fixes.{major}.{minor}in the display name used for both fields, refresh staleproduct_nameon rematch, and defaultgenerate_rocky_config.pymirror names to the major (Rocky Linux 9 aarch64from--version 9.6). riscv64 labels without a minor are unchanged.Existing rows pick up the stream label on the next rematch. This does not invent empty-package RLSAs.
Test plan
python -m unittest apollo.tests.test_rh_matcher_activities.TestStreamProductNamecurl -s https://apollo.build.resf.org/api/v3/advisories/RLBA-2025:2973 | jq '{products: [.affected_products[].name], pkgs: [.packages[].product_name] | unique}'— both sides areRocky Linux 9 <arch>, not9.6.Closes #71