From 4a39a9f3b4daaa932e3784a5b98e337b6055782b Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Tue, 5 Oct 2021 13:52:01 -0400 Subject: [PATCH] Drop Fedora 33, add Fedora 35 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 --- .../fedora/cloud.cfg.d/50_custom_disk_setup.cfg | 4 ---- base_images/fedora_base-setup.sh | 17 ++++++++++++++++- base_images/gce.yml | 15 +++++++++------ cache_images/fedora_packaging.sh | 9 ++++++--- podman/fedora_release | 2 +- podman/prior-fedora_release | 2 +- 6 files changed, 33 insertions(+), 16 deletions(-) delete mode 100644 base_images/cloud-init/fedora/cloud.cfg.d/50_custom_disk_setup.cfg diff --git a/base_images/cloud-init/fedora/cloud.cfg.d/50_custom_disk_setup.cfg b/base_images/cloud-init/fedora/cloud.cfg.d/50_custom_disk_setup.cfg deleted file mode 100644 index c0fdf0e2..00000000 --- a/base_images/cloud-init/fedora/cloud.cfg.d/50_custom_disk_setup.cfg +++ /dev/null @@ -1,4 +0,0 @@ -#cloud-config -growpart: - mode: false -resize_rootfs: false diff --git a/base_images/fedora_base-setup.sh b/base_images/fedora_base-setup.sh index f30a23d3..37263d8d 100644 --- a/base_images/fedora_base-setup.sh +++ b/base_images/fedora_base-setup.sh @@ -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. @@ -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 diff --git a/base_images/gce.yml b/base_images/gce.yml index 84c32f6e..12d61f3c 100644 --- a/base_images/gce.yml +++ b/base_images/gce.yml @@ -26,13 +26,16 @@ variables: # Empty value means it must be passed in on command-line # "Created by: Canonical" UBUNTU_BASE_IMAGE: 'ubuntu-2104-hirsute-v20210511a' - # 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-20211006.n.0-CHECKSUM" + FEDORA_IMAGE_URL: "https://dl.fedoraproject.org/pub/fedora/linux/development/35/Cloud/x86_64/images/Fedora-Cloud-Base-35-20211006.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 diff --git a/cache_images/fedora_packaging.sh b/cache_images/fedora_packaging.sh index a7cb4c7b..031b7760 100644 --- a/cache_images/fedora_packaging.sh +++ b/cache_images/fedora_packaging.sh @@ -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 @@ -167,7 +168,9 @@ if ! ((CONTAINER)); then policycoreutils ) else - EXARG="--exclude=selinux*" + if [[ "$OS_RELEASE_VER" -lt 35 ]]; then + EXARG="--exclude=selinux*" + fi fi @@ -177,7 +180,7 @@ DOWNLOAD_PACKAGES=(\ oci-umount parallel podman-docker - python3-pytest4 + python3-pytest python3-virtualenv ) diff --git a/podman/fedora_release b/podman/fedora_release index a7873645..8f92bfdd 100644 --- a/podman/fedora_release +++ b/podman/fedora_release @@ -1 +1 @@ -34 +35 diff --git a/podman/prior-fedora_release b/podman/prior-fedora_release index bb95160c..a7873645 100644 --- a/podman/prior-fedora_release +++ b/podman/prior-fedora_release @@ -1 +1 @@ -33 +34