Claude Code plugin POC for backporting upstream patches to RHEL/CentOS dist-git packages.
Note: This plugin is intended to be run inside a VM, as it performs mock builds during the backport process.
- Claude Code CLI installed and configured
centpkginstalled and configuredmockinstalled and configuredgitwith access to upstream repositoriespodman(optional, for CVE reproducer testing)
Add the marketplace and install the plugin:
/plugin marketplace add https://github.com/lbarczio/claude-backport-poc
/plugin install claude-backport-poc@claude-backport
Verify the installation:
/plugin
git clone https://github.com/lbarczio/claude-backport-poc.git
claude
/plugin marketplace add ./claude-backport-poc
/plugin install claude-backport-poc@claude-backportFrom inside a dist-git repository clone:
/claude-backport:backport JIRA_ISSUE BRANCH PATCH_URL [REPRODUCER_URL]# Basic backport
/claude-backport:backport RHEL-12345 c10s https://gitlab.com/libtiff/libtiff/-/commit/abc123.patch
# With CVE reproducer verification
/claude-backport:backport RHEL-67890 c10s https://github.com/openssl/openssl/commit/def456.patch https://raw.githubusercontent.com/example/cve-poc/main/reproducer.c
# Multiple patches (comma-separated)
/claude-backport:backport RHEL-11111 c10s https://github.com/curl/curl/commit/aaa.patch,https://github.com/curl/curl/commit/bbb.patch- Creates a working branch from the provided base branch
- Downloads and applies upstream patches using cherry-pick (preferred) or git-am (fallback)
- Updates the spec file with new Patch tags
- Verifies patches apply with
centpkg prep - Generates SRPM and runs a mock build
- (Optional) Reproduces the CVE before/after to verify the fix
| Plugin | Description |
|---|---|
claude-backport |
Backport upstream patches to RHEL/CentOS dist-git packages |