Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ CRIU_DAEMON_SRC := criu-daemon.sh
CONFIG_SRC := bisect.conf
HANDLER_SRC_DIR := handlers
HANDLER_SRCS := $(wildcard $(HANDLER_SRC_DIR)/*.sh)
RPM_LIST_DIR := rpm_lists
RPM_LIST_DIR_TARGET := $(BIN_DIR)/rpm_lists

.PHONY: all install uninstall clean help
.PHONY: all install uninstall clean help update-rpm-lists

all: help

Expand All @@ -24,6 +26,7 @@ help:
@echo "Targets:"
@echo " install Install the bisection scripts, CRIU daemon and handlers."
@echo " uninstall Remove all installed files."
@echo " update-rpm-lists Refresh shipped NVR lists from upstream repos (requires python3)."
@echo " help Show this help message."

format-check:
Expand All @@ -46,6 +49,11 @@ integration-tests:

tests: format-check static-analysis unit-tests integration-tests

update-rpm-lists:
python3 tools/generate_rhel_kernel_rpm_list.py --nvr C9S x86_64 > $(RPM_LIST_DIR)/c9s.list
python3 tools/generate_rhel_kernel_rpm_list.py --nvr C10S x86_64 > $(RPM_LIST_DIR)/c10s.list
python3 tools/generate_fedora_kernel_rpm_list.py --nvr > $(RPM_LIST_DIR)/fedora.list

install:
@if [ "$(EUID)" -ne 0 ]; then \
echo "Please run as root or with sudo."; \
Expand All @@ -69,6 +77,10 @@ install:
@cp $(HANDLER_SRCS) $(HANDLER_DIR_TARGET)/
@chmod +x $(HANDLER_DIR_TARGET)/*.sh

@echo "Copying RPM NVR lists to $(RPM_LIST_DIR_TARGET)/"
@mkdir -p $(RPM_LIST_DIR_TARGET)
@cp $(RPM_LIST_DIR)/*.list $(RPM_LIST_DIR_TARGET)/

@if [ ! -f "$(CONFIG_FILE_TARGET)" ]; then \
echo "Copying default configuration to $(CONFIG_FILE_TARGET)"; \
cp $(CONFIG_SRC) $(CONFIG_FILE_TARGET); \
Expand Down
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,26 @@ To uninstall:
sudo make uninstall
```

## RPM Lists

The tool ships pre-built NVR lists in `rpm_lists/` for CentOS Stream 9,
CentOS Stream 10, and Fedora. When `KERNEL_RPM_LIST` is not set, the tool
auto-detects the distro and architecture from `BAD_COMMIT` and uses the
appropriate shipped list to construct RPM URLs at runtime.

To generate a fresh RPM list at runtime (requires `python3`,
`beautifulsoup4`, `packaging`), set in `bisect.conf`:

```
GENERATE_RPM_LIST="yes"
```

To refresh the shipped lists (maintainer use):

```bash
make update-rpm-lists
```

## Configuration

Edit `/usr/local/bin/kernel-auto-bisect/bisect.conf` after installation.
Expand Down Expand Up @@ -86,7 +106,7 @@ Edit `/usr/local/bin/kernel-auto-bisect/bisect.conf` after installation.

| Variable | Description |
|---|---|
| `KERNEL_RPM_LIST` | Path to a file listing kernel RPM URLs, one per line (ordered from good to bad) |
| `KERNEL_RPM_LIST` | Path to a file listing kernel RPM URLs, one per line (ordered from good to bad). Optional — when omitted, auto-selected from shipped NVR lists based on `BAD_COMMIT`. |
| `RPM_CACHE_DIR` | Directory to cache downloaded RPMs |
| `GOOD_COMMIT` | Kernel release string of the known-good version (e.g. `5.14.0-162.el9.aarch64`) |
| `BAD_COMMIT` | Kernel release string of the known-bad version |
Expand All @@ -105,6 +125,7 @@ Edit `/usr/local/bin/kernel-auto-bisect/bisect.conf` after installation.
| `REPRODUCER_SCRIPT` | Path to the reproducer script |
| `RUNS_PER_COMMIT` | Number of test runs per commit (for intermittent issues, default: 1) |
| `VERIFY_COMMITS` | Set to `no` to skip initial good/bad commit verification |
| `GENERATE_RPM_LIST` | Set to `yes` to generate a fresh RPM list at runtime using Python scripts instead of shipped lists |

## Reproducer Script

Expand Down
10 changes: 9 additions & 1 deletion bisect.conf
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,17 @@ GIT_REPO_BRANCH=os-build
KERNEL_SRC_DIR="/path/to/your/linux/source"

# === RPM Configuration (for INSTALL_STRATEGY="rpm") ===
KERNEL_RPM_LIST="/path/to/your/kernel_rpm_list.txt"
# KERNEL_RPM_LIST is optional. When omitted, the tool auto-selects a shipped
# NVR list based on BAD_COMMIT's dist tag and constructs RPM URLs at runtime.
# Set this to override with your own list of kernel RPM URLs (one per line).
#KERNEL_RPM_LIST="/path/to/your/kernel_rpm_list.txt"
RPM_CACHE_DIR="/var/cache/kdump-bisect-rpms"

# GENERATE_RPM_LIST: Set to "yes" to generate a fresh NVR list at runtime
# using the Python scripts in tools/ instead of the shipped static lists.
# Requires python3 with beautifulsoup4 and packaging modules.
#GENERATE_RPM_LIST="yes"

# === Commit/Version Boundaries ===
# If INSTALL_STRATEGY="git", these are git commit hashes.
# If INSTALL_STRATEGY="rpm", these are kernel release versions (e.g., "5.14.0-162.el9.aarch64").
Expand Down
Loading