From 68395f9beb3039d9c956dd6d7fab47e6fedfe005 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Tue, 26 Apr 2022 13:31:19 -0400 Subject: [PATCH 1/2] fix staticcheck linter warning for deprecated function Port of fix from podman-land: https://github.com/containers/podman/commit/62f4ae98fb73065063c05f45663b1fadbcb269c9 Thanks to pholzing@redhat.com for figuring this out. [NO NEW TESTS NEEDED] Signed-off-by: Chris Evich --- pkg/formats/templates.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/formats/templates.go b/pkg/formats/templates.go index c2582552a3..66f3ba3549 100644 --- a/pkg/formats/templates.go +++ b/pkg/formats/templates.go @@ -20,6 +20,10 @@ var basicFunctions = template.FuncMap{ }, "split": strings.Split, "join": strings.Join, + // strings.Title is deprecated since go 1.18 + // However for our use case it is still fine. The recommended replacement + // is adding about 400kb binary size so lets keep using this for now. + //nolint:staticcheck "title": strings.Title, "lower": strings.ToLower, "upper": strings.ToUpper, From cc5e80f6de81d3da05bd40e78258911289534076 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Tue, 26 Apr 2022 11:58:16 -0400 Subject: [PATCH 2/2] Cirrus: Update CI VMs to F36 Signed-off-by: Chris Evich --- .cirrus.yml | 6 +++--- contrib/cirrus/lib.sh | 1 - contrib/cirrus/logcollector.sh | 3 +++ contrib/cirrus/setup.sh | 8 +++++++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 842076fa0d..ccf7be53a8 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -27,11 +27,11 @@ env: #### # GCE project where images live IMAGE_PROJECT: "libpod-218412" - FEDORA_NAME: "fedora-35" - PRIOR_FEDORA_NAME: "fedora-34" + FEDORA_NAME: "fedora-36" + PRIOR_FEDORA_NAME: "fedora-35" UBUNTU_NAME: "ubuntu-2110" - IMAGE_SUFFIX: "c4764556961513472" + IMAGE_SUFFIX: "c4955393725038592" FEDORA_CACHE_IMAGE_NAME: "fedora-${IMAGE_SUFFIX}" PRIOR_FEDORA_CACHE_IMAGE_NAME: "prior-fedora-${IMAGE_SUFFIX}" UBUNTU_CACHE_IMAGE_NAME: "ubuntu-${IMAGE_SUFFIX}" diff --git a/contrib/cirrus/lib.sh b/contrib/cirrus/lib.sh index 7f65e0f5c6..31278ec86d 100755 --- a/contrib/cirrus/lib.sh +++ b/contrib/cirrus/lib.sh @@ -180,7 +180,6 @@ in_podman() { echo "$envarg" | tee -a $envfile | indent done showrun podman run -i --name="$IN_PODMAN_NAME" \ - --net=host \ --net="container:registry" \ --security-opt=label=disable \ --security-opt=seccomp=unconfined \ diff --git a/contrib/cirrus/logcollector.sh b/contrib/cirrus/logcollector.sh index 61d9907254..9503e2151d 100755 --- a/contrib/cirrus/logcollector.sh +++ b/contrib/cirrus/logcollector.sh @@ -39,6 +39,9 @@ case $1 in ) case $OS_RELEASE_ID in fedora*) + if [[ "$OS_RELEASE_VER" -ge 36 ]]; then + PKG_NAMES+=(aardvark-dns netavark) + fi PKG_LST_CMD='rpm -q --qf=%{N}-%{V}-%{R}-%{ARCH}\n' ;; ubuntu*) diff --git a/contrib/cirrus/setup.sh b/contrib/cirrus/setup.sh index 6708b49013..a3a871569a 100755 --- a/contrib/cirrus/setup.sh +++ b/contrib/cirrus/setup.sh @@ -10,7 +10,13 @@ source $(dirname $0)/lib.sh req_env_vars OS_RELEASE_ID OS_RELEASE_VER GOSRC IN_PODMAN_IMAGE -echo "Setting up $OS_RELEASE_ID $OS_RELEASE_VER" +msg "Disabling git repository owner-check system-wide." +# Newer versions of git bark if repo. files are unexpectedly owned. +# This mainly affects rootless and containerized testing. But +# the testing environment is disposable, so we don't care.= +git config --system --add safe.directory $GOSRC + +msg "Setting up $OS_RELEASE_ID $OS_RELEASE_VER" cd $GOSRC case "$OS_RELEASE_ID" in fedora)