epel-minor-release/koji-release-tags: Update external repo handling

The original make-koji-release-tags script this playbook is based on had
a significant flaw.  The original design was to have external repos for
each epel10.x-base tag that changed URLs over time.  For example,
epel10.0-base would have an external repo of el10.0-baseos that would
migrate through the following repos:

* https://infrastructure.fedoraproject.org/repo/centos/centos-10/BaseOS/$arch/os/
* https://infrastructure.fedoraproject.org/repo/centos/centos-10-snapshot/BaseOS/$arch/os/
* https://infrastructure.fedoraproject.org/repo/rhel/rhel10/10.0/repos/$arch/baseos/

During the epel10.0 mass branching, we discovered that wouldn't work.
CentOS and RHEL have many RPMs with the same filename but different
checksums as they have different metadata and are signed with a
different key.  Koji build error out when the checksum of an RPM that
has already been indexed changes.  The solution to this is to use
external repos whose URLs don't change, but then move the external repos
around to different tags over time.  That is what we have already
implemented in production, we just never updated make-koji-release-tags
to reflect it.

This changes the playbook create the new epel10.x-base tag with the
correct external repo names and switch the existing epel10.x-base tag
from the centos-10 repos to the centos-10-snapshot repos.

Signed-off-by: Carl George <carlwgeorge@gmail.com>
This commit is contained in:
Carl George
2025-08-15 14:11:48 -05:00
parent b4ce7aa042
commit d5cabb0a79

View File

@@ -36,17 +36,6 @@
- 'release_minor|int > 0'
fail_msg: The release value is not a valid version.
- name: Create external repos for EPEL minor release
ktdreyer.koji_ansible.koji_external_repo:
koji: "{{ koji_profile }}"
name: "{{ item.name }}"
url: "{{ item.url }}"
state: present
loop:
- {'name': 'el{{ release }}-baseos', 'url': 'https://infrastructure.fedoraproject.org/repo/centos/centos-10/BaseOS/$arch/os/'}
- {'name': 'el{{ release }}-appstream', 'url': 'https://infrastructure.fedoraproject.org/repo/centos/centos-10/AppStream/$arch/os/'}
- {'name': 'el{{ release }}-crb', 'url': 'https://infrastructure.fedoraproject.org/repo/centos/centos-10/CRB/$arch/os/'}
- name: Add main tag for EPEL minor release
ktdreyer.koji_ansible.koji_tag:
koji: "{{ koji_profile }}"
@@ -54,23 +43,32 @@
arches: "{{ primary_arches }}"
state: present
external_repos:
- repo: "el{{ release }}-baseos"
- repo: "c{{ release_major }}-baseos"
priority: 10
- repo: "el{{ release }}-appstream"
- repo: "c{{ release_major }}-appstream"
priority: 20
- repo: "el{{ release }}-crb"
- repo: "c{{ release_major }}-crb"
priority: 30
- name: Fix external repos for EPEL old release
ktdreyer.koji_ansible.koji_external_repo:
koji: "{{ koji_profile }}"
name: "{{ item.name }}"
url: "{{ item.url }}"
state: present
- name: Remove external repos from the old release base tag
ansible.builtin.command: koji --profile {{ koji_profile }} remove-external-repo {{ item }} epel{{ old_release }}-base
changed_when: true
loop:
- {'name': 'el{{ old_release }}-baseos', 'url': 'https://infrastructure.fedoraproject.org/repo/centos/centos-10-snapshot/BaseOS/$arch/os/'}
- {'name': 'el{{ old_release }}-appstream', 'url': 'https://infrastructure.fedoraproject.org/repo/centos/centos-10-snapshot/AppStream/$arch/os/'}
- {'name': 'el{{ old_release }}-crb', 'url': 'https://infrastructure.fedoraproject.org/repo/centos/centos-10-snapshot/CRB/$arch/os/'}
- c{{ release_major }}-baseos
- c{{ release_major }}-appstream
- c{{ release_major }}-crb
- name: Add snapshot external repos to the old release base tag
ktdreyer.koji_ansible.koji_tag:
koji: "{{ koji_profile }}"
name: "epel{{ old_release }}-base"
external_repos:
- repo: "c{{ release_major }}-snapshot-baseos"
priority: 10
- repo: "c{{ release_major }}-snapshot-appstream"
priority: 20
- repo: "c{{ release_major }}-snapshot-crb"
priority: 30
- name: Clone EPEL old release tag into the new release
ansible.builtin.command: koji --profile {{ koji_profile }} clone-tag --all --latest-only epel{{ old_release }} epel{{ release }}