Upgrade openEuler to 22.03 LTS

openEuler 20.03-LTS-SP2 was out of date in May 2022. 22.03 LTS
is the newest LTS version. It was release in March 2022 and
will be maintained for 2 years. This patch upgrades the LTS
version. It'll be used in Devstack, Kolla-ansible and so on
in CI jobs.

This patch also enables the YUM mirror to speed up the package
download.

Change-Id: Iba38570d96374226b924db3aca305f7571643823
This commit is contained in:
wangxiyuan 2022-07-05 10:05:16 +08:00
parent f118649738
commit 934a65bc34
16 changed files with 59 additions and 46 deletions

View File

@ -22,7 +22,7 @@
vars:
dib_functests:
- containerfile/jammy-build-succeeds
- openeuler-minimal/20.03-LTS-SP2-build-succeeds
- openeuler-minimal/22.03-LTS-build-succeeds
# Image based tests
- centos/8-stream-build-succeeds
- centos/9-stream-build-succeeds
@ -57,7 +57,7 @@
dib_functests:
- centos-minimal/8-stream-aarch64-build-succeeds
- centos-minimal/9-stream-aarch64-build-succeeds
- openeuler-minimal/20.03-LTS-SP2-build-succeeds
- openeuler-minimal/22.03-LTS-build-succeeds
#
# Build and boot functional tests

View File

@ -7,6 +7,9 @@ Use of this element will require 'yum' and 'yum-utils' to be installed on
Ubuntu and Debian. Nothing additional is needed on Fedora, CentOS or
openEuler.
Set ``DIB_RELEASE`` to ``20.03-LTS-SP2``,``21.03`` or other release number
to explicitly select the release. ``DIB_RELEASE`` defaults the latest LTS
release.
Set ``DIB_RELEASE`` to ``22.03-LTS`` other release number to explicitly select
the release. ``DIB_RELEASE`` defaults the latest LTS release.
Set ``DIB_DISTRIBUTION_MIRROR`` to the mirror URL use a openEuler Yum mirror.
This URL should point to the directory containing the ``DIB_RELEASE``
directories.

View File

@ -1,3 +1,3 @@
export DISTRO_NAME=openeuler
export DIB_RELEASE=${DIB_RELEASE:-20.03-LTS-SP2}
export DIB_RELEASE=${DIB_RELEASE:-22.03-LTS}
export EFI_BOOT_DIR="EFI/openEuler"

View File

@ -0,0 +1,5 @@
if [ -n "${DIB_DISTRIBUTION_MIRROR:-}" ]; then
# Only set the mirror for OS, everything, EPOL and update repositories,
# The others (debuginfo and source) aren't mirrored since they do not exist on all mirrors
sed -i "/\(debuginfo\|source\)/! {s#http://repo.openeuler.org#$DIB_DISTRIBUTION_MIRROR#g}" $TARGET_ROOT/etc/yum.repos.d/openEuler.repo
fi

View File

@ -11,17 +11,18 @@ set -o pipefail
yum_repos_dir="$(dirname $0)/../yum.repos.d"
mkdir -p $yum_repos_dir
REPO_URL=${DIB_DISTRIBUTION_MIRROR:-http://repo.openeuler.org}
repo_file=$(mktemp)
cat > $repo_file << EOF
[OS]
name=openEuler-$DIB_RELEASE - OS
baseurl=http://repo.openeuler.org/openEuler-$DIB_RELEASE/OS/\$basearch/
baseurl=${REPO_URL}/openEuler-$DIB_RELEASE/OS/\$basearch/
enabled=1
gpgcheck=0
[update]
name=openEuler-$DIB_RELEASE - update
baseurl=http://repo.openeuler.org/openEuler-$DIB_RELEASE/update/\$basearch/
baseurl=${REPO_URL}/openEuler-$DIB_RELEASE/update/\$basearch/
enabled=1
gpgcheck=0
EOF

View File

@ -0,0 +1 @@
openEuler 22.03-LTS test

View File

@ -101,7 +101,7 @@ We run functional (build-only) tests on the following elements and
versions:
* ``containerfile``: Ubuntu Focal
* ``openeuler-minimal``: 20.03-LTS-SP2
* ``openeuler-minimal``: 22.03-LTS
* ``centos`` : (image-based build) 8-stream and 9-stream
* ``fedora`` : (image-based build) latest
* ``opensuse`` : 15.3
@ -112,7 +112,7 @@ For ARM64, we also run functional tests on
* ``ubuntu-minimal`` : Bionic and Focal
* ``debian-minimal`` : Bullseye
* ``centos-minimal`` : 8-stream and 9-stream
* ``openeuler-minimal``: 20.03-LTS-SP2
* ``openeuler-minimal``: 22.03-LTS
For additional details, see the ``README`` file of the relevant
elements.

View File

@ -0,0 +1,4 @@
---
features:
- |
Upgrade openEuler element from 20.03-LTS-SP2 to 22.03-LTS.

View File

@ -74,17 +74,17 @@
- [ 'default' ]
- [ 'fedora.repo', 'fedora-updates.repo' ]
- name: Create openeuler-minimal 20.03-LTS-SP2 directory
- name: Create openeuler-minimal 22.03-LTS directory
file:
path: "{{ dib_gate_mirror_repos }}/openeuler-minimal/20.03-LTS-SP2/yum.repos.d"
path: "{{ dib_gate_mirror_repos }}/openeuler-minimal/22.03-LTS/yum.repos.d"
state: directory
mode: 0775
recurse: yes
- name: Install openeuler-minimal 20.03-LTS-SP2 repo files
- name: Install openeuler-minimal 22.03-LTS repo files
template:
dest: "{{ dib_gate_mirror_repos }}/openeuler-minimal/20.03-LTS-SP2/yum.repos.d/dib-mirror-{{ item }}"
dest: "{{ dib_gate_mirror_repos }}/openeuler-minimal/22.03-LTS/yum.repos.d/dib-mirror-{{ item }}"
mode: 0644
src: "openeuler-minimal/20.03-LTS-SP2/{{ item }}.j2"
src: "openeuler-minimal/22.03-LTS/{{ item }}.j2"
with_items:
- openEuler.repo

View File

@ -1,29 +0,0 @@
[OS]
name=OS
baseurl=http://{{ mirror_fqdn }}/openeuler/openEuler-20.03-LTS-SP2/OS/$basearch/
enabled=1
gpgcheck=0
[everything]
name=everything
baseurl=http://{{ mirror_fqdn }}/openeuler/openEuler-20.03-LTS-SP2/everything/$basearch/
enabled=1
gpgcheck=0
[EPOL]
name=EPOL
baseurl=http://{{ mirror_fqdn }}/openeuler/openEuler-20.03-LTS-SP2/EPOL/main/$basearch/
enabled=1
gpgcheck=0
[EPOL-UPDATE]
name=EPOL-UPDATE
baseurl=http://{{ mirror_fqdn }}/openeuler/openEuler-20.03-LTS-SP2/EPOL/update/main/$basearch/
enabled=1
gpgcheck=0
[update]
name=update
baseurl=http://{{ mirror_fqdn }}/openeuler/openEuler-20.03-LTS-SP2/update/$basearch/
enabled=1
gpgcheck=0

View File

@ -0,0 +1,29 @@
[OS]
name=OS
baseurl=http://{{ mirror_fqdn }}/openeuler/openEuler-22.03-LTS/OS/$basearch/
enabled=1
gpgcheck=0
[everything]
name=everything
baseurl=http://{{ mirror_fqdn }}/openeuler/openEuler-22.03-LTS/everything/$basearch/
enabled=1
gpgcheck=0
[EPOL]
name=EPOL
baseurl=http://{{ mirror_fqdn }}/openeuler/openEuler-22.03-LTS/EPOL/main/$basearch/
enabled=1
gpgcheck=0
[EPOL-UPDATE]
name=EPOL-UPDATE
baseurl=http://{{ mirror_fqdn }}/openeuler/openEuler-22.03-LTS/EPOL/update/main/$basearch/
enabled=1
gpgcheck=0
[update]
name=update
baseurl=http://{{ mirror_fqdn }}/openeuler/openEuler-22.03-LTS/update/$basearch/
enabled=1
gpgcheck=0