From 613af3251b9817aa71dc586487756391fed99059 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 21 Feb 2022 15:20:09 +0100 Subject: [PATCH 1/3] gitlab-ci: fix CentOS Linux 8 containers during ".gitlab-ci/fedora-install.sh" See-also: https://stackoverflow.com/questions/70926799/centos-through-vm-no-urls-in-mirrorlist See-also: https://techglimpse.com/failed-metadata-repo-appstream-centos-8/ --- .gitlab-ci.yml | 4 ++-- .gitlab-ci/fedora-install.sh | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 51ce0dc604..971f33cb2b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,10 +47,10 @@ variables: # # This is done by running `ci-fairy generate-template` and possibly bump # ".default_tag". - FEDORA_TAG: '2022-02-14.0-8384452eb54e' + FEDORA_TAG: '2022-02-14.0-4303738066bf' UBUNTU_TAG: '2022-02-14.0-bd3c060f94c2' DEBIAN_TAG: '2022-02-14.0-bd3c060f94c2' - CENTOS_TAG: '2022-02-14.0-8384452eb54e' + CENTOS_TAG: '2022-02-14.0-4303738066bf' ALPINE_TAG: '2022-02-14.0-0990abecb69f' FEDORA_EXEC: 'bash .gitlab-ci/fedora-install.sh' diff --git a/.gitlab-ci/fedora-install.sh b/.gitlab-ci/fedora-install.sh index eff9e52432..6a4b91bfe6 100755 --- a/.gitlab-ci/fedora-install.sh +++ b/.gitlab-ci/fedora-install.sh @@ -5,13 +5,18 @@ set -ex IS_FEDORA=0 IS_CENTOS=0 IS_CENTOS_7=0 +IS_CENTOS_8=0 grep -q '^NAME=.*\(CentOS\)' /etc/os-release && IS_CENTOS=1 grep -q '^NAME=.*\(Fedora\)' /etc/os-release && IS_FEDORA=1 if [ $IS_CENTOS = 1 ]; then - grep -q '^VERSION_ID=.*\<7\>' /etc/os-release && IS_CENTOS_7=1 + if grep -q '^VERSION_ID=.*\<7\>' /etc/os-release ; then + IS_CENTOS_7=1 + elif grep -q '^VERSION_ID=.*\<8\>' /etc/os-release ; then + IS_CENTOS_8=1 + fi fi -if [ $IS_CENTOS = 1 ]; then + if [ $IS_CENTOS = 1 ]; then if [ $IS_CENTOS_7 = 1 ]; then yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum install -y glibc-common @@ -19,6 +24,13 @@ if [ $IS_CENTOS = 1 ]; then locale -a yum install -y python36-dbus python36-gobject-base else + if [ $IS_CENTOS_8 = 1 ]; then + # CentOS Linux 8 is now EOF and plain `dnf upgrade` does not work. We need + # to patch the mirror list. + sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* + sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* + fi + dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm dnf install -y 'dnf-command(config-manager)' dnf config-manager --set-enabled powertools || \ From e73b78637cae969871f56409214f5493936c340e Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 16 Feb 2022 08:31:18 +0100 Subject: [PATCH 2/3] gitlab-ci: update ci-templates version We need the latest fix to bootstrap CentOS 8 Linux containers. See-also: https://gitlab.freedesktop.org/freedesktop/ci-templates/-/merge_requests/131 See-also: https://gitlab.freedesktop.org/freedesktop/ci-templates/-/merge_requests/132 --- .gitlab-ci.yml | 12 ++++++------ .gitlab-ci/ci.template | 2 +- .gitlab-ci/config.yml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 971f33cb2b..4a27e962c0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ ######################################## -.templates_sha: &template_sha 14731f78c23c7b523a85a26a068ade9ac1ecd2f3 # see https://docs.gitlab.com/ee/ci/yaml/#includefile +.templates_sha: &template_sha 3e66ea37e5672bb8f48e3056ba92915b5fc5b888 # see https://docs.gitlab.com/ee/ci/yaml/#includefile include: # Alpine container builder template @@ -47,11 +47,11 @@ variables: # # This is done by running `ci-fairy generate-template` and possibly bump # ".default_tag". - FEDORA_TAG: '2022-02-14.0-4303738066bf' - UBUNTU_TAG: '2022-02-14.0-bd3c060f94c2' - DEBIAN_TAG: '2022-02-14.0-bd3c060f94c2' - CENTOS_TAG: '2022-02-14.0-4303738066bf' - ALPINE_TAG: '2022-02-14.0-0990abecb69f' + FEDORA_TAG: '2022-02-21.0-b8ebc9faeed7' + UBUNTU_TAG: '2022-02-21.0-0b989b22505f' + DEBIAN_TAG: '2022-02-21.0-0b989b22505f' + CENTOS_TAG: '2022-02-21.0-b8ebc9faeed7' + ALPINE_TAG: '2022-02-21.0-f12999972d57' FEDORA_EXEC: 'bash .gitlab-ci/fedora-install.sh' UBUNTU_EXEC: 'bash .gitlab-ci/debian-install.sh' diff --git a/.gitlab-ci/ci.template b/.gitlab-ci/ci.template index bfaf858fad..20ffe286b2 100644 --- a/.gitlab-ci/ci.template +++ b/.gitlab-ci/ci.template @@ -9,7 +9,7 @@ ######################################## -.templates_sha: &template_sha 14731f78c23c7b523a85a26a068ade9ac1ecd2f3 # see https://docs.gitlab.com/ee/ci/yaml/#includefile +.templates_sha: &template_sha 3e66ea37e5672bb8f48e3056ba92915b5fc5b888 # see https://docs.gitlab.com/ee/ci/yaml/#includefile include: {% for distro in distributions|sort(attribute="name") %} diff --git a/.gitlab-ci/config.yml b/.gitlab-ci/config.yml index c1a442ad6b..39d0abbaf2 100644 --- a/.gitlab-ci/config.yml +++ b/.gitlab-ci/config.yml @@ -8,7 +8,7 @@ # # We're happy to rebuild all containers when one changes. -.default_tag: &default_tag '2022-02-14.0' +.default_tag: &default_tag '2022-02-21.0' # The list of all distributions we want to create job for. From e4c66b5666cf6580252ceda89d5f59176228d48a Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 16 Feb 2022 08:31:55 +0100 Subject: [PATCH 3/3] Revert "gitlab-ci: disable CentOS 8 Linux containers" ci-templates now works around the earlier problem to install CentOS 8 Linux containers. Re-add the tests. This reverts commit b2d2b8d6fa05e6911c3a7599b35e38e149ddf873. --- .gitlab-ci.yml | 100 +++++++++++++++++++++++++++++++++++++++--- .gitlab-ci/config.yml | 3 ++ 2 files changed, 98 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4a27e962c0..cb03d400bc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,11 +47,11 @@ variables: # # This is done by running `ci-fairy generate-template` and possibly bump # ".default_tag". - FEDORA_TAG: '2022-02-21.0-b8ebc9faeed7' - UBUNTU_TAG: '2022-02-21.0-0b989b22505f' - DEBIAN_TAG: '2022-02-21.0-0b989b22505f' - CENTOS_TAG: '2022-02-21.0-b8ebc9faeed7' - ALPINE_TAG: '2022-02-21.0-f12999972d57' + FEDORA_TAG: '2022-02-21.0-f42312ef8cae' + UBUNTU_TAG: '2022-02-21.0-ab561a08b357' + DEBIAN_TAG: '2022-02-21.0-ab561a08b357' + CENTOS_TAG: '2022-02-21.0-f42312ef8cae' + ALPINE_TAG: '2022-02-21.0-bad60eeb6900' FEDORA_EXEC: 'bash .gitlab-ci/fedora-install.sh' UBUNTU_EXEC: 'bash .gitlab-ci/debian-install.sh' @@ -304,6 +304,36 @@ centos:7.9.2009@container-prep: FDO_DISTRIBUTION_TAG: $CENTOS_TAG FDO_DISTRIBUTION_EXEC: $CENTOS_EXEC +centos:8.1.1911@container-prep: + extends: + - .fdo.container-build@centos + stage: prep + variables: + GIT_STRATEGY: none + FDO_DISTRIBUTION_VERSION: '8.1.1911' + FDO_DISTRIBUTION_TAG: $CENTOS_TAG + FDO_DISTRIBUTION_EXEC: $CENTOS_EXEC + +centos:8.2.2004@container-prep: + extends: + - .fdo.container-build@centos + stage: prep + variables: + GIT_STRATEGY: none + FDO_DISTRIBUTION_VERSION: '8.2.2004' + FDO_DISTRIBUTION_TAG: $CENTOS_TAG + FDO_DISTRIBUTION_EXEC: $CENTOS_EXEC + +centos:8.3.2011@container-prep: + extends: + - .fdo.container-build@centos + stage: prep + variables: + GIT_STRATEGY: none + FDO_DISTRIBUTION_VERSION: '8.3.2011' + FDO_DISTRIBUTION_TAG: $CENTOS_TAG + FDO_DISTRIBUTION_EXEC: $CENTOS_EXEC + alpine:latest@container-prep: extends: - .fdo.container-build@alpine @@ -546,6 +576,33 @@ centos:7.9.2009@container-clean: FDO_DISTRIBUTION_VERSION: '7.9.2009' FDO_DISTRIBUTION_TAG: $CENTOS_TAG +centos:8.1.1911@container-clean: + extends: + - .container-clean + variables: + GIT_STRATEGY: none + CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/centos/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG + FDO_DISTRIBUTION_VERSION: '8.1.1911' + FDO_DISTRIBUTION_TAG: $CENTOS_TAG + +centos:8.2.2004@container-clean: + extends: + - .container-clean + variables: + GIT_STRATEGY: none + CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/centos/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG + FDO_DISTRIBUTION_VERSION: '8.2.2004' + FDO_DISTRIBUTION_TAG: $CENTOS_TAG + +centos:8.3.2011@container-clean: + extends: + - .container-clean + variables: + GIT_STRATEGY: none + CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/centos/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG + FDO_DISTRIBUTION_VERSION: '8.3.2011' + FDO_DISTRIBUTION_TAG: $CENTOS_TAG + alpine:latest@container-clean: extends: - .container-clean @@ -817,6 +874,39 @@ t_centos:7.9.2009: - "centos:7.9.2009@container-prep" when: manual +t_centos:8.1.1911: + extends: + - .build@template + - .fdo.distribution-image@centos + variables: + FDO_DISTRIBUTION_VERSION: '8.1.1911' + FDO_DISTRIBUTION_TAG: $CENTOS_TAG + needs: + - "centos:8.1.1911@container-prep" + when: manual + +t_centos:8.2.2004: + extends: + - .build@template + - .fdo.distribution-image@centos + variables: + FDO_DISTRIBUTION_VERSION: '8.2.2004' + FDO_DISTRIBUTION_TAG: $CENTOS_TAG + needs: + - "centos:8.2.2004@container-prep" + when: manual + +t_centos:8.3.2011: + extends: + - .build@template + - .fdo.distribution-image@centos + variables: + FDO_DISTRIBUTION_VERSION: '8.3.2011' + FDO_DISTRIBUTION_TAG: $CENTOS_TAG + needs: + - "centos:8.3.2011@container-prep" + when: manual + t_alpine:latest: extends: - .build@template diff --git a/.gitlab-ci/config.yml b/.gitlab-ci/config.yml index 39d0abbaf2..cbbc35c3ec 100644 --- a/.gitlab-ci/config.yml +++ b/.gitlab-ci/config.yml @@ -52,6 +52,9 @@ distributions: - '7.7.1908' - '7.8.2003' - '7.9.2009' + - '8.1.1911' + - '8.2.2004' + - '8.3.2011' - name: alpine tag: *default_tag base_type: alpine