include::_partials/attributes.adoc[]

= Mass Branching Checklist

// Merge things from google document to finalize the checklist

== Description

At each alpha freeze, a mass branching process is conducted to separate the pending release from `devel/` branch. This allows Rawhide to continue while the pending release undergoes bugfix and polish activities.

== Action

=== T-1 Day actions for mass branching

==== Send Announcement

* [ ] One day prior to mass branching, send out an announcement notifying the community about the upcoming mass branching. Mention that new Koji builds for Rawhide will be disabled during the process.

==== Signing keys for rawhide+1

Action: add a separate SOP for the same

==== Repos to Branch

* [ ] Update the following repositories we need to prepare before the mass branching occurs: (Two Branches needs to be upserted (rawhide needs update, and the branched branch needs to be created)

==== Updates Archive Yum Repo Seeding

* [ ] Ask CoreOS team to seed the N paths for the updates-archive yum repo by running the https://pagure.io/releng/archive-repo-manager/blob/main/f/README.md?text=True#_163[steps here]. This is so tests won't start failing after branching.

==== Pungi-Fedora

===== Rawhide Branch

* [ ] Check for all the RELEASE, RELEASE_TITLE, COMPSFILE (all this points to rawhide version)
* [ ] Make sure to update the sigkeys for the latest rawhide version
* [ ] Files to change:
  * [ ] nightly.sh
  * [ ] cloud-nightly.sh
  * [ ] container-nightly.sh
  * [ ] fedora-cloud.conf
  * [ ] fedora-container.conf
  * [ ] fedora.conf

===== Branched (FN) Branch

* [ ] Files to change:
  * [ ] general.conf `runroot_tag = 'fN-build'`
  * [ ] fedora.conf
    * [ ] (All rawhide occurrences should be updated to FN version, release_version, global_ksurl, global_version)
    * [ ] ostree use fN branch for config (Update "config_branch" to point to fN from main)
  * [ ] nightly.sh
    * [ ] (All rawhide occurrences should be updated to FN version, and TARGET_DIR needs to be changed to branched from rawhide, RELEASE_TITLE, FROM)

==== Fedora Kickstarts

* [ ] ~~Rawhide Branch~~
* [ ] Branched (FN) Branch
  * [ ] fedora-repo.ks (need to comment out the rawhide includes)
  * [ ] fedora-iot.ks
    * (All rawhide occurrences should be updated to FN version)
  * References: https://pagure.io/fedora-kickstarts/c/f2812c2e279c2bcf8b5bb65e264a7b644e2c81e3?branch=f39

==== Fedora Comps

===== Rawhide Branch

* [ ] Update the Makefile to rawhide version
* [ ] For fn+1 (rawhide) file: Create a comps-fN+1.xml.in (copy it from the last file and update/sync it according to changesets)
    - Sync Rawhide with changes from Fedora {branched}: make sure of including the changeset changes occured in the branched repo

==== Workstation Ostree Config

===== Rawhide/Main Branch

* [ ] Add Fedora (rawhide version) repo configs ([[reference](https://pagure.io/workstation-ostree-config/c/53d2a6b48edbb7a24305d4ae99e052aa14354b9f?branch=main)])

===== Branched (FN) Branch

* [ ] Change all the rawhide references to point to fN version (grep for rawhide and replace it with the branched version)

==== Fedora Release

===== Rawhide Branch

* [ ] Need to update the dist_version and Version in the spec file, with a changelog entry

===== Branched (FN) Branch

* [ ] Need to update the release_name from rawhide to branched and is_rawhide should be 0

==== Fedora Repos

===== Rawhide Branch

* [ ] Need to update the dist_version and Version in the spec file, with a changelog entry
* [ ] Check for the presence of rawhide+1 key in the files, if not present add the key to it. for [example](https://src.fedoraproject.org/rpms/fedora-repos/c/53f6d1a7bd0b89ad7bccd95e8b4d52b5774e7420?branch=main).

===== Branched (FN) Branch

* [ ] In the branch, update the definition of rawhide_release, and create a changelog entry for [example](https://src.fedoraproject.org/rpms/fedora-repos/c/724c961a79f52abc7d450b1c33ccebed09de6099?branch=f39).

==== Ansible

===== Bodhi

* [ ] Update the Bodhi2 role in the infra ansible repository. This includes updating `koji-sync-listener.py`, `new-updates-sync`, Pungi configs for RPM updates, and Bodhi templates.

===== Enable Branched Compose

* [ ] Enable the branched compose in the releng role of the infra ansible repository.

===== Fedora Branched

* [ ] Set `FedoraBranched` and `FedoraBranchedBodhi` variables to appropriate values in the infra ansible repository.

===== Koji Hub

* [ ] Update the Koji hub configuration to allow side tags for the new Rawhide tag.

===== Robosignatory

* [ ] Update the Robosignatory role in the infra ansible repository. Disable branched signing and add the new release.
* [ ] Always check if there is a new artifact that got introduced in the release cycle, if so then we need to handle it more properly with robosignatory and include it in relevant files. (confirm this more with seniors)

===== Fedora Release

* [ ] Update the `fedora-release` package in Rawhide and the Branched release, including necessary changes to `fedora-release.spec`.

===== Fedora Repos

* [ ] Update the `fedora-repos` package in Rawhide, Branched to receive new GPG keys and updated rawhide symlinks.
* [ ] Update the `fedora-repos` package in remaining stable release branches and updated rawhide symlinks.

==== Toddlers

* [ ] Add the new version to the toddlers App configuration, referring to the provided PR for guidance. (For instance: check this: https://pagure.io/fork/humaton/fedora-infra/ansible/c/36b9cb2097fcfc30024f2982d9396cd9e0da7233)
  Changes to be done:

----
[consumer_config.scm_request_processor.branch_slas.f<NEW_BRANCH_VERSION>]
bug_fixes = 'YYYY-MM-DD'
security_fixes = 'YYYY-MM-DD'
----

=== T Day actions for mass branching

(for reviewers here is a checklist that one can copy this on the releng tracker so we can keep track of everything needed in one place)

==== Merge all the preparatory PRs:

* [ ] Pungi-Fedora (https://pagure.io/pungi-fedora)
* [ ] Fedora Kickstarts (https://pagure.io/fedora-kickstarts)
* [ ] Fedora Comps (https://pagure.io/fedora-comps)
* [ ] Workstation Ostree Config (https://pagure.io/workstation-ostree-config/)
* [ ] Fedora Release (https://src.fedoraproject.org/rpms/fedora-release)
* [ ] Fedora Repos (https://src.fedoraproject.org/rpms/fedora-repos)
* [ ] Toddlers (https://pagure.io/fedora-infra/toddlers)


==== Merging and running ansible changes

==== Push the Changes

* [ ] Commit, push, and apply the changes using the corresponding ansible playbooks for various services.

==== Disable Rawhide Builds in Koji

* [ ] Configure an outage in Koji to disable Rawhide builds.
* [ ] Cancel all running builds for Rawhide by listing and selecting relevant tasks, and then cancel each task.

==== Koji

* [ ] Run the `make-koji-release-tags` script from the releng repository to handle builds from the new branch.

==== Dist-Git

* [ ] Create new branches in Git and update gitolite.conf to allow users to push to the new branches.
* [ ] Run the `mass-branching-git.py` script to create new branches based on the file generated by PDC.

==== Bodhi

* [ ] Link empty repos and create empty repos as necessary to prepare for the new release.
* [ ] Create rawhide releases in Bodhi using appropriate commands for various types of releases (e.g., standard, container, flatpak).
* [ ] Update MirrorManager to point to the new Rawhide release.
* [ ] Enable autosigning on the Branched release after the compose is completed.
* [ ] Perform ELN-related work, including updating image configurations and scripts.

==== Fedora Container Base Image

* [ ] Import new images for Rawhide and update tags for `fedora:rawhide` and `fedora:${RAWHIDE}`.

==== Update Sync Script

* [ ] Update the sync script in the releng repository with the new version.
