diff --git a/fedora-iot.conf b/fedora-bootc.conf similarity index 69% rename from fedora-iot.conf rename to fedora-bootc.conf index 8c35a1c..743699f 100644 --- a/fedora-iot.conf +++ b/fedora-bootc.conf @@ -22,7 +22,7 @@ sigkeys = ['a15B79cc'] tree_arches = ['aarch64', 'x86_64'] # limit tree variants # if undefined, all variants from variants.xml will be included -tree_variants = ['IoT'] +tree_variants = ['bootc'] hashed_directories = True # RUNROOT settings @@ -87,13 +87,6 @@ lorax_options = [ }) ] -additional_packages = [ - ('^IoT$$', { - '*': [ - '*', - ], - }), -] multilib = [ ('^Everything$', { 'x86_64': ['devel', 'runtime'], @@ -203,71 +196,25 @@ 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/f40' global_release = '!RELEASE_FROM_LABEL_DATE_TYPE_RESPIN' global_version = '40' # live_images ignores this in favor of live_target global_target = 'f40' -osbuild = { - "^IoT$": [ - { - "name": "%s" % release_name, - "distro": "fedora-40", - "image_types": ["iot-raw-image"], - "target": "f%s-candidate" % release_version, +ostree_container = { + "^bootc$": { + "version": "!OSTREE_VERSION_FROM_LABEL_DATE_TYPE_RESPIN", + "config_url": "https://pagure.io/fedora-iot/base-images", + "config_branch": "f41-stable", + "treefile": "fedora-40.yaml", + "repo": ["https://kojipkgs.fedoraproject.org/compose/40/Fedora-40-20240414.0/compose/Everything/$basearch/os/", + "https://kojipkgs.fedoraproject.org/compose/updates/f40-updates/compose/Everything/$basearch/os/"], "arches": ["x86_64", "aarch64"], - "repo": ["https://kojipkgs.fedoraproject.org/compose/rawhide/latest-Fedora-Rawhide/compose/Everything/$arch/os/"], - "ostree_url": "https://kojipkgs.fedoraproject.org/compose/iot/repo/", - "ostree_ref": "fedora/rawhide/$arch/iot", - "subvariant": "IoT", - }, - { - "name": "%s-ostree" % release_name, - "distro": "fedora-40", - "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/"], - "ostree_url": "https://kojipkgs.fedoraproject.org/compose/iot/repo/", - "ostree_ref": "fedora/rawhide/$arch/iot", - "subvariant": "IoT", - "manifest_type": "dvd-ostree", - }, - { - "name": "%s" % release_name, - "distro": "fedora-40", - "image_types": ["iot-bootable-container"], - "target": "f%s-candidate" % release_version, - "arches": ["x86_64", "aarch64"], - "repo": ["https://kojipkgs.fedoraproject.org/compose/rawhide/latest-Fedora-Rawhide/compose/Everything/$arch/os/"], - "ostree_url": "https://kojipkgs.fedoraproject.org/compose/iot/repo/", - "ostree_ref": "fedora/rawhide/$arch/iot", - "subvariant": "IoT", - "failable": ["*"], - }, - ], -} - -ostree = { - "^IoT$": { - "version": "!OSTREE_VERSION_FROM_LABEL_DATE_TYPE_RESPIN", - "force_new_commit": True, - "unified_core": True, - "treefile": "fedora-iot.yaml", - "config_url": "https://pagure.io/fedora-iot/ostree.git", - "config_branch": "main", - "repo": [ - "IoT", - "https://kojipkgs.fedoraproject.org/compose/rawhide/latest-Fedora-Rawhide/compose/Everything/$basearch/os/" - ] - "tag_ref": False, - "ostree_repo": "/mnt/koji/compose/iot/repo/", - "ostree_ref": "fedora/rawhide/${basearch}/iot", - "runroot_packages": ["selinux-policy-targeted"], - "arches": ["x86_64", "aarch64"], - "update_summary": True, - } + "failable": ['*'], + "subvariant": "base", + "name": "Fedora-base-bootc", + }, } koji_profile = 'compose_koji' diff --git a/sync-bootc-base-containers.sh b/sync-bootc-base-containers.sh new file mode 100755 index 0000000..5417d10 --- /dev/null +++ b/sync-bootc-base-containers.sh @@ -0,0 +1,180 @@ +#!/bin/bash + +set -x + +# +# Sync latest docker image +# +# Docs in the f_help function +f_ctrl_c() { + printf "\n*** Exiting ***\n" + exit $? +} +# trap int (ctrl-c) +trap f_ctrl_c SIGINT +f_help() { + cat < /dev/null + # Import the image + for arch in "${ARCHES[@]}"; do + local filename + filename="/mnt/koji/compose/iot/Fedora-IoT-${release}-${compdate}/compose/bootc/${arch}/images/${basename}-${release}.${compdate}.ociarchive" + copy_image ${format}:${filename} ${registry_name}:${release}-${arch} + done + + popd &> /dev/null + + generate_manifest_list ${registry_name} ${release} + printf "Removing temporary directory\n" + rm -rf $work_dir +} + +# +# Version should not be higher than rawhide +# Either there is a mistake or script is out of date +# +if [[ ${1} -gt "$current_rawhide" ]]; then + printf "ERROR: VERSION HIGHER THAN RAWHIDE" + exit 1 +fi + +printf "Syncing compose contailers: ${vers} : ${compose}\n" + +# For fedora-bootc +if [[ -n ${base_build_nvr} ]]; then + find_and_copy_images ${base_build_nvr} fedora-bootc ${vers} ${compose} +fi diff --git a/twoweek-nightly.sh b/twoweek-nightly.sh index 717a35f..63e3784 100755 --- a/twoweek-nightly.sh +++ b/twoweek-nightly.sh @@ -4,7 +4,7 @@ LABEL=$1 # Remove the label from arguments. It gets special treatment. Other arguments # to the script are passed to pungi-koji directly. shift -CONFIG="fedora-iot.conf" +CONFIG="fedora-bootc.conf" TARGET_DIR="/mnt/koji/compose/iot" NIGHTLY="" DEST=$(pwd) @@ -18,7 +18,7 @@ TMPDIR=`mktemp -d /tmp/$RELEASE.$DATE.XXXX` TOMAIL="iot@lists.fedoraproject.org" FROM="Fedora IoT Report " 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 @@ -47,36 +47,6 @@ time $CMD "$@" if [ "$?" != "0" ]; then exit 1 fi -ostree summary --update --repo=/mnt/koji/compose/iot/repo/ -NEWCOMPOSE_ID=$(cat $TARGET_DIR/latest-$SHORT-$RELEASE_TITLE/COMPOSE_ID) -SHORTCOMPOSE_ID=$(echo $NEWCOMPOSE_ID|sed -e 's|Fedora-.*-||g') - -./releng/scripts/build_composeinfo "$TARGET_DIR/$NEWCOMPOSE_ID/" --name "$NEWCOMPOSE_ID" - -DESTDIR=$TARGET_DIR/$NEWCOMPOSE_ID -# Public URL the synced compose will wind up at, we put it in fedmsgs -LOCATION="https://dl.fedoraproject.org$RSYNCTARGET" -# Update fedmsg template -fedmsg_json_start=$(printf '{"log": "start", "branch": "%s", "arch": "%s", "short": "%s", "compose_id": "%s", "location": "%s"}' "$RELEASE" "$ARCH" "$SHORT" "$NEWCOMPOSE_ID", "$LOCATION") -fedmsg_json_done=$(printf '{"log": "done", "branch": "%s", "arch": "%s", "short": "%s", "compose_id": "%s", "location": "%s"}' "$RELEASE" "$ARCH" "$SHORT" "$NEWCOMPOSE_ID" "$LOCATION") - -$RSYNCPREFIX mkdir -p $DESTDIR -# Tell interested persons that the rsync is starting (zomg!) -send_fedmsg "${fedmsg_json_start}" ${RELEASE} rsync.start -for dir in IoT metadata ; - do - $RSYNCPREFIX rsync -avhH --delete-after $DESTDIR/compose/$dir/ "$RSYNCTARGET/$dir/" ; - $RSYNCPREFIX ./releng/scripts/build_composeinfo "$RSYNCTARGET/" --name $NEWCOMPOSE_ID - done -# Tell interested persons that the rsync is done. -send_fedmsg "${fedmsg_json_done}" ${RELEASE} rsync.complete -# Tell everyone by fedmsg about the compose -send_fedmsg "${fedmsg_json_done}" ${RELEASE} complete -SUBJECT='Fedora '$RELEASE' compose report: '$SHORTCOMPOSE_ID' changes' -#for tomail in $TOMAIL ; do -# cat $DESTDIR/logs/*verbose $DESTDIR/logs/depcheck | \ -# mutt -e "set from=\"$FROM\"" -e 'set envelope_from=yes' -s "$SUBJECT" $tomail -#done - -find $TARGET_DIR -xdev -depth -maxdepth 2 -mtime +14 -name Fedora-IoT-${RELEASE}\* -exec rm -rf {} \; +# Push containers +#./sync-bootc-base-containers.sh ${RELEASE} ${LABEL} diff --git a/variants-fedora.xml b/variants-fedora.xml index fc87bb1..058a67d 100644 --- a/variants-fedora.xml +++ b/variants-fedora.xml @@ -7,4 +7,10 @@ x86_64 + + + aarch64 + x86_64 + +