Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to Fedora 39 #302

Merged
merged 2 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/orphan_vms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
GCPPROJECT: 'libpod-218412'
run: |
export GCPNAME GCPJSON AWSINI GCPPROJECT
export GCPPROJECTS=$(egrep -vx '^#+.*$' $GITHUB_WORKSPACE/gcpprojects.txt | tr -s '[:space:]' ' ')
export GCPPROJECTS=$(grep -E -vx '^#+.*$' $GITHUB_WORKSPACE/gcpprojects.txt | tr -s '[:space:]' ' ')
podman run --rm \
-e GCPNAME -e GCPJSON -e AWSINI -e GCPPROJECT -e GCPPROJECTS \
quay.io/libpod/orphanvms:latest \
Expand All @@ -59,7 +59,7 @@ jobs:
- name: Count number of orphaned VMs
id: orphans
run: |
count=$(egrep -x '\* VM .+' /tmp/orphanvms_output.txt | wc -l)
count=$(grep -E -x '\* VM .+' /tmp/orphanvms_output.txt | wc -l)
# Assist with debugging job (step-outputs are otherwise hidden)
printf "Orphan VMs count:%d\n" $count
if [[ "$count" =~ ^[0-9]+$ ]]; then
Expand Down
2 changes: 1 addition & 1 deletion IMG_SFX
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20230926t165419z-f38f37d13
20230928t004553z-f39f38d13
2 changes: 1 addition & 1 deletion IMPORT_IMG_SFX
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20230816t191121z-f38f37d13
20230921t135305z-f39f38d13
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ if_ci_else = $(if $(findstring true,$(CI)),$(1),$(2))

export CENTOS_STREAM_RELEASE = 8

export FEDORA_RELEASE = 38
export PRIOR_FEDORA_RELEASE = 37
export FEDORA_RELEASE = 39
export PRIOR_FEDORA_RELEASE = 38

# This should always be one-greater than $FEDORA_RELEASE (assuming it's actually the latest)
export RAWHIDE_RELEASE = 39
export RAWHIDE_RELEASE = 40

# See import_images/README.md
export FEDORA_IMPORT_IMG_SFX = $(_IMPORT_IMG_SFX)
cevich marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
2 changes: 1 addition & 1 deletion base_images/fedora_base-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if ! ((CONTAINER)); then
if ((OS_RELEASE_VER<35)); then
PKGS+=(google-compute-engine-tools)
else
PKGS+=(google-compute-engine-guest-configs)
PKGS+=(google-compute-engine-guest-configs google-guest-agent)
fi
fi
fi
Expand Down
23 changes: 23 additions & 0 deletions cache_images/fedora_packaging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,29 @@ DOWNLOAD_PACKAGES=(\
msg "Installing general build/test dependencies"
bigto $SUDO dnf install -y $EXARG "${INSTALL_PACKAGES[@]}"

# FIXME: 2023-09-26: emergency upgrade to fix chmod-symlink bug
if [[ $(date +%Y%m) -gt 202309 ]]; then
echo ""
echo "FATAL FATAL FATAL: REMOVE THIS TEMPORARY WORKAROUND"
echo
exit 1
fi
source /etc/os-release
# shellcheck disable=SC2154
if [[ $VERSION_ID -ge 38 ]]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to override on rawhide also. I'm assuming that's desired.


For future ref.: The distro name and release are defined by both lib.sh (here) and (elsewhere) in the common automation library. Something like:

OS_RELEASE_VER="$(source /etc/os-release; echo $VERSION_ID | tr -d '.')"
OS_RELEASE_ID="$(source /etc/os-release; echo $ID)"
OS_REL_VER="$OS_RELEASE_ID-$OS_RELEASE_VER"

In this script's context, there's also $PACKER_BUILD_NAME which can be used to distinguish Fedora vs Rawhide.

arch=$(uname -m)
crunrpm=https://kojipkgs.fedoraproject.org//packages/crun/1.9.2/1.fc${VERSION_ID}/${arch}/crun-1.9.2-1.fc${VERSION_ID}.${arch}.rpm
msg "FIXME-2023-09-26: installing $crunrpm"
bigto $SUDO dnf -y install $crunrpm ${crunrpm/crun-/crun-wasm-}
fi
# FIXME FIXME FIXME: https://bugzilla.redhat.com/show_bug.cgi?id=2238149
# shellcheck disable=SC2154
if [[ $VERSION_ID -eq 39 ]] && [[ $(uname -m) == "x86_64" ]]; then
msg "FIXME-2023-09-27: installing pandoc-3.1.3-25"
bigto $SUDO dnf -y install https://kojipkgs.fedoraproject.org//work/tasks/7301/106797301/pandoc-3.1.3-25.fc40.x86_64.rpm \
https://kojipkgs.fedoraproject.org//work/tasks/7301/106797301/pandoc-common-3.1.3-25.fc40.noarch.rpm
fi

msg "Downloading packages for optional installation at runtime, as needed."
$SUDO mkdir -p "$PACKAGE_DOWNLOAD_DIR"
cd "$PACKAGE_DOWNLOAD_DIR"
Expand Down
2 changes: 1 addition & 1 deletion cache_images/rawhide_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ source "$REPO_DIRPATH/lib.sh"
req_env_vars PACKER_BUILD_NAME

# Going from F38 -> rawhide requires some special handling WRT DNF upgrade to DNF5
if [[ "$OS_RELEASE_VER" -eq 38 ]]; then
if [[ "$OS_RELEASE_VER" -ge 38 ]]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch.

warn "Upgrading dnf -> dnf5"
showrun $SUDO dnf update -y dnf
showrun $SUDO dnf install -y dnf5
Expand Down
8 changes: 4 additions & 4 deletions get_ci_vm/bad_repo_test/hack/get_ci_vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ delvm() {
}

image_hints() {
_BIS=$(egrep -m 1 '_BUILT_IMAGE_SUFFIX:[[:space:]+"[[:print:]]+"' \
_BIS=$(grep -E -m 1 '_BUILT_IMAGE_SUFFIX:[[:space:]+"[[:print:]]+"' \
"$SECCOMPHOOKROOT/.cirrus.yml" | cut -d: -f 2 | tr -d '"[:blank:]')
egrep '[[:space:]]+[[:alnum:]].+_CACHE_IMAGE_NAME:[[:space:]+"[[:print:]]+"' \
grep -E '[[:space:]]+[[:alnum:]].+_CACHE_IMAGE_NAME:[[:space:]+"[[:print:]]+"' \
"$SECCOMPHOOKROOT/.cirrus.yml" | cut -d: -f 2 | tr -d '"[:blank:]' | \
sed -r -e "s/\\\$[{]_BUILT_IMAGE_SUFFIX[}]/$_BIS/" | sort -u
}
Expand Down Expand Up @@ -141,7 +141,7 @@ cd $SECCOMPHOOKROOT

# Attempt to determine if named 'oci-seccomp-bpf-hook' gcloud configuration exists
showrun $PGCLOUD info > $TMPDIR/gcloud-info
if egrep -q "Account:.*None" $TMPDIR/gcloud-info
if grep -E -q "Account:.*None" $TMPDIR/gcloud-info
then
echo -e "\n${YEL}WARNING: Can't find gcloud configuration for 'oci-seccomp-bpf-hook', running init.${NOR}"
echo -e " ${RED}Please choose '#1: Re-initialize' and 'login' if asked.${NOR}"
Expand All @@ -151,7 +151,7 @@ then

# Verify it worked (account name == [email protected])
$PGCLOUD info > $TMPDIR/gcloud-info-after-init
if egrep -q "Account:.*None" $TMPDIR/gcloud-info-after-init
if grep -E -q "Account:.*None" $TMPDIR/gcloud-info-after-init
then
echo -e "${RED}ERROR: Could not initialize 'oci-seccomp-bpf-hook' configuration in gcloud.${NOR}"
exit 5
Expand Down
2 changes: 1 addition & 1 deletion get_ci_vm/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ has_valid_aws_credentials() {
_awsoutput=$($AWSCLI configure list 2>&1 || true)
dbg "$AWSCLI configure list"
dbg "$_awsoutput"
if egrep -qx 'The config profile.+could not be found'<<<"$_awsoutput"; then
if grep -E -qx 'The config profile.+could not be found'<<<"$_awsoutput"; then
dbg "AWS config/credentials are missing"
return 1
elif [[ ! -r "$EC2_SSH_KEY" ]] || [[ ! -r "${EC2_SSH_KEY}.pub" ]]; then
Expand Down
4 changes: 2 additions & 2 deletions get_ci_vm/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ testf() {
echo "# $@" > /dev/stderr
fi

# Using egrep vs file safer than shell builtin test
# Using grep -E vs file safer than shell builtin test
local a_out_f
local a_exit=0
a_out_f=$(mktemp -p '' "tmp_${FUNCNAME[0]}_XXXXXXXX")
Expand Down Expand Up @@ -109,7 +109,7 @@ testf() {
if ((TEST_DEBUG)); then
echo "Received $(wc -l $a_out_f | awk '{print $1}') output lines of $(wc -c $a_out_f | awk '{print $1}') bytes total"
fi
if egrep -q "$e_out_re" "${a_out_f}.oneline"; then
if grep -E -q "$e_out_re" "${a_out_f}.oneline"; then
_test_report "Command $1 exited as expected with expected output" "0" "$a_out_f"
else
_test_report "Expecting regex '$e_out_re' match to (whitespace-squashed) output" "1" "$a_out_f"
Expand Down
2 changes: 1 addition & 1 deletion get_fedora_url.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ else
fi

# Support both '.CHECKSUM' and '-CHECKSUM' at the end
filename=$(egrep -i -m 1 -- "$extension$" <<<"$by_arch" || true)
filename=$(grep -E -i -m 1 -- "$extension$" <<<"$by_arch" || true)
[[ -n "$filename" ]] || \
die "No '$extension' targets among $by_arch"

Expand Down
8 changes: 4 additions & 4 deletions imgobsolete/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ $GCLOUD compute images list --format="$FORMAT" --filter="$FILTER" | \
count_image
reason=""
created_ymd=$(date --date=$creationTimestamp --iso-8601=date)
permanent=$(egrep --only-matching --max-count=1 --ignore-case 'permanent=true' <<< $labels || true)
last_used=$(egrep --only-matching --max-count=1 'last-used=[[:digit:]]+' <<< $labels || true)
permanent=$(grep -E --only-matching --max-count=1 --ignore-case 'permanent=true' <<< $labels || true)
last_used=$(grep -E --only-matching --max-count=1 'last-used=[[:digit:]]+' <<< $labels || true)

LABELSFX="labels: '$labels'"

Expand Down Expand Up @@ -147,9 +147,9 @@ for (( i=nr_amis ; i ; i-- )); do
done

unset automation permanent reason
automation=$(egrep --only-matching --max-count=1 \
automation=$(grep -E --only-matching --max-count=1 \
--ignore-case 'automation=true' <<< $tags || true)
permanent=$(egrep --only-matching --max-count=1 \
permanent=$(grep -E --only-matching --max-count=1 \
--ignore-case 'permanent=true' <<< $tags || true)

if [[ -n "$permanent" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion imgprune/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ $GCLOUD compute images list --show-deprecated \
do
count_image
reason=""
permanent=$(egrep --only-matching --max-count=1 --ignore-case 'permanent=true' <<< $labels || true)
permanent=$(grep -E --only-matching --max-count=1 --ignore-case 'permanent=true' <<< $labels || true)
[[ -z "$permanent" ]] || \
die 1 "Refusing to delete a deprecated image labeled permanent=true. Please use gcloud utility to set image active, then research the cause of deprecation."
[[ "$dep_state" == "OBSOLETE" ]] || \
Expand Down