Mass Branching

Description

At each alpha freeze we branch the pending release away from devel/ which allows rawhide (currently F39) to move on while the pending release goes into bugfix and polish mode.

Action

Update fedscm-admin

Add the new release to fedscm-admin and create an update and send it to limb.

Please take a look at the fedscm-admin commit.

PDC

The "product-release" needs to be created in PDC.

In the scripts/pdc/ directory, run:

$ python create-product-release.py fedora $TOKEN Fedora $NEW_VERSION

On pdc-backend01.stg (for testing) or pdc-backend01 (for production) clone (or update an existing one) the releng repo:

In the scripts/pdc/ directory, run (see the --help of the script for information on how to run it):

$ python create-new-release-branches.py …​ --createfile

Note

the --createfile argument is necessary, that file is needed for the next step.

Note

Due to memory leak issue in pdc, we need to set the config in /etc/pdc.d/fedora.json \{ "fedora": \{ "host": "http://pdc-web02.iad2.fedoraproject.org/rest_api/v1/", "develop": false, "ssl-verify": false, } }

dist-git

Now that pdc has the new release and each package has been branched in pdc we need to update dist-git in two steps:

  • Create the new branch in git

  • Update the gitolite.conf to allow user to push to this new branch

For both of these actions you will need the file generated by pdc above.

Create the git branches

On pkgs01.stg (for testing) or pkgs02 (for production), run:

$ sudo -u pagure python /usr/local/bin/mass-branching-git.py <new branch name> <input file>

Where <new branch name> will be like f39 and the <input file> the path to the file generated by pdc above.

Ansible

Apps in ansible need to be updated to be aware of a new branch.

Bodhi

Bodhi needs to be updated to add new release. This needs to be done in bodhi2 role in infra ansible repo. This change includes, updating koji-sync-listener.py, new-updates-sync, pungi configs for both rpm and modular updates, bodhi templates.

- roles/bodhi2/backend/files/new-updates-sync
- roles/bodhi2/backend/tasks/main.yml
- roles/bodhi2/backend/templates/pungi.module.conf.j2
- roles/bodhi2/backend/templates/pungi.rpm.conf.j2
- roles/bodhi2/backend/templates/koji_sync_listener.toml

Please check these files from the commit for your reference.

Enable Branched Compose

We need to enable the branched compose. This is done in releng role of infra ansbile repo.

Please check the file roles/releng/files/branched from the commit for your reference.

Fedora Branched
  1. Set FedoraBranched variable to True in infra ansible repo.

  2. Set FedoraBranchedBodhi variable to preenable in infra ansible repo.

Please check the file FedoraBranched.yaml and FedoraBranchedBodhi.yaml from the commit for your reference.

Koji hub

Update the koji hub config to allow side tags for new koji rawhide (currently f39) tag.

Please check the file roles/koji_hub/templates/hub.conf.j2 from the commit for your reference.

Robosignatory

Robosignatory has two parts, which can be found in robosignatory role in infra ansible repo.:

  1. Disable branched signing, so that we can freeze branched until we get a compose.

  2. Adding new release.

Please check the file roles/robosignatory/templates/robosignatory.toml.j2 from the commit for your reference.

mbs

Add the new rawhide platform. Its done in mbs role in infra ansible repo.

Please check the file roles/mbs/common/files/default-modules.production/platform-f38.yaml from the commit for your reference.

Push the changes

When done editing the files, commit, push and apply them via the corresponding ansible playbook:

$ sudo rbac-playbook groups/koji-hub.yml
$ sudo rbac-playbook groups/releng-compose.yml
$ sudo rbac-playbook groups/bodhi-backend.yml
$ sudo rbac-playbook openshift-apps/greenwave.yml
$ sudo -i ansible-playbook /srv/web/infra/ansible/playbooks/$ groups/proxies.yml -t pkgdb2
$ sudo rbac-playbook groups/mbs.yml -t mbs

Ask someone in fedora infra to run the robosignatory playbook.

Koji

The koji build system needs to have some tag/target work done to handle builds from the new branch and to update where builds from rawhide go.

Fedora Release

The fedora-release package needs to be updated in Rawhide and Branched.

Changes to fedora-release.spec in the rawhide branch:

(can also check this commit for reference)

  1. Increment %define dist_version to 39:

    %define dist_version 39

  2. Increment Version: and reset Release::

    Version: 39
    Release: 0.1%{?eln:.eln%{eln}}

  3. Add a %changelog entry:

    %changelog * Day Mon DD YYYY Name <Email> - 39-0.1
    - Setup for rawhide being F39

Changes to fedora-release.spec in the branched (currently 38) branch:

