Skip to content

Commit

Permalink
Drop Fedora 33, add Fedora 35
Browse files Browse the repository at this point in the history
The F35 cloud image is now based on a BTRFS root filesystem.  Since
secondary storage provisioning is no longer tested by containers/storage
support for runtime storage-expansion in Fedora images is being dropped.
This significantly simplifies the build and runtime, but requires all
repos using these images to remove calls to `growpart` and other runtime
partitioning scripts.

Signed-off-by: Chris Evich <[email protected]>
  • Loading branch information
cevich committed Oct 27, 2021
1 parent dddbb22 commit d5d6b45
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 17 deletions.

This file was deleted.

17 changes: 16 additions & 1 deletion base_images/fedora_base-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@ REPO_DIRPATH=$(realpath "$SCRIPT_DIRPATH/../")
# shellcheck source=./lib.sh
source "$REPO_DIRPATH/lib.sh"

# TODO: Workaround for broken/missing mirrors during beta
if ((OS_RELEASE_VER==35)); then
for filepath in /etc/yum.repos.d/fedora*.repo; do
echo "Warning: Patching $filepath for F35 beta"
sed -i -r \
-e 's/^#(baseurl=.+)/\1/' \
-e 's/^(metalink=.+)/#\1/' \
-e 's/download.example/dl.fedoraproject.org/' \
-e 's/linux\/releases/linux\/development/' \
$filepath
done
fi

# When installing during a container-build, installing anything
# selinux-related will seriously screw up the rest of your day
# with rpm debugging.
Expand All @@ -24,7 +37,9 @@ declare -a PKGS
PKGS=(rng-tools git coreutils)
XSELINUX=
if ((CONTAINER)); then
XSELINUX="--exclude=selinux*"
if ((OS_RELEASE_VER<35)); then
XSELINUX="--exclude=selinux*"
fi
else
PKGS+=(google-compute-engine-tools google-compute-engine-oslogin)
fi
Expand Down
20 changes: 13 additions & 7 deletions base_images/gce.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@ variables: # Empty value means it must be passed in on command-line
# Use the most recent image based on this family name.
UBUNTU_BASE_FAMILY: 'ubuntu-2104'

# Latest Fedora release download URL
FEDORA_IMAGE_URL: "https://dl.fedoraproject.org/pub/fedora/linux/releases/34/Cloud/x86_64/images/Fedora-Cloud-Base-34-1.2.x86_64.qcow2"
FEDORA_CSUM_URL: "https://dl.fedoraproject.org/pub/fedora/linux/releases/34/Cloud/x86_64/images/Fedora-Cloud-34-1.2-x86_64-CHECKSUM"
# Latest Fedora release (qcow and CHECKSUM) download URLs
# N/B: There are Fedora-Cloud...GCP.tar.gz images available, however
# as of this comment, they lack the cloud-init package which is
# required by GCP for startup resizing of the rootfs.
FEDORA_CSUM_URL: "https://dl.fedoraproject.org/pub/fedora/linux/development/35/Cloud/x86_64/images/Fedora-Cloud-35-x86_64-20211027.n.0-CHECKSUM"
FEDORA_IMAGE_URL: "https://dl.fedoraproject.org/pub/fedora/linux/development/35/Cloud/x86_64/images/Fedora-Cloud-Base-35-20211027.n.0.x86_64.qcow2"

# Prior Fedora release
PRIOR_FEDORA_IMAGE_URL: "https://dl.fedoraproject.org/pub/fedora/linux/releases/33/Cloud/x86_64/images/Fedora-Cloud-Base-33-1.2.x86_64.qcow2"
PRIOR_FEDORA_CSUM_URL: "https://dl.fedoraproject.org/pub/fedora/linux/releases/33/Cloud/x86_64/images/Fedora-Cloud-33-1.2-x86_64-CHECKSUM"
PRIOR_FEDORA_CSUM_URL: "https://dl.fedoraproject.org/pub/fedora/linux/releases/34/Cloud/x86_64/images/Fedora-Cloud-34-1.2-x86_64-CHECKSUM"
PRIOR_FEDORA_IMAGE_URL: "https://dl.fedoraproject.org/pub/fedora/linux/releases/34/Cloud/x86_64/images/Fedora-Cloud-Base-34-1.2.x86_64.qcow2"


# Don't leak sensitive values in error messages / output
Expand Down Expand Up @@ -143,13 +146,16 @@ post-processors:
bucket: '{{user `XFERBUCKET`}}'
gcs_object_name: '{{build_name}}-{{user `IMG_SFX`}}.tar.gz'
image_name: "fedora-b{{user `IMG_SFX`}}"
image_description: 'Based on {{user `FEDORA_IMAGE_URL`}}'
image_family: '{{build_name}}-base'
# Can't save the url in an image_label
image_description: '{{user `FEDORA_IMAGE_URL`}}'
image_labels:
sfx: '{{user `IMG_SFX`}}'
- <<: *gcp_import
only: ['prior-fedora']
image_name: "prior-fedora-b{{user `IMG_SFX`}}"
image_description: 'Based on {{user `PRIOR_FEDORA_IMAGE_URL`}}'
image_family: '{{build_name}}-base'
image_description: '{{user `PRIOR_FEDORA_IMAGE_URL`}}'
- type: 'manifest'
output: 'base_images/manifest.json' # Collected by Cirrus-CI
strip_path: true
Expand Down
9 changes: 6 additions & 3 deletions cache_images/fedora_packaging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ INSTALL_PACKAGES=(\
case "$OS_RELEASE_VER" in
32) INSTALL_PACKAGES+=( python3-pytoml ) ;;
33) ;&
34) INSTALL_PACKAGES+=( perl-FindBin python-toml ) ;;
34) ;&
35) INSTALL_PACKAGES+=( perl-FindBin python-toml ) ;;
*) die "Unknown/Unsupported \$OS_REL_VER '$OS_REL_VER'" ;;
esac

Expand All @@ -167,7 +168,9 @@ if ! ((CONTAINER)); then
policycoreutils
)
else
EXARG="--exclude=selinux*"
if [[ "$OS_RELEASE_VER" -lt 35 ]]; then
EXARG="--exclude=selinux*"
fi
fi


Expand All @@ -177,7 +180,7 @@ DOWNLOAD_PACKAGES=(\
oci-umount
parallel
podman-docker
python3-pytest4
python3-pytest
python3-virtualenv
)

Expand Down
2 changes: 1 addition & 1 deletion podman/fedora_release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
34
35
2 changes: 1 addition & 1 deletion podman/prior-fedora_release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
33
34

0 comments on commit d5d6b45

Please sign in to comment.