From 5bd816cb3d86e4d30017703d6f6b3b7e0556a3c7 Mon Sep 17 00:00:00 2001
From: Paul Whalen <pwhalen@fedoraproject.org>
Date: Aug 15 2024 13:55:23 +0000
Subject: F-41: Update for branching


Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>

---

diff --git a/fedora-iot.conf b/fedora-iot.conf
index 99c08de..e1a5d3b 100644
--- a/fedora-iot.conf
+++ b/fedora-iot.conf
@@ -203,7 +203,7 @@ translate_paths = [
 ]
 
 # These will be inherited by live_media, live_images and image_build
-global_ksurl = 'git+https://pagure.io/fedora-kickstarts.git?#HEAD'
+global_ksurl = 'git+https://pagure.io/fedora-kickstarts.git?#origin/f41'
 global_release = '!RELEASE_FROM_LABEL_DATE_TYPE_RESPIN'
 global_version = '41'
 # live_images ignores this in favor of live_target
@@ -217,9 +217,9 @@ osbuild = {
         "image_types": ["iot-raw-image"],
         "target": "f%s-candidate" % release_version,
         "arches": ["x86_64", "aarch64"],
-        "repo": ["https://kojipkgs.fedoraproject.org/compose/rawhide/latest-Fedora-Rawhide/compose/Everything/$arch/os/"],
+        "repo": ["https://kojipkgs.fedoraproject.org/compose/branched/latest-Fedora-41/compose/Everything/$arch/os/"],
         "ostree_url": "https://kojipkgs.fedoraproject.org/compose/iot/repo/",
-        "ostree_ref": "fedora/rawhide/$arch/iot",
+        "ostree_ref": "fedora/devel/$arch/iot",
         "subvariant": "IoT",
       },
       {
@@ -228,9 +228,9 @@ osbuild = {
         "image_types": ["iot-installer"],
         "target": "f%s-candidate" % release_version,
         "arches": ["x86_64", "aarch64"],
-        "repo": ["https://kojipkgs.fedoraproject.org/compose/rawhide/latest-Fedora-Rawhide/compose/Everything/$arch/os/"],
+        "repo": ["https://kojipkgs.fedoraproject.org/compose/branched/latest-Fedora-41/compose/Everything/$arch/os/"],
         "ostree_url": "https://kojipkgs.fedoraproject.org/compose/iot/repo/",
-        "ostree_ref": "fedora/rawhide/$arch/iot",
+        "ostree_ref": "fedora/devel/$arch/iot",
         "subvariant": "IoT",
         "manifest_type": "dvd-ostree",
       },
@@ -240,9 +240,9 @@ osbuild = {
         "image_types": ["iot-simplified-installer"],
         "target": "f%s-candidate" % release_version,
         "arches": ["x86_64", "aarch64"],
-        "repo": ["https://kojipkgs.fedoraproject.org/compose/rawhide/latest-Fedora-Rawhide/compose/Everything/$arch/os/"],
+        "repo": ["https://kojipkgs.fedoraproject.org/compose/branched/latest-Fedora-41/compose/Everything/$arch/os/"],
         "ostree_url": "https://kojipkgs.fedoraproject.org/compose/iot/repo/",
-        "ostree_ref": "fedora/rawhide/$arch/iot",
+        "ostree_ref": "fedora/devel/$arch/iot",
         "subvariant": "IoT_Simplified_Provisioner",
         "customizations": {"installation_device": "/dev/vda"},
         "failable": ["*"],
@@ -258,14 +258,14 @@ ostree = {
             "unified_core": True,
             "treefile": "fedora-iot.yaml",
             "config_url": "https://pagure.io/fedora-iot/ostree.git",
-            "config_branch": "main",
+            "config_branch": "f41",
             "repo": [
                 "IoT",
-                "https://kojipkgs.fedoraproject.org/compose/rawhide/latest-Fedora-Rawhide/compose/Everything/$basearch/os/"
+                "https://kojipkgs.fedoraproject.org/compose/branched/latest-Fedora-41/compose/Everything/$basearch/os/"
             ]
             "tag_ref": False,
             "ostree_repo": "/mnt/koji/compose/iot/repo/",
-            "ostree_ref": "fedora/rawhide/${basearch}/iot",
+            "ostree_ref": "fedora/devel/${basearch}/iot",
             "runroot_packages": ["selinux-policy-targeted"],
             "arches": ["x86_64", "aarch64"],
             "update_summary": True,
@@ -276,18 +276,18 @@ ostree_container = {
     "^bootc$": {
         "version": "!OSTREE_VERSION_FROM_LABEL_DATE_TYPE_RESPIN",
         "config_url": "https://pagure.io/fedora-iot/base-images",
-        "config_branch": "main",
+        "config_branch": "f41",
         "treefile": "fedora-bootc.yaml",
-        "repo": ["https://kojipkgs.fedoraproject.org/compose/rawhide/latest-Fedora-Rawhide/compose/Everything/$basearch/os/"],
+        "repo": ["https://kojipkgs.fedoraproject.org/compose/branched/latest-Fedora-41/compose/Everything/$basearch/os/"],
         "arches": ["x86_64", "aarch64", "ppc64le", "s390x"],
         "failable": ['*'],
     },
     "^bootc-tier0$": {
         "version": "!OSTREE_VERSION_FROM_LABEL_DATE_TYPE_RESPIN",
         "config_url": "https://pagure.io/fedora-iot/base-images",
-        "config_branch": "main",
+        "config_branch": "f41",
         "treefile": "fedora-tier-0.yaml",
-        "repo": ["https://kojipkgs.fedoraproject.org/compose/rawhide/latest-Fedora-Rawhide/compose/Everything/$basearch/os/"],
+        "repo": ["https://kojipkgs.fedoraproject.org/compose/branched/latest-Fedora-41/compose/Everything/$basearch/os/"],
         "arches": ["x86_64", "aarch64", "ppc64le", "s390x"],
         "failable": ['*'],
     },
diff --git a/sync-bootc-base-containers.sh b/sync-bootc-base-containers.sh
index da29480..cfe8ce4 100755
--- a/sync-bootc-base-containers.sh
+++ b/sync-bootc-base-containers.sh
@@ -50,8 +50,10 @@ arch_to_goarch() {
 # This is the release of Fedora that is currently stable, it will define if we
 # need to move the fedora:latest tag
 current_stable="40"
+# Define the development release
+current_devel="41"
 # Define what is rawhide so we know to push that tag
-current_rawhide="41"
+current_rawhide="42"
 # Sanity checking
 if ! [[ "${1}" =~ ^-?[0-9]+$ ]];
 then
@@ -85,10 +87,12 @@ base_build_nvr=${basename}-${vers}-${compdate}
 
 if [[ ${1} -eq "$current_stable" ]]; then
     tagname="latest"
-fi
-if [[ ${1} -eq "$current_rawhide" ]]; then
+elif [[ ${1} -eq "$current_rawhide" ]]; then
     tagname="rawhide"
+elif [[ ${1} -eq "$current_devel" ]]; then
+    tagname="${current_devel}"
 fi
+
 if [[ -z "$stage" ]]; then
     registries=("registry.fedoraproject.org" "candidate-registry.fedoraproject.org" "quay.io/fedora")
 else
diff --git a/twoweek-nightly.sh b/twoweek-nightly.sh
index 990268a..dd66c3f 100755
--- a/twoweek-nightly.sh
+++ b/twoweek-nightly.sh
@@ -18,7 +18,7 @@ TMPDIR=`mktemp -d /tmp/$RELEASE.$DATE.XXXX`
 TOMAIL="iot@lists.fedoraproject.org"
 FROM="Fedora IoT Report <rawhide@fedoraproject.org>"
 RSYNCPREFIX="sudo -u ftpsync"
-RSYNCTARGET="/pub/alt/iot/rawhide/"
+RSYNCTARGET="/pub/alt/iot/branched/"
 OLDCOMPOSE_ID=$(cat $TARGET_DIR/latest-$SHORT-$RELEASE_TITLE/COMPOSE_ID)
 
 # assume a releng dir is a git checkout of the releng repo

