From f3b828d5759ae67ea7798cf45698d49ac318c7c1 Mon Sep 17 00:00:00 2001 From: Gordon Messmer Date: Apr 06 2026 20:27:43 +0000 Subject: [PATCH 1/2] Simplify the new release branching process --- diff --git a/README.md b/README.md index 3a2a6a4..f9151b6 100644 --- a/README.md +++ b/README.md @@ -220,27 +220,17 @@ Make a PR similar to [ansible#1318](https://pagure.io/fedora-infra/ansible/pull-request/1318) in [fedora-infra/ansible](https://pagure.io/fedora-infra/ansible). -### On Rawhide / main branch +### This repo -``` -sed -i "s/45/46/g" *.repo comps-sync.py -sed -i "s/releasever: 45/releasever: 46/" common.yaml -sed -i --follow-symlinks "s/# - fedora-45/# - fedora-46/" *.yaml -mv fedora-45.repo fedora-46.repo -mv fedora-45-updates.repo fedora-46-updates.repo -sed -i "s/46/46/g" README.md -sed -i "s/45/46/g" README.md -``` - -### On the new branch (f45) +Use the branch recipe to create the new release branch and update the main +branch: ``` -rm fedora-rawhide.repo -sed -i --follow-symlinks "/- fedora-rawhide/d" *.yaml -sed -i --follow-symlinks "s/# - fedora-45/- fedora-45/" *.yaml -sed -i "s/releasever_ref: \"rawhide\"/releasever_ref: \"45\"/" common.yaml +just branch ``` +Push the new changes in both branches. + ## Historical references Building and testing instructions: diff --git a/base-atomic.yaml b/base-atomic.yaml index f2d58ab..657a666 100644 --- a/base-atomic.yaml +++ b/base-atomic.yaml @@ -21,5 +21,5 @@ exclude-packages: # Kept in the leaf manifest as they are overwritten by Pungi in composes repos: - fedora-rawhide - # - fedora-45 - # - fedora-45-updates + # - fedora + # - updates diff --git a/budgie-atomic-ostree.yaml b/budgie-atomic-ostree.yaml index dc16462..9c2a71c 100644 --- a/budgie-atomic-ostree.yaml +++ b/budgie-atomic-ostree.yaml @@ -7,5 +7,5 @@ include: # Kept in the leaf manifest as they are overwritten by Pungi in composes repos: - fedora-rawhide - # - fedora-45 - # - fedora-45-updates + # - fedora + # - updates diff --git a/budgie-atomic.yaml b/budgie-atomic.yaml index c57ca69..7bc5657 100644 --- a/budgie-atomic.yaml +++ b/budgie-atomic.yaml @@ -4,5 +4,5 @@ include: # Kept in the leaf manifest as they are overwritten by Pungi in composes repos: - fedora-rawhide - # - fedora-45 - # - fedora-45-updates + # - fedora + # - updates diff --git a/cosmic-atomic-ostree.yaml b/cosmic-atomic-ostree.yaml index feeadc8..6a5c45a 100644 --- a/cosmic-atomic-ostree.yaml +++ b/cosmic-atomic-ostree.yaml @@ -7,5 +7,5 @@ include: # Kept in the leaf manifest as they are overwritten by Pungi in composes repos: - fedora-rawhide - # - fedora-45 - # - fedora-45-updates + # - fedora + # - updates diff --git a/cosmic-atomic.yaml b/cosmic-atomic.yaml index 8dbccb7..241d828 100644 --- a/cosmic-atomic.yaml +++ b/cosmic-atomic.yaml @@ -4,5 +4,5 @@ include: # Kept in the leaf manifest as they are overwritten by Pungi in composes repos: - fedora-rawhide - # - fedora-45 - # - fedora-45-updates + # - fedora + # - updates diff --git a/fedora-45-updates.repo b/fedora-45-updates.repo deleted file mode 100644 index fdafc2b..0000000 --- a/fedora-45-updates.repo +++ /dev/null @@ -1,6 +0,0 @@ -[fedora-45-updates] -name=Fedora 45 $basearch Updates -mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f45&arch=$basearch -enabled=1 -gpgcheck=1 -metadata_expire=1d diff --git a/fedora-45.repo b/fedora-45.repo deleted file mode 100644 index 7b3cfed..0000000 --- a/fedora-45.repo +++ /dev/null @@ -1,6 +0,0 @@ -[fedora-45] -name=Fedora 45 $basearch -mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-45&arch=$basearch -enabled=1 -gpgcheck=1 -metadata_expire=1d diff --git a/fedora.repo b/fedora.repo new file mode 100644 index 0000000..79077d6 --- /dev/null +++ b/fedora.repo @@ -0,0 +1,6 @@ +[fedora] +name=Fedora $releasever $basearch +metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch +enabled=1 +gpgcheck=1 +metadata_expire=1d diff --git a/justfile b/justfile index 0a1a5e3..a45753c 100644 --- a/justfile +++ b/justfile @@ -70,6 +70,25 @@ all: validate validate: ./ci/validate +branch release: + git checkout main + # exit if branching the repo fails, possibly already exists + git branch f{{release}} || exit 1 + sed -i "s/{{release}}/$(( {{release}} + 1 ))/g" comps-sync.py README.md + sed -i "s/releasever: {{release}}/releasever: $(( {{release}} + 1 ))/" common.yaml + git add comps-sync.py common.yaml README.md + git commit -m "Update main branch to $(( {{release}} + 1 ))" + + git checkout f{{release}} + git rm fedora-rawhide.repo + sed -i --follow-symlinks "/- fedora-rawhide/d" *.yaml + sed -i --follow-symlinks "s/# - fedora/- fedora/" *.yaml + sed -i --follow-symlinks "s/# - updates/- updates/" *.yaml + sed -i "s/releasever_ref: \"rawhide\"/releasever_ref: \"{{release}}\"/" common.yaml + git add *.yaml + git commit -m "Update configs for branch f{{release}}" + + # Comps-sync, but without pulling latest sync: #!/bin/bash diff --git a/kinoite-mobile.yaml b/kinoite-mobile.yaml index 72a18f1..c054713 100644 --- a/kinoite-mobile.yaml +++ b/kinoite-mobile.yaml @@ -4,5 +4,5 @@ include: # Kept in the leaf manifest as they are overwritten by Pungi in composes repos: - fedora-rawhide - # - fedora-45 - # - fedora-45-updates + # - fedora + # - updates diff --git a/kinoite-ostree.yaml b/kinoite-ostree.yaml index 9590aff..86f0996 100644 --- a/kinoite-ostree.yaml +++ b/kinoite-ostree.yaml @@ -7,5 +7,5 @@ include: # Kept in the leaf manifest as they are overwritten by Pungi in composes repos: - fedora-rawhide - # - fedora-45 - # - fedora-45-updates + # - fedora + # - updates diff --git a/kinoite.yaml b/kinoite.yaml index db9990e..f7dcadf 100644 --- a/kinoite.yaml +++ b/kinoite.yaml @@ -4,5 +4,5 @@ include: # Kept in the leaf manifest as they are overwritten by Pungi in composes repos: - fedora-rawhide - # - fedora-45 - # - fedora-45-updates + # - fedora + # - updates diff --git a/silverblue-ostree.yaml b/silverblue-ostree.yaml index 7ff9949..1c5d0fa 100644 --- a/silverblue-ostree.yaml +++ b/silverblue-ostree.yaml @@ -7,5 +7,5 @@ include: # Kept in the leaf manifest as they are overwritten by Pungi in composes repos: - fedora-rawhide - # - fedora-45 - # - fedora-45-updates + # - fedora + # - updates diff --git a/silverblue.yaml b/silverblue.yaml index 5d49816..b1dc845 100644 --- a/silverblue.yaml +++ b/silverblue.yaml @@ -4,5 +4,5 @@ include: # Kept in the leaf manifest as they are overwritten by Pungi in composes repos: - fedora-rawhide - # - fedora-45 - # - fedora-45-updates + # - fedora + # - updates diff --git a/sway-atomic-ostree.yaml b/sway-atomic-ostree.yaml index 604e70a..cfeb62b 100644 --- a/sway-atomic-ostree.yaml +++ b/sway-atomic-ostree.yaml @@ -7,5 +7,5 @@ include: # Kept in the leaf manifest as they are overwritten by Pungi in composes repos: - fedora-rawhide - # - fedora-45 - # - fedora-45-updates + # - fedora + # - updates diff --git a/sway-atomic.yaml b/sway-atomic.yaml index 5a8b1b0..a8fde87 100644 --- a/sway-atomic.yaml +++ b/sway-atomic.yaml @@ -4,5 +4,5 @@ include: # Kept in the leaf manifest as they are overwritten by Pungi in composes repos: - fedora-rawhide - # - fedora-45 - # - fedora-45-updates + # - fedora + # - updates diff --git a/updates.repo b/updates.repo new file mode 100644 index 0000000..79c04f6 --- /dev/null +++ b/updates.repo @@ -0,0 +1,6 @@ +[updates] +name=Fedora $releasever $basearch Updates +metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch +enabled=1 +gpgcheck=1 +metadata_expire=1d From 2c59fda8319370b8cfd8db356979279611c286e6 Mon Sep 17 00:00:00 2001 From: Gordon Messmer Date: Apr 06 2026 20:27:43 +0000 Subject: [PATCH 2/2] More simpler --- diff --git a/README.md b/README.md index f9151b6..2505151 100644 --- a/README.md +++ b/README.md @@ -226,7 +226,7 @@ Use the branch recipe to create the new release branch and update the main branch: ``` -just branch +just branch ``` Push the new changes in both branches. diff --git a/fedora-rawhide.repo b/fedora-rawhide.repo deleted file mode 100644 index 30b51c9..0000000 --- a/fedora-rawhide.repo +++ /dev/null @@ -1,6 +0,0 @@ -[fedora-rawhide] -name=Fedora rawhide $basearch -mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=$basearch -enabled=1 -gpgcheck=1 -metadata_expire=1d diff --git a/fedora.repo b/fedora.repo index 79077d6..6ed2960 100644 --- a/fedora.repo +++ b/fedora.repo @@ -1,6 +1,20 @@ +[fedora-rawhide] +name=Fedora rawhide $basearch +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=$basearch +enabled=1 +gpgcheck=1 +metadata_expire=1d + [fedora] name=Fedora $releasever $basearch metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch enabled=1 gpgcheck=1 metadata_expire=1d + +[updates] +name=Fedora $releasever $basearch Updates +metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch +enabled=1 +gpgcheck=1 +metadata_expire=1d diff --git a/justfile b/justfile index a45753c..57e3379 100644 --- a/justfile +++ b/justfile @@ -70,23 +70,29 @@ all: validate validate: ./ci/validate -branch release: +branch: + #!/bin/bash + set -euo pipefail + git checkout main - # exit if branching the repo fails, possibly already exists - git branch f{{release}} || exit 1 - sed -i "s/{{release}}/$(( {{release}} + 1 ))/g" comps-sync.py README.md - sed -i "s/releasever: {{release}}/releasever: $(( {{release}} + 1 ))/" common.yaml + + default_variant={{default_variant}} + version="$(rpm-ostree compose tree --print-only --repo=repo ${default_variant}.yaml | jq -r '."mutate-os-release"')" + + # recipe will exit if branching the repo fails, such as if branch already exists + git branch f${version} + sed -i "s/${version}/$(( version + 1 ))/g" comps-sync.py README.md + sed -i "s/releasever: ${version}/releasever: $(( version + 1 ))/" common.yaml git add comps-sync.py common.yaml README.md - git commit -m "Update main branch to $(( {{release}} + 1 ))" + git commit -m "Update main branch to $(( version + 1 ))" - git checkout f{{release}} - git rm fedora-rawhide.repo + git checkout f${version} sed -i --follow-symlinks "/- fedora-rawhide/d" *.yaml sed -i --follow-symlinks "s/# - fedora/- fedora/" *.yaml sed -i --follow-symlinks "s/# - updates/- updates/" *.yaml - sed -i "s/releasever_ref: \"rawhide\"/releasever_ref: \"{{release}}\"/" common.yaml + sed -i "s/releasever_ref: \"rawhide\"/releasever_ref: \"${version}\"/" common.yaml git add *.yaml - git commit -m "Update configs for branch f{{release}}" + git commit -m "Update configs for branch f${version}" # Comps-sync, but without pulling latest diff --git a/updates.repo b/updates.repo deleted file mode 100644 index 79c04f6..0000000 --- a/updates.repo +++ /dev/null @@ -1,6 +0,0 @@ -[updates] -name=Fedora $releasever $basearch Updates -metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch -enabled=1 -gpgcheck=1 -metadata_expire=1d