(can also check this commit for reference)

  1. Adjust release_name and unset is_rawhide:

    %define release_name Thirty Eight
    %define is_rawhide 0

  2. Verify the correct number for dist_version and Version::

    %define dist_version 38
    Version: 38

  3. Bump Release::

    Release: 0.4%{?eln:.eln%{eln}}

  4. Add a %changelog entry:

    %changelog * Day Mon DD YYYY Name <Email> - 38-0.4
    - Branching F38 from rawhide

Fedora Repos

The fedora-repos package needs to be updated in Rawhide, Branched, and also in all stable release branches (in order to receive new GPG keys and updated symlinks).

Changes to the rawhide branch (mostly in fedora-repos.spec):

(can also check this commit for reference)

  1. Generate and add a Rawhide+1 which is 40 GPG key file, then add it to the spec file:

    Source57: RPM-GPG-KEY-fedora-40-primary

  2. Update the archmap file and define architectures for Rawhide+1:

    fedora-{rawhide+1}-primary: x86_64 armhfp aarch64 ppc64le s390x

  3. Increment %global rawhide_release:

    %global rawhide_release 39

  4. Bump Version: and reset Release::

    Version: 39
    Release: 0.1%{?eln:.eln%{eln}}

  5. Add a %changelog entry:

    %changelog * Day Mon DD YYYY Name <Email> - 39-0.1
    - Setup for rawhide being F39

Changes to the branched branch (mostly in fedora-repos.spec):

(can also check this commit for reference)

  1. Copy the Rawhide+1 which is 40 GPG key file from the rawhide branch, then add it to the spec file:

    Source57: RPM-GPG-KEY-fedora-40-primary

  2. Copy the archmap file from the rawhide branch.

  3. Update %global rawhide_release:

    %global rawhide_release 39

  4. Enable updates_testing_enabled:

    %global updates_testing_enabled 1

  5. Bump Release:

    Release: 0.3%{?eln:.eln%{eln}}

  6. Add a %changelog entry:

    %changelog *Day Mon DD YYYY Name <Email> - 38-0.3
    - Update Rawhide definition, enable updates-testing for Branched

Note

Build fedora-release and fedora-repos packages for Branched release before enabling the Rawhide gating.

Changes to the stable branches (mostly in fedora-repos.spec):

  1. Copy the Rawhide+1 GPG key which is 40 file from the rawhide branch, then add it to the spec file:

    Source57: RPM-GPG-KEY-fedora-40-primary

  2. Copy the archmap file from the rawhide branch.

  3. Update %global rawhide_release:

    %global rawhide_release 39

  4. Bump Release::

    Release: 0.3%{?eln:.eln%{eln}}

  5. Add a %changelog entry:

    %changelog *Day Mon DD YYYY Name <Email> - 37-0.3
    - Update Rawhide definition

Bodhi

Linking Empty Repos

We need to link empty repos so that new-updates-sync wont complain about missing repos. The following commands should be run on bodhi-backend01.phx2.fedoraproject.org

$ sudo ln -s /mnt/koji/compose/updates/empty-repo/ /mnt/koji/compose/updates/f38-updates $ sudo ln -s /mnt/koji/compose/updates/empty-repo/ /mnt/koji/compose/updates/f38-updates-testing $ sudo ln -s /mnt/koji/compose/updates/empty-repo/ /mnt/koji/compose/updates/f38-modular-updates $ sudo ln -s /mnt/koji/compose/updates/empty-repo/ /mnt/koji/compose/updates/f38-modular-updates-testing

Creating Empty Repos

To create empty repos on the master mirror, run create_emtpy_repos.sh from pagure releng repo. This should be run on bodhi-backend01.phx2.fedoraproject.org

$ sudo -u ftpsync sh scripts/branching/create_empty_repos.sh 38

Note

Please verify the repo permissions that are created under /pub/fedora/linux/development/<fedora_release_number> and /pub/fedora-secondary/development/<fedora_release_number>. They should be owned by ftpsync:ftpsync

Creating rawhide release

To create a rawhide release in bodhi, you need to run

$ bodhi releases create --name "F39" --long-name "Fedora 39" --id-prefix FEDORA --version 39 --branch f39 --dist-tag f39 --stable-tag f39 --testing-tag f39-updates-testing --candidate-tag f39-updates-candidate --pending-stable-tag f39-updates-pending --pending-testing-tag f39-updates-testing-pending --pending-signing-tag f39-signing-pending --state pending --override-tag f39-override --create-automatic-updates --not-composed-by-bodhi

To create a container release for rawhide in bodhi, you need to run

$ bodhi releases create --name "F39C" --long-name "Fedora 39 Containers" --id-prefix FEDORA-CONTAINER --version 39 --branch f39 --dist-tag f39-container --stable-tag f39-container-updates --testing-tag f39-container-updates-testing --candidate-tag f39-container-updates-candidate --pending-stable-tag f39-container-updates-pending --pending-testing-tag f39-container-updates-testing-pending --state pending --override-tag f39-container-override

To create a flatpak release for branched in bodhi, you need to run

$ bodhi releases create --name "F38F" --long-name "Fedora 38 Flatpaks" --id-prefix FEDORA-FLATPAK --version 38 --branch f38 --dist-tag f38-flatpak --stable-tag f38-flatpak-updates --testing-tag f38-flatpak-updates-testing --candidate-tag f38-flatpak-updates-candidate --pending-stable-tag f38-flatpak-updates-pending --pending-testing-tag f38-flatpak-updates-testing-pending --state pending --override-tag f38-flatpak-override

You need to run the bodhi openshift playbook, so that UI will know about the new release. Then, you need to restart fm-consumer@config.service and bodhi-celery.service services on bodhi-backend01.phx2.fedoraproject.org

$ sudo rbac-playbook openshift-apps/bodhi.yml $ sudo systemctl restart fm-consumer@config.service bodhi-celery.service

Note

Build fedora-release, fedora-repos package for rawhide after enabling the rawhide gating

Update rawhide koji repo

We need to point the rawhide buildroot repo to the newly created rawhide buildroot. This way kojira doesn’t make a newrepo for rawhide target as often as fxx-build (new rawhide buildroot).

Run the following command from any of the compose boxes:

$ cd /mnt/koji/repos/rawhide; rm -f latest; ln -s ../f39-build/latest ./latest

Update block_retired.py script

block_retired.py script in releng repo should be updated with rawhide release and also branched release should be added to the script.

Please look at this block_retired.py commit as an example.

Updating MirrorManager

We need to update the mirrormanager so that it will point rawhide to the new rawhide release.

Please follow the instructions in the fedora infra ticket to update the database of mirrormanager.

Enable autosigning on branched release

Once the branched compose is composed, we need to re-enable robosignatory on branched release

Add the new rawhide key to eln pungi config. For example, look at this pungi eln config commit

Change the trigger notification for DistroBuildSync to the new Rawhide version. For example, look at this commit.

Branch new rawhide in Koschei

Branch new fedora rawhide in koschei.

Fedora Container Base Image

In order to enable builds for Container Base Images via the Fedora Layered Image Build System we will need to import a new image for Rawhide as well as for the new fedora:rawhide and fedora:$39 tags.

Check for the latest successful Rawhide Base Image composed image here.

On compose-x86-01.phx2 run:

# Update this to be the correct URL for your image
$ BASEIMAGE_URL="https://kojipkgs.fedoraproject.org//packages/Fedora-Docker-Base/Rawhide/20170310.n.0/images/Fedora-Docker-Base-Rawhide-20170310.n.0.x86_64.tar.xz"

# Update this to whatever version number Rawhide now points to
$ RAWHIDE="27"

# Load the latest, find it's image name
$ sudo docker load < <(curl -s "${BASEIMAGE_URL}")
$ sudo docker images | grep base-rawhide
fedora-docker-base-rawhide-20170310.n.0.x86_64      latest      ffd832a990ca        5 hours ago     201.8 MB

# Tag everything
$ sudo docker tag fedora-docker-base-rawhide-20170310.n.0.x86_64 candidate-registry.fedoraproject.org/fedora:rawhide
$ sudo docker tag fedora-docker-base-rawhide-20170310.n.0.x86_64 candidate-registry.fedoraproject.org/fedora:${RAWHIDE}
$ sudo docker tag fedora-docker-base-rawhide-20170310.n.0.x86_64 registry.fedoraproject.org/fedora:rawhide
$ sudo docker tag fedora-docker-base-rawhide-20170310.n.0.x86_64 registry.fedoraproject.org/fedora:${RAWHIDE}

# Push the images
$ sudo docker push candidate-registry.fedoraproject.org/fedora:rawhide
$ sudo docker push candidate-registry.fedoraproject.org/fedora:${RAWHIDE}
$ sudo docker push registry.fedoraproject.org/fedora:rawhide
$ sudo docker push registry.fedoraproject.org/fedora:${RAWHIDE}

# Clean up after ourselves
$ sudo docker rmi fedora-docker-base-rawhide-20170310.n.0.x86_64
Untagged: fedora-docker-base-rawhide-20170310.n.0.x86_64:latest
$ for i in $(sudo docker images -q -f 'dangling=true'); do sudo docker rmi $i; done
Update sync script

In releng repository update script.

And set current_rawhide variable.

Consider Before Running

Note

FIXME: Need some love here