From a72549545f0030b6e54a952965b3a0bafb3e18bc Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Apr 28 2026 19:09:23 +0000 Subject: [PATCH 1/2] Add AI agent skill for adding a new Fedora target release Assisted-By: --- diff --git a/.agents/skills/add-fedora-target/SKILL.md b/.agents/skills/add-fedora-target/SKILL.md new file mode 100644 index 0000000..fb450f7 --- /dev/null +++ b/.agents/skills/add-fedora-target/SKILL.md @@ -0,0 +1,101 @@ +--- +name: add-fedora-target +description: Add a new Fedora release as a target to archive-repo-manager, updating the Python consumer and bash signing key config +--- + +## What this skill does + +Guides through adding a new Fedora release as a target for the +archive-repo-manager tool. This involves two file edits and a specific +commit message format. + +## Prerequisites + +Before starting, you need the **RPM signing key short-hash** for the new +Fedora release. Ask the user to visit this URL and retrieve the 8-character +hex signing key ID for the target release: + +https://forge.fedoraproject.org/infra/ansible/src/branch/main/roles/bodhi2/backend/templates/pungi.rpm.conf.j2 + +If the user has not provided the signing key, present them with this URL +and ask them to look up the key and provide it before proceeding. Do not +guess the signing key. + +## Steps + +### 1. Identify the current state + +Read `archive_repo_manager.py` to find the `TARGET_FEDORA_RELEASES` list, +and `run-archive-repo-update` to find the `SIGNINGKEYS` associative array. + +### 2. Edit `archive_repo_manager.py` + +Add the new release number (as a string) to the end of the +`TARGET_FEDORA_RELEASES` list. + +Example — adding Fedora 44: + + # Before + TARGET_FEDORA_RELEASES = ['42', '43'] + # After + TARGET_FEDORA_RELEASES = ['42', '43', '44'] + +### 3. Edit `run-archive-repo-update` + +Add a new entry to the `SIGNINGKEYS` bash associative array. Maintain the +existing indentation and formatting style. The new entry goes at the end, +just before the closing `)`. + +Example — adding Fedora 44 with key `abcd1234`: + + # Before + declare -A SIGNINGKEYS=( + [42]='105ef944' + [43]='31645531' + ) + # After + declare -A SIGNINGKEYS=( + [42]='105ef944' + [43]='31645531' + [44]='abcd1234' + ) + +### 4. Commit + +Use the commit message format: `Add Fedora XX as a target` + +### 5. Post-commit reminder + +Check whether the S3 bucket directory structure has already been +initialized for the new release by fetching (with WebFetch) the repodata +for one architecture, e.g.: + + https://fedoraproject-updates-archive.fedoraproject.org/fedora/XX/x86_64/repodata/repomd.xml + +- If the fetch **succeeds** (HTTP 200 / valid XML), the repo is already + initialized — no reminder is needed. +- If the fetch **fails** (HTTP 404, connection error, etc.), remind the + user that the S3 bucket directory structure must be initialized for the + new release before the tool can process updates. The commands are: + + RELEASE=XX + ARCHES='aarch64 ppc64le s390x x86_64' + pushd /path/to/bucket/ + for arch in $ARCHES; do + mkdir -p "fedora/${RELEASE}/${arch}" + pushd "fedora/${RELEASE}/${arch}" + createrepo_c --no-database --zck \ + --zck-dict-dir "/usr/share/fedora-repo-zdicts/f${RELEASE}" . + popd + done + popd + +## Important notes + +- Release numbers are stored as **strings** in the Python list + (e.g., `'44'` not `44`) +- Signing keys are **8-character lowercase hex strings** +- Only `archive_repo_manager.py` and `run-archive-repo-update` need to be + modified; no Dockerfile or other config changes are required +- Dropping an old release is the reverse operation (remove from both files) + with commit message format: `Drop XX as a target` From 449be81d3aca0da8e6cbfb0ce15d240b9b233c42 Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Apr 28 2026 19:10:07 +0000 Subject: [PATCH 2/2] Add Fedora 44 as a target Assisted-By: --- diff --git a/archive_repo_manager.py b/archive_repo_manager.py index 2542dce..72a342e 100755 --- a/archive_repo_manager.py +++ b/archive_repo_manager.py @@ -11,7 +11,7 @@ logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) ARCHIVE_REPO_MOUNT_POINT = '/mnt/bucket/' -TARGET_FEDORA_RELEASES = ['42', '43'] +TARGET_FEDORA_RELEASES = ['42', '43', '44'] # We are processing the org.fedoraproject.prod.bodhi.compose.complete topic diff --git a/run-archive-repo-update b/run-archive-repo-update index 4a2e518..8617a64 100755 --- a/run-archive-repo-update +++ b/run-archive-repo-update @@ -8,6 +8,7 @@ ARCHES="aarch64 ppc64le s390x x86_64" declare -A SIGNINGKEYS=( [42]='105ef944' [43]='31645531' + [44]='6d9f90a6' ) # A function to get the list of builds in the updates repo