[sop-mass-branching] Use attributes to depict release versions

Signed-off-by: Samyak Jain <samyak.jn11@gmail.com>
This commit is contained in:
Samyak Jain 2023-03-06 14:53:19 +05:30
parent 946676b8a9
commit 45dc2cf771
2 changed files with 147 additions and 136 deletions

View file

@ -1,5 +1,8 @@
:year: 2023
:rawhide_1: 40
:rawhide: 39
:rawhide_name: Thirty Nine
:branched: 38
:branched_name: Thirty Eight
:current: 37
:old_release: 36

View file

@ -1,9 +1,11 @@
include::_partials/attributes.adoc[]
== Mass Branching
=== Description
At each alpha freeze we branch the pending release away from `devel/`
which allows rawhide to move on while the pending release goes into
which allows rawhide (currently F{rawhide}) to move on while the pending release goes into
bugfix and polish mode.
=== Action
@ -39,23 +41,23 @@ 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:
....
git clone https://pagure.io/releng.git
....
``
$ git clone https://pagure.io/releng.git
``
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]
.Note
@ -87,11 +89,11 @@ For both of these actions you will need the file generated by pdc above.
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 something like `f28` and the
Where `<new branch name>` will be like `f{rawhide}` and the
`<input file>` the path to the file generated by pdc above.
==== Ansible
@ -133,7 +135,7 @@ Please check the file `FedoraBranched.yaml` and `FedoraBranchedBodhi.yaml` from
===== Koji hub
Update the koji hub config to allow side tags for new koji rawhide tag.
Update the koji hub config to allow side tags for new koji rawhide (currently f{rawhide}) tag.
Please check the file `roles/koji_hub/templates/hub.conf.j2` from the https://pagure.io/fedora-infra/ansible/c/549e5d3ace41c04fdbef9d81f359f16c2fe0c2fa?branch=main[commit] for your reference.
@ -156,14 +158,14 @@ Please check the file `roles/robosignatory/templates/robosignatory.toml.j2` from
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
....
``
$ 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.
@ -186,60 +188,54 @@ Changes to `fedora-release.spec` in the *rawhide* branch:
(can also check this https://src.fedoraproject.org/rpms/fedora-release/c/841f1fb8e5f7ff2b11a5e0905f15e765da405edd?branch=rawhide[commit] for reference)
[arabic]
. Increment `%define dist_version`:
. Increment `%define dist_version` to {rawhide}:
+
....
-%define dist_version 35
+%define dist_version 36
....
``
%define dist_version {rawhide}
``
. Increment `Version:` and reset `Release:`:
+
....
-Version: 35
-Release: 0.3%{?eln:.eln%{eln}}
+Version: 36
+Release: 0.1%{?eln:.eln%{eln}}
....
``
Version: {rawhide} +
Release: 0.1%{?eln:.eln%{eln}} +
``
. Add a `%changelog` entry:
+
....
``
%changelog
+* Tue Feb 23 2021 Mohan Boddu <mboddu@bhujji.com> - 36-0.1
+- Setup for rawhide being F36
....
* Day Mon DD YYYY Name <Email> - {rawhide}-0.1 +
- Setup for rawhide being F{rawhide} +
``
Changes to `fedora-release.spec` in the *branched* branch:
Changes to `fedora-release.spec` in the *branched* (currently {branched}) branch:
(can also check this https://src.fedoraproject.org/rpms/fedora-release/c/a2c289b44335eec89efaddee02d807b048edd51f?branch=f37[commit] for reference)
[arabic]
. Adjust `release_name` and unset `is_rawhide`:
+
....
-%define release_name Rawhide
-%define is_rawhide 1
+%define release_name Thirty Five
+%define is_rawhide 0
....
``
%define release_name {branched_name} +
%define is_rawhide 0 +
``
. Verify the correct number for `dist_version` and `Version:`:
+
....
%define dist_version 35
Version: 35
....
``
%define dist_version {branched} +
Version: {branched} +
``
. Bump `Release:`:
+
....
-Release: 0.3%{?eln:.eln%{eln}}
+Release: 0.4%{?eln:.eln%{eln}}
....
``
Release: 0.4%{?eln:.eln%{eln}}
``
. Add a `%changelog` entry:
+
....
``
%changelog
+* Tue Feb 23 2021 Mohan Boddu <mboddu@bhujji.com> - 35-0.4
+- Branching F35 from rawhide
....
* Day Mon DD YYYY Name <Email> - {branched}-0.4 +
- Branching F{branched} from rawhide +
``
==== Fedora Repos
@ -252,76 +248,74 @@ Changes to the *rawhide* branch (mostly in `fedora-repos.spec`):
(can also check this https://src.fedoraproject.org/rpms/fedora-repos/c/043010400f007c9f7167c9411d4463f4c2f08b9e?branch=rawhide[commit] for reference)
[arabic]
. Generate and add a _Rawhide+1_ GPG key file, then add it to the spec
. Generate and add a _Rawhide+1_ which is {rawhide_1} GPG key file, then add it to the spec
file:
+
....
Source57: RPM-GPG-KEY-fedora-37-primary
....
``
Source57: RPM-GPG-KEY-fedora-{rawhide_1}-primary
``
. Update the `archmap` file and define architectures for _Rawhide+1_:
+
....
+fedora-37-primary: x86_64 armhfp aarch64 ppc64le s390x
....
``
fedora-{rawhide+1}-primary: x86_64 armhfp aarch64 ppc64le s390x
``
. Increment `%global rawhide_release`:
+
....
-%global rawhide_release 35
+%global rawhide_release 36
....
``
%global rawhide_release {rawhide}
``
. Bump `Version:` and reset `Release:`:
+
....
-Version: 35
-Release: 0.2%{?eln:.eln%{eln}}
+Version: 36
+Release: 0.1%{?eln:.eln%{eln}}
....
``
Version: {rawhide} +
Release: 0.1%{?eln:.eln%{eln}} +
``
. Add a `%changelog` entry:
+
....
``
%changelog
+* Tue Feb 23 2021 Tomas Hrcka <thrcka@redhat.com> - 36-0.1
+- Setup for rawhide being F36
....
* Day Mon DD YYYY Name <Email> - {rawhide}-0.1 +
- Setup for rawhide being F{rawhide} +
``
Changes to the *branched* branch (mostly in `fedora-repos.spec`):
(can also check this https://src.fedoraproject.org/rpms/fedora-repos/c/cd678e7b4aa59e234f32c9697198f58d9c89d862?branch=f38[commit] for reference)
[arabic]
. Copy the _Rawhide+1_ GPG key file from the _rawhide_ branch, then add
. Copy the _Rawhide+1_ which is {rawhide_1} GPG key file from the _rawhide_ branch, then add
it to the spec file:
+
....
Source57: RPM-GPG-KEY-fedora-37-primary
....
``
Source57: RPM-GPG-KEY-fedora-{rawhide_1}-primary
``
. Copy the `archmap` file from the _rawhide_ branch.
. Update `%global rawhide_release`:
+
....
-%global rawhide_release 35
+%global rawhide_release 36
....
[attributes]
``
%global rawhide_release {rawhide}
``
. Enable `updates_testing_enabled`:
+
....
-%global updates_testing_enabled 0
+%global updates_testing_enabled 1
....
. Bump `Release:`:
``
%global updates_testing_enabled 1
``
. Bump `Release`:
+
....
-Release: 0.2%{?eln:.eln%{eln}}
+Release: 0.3%{?eln:.eln%{eln}}
....
``
Release: 0.3%{?eln:.eln%{eln}} +
``
. Add a `%changelog` entry:
+
....
``
%changelog
+* Tue Feb 23 2021 Tomas Hrcka <thrcka@redhat.com> - 35-0.3
+- Update Rawhide definition, enable updates-testing for Branched
....
*Day Mon DD YYYY Name <Email> - {branched}-0.3 +
- Update Rawhide definition, enable updates-testing for Branched +
``
[NOTE]
.Note
@ -333,32 +327,36 @@ Build `fedora-release` and `fedora-repos` packages for Branched release
Changes to the *stable* branches (mostly in `fedora-repos.spec`):
[arabic]
. Copy the _Rawhide+1_ GPG key file from the _rawhide_ branch, then add
. Copy the _Rawhide+1_ GPG key which is {rawhide_1} file from the _rawhide_ branch, then add
it to the spec file:
+
....
Source57: RPM-GPG-KEY-fedora-37-primary
....
[attributes]
``
Source57: RPM-GPG-KEY-fedora-{rawhide_1}-primary
``
+
. Copy the `archmap` file from the _rawhide_ branch.
. Update `%global rawhide_release`:
+
....
-%global rawhide_release 35
+%global rawhide_release 36
....
[attributes]
``
%global rawhide_release {rawhide}
``
. Bump `Release:`:
+
....
-Release: 0.2%{?eln:.eln%{eln}}
+Release: 0.3%{?eln:.eln%{eln}}
....
[attributes]
``
Release: 0.3%{?eln:.eln%{eln}}
``
. Add a `%changelog` entry:
+
....
[attributes]
``
%changelog
+* Tue Feb 23 2021 Tomas Hrcka <thrcka@redhat.com> - 34-0.3
+- Update Rawhide definition
....
*Day Mon DD YYYY Name <Email> - {current}-0.3 +
- Update Rawhide definition +
``
==== Bodhi
@ -368,12 +366,14 @@ 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/f32-updates
$ sudo ln -s /mnt/koji/compose/updates/empty-repo/ /mnt/koji/compose/updates/f32-updates-testing
$ sudo ln -s /mnt/koji/compose/updates/empty-repo/ /mnt/koji/compose/updates/f32-modular-updates
$ sudo ln -s /mnt/koji/compose/updates/empty-repo/ /mnt/koji/compose/updates/f32-modular-updates-testing
....
[attributes]
``
$ sudo ln -s /mnt/koji/compose/updates/empty-repo/ /mnt/koji/compose/updates/f{branched}-updates
$ sudo ln -s /mnt/koji/compose/updates/empty-repo/ /mnt/koji/compose/updates/f{branched}-updates-testing
$ sudo ln -s /mnt/koji/compose/updates/empty-repo/ /mnt/koji/compose/updates/f{branched}-modular-updates
$ sudo ln -s /mnt/koji/compose/updates/empty-repo/ /mnt/koji/compose/updates/f{branched}-modular-updates-testing
``
===== Creating Empty Repos
@ -382,9 +382,10 @@ https://pagure.io/releng/blob/main/f/scripts/branching/create_empty_repos.sh[cre
from https://pagure.io/releng[pagure releng] repo. This should be run on
*bodhi-backend01.phx2.fedoraproject.org*
....
$ sudo -u ftpsync sh scripts/branching/create_empty_repos.sh 31
....
[attributes]
``
$ sudo -u ftpsync sh scripts/branching/create_empty_repos.sh {branched}
``
[NOTE]
.Note
@ -399,31 +400,36 @@ be owned by _ftpsync:ftpsync_
To create a rawhide release in bodhi, you need to run
....
$ bodhi releases create --name "F36" --long-name "Fedora 36" --id-prefix FEDORA --version 36 --branch f36 --dist-tag f36 --stable-tag f36 --testing-tag f36-updates-testing --candidate-tag f36-updates-candidate --pending-stable-tag f36-updates-pending --pending-testing-tag f36-updates-testing-pending --pending-signing-tag f36-signing-pending --state pending --override-tag f36-override --create-automatic-updates --not-composed-by-bodhi
....
[attributes]
``
$ bodhi releases create --name "F{rawhide}" --long-name "Fedora {rawhide}" --id-prefix FEDORA --version {rawhide} --branch f{rawhide} --dist-tag f{rawhide} --stable-tag f{rawhide} --testing-tag f{rawhide}-updates-testing --candidate-tag f{rawhide}-updates-candidate --pending-stable-tag f{rawhide}-updates-pending --pending-testing-tag f{rawhide}-updates-testing-pending --pending-signing-tag f{rawhide}-signing-pending --state pending --override-tag f{rawhide}-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 "F36C" --long-name "Fedora 36 Containers" --id-prefix FEDORA-CONTAINER --version 36 --branch f36 --dist-tag f36-container --stable-tag f36-container-updates --testing-tag f36-container-updates-testing --candidate-tag f36-container-updates-candidate --pending-stable-tag f36-container-updates-pending --pending-testing-tag f36-container-updates-testing-pending --state pending --override-tag f36-container-override
....
[attributes]
``
$ bodhi releases create --name "F{rawhide}C" --long-name "Fedora {rawhide} Containers" --id-prefix FEDORA-CONTAINER --version {rawhide} --branch f{rawhide} --dist-tag f{rawhide}-container --stable-tag f{rawhide}-container-updates --testing-tag f{rawhide}-container-updates-testing --candidate-tag f{rawhide}-container-updates-candidate --pending-stable-tag f{rawhide}-container-updates-pending --pending-testing-tag f{rawhide}-container-updates-testing-pending --state pending --override-tag f{rawhide}-container-override
``
To create a flatpak release for branched in bodhi, you need to run
....
$ bodhi releases create --name "F35F" --long-name "Fedora 35 Flatpaks" --id-prefix FEDORA-FLATPAK --version 35 --branch f35 --dist-tag f35-flatpak --stable-tag f35-flatpak-updates --testing-tag f35-flatpak-updates-testing --candidate-tag f35-flatpak-updates-candidate --pending-stable-tag f35-flatpak-updates-pending --pending-testing-tag f35-flatpak-updates-testing-pending --state pending --override-tag f35-flatpak-override
....
[attributes]
``
$ bodhi releases create --name "F{branched}F" --long-name "Fedora {branched} Flatpaks" --id-prefix FEDORA-FLATPAK --version {branched} --branch f{branched} --dist-tag f{branched}-flatpak --stable-tag f{branched}-flatpak-updates --testing-tag f{branched}-flatpak-updates-testing --candidate-tag f{branched}-flatpak-updates-candidate --pending-stable-tag f{branched}-flatpak-updates-pending --pending-testing-tag f{branched}-flatpak-updates-testing-pending --state pending --override-tag f{branched}-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]
.Note
@ -438,12 +444,14 @@ 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
Run the following command from any of the compose boxes:
....
$ cd /mnt/koji/repos/rawhide; rm -f latest; ln -s ../f34-build/latest
``
$ cd /mnt/koji/repos/rawhide; rm -f latest; ln -s ../f{rawhide}-build/latest
./latest
....
``
===== Update block_retired.py script