From e4eb70a2b76458c28a1390672f7937b39c5740dc Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Mon, 20 Feb 2023 13:45:27 -0500 Subject: [PATCH] Cirrus: Replace Ubuntu -> Debian SID Signed-off-by: Chris Evich --- .cirrus.yml | 23 ++++++++++++----------- contrib/cirrus/lib.sh | 11 ++--------- contrib/cirrus/logcollector.sh | 6 +++--- contrib/cirrus/setup.sh | 15 +++------------ contrib/cirrus/test.sh | 2 +- 5 files changed, 21 insertions(+), 36 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 292161c3faa..7f6c4f1918a 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -29,12 +29,13 @@ env: IMAGE_PROJECT: "libpod-218412" FEDORA_NAME: "fedora-37" PRIOR_FEDORA_NAME: "fedora-36" - UBUNTU_NAME: "ubuntu-2204" + DEBIAN_NAME: "debian-12" - IMAGE_SUFFIX: "c6300530360713216" + # Image identifiers + IMAGE_SUFFIX: "c20230215t175929z-f37f36d12" FEDORA_CACHE_IMAGE_NAME: "fedora-${IMAGE_SUFFIX}" PRIOR_FEDORA_CACHE_IMAGE_NAME: "prior-fedora-${IMAGE_SUFFIX}" - UBUNTU_CACHE_IMAGE_NAME: "ubuntu-${IMAGE_SUFFIX}" + DEBIAN_CACHE_IMAGE_NAME: "debian-${IMAGE_SUFFIX}" IN_PODMAN_IMAGE: "quay.io/libpod/fedora_podman:${IMAGE_SUFFIX}" @@ -75,7 +76,7 @@ meta_task: IMGNAMES: |- ${FEDORA_CACHE_IMAGE_NAME} ${PRIOR_FEDORA_CACHE_IMAGE_NAME} - ${UBUNTU_CACHE_IMAGE_NAME} + ${DEBIAN_CACHE_IMAGE_NAME} build-push-${IMAGE_SUFFIX} BUILDID: "${CIRRUS_BUILD_ID}" REPOREF: "${CIRRUS_CHANGE_IN_REPO}" @@ -189,7 +190,7 @@ conformance_task: depends_on: *smoke_vendor_cross gce_instance: - image_name: "${UBUNTU_CACHE_IMAGE_NAME}" + image_name: "${DEBIAN_CACHE_IMAGE_NAME}" timeout_in: 25m @@ -220,8 +221,8 @@ integration_task: IMAGE_NAME: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}" STORAGE_DRIVER: 'vfs' - env: - DISTRO_NV: "${UBUNTU_NAME}" - IMAGE_NAME: "${UBUNTU_CACHE_IMAGE_NAME}" + DISTRO_NV: "${DEBIAN_NAME}" + IMAGE_NAME: "${DEBIAN_CACHE_IMAGE_NAME}" STORAGE_DRIVER: 'vfs' # OVERLAY - env: @@ -233,8 +234,8 @@ integration_task: IMAGE_NAME: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}" STORAGE_DRIVER: 'overlay' - env: - DISTRO_NV: "${UBUNTU_NAME}" - IMAGE_NAME: "${UBUNTU_CACHE_IMAGE_NAME}" + DISTRO_NV: "${DEBIAN_NAME}" + IMAGE_NAME: "${DEBIAN_CACHE_IMAGE_NAME}" STORAGE_DRIVER: 'overlay' gce_instance: @@ -278,8 +279,8 @@ integration_rootless_task: STORAGE_DRIVER: 'overlay' PRIV_NAME: rootless - env: - DISTRO_NV: "${UBUNTU_NAME}" - IMAGE_NAME: "${UBUNTU_CACHE_IMAGE_NAME}" + DISTRO_NV: "${DEBIAN_NAME}" + IMAGE_NAME: "${DEBIAN_CACHE_IMAGE_NAME}" STORAGE_DRIVER: 'overlay' PRIV_NAME: rootless diff --git a/contrib/cirrus/lib.sh b/contrib/cirrus/lib.sh index d47f5777a22..2d5ae3ce76f 100755 --- a/contrib/cirrus/lib.sh +++ b/contrib/cirrus/lib.sh @@ -96,7 +96,7 @@ PACKAGE_DOWNLOAD_DIR=/var/cache/download lilto() { err_retry 8 1000 "" "$@"; } # just over 4 minutes max bigto() { err_retry 7 5670 "" "$@"; } # 12 minutes max -# Working with apt under Debian/Ubuntu automation is a PITA, make it easy +# Working with apt under automation is a PITA, make it easy # Avoid some ways of getting stuck waiting for user input export DEBIAN_FRONTEND=noninteractive # Short-cut for frequently used base command @@ -127,7 +127,7 @@ remove_packaged_buildah_files() { warn "Removing packaged buildah files to prevent conflicts with source build and testing." req_env_vars OS_RELEASE_ID - if [[ "$OS_RELEASE_ID" =~ "ubuntu" ]] + if [[ "$OS_RELEASE_ID" =~ "debian" ]] then LISTING_CMD="dpkg-query -L buildah" else @@ -139,13 +139,6 @@ remove_packaged_buildah_files() { do # Sub-directories may contain unrelated/valuable stuff if [[ -d "$fullpath" ]]; then continue; fi - # As of Ubuntu 2010, policy.json in buildah, not containers-common package - if [[ "$OS_RELEASE_ID" == "ubuntu" ]] && \ - grep -q '/etc/containers'<<<"$fullpath"; then - - warn "Not removing $fullpath (from buildah package)" - continue - fi rm -vf "$fullpath" done diff --git a/contrib/cirrus/logcollector.sh b/contrib/cirrus/logcollector.sh index 9503e2151d2..419b16eb5dc 100755 --- a/contrib/cirrus/logcollector.sh +++ b/contrib/cirrus/logcollector.sh @@ -9,7 +9,7 @@ req_env_vars CI GOSRC OS_RELEASE_ID case $1 in audit) case $OS_RELEASE_ID in - ubuntu) showrun cat /var/log/kern.log ;; + debian) showrun cat /var/log/kern.log ;; fedora) showrun cat /var/log/audit/audit.log ;; *) bad_os_id_ver ;; esac @@ -21,7 +21,7 @@ case $1 in buildah_info) showrun $GOSRC/bin/buildah info;; golang) showrun go version;; packages) - # These names are common to Fedora and Ubuntu + # These names are common to Fedora and Debian PKG_NAMES=(\ buildah conmon @@ -44,7 +44,7 @@ case $1 in fi PKG_LST_CMD='rpm -q --qf=%{N}-%{V}-%{R}-%{ARCH}\n' ;; - ubuntu*) + debian*) PKG_LST_CMD='dpkg-query --show --showformat=${Package}-${Version}-${Architecture}\n' ;; *) bad_os_id_ver ;; diff --git a/contrib/cirrus/setup.sh b/contrib/cirrus/setup.sh index a3a871569af..8979658458d 100755 --- a/contrib/cirrus/setup.sh +++ b/contrib/cirrus/setup.sh @@ -32,21 +32,12 @@ EOF showrun setsebool -P container_manage_cgroup true fi ;; - ubuntu) + debian) if [[ "$1" == "conformance" ]]; then - msg "Installing previously downloaded/cached packages" - ooe.sh dpkg -i \ + msg "Installing previously downloaded/cached Docker packages" + dpkg -i \ $PACKAGE_DOWNLOAD_DIR/containerd.io*.deb \ $PACKAGE_DOWNLOAD_DIR/docker-ce*.deb - - # At the time of this comment, Ubuntu is using systemd-resolved - # which interfears badly with conformance testing. Some tests - # need to run dnsmasq on port 53. - if [[ -r "/run/systemd/resolve/resolv.conf" ]]; then - msg "Disabling systemd-resolved service" - systemctl stop systemd-resolved.service - cp /run/systemd/resolve/resolv.conf /etc/ - fi fi ;; *) diff --git a/contrib/cirrus/test.sh b/contrib/cirrus/test.sh index 853232b2389..1bb3709895a 100755 --- a/contrib/cirrus/test.sh +++ b/contrib/cirrus/test.sh @@ -67,7 +67,7 @@ else # This test compares images built with the "latest" version # of docker, against images built with buildah. Runtime installs # are required to ensure the latest docker version is used. - [[ "$OS_RELEASE_ID" == "ubuntu" ]] || \ + [[ "$OS_RELEASE_ID" == "debian" ]] || \ bad_os_id_ver systemctl enable --now docker