934a65bc34
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
30 lines
704 B
Bash
Executable file
30 lines
704 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
# NOTE(xinliang): This script should run before script elements/yum-minimal/root.d/08-yum-chroot
|
|
# So set the script name prefix as 00-
|
|
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=${REPO_URL}/openEuler-$DIB_RELEASE/OS/\$basearch/
|
|
enabled=1
|
|
gpgcheck=0
|
|
|
|
[update]
|
|
name=openEuler-$DIB_RELEASE - update
|
|
baseurl=${REPO_URL}/openEuler-$DIB_RELEASE/update/\$basearch/
|
|
enabled=1
|
|
gpgcheck=0
|
|
EOF
|
|
|
|
mv $repo_file ${yum_repos_dir}/openEuler.repo
|