Skip to content

Optional KERNEL_RPM_LIST with Auto-Detection#22

Draft
coiby wants to merge 12 commits intorhkdump:mainfrom
coiby:feature/optional-kernel-rpm-list
Draft

Optional KERNEL_RPM_LIST with Auto-Detection#22
coiby wants to merge 12 commits intorhkdump:mainfrom
coiby:feature/optional-kernel-rpm-list

Conversation

@coiby
Copy link
Copy Markdown
Member

@coiby coiby commented Apr 16, 2026

Resolves: #9

Problem

Users must manually run a Python generator script and set KERNEL_RPM_LIST in
bisect.conf before starting an RPM bisect. This is tedious when the tool
could infer the RPM list from BAD_COMMIT.

Solution

Make KERNEL_RPM_LIST optional. When omitted, the tool auto-detects the
distro and architecture from BAD_COMMIT's NVR, selects a shipped NVR list,
constructs full RPM URLs at runtime, and writes them to
$WORK_DIR/kernel_rpm_list.txt. Users can opt into fresh list generation via
GENERATE_RPM_LIST=yes.

coiby and others added 12 commits April 16, 2026 20:28
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduce two helper functions to parse NVR (Name-Version-Release) strings:
- parse_nvr_distro: extracts distro identifier (c9s, c10s, fedora) from
  NVR strings like "6.12.0-200.el10.x86_64"
- parse_nvr_arch: extracts architecture (x86_64, aarch64, s390x) from
  NVR strings

These functions will be used to make KERNEL_RPM_LIST optional by
automatically resolving RPM lists based on NVR information.

Implemented using TDD with comprehensive test coverage in
spec/resolve_rpm_list_spec.sh.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements a helper function that constructs full kernel-core RPM URLs
from NVR (Name-Version-Release) strings and architecture. This supports
both CentOS Stream (.el*) and Fedora (.fc*) distributions by using the
appropriate Koji base URL for each.

The function splits the NVR on the first hyphen to extract version and
release components, then builds the URL following the standard Koji
package path structure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Following TDD, add support for outputting NVR instead of full URLs:
- Add --nvr flag to both Fedora and RHEL generators
- Add arch parameter support to Fedora generator (defaults to x86_64)
- Maintain backward compatibility (without --nvr, outputs full URLs)
- Add comprehensive shellspec tests

The --nvr mode is used by resolve_rpm_list() when GENERATE_RPM_LIST=yes
and by 'make update-rpm-lists' to refresh shipped NVR list files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update bisect.conf:
- Comment out KERNEL_RPM_LIST to make it clearly optional
- Add inline documentation explaining auto-detection from BAD_COMMIT
- Add GENERATE_RPM_LIST option for runtime generation

Update README.md:
- Mark KERNEL_RPM_LIST as optional in RPM Mode table
- Add GENERATE_RPM_LIST to Other Options table
- Add new "RPM Lists" section explaining shipped lists and auto-detection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Clarify that tests use mock scripts to avoid network calls
and do not test the real Python scripts' scraping behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When kab.sh aborts early (e.g. due to config errors), the CRIU test
previously kept polling for up to 10 minutes before timing out. Now
the wait loop checks if the kab.sh process is still running and fails
immediately with the last 20 lines of test.log if it has exited.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When http_proxy or https_proxy is set in the test environment
(via tmt -e), append them to bisect.conf so kab.sh on the
server can use the proxy for downloading RPMs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't require KERNEL_RPM_LIST

1 participant