diff --git a/.zuul.d/jobs.yaml b/.zuul.d/jobs.yaml index 29bf980b4..58dad6189 100644 --- a/.zuul.d/jobs.yaml +++ b/.zuul.d/jobs.yaml @@ -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 diff --git a/diskimage_builder/elements/openeuler-minimal/README.rst b/diskimage_builder/elements/openeuler-minimal/README.rst index 9ab49ad22..78053217b 100644 --- a/diskimage_builder/elements/openeuler-minimal/README.rst +++ b/diskimage_builder/elements/openeuler-minimal/README.rst @@ -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. diff --git a/diskimage_builder/elements/openeuler-minimal/environment.d/10-openeuler-distro-name.bash b/diskimage_builder/elements/openeuler-minimal/environment.d/10-openeuler-distro-name.bash index 4f51dbcc8..4804dc4c3 100644 --- a/diskimage_builder/elements/openeuler-minimal/environment.d/10-openeuler-distro-name.bash +++ b/diskimage_builder/elements/openeuler-minimal/environment.d/10-openeuler-distro-name.bash @@ -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" diff --git a/diskimage_builder/elements/openeuler-minimal/pre-install.d/00-setup-mirror.bash b/diskimage_builder/elements/openeuler-minimal/pre-install.d/00-setup-mirror.bash new file mode 100644 index 000000000..312f03452 --- /dev/null +++ b/diskimage_builder/elements/openeuler-minimal/pre-install.d/00-setup-mirror.bash @@ -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 diff --git a/diskimage_builder/elements/openeuler-minimal/root.d/00-00-generate-repo b/diskimage_builder/elements/openeuler-minimal/root.d/00-00-generate-repo index 9ea55cf64..0615441a8 100755 --- a/diskimage_builder/elements/openeuler-minimal/root.d/00-00-generate-repo +++ b/diskimage_builder/elements/openeuler-minimal/root.d/00-00-generate-repo @@ -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 diff --git a/diskimage_builder/elements/openeuler-minimal/test-elements/20.03-LTS-SP2-build-succeeds/README.rst b/diskimage_builder/elements/openeuler-minimal/test-elements/20.03-LTS-SP2-build-succeeds/README.rst deleted file mode 100644 index e504e4a48..000000000 --- a/diskimage_builder/elements/openeuler-minimal/test-elements/20.03-LTS-SP2-build-succeeds/README.rst +++ /dev/null @@ -1 +0,0 @@ -openEuler 20.03-LTS-SP2 test diff --git a/diskimage_builder/elements/openeuler-minimal/test-elements/20.03-LTS-SP2-build-succeeds/environment.d/10-set-distro.bash b/diskimage_builder/elements/openeuler-minimal/test-elements/20.03-LTS-SP2-build-succeeds/environment.d/10-set-distro.bash deleted file mode 100644 index 50ea59d05..000000000 --- a/diskimage_builder/elements/openeuler-minimal/test-elements/20.03-LTS-SP2-build-succeeds/environment.d/10-set-distro.bash +++ /dev/null @@ -1 +0,0 @@ -export DIB_RELEASE='20.03-LTS-SP2' diff --git a/diskimage_builder/elements/openeuler-minimal/test-elements/22.03-LTS-build-succeeds/README.rst b/diskimage_builder/elements/openeuler-minimal/test-elements/22.03-LTS-build-succeeds/README.rst new file mode 100644 index 000000000..f9696478e --- /dev/null +++ b/diskimage_builder/elements/openeuler-minimal/test-elements/22.03-LTS-build-succeeds/README.rst @@ -0,0 +1 @@ +openEuler 22.03-LTS test diff --git a/diskimage_builder/elements/openeuler-minimal/test-elements/20.03-LTS-SP2-build-succeeds/element-deps b/diskimage_builder/elements/openeuler-minimal/test-elements/22.03-LTS-build-succeeds/element-deps similarity index 100% rename from diskimage_builder/elements/openeuler-minimal/test-elements/20.03-LTS-SP2-build-succeeds/element-deps rename to diskimage_builder/elements/openeuler-minimal/test-elements/22.03-LTS-build-succeeds/element-deps diff --git a/diskimage_builder/elements/openeuler-minimal/test-elements/22.03-LTS-build-succeeds/environment.d/10-set-distro.bash b/diskimage_builder/elements/openeuler-minimal/test-elements/22.03-LTS-build-succeeds/environment.d/10-set-distro.bash new file mode 100644 index 000000000..4dd7ce40d --- /dev/null +++ b/diskimage_builder/elements/openeuler-minimal/test-elements/22.03-LTS-build-succeeds/environment.d/10-set-distro.bash @@ -0,0 +1 @@ +export DIB_RELEASE='22.03-LTS' diff --git a/diskimage_builder/elements/openeuler-minimal/test-elements/20.03-LTS-SP2-build-succeeds/test-output-formats b/diskimage_builder/elements/openeuler-minimal/test-elements/22.03-LTS-build-succeeds/test-output-formats similarity index 100% rename from diskimage_builder/elements/openeuler-minimal/test-elements/20.03-LTS-SP2-build-succeeds/test-output-formats rename to diskimage_builder/elements/openeuler-minimal/test-elements/22.03-LTS-build-succeeds/test-output-formats diff --git a/doc/source/user_guide/supported_distros.rst b/doc/source/user_guide/supported_distros.rst index c50878c9c..f28e68d29 100644 --- a/doc/source/user_guide/supported_distros.rst +++ b/doc/source/user_guide/supported_distros.rst @@ -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. diff --git a/releasenotes/notes/upgrade_openeuler_to_22.03-d67d9bb3c5c97749.yaml b/releasenotes/notes/upgrade_openeuler_to_22.03-d67d9bb3c5c97749.yaml new file mode 100644 index 000000000..9469b4af1 --- /dev/null +++ b/releasenotes/notes/upgrade_openeuler_to_22.03-d67d9bb3c5c97749.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Upgrade openEuler element from 20.03-LTS-SP2 to 22.03-LTS. diff --git a/roles/dib-setup-gate-mirrors/tasks/main.yaml b/roles/dib-setup-gate-mirrors/tasks/main.yaml index 6ce85ea40..2b5e37b15 100644 --- a/roles/dib-setup-gate-mirrors/tasks/main.yaml +++ b/roles/dib-setup-gate-mirrors/tasks/main.yaml @@ -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 diff --git a/roles/dib-setup-gate-mirrors/templates/openeuler-minimal/20.03-LTS-SP2/openEuler.repo.j2 b/roles/dib-setup-gate-mirrors/templates/openeuler-minimal/20.03-LTS-SP2/openEuler.repo.j2 deleted file mode 100644 index c209a533d..000000000 --- a/roles/dib-setup-gate-mirrors/templates/openeuler-minimal/20.03-LTS-SP2/openEuler.repo.j2 +++ /dev/null @@ -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 diff --git a/roles/dib-setup-gate-mirrors/templates/openeuler-minimal/22.03-LTS/openEuler.repo.j2 b/roles/dib-setup-gate-mirrors/templates/openeuler-minimal/22.03-LTS/openEuler.repo.j2 new file mode 100644 index 000000000..5eaf8505c --- /dev/null +++ b/roles/dib-setup-gate-mirrors/templates/openeuler-minimal/22.03-LTS/openEuler.repo.j2 @@ -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