Compare commits

...
Sign in to create a new pull request.

23 commits

Author SHA1 Message Date
Paul Whalen
8e996a1358 F40: Fix container names and stop running the container sync script
This fixes the container name of the generic bootc image
and aligns all branches.

We no longer need to run the sync script for the containers

Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
2025-04-28 16:48:45 -04:00
Paul Whalen
08b86c0759 Revert "Update f40 release url to use master mirror"
This reverts commit 0d7e74fa4a.
2025-03-29 10:12:53 -04:00
Paul Whalen
0d7e74fa4a Update f40 release url to use master mirror
The Fedora 40 release directory has been cleaned up and no longer available,
use the master mirror to fix failing fedora-bootc images.

Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
2025-03-27 09:14:42 -04:00
Paul Whalen
3e2dd8f1a3 Move fedora-bootc image to f41-stable branch
See: https://pagure.io/fedora-iot/pungi-iot/issue/128

Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
2025-03-03 11:17:00 -05:00
Paul Whalen
583d963554 F40: Update base-images to use main
Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
2024-11-26 15:26:56 -05:00
Paul Whalen
ec6291028c F40: Remove unused sections of the twoweek-nightly.sh script
Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
2024-11-26 09:51:23 -05:00
Paul Whalen
1bc946b6bb F40: Use versioned conf for bootc images
Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
2024-11-25 16:43:20 -05:00
Paul Whalen
da2cab94ec Remove IoT, only compose fedora-bootc container
Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
2024-11-18 16:24:51 -05:00
Paul Whalen
6cae4ca9aa Update bootc branch to f40
Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
2024-06-10 15:52:30 -04:00
Peter Robinson
f7a61386b4 Improve container version detection process
Some minor improvements around container version and release
detection.

Signed-off-by: Peter Robinson <pbrobinson@fedoraproject.org>
2024-05-08 13:10:34 +01:00
Peter Robinson
0fda47c2ef Add script to push containers to registries
Add script to push containers to registries, run the script
at the end of the compose process to push the container
manifests to the fedora container registries.

Signed-off-by: Peter Robinson <pbrobinson@fedoraproject.org>
2024-05-08 13:10:25 +01:00
Paul Whalen
b2beebd8d6 40: drop osbuild bootc container
Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
2024-05-02 17:42:49 -04:00
Peter Robinson
49bbe467d9 Move to base-images mirror repo
Signed-off-by: Peter Robinson <pbrobinson@fedoraproject.org>
2024-04-27 16:46:50 +01:00
Paul Whalen
220559ddd9 F40: Enable updates
Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
2024-04-23 11:08:33 -04:00
Paul Whalen
8c2e1a884f F40: Update for final
Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
2024-04-22 08:34:28 -04:00
Paul Whalen
b6f101df00 F40: Use pagure bootc repo
Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
2024-04-21 17:40:19 -04:00
Paul Whalen
a75c386bf7 F40: use upstream bootc repo
Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
2024-04-19 14:21:41 -04:00
Paul Whalen
69a2072bdc F40: Add bootc image
Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
2024-04-17 16:36:28 -04:00
Paul Whalen
2f6b649943 F40: Change simplified-provisioning to -provisioner
Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
2024-03-07 11:08:51 -05:00
Paul Whalen
ce5eaa7cff F40: Change bootable-container name to -bootc
Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
2024-03-06 09:58:13 -05:00
Paul Whalen
b45ec3b7c4 F40: Add simplified provisioning deliverable
Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
2024-03-05 17:34:01 -05:00
Paul Whalen
16b70e0849 Fix names for osbuild deliverables
Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
2024-02-15 14:07:41 -05:00
Paul Whalen
8793fd5b80 F-40: Update for branching
Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
2024-02-13 14:49:00 -05:00
4 changed files with 204 additions and 101 deletions

View file

@ -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'

180
sync-bootc-base-containers.sh Executable file
View file

@ -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 <<EOF
NAME
${0}
SYNOPSIS
${0} FEDORA_RELEASE IMAGE_URL [-s]
OPTIONS
-s - Sync the stage registries instead of production
DESCRIPTION
This is a stop-gap solution to identify parent inheritance of container
images until the container release automation[0] is in place and we have
fully automated rebuilds[1] in OSBS.
This information should be used such that the images can be rebuilt and
released in the appropriate order using flr-koji.
[0] - https://pagure.io/releng-automation
[1] - https://osbs.readthedocs.io/en/latest/multiarch.html#chain-rebuilds
EXAMPLE
${0} 26
EOF
}
ARCHES=("aarch64" "x86_64")
arch_to_goarch() {
local a=$1; shift
# See https://github.com/coreos/stream-metadata-go/blob/c5fe1b98ac1b1e6ab62a606b7580dc1f30703f83/arch/arch.go#L14
case "$a" in
aarch64) echo arm64 ;;
x86_64) echo amd64 ;;
*) echo $a ;;
esac
}
# This is the release of Fedora that is currently stable, it will define if we
# need to move the fedora:latest tag
current_stable="41"
# Define what is rawhide so we know to push that tag
current_rawhide="42"
# Sanity checking
if ! [[ "${1}" =~ ^-?[0-9]+$ ]];
then
printf "ERROR: FEDORA_RELEASE missing or invalid\n"
f_help
exit 1
fi
# Determine if we want stage or not (yes, I know this should be getops but I
# don't want this script to survive so we're doing quick and dirty.
#
# If ${stage} is a non-zero length string, then perform staging
stage=""
if [[ "${3}" == "-s" ]]; then
printf "INFO: PERFORMING STAGE SYNC\n"
stage="true"
fi
basename="Fedora-IoT-bootc"
format="oci-archive"
vers=${1}
compose=${2}
compdate=`echo ${compose} | cut -c 4-`
# Obtain the latest build
#
# Need fXX-updates-canddiate to get actual latest nightly
# Can't currently query koji for runroot tasks as they're not tagged
#
# base_build_nvr=$(koji -q latest-build --type=image f${1}-updates-candidate ${basename} | awk '{print $1}')
base_build_nvr=${basename}-${vers}-${compdate}
if [[ ${1} -eq "$current_stable" ]]; then
tagname="latest"
fi
if [[ ${1} -eq "$current_rawhide" ]]; then
tagname="rawhide"
fi
if [[ -z "$stage" ]]; then
registries=("registry.fedoraproject.org" "candidate-registry.fedoraproject.org" "quay.io/fedora")
else
registries=("registry.stg.fedoraproject.org" "candidate-registry.stg.fedoraproject.org")
fi
# Copy a local image to all necessary remote registries
copy_image() {
local src=$1; shift
local name=$1; shift
for registry in ${registries[@]}; do
skopeo copy $src docker://${registry}/${name}
done
}
# From already uploaded architecture-specific images, generate a manifest listed image
# on all registries
generate_manifest_list() {
local name=$1; shift
local version=$1; shift
for registry in "${registries[@]}"
do
printf "Push manifest to ${registry}\n"
if [ -n "$tagname" ]
then
printf "tag is set: ${tagname}\n"
buildah rmi "${registry}/${name}:${tagname}" || true
buildah manifest create "${registry}/${name}:${tagname}"
for arch in "${ARCHES[@]}"; do
buildah manifest add --arch=$(arch_to_goarch ${arch}) "${registry}/${name}:${tagname}" "docker://${registry}/${name}:${version}-${arch}"
done
buildah manifest push "${registry}/${name}:${tagname}" "docker://${registry}/${name}:${tagname}" --all
fi
buildah rmi "${registry}/${name}:${version}" || true
buildah manifest create "${registry}/${name}:${version}"
for arch in "${ARCHES[@]}"; do
buildah manifest add --arch=$(arch_to_goarch ${arch}) "${registry}/${name}:${version}" "docker://${registry}/${name}:${version}-${arch}"
done
buildah manifest push "${registry}/${name}:${version}" "docker://${registry}/${name}:${version}" --all
done
}
find_and_copy_images() {
local nvr=$1
local registry_name=$2
local release=$3
local name
if [[ ${registry_name} = "fedora-bootc" ]]; then
name=${basename}
else
printf "Unexpected image type! If we added a new one, it needs mapping here"
exit 1
fi
# Check both architectures completed in the build else exit
if [ ! -f "/mnt/koji/compose/iot/Fedora-IoT-${release}-${compdate}/compose/bootc/x86_64/images/${basename}-${release}.${compdate}.ociarchive" ] && \
[ ! -f "/mnt/koji/compose/iot/Fedora-IoT-${release}-${compdate}/compose/bootc/aarch64/images/${basename}-${release}.${compdate}.ociarchive" ]; then
echo "One of the expected images are missing, exiting."
exit 1
fi
work_dir=$(mktemp -d)
pushd ${work_dir} &> /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

View file

@ -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 <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
@ -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}

View file

@ -7,4 +7,10 @@
<arch>x86_64</arch>
</arches>
</variant>
<variant id="bootc" name="bootc" type="variant" is_empty="true">
<arches>
<arch>aarch64</arch>
<arch>x86_64</arch>
</arches>
</variant>
</variants>