centos: do not use $releasever in .repo files

For centos stream, the $releasever is just the major version.  Several
of our .repo files are using $releasever in their path, and I think
that 8-stream installs are actually using 8 repos to install from.
For 9-stream, which doesn't have a corresponding 9, we're getting
errors enabling some of the aarch64 tests.

Replace all the $releasever expansions in the .repo files with the
exact version they are being installed for.  They don't need to be
generic; we are installing these specific repos for each DIB_RELEASE,
so they don't mix-and-match.

Change-Id: I48d438d8f51280cd060433fc8a67358d8345287f
This commit is contained in:
Ian Wienand 2022-01-25 15:48:47 +11:00
parent 8690088ecd
commit d1b2a43a84
5 changed files with 10 additions and 7 deletions

View File

@ -1,5 +1,5 @@
[Stream-AppStream]
name=CentOS-Stream - AppStream
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=AppStream
mirrorlist=http://mirrorlist.centos.org/?release=8-stream&arch=$basearch&repo=AppStream
gpgcheck=0

View File

@ -1,5 +1,5 @@
[Stream-BaseOS]
name=CentOS-Stream - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS
mirrorlist=http://mirrorlist.centos.org/?release=8-stream&arch=$basearch&repo=BaseOS
gpgcheck=0

View File

@ -140,10 +140,13 @@ function _install_repos {
# ${TMPDIR}/yum-$USER-random. Since we don't need this once the
# initial download happens, redirect TMPDIR for this call so we
# can clean it up nicely
#
# Note that the $releasever for centos-stream is just the major
# version. There is another variable "$stream" that we don't pass
local temp_tmp
temp_tmp=$(mktemp -d)
TMPDIR=${temp_tmp} ${HOST_YUM_DOWNLOADER} --verbose \
--releasever=${DIB_RELEASE} \
--releasever=${DIB_RELEASE/-*/} \
--setopt=reposdir=$repo \
--setopt=cachedir=$temp_tmp \
--destdir=$WORKING \
@ -205,8 +208,8 @@ function _install_pkg_manager {
# the yumdownloader calls above in _install_repos want to use
# ~/.rpmdb/ ... there is nothing in the build-system /var/lib/rpm!
#
# Another issue we hit is having to set --releasedir here. yum
# determines $releasevar based on (more or less) "rpm -q
# Another issue we hit is having to set --releasever here. yum
# determines $releasever based on (more or less) "rpm -q
# --whatprovides $distroverpkg". By default, this is
# "redhat-release" (fedora-release provides redhat-release) but
# some platforms like CentOS override it in /etc/yum.conf (to

View File

@ -1,5 +1,5 @@
[Stream-AppStream]
name=CentOS-Stream - AppStream
baseurl=https://{{ mirror_fqdn }}/centos/$releasever/AppStream/$basearch/os/
baseurl=https://{{ mirror_fqdn }}/centos/8-stream/AppStream/$basearch/os/
gpgcheck=0

View File

@ -1,5 +1,5 @@
[Stream-BaseOS]
name=CentOS-Stream - Base
baseurl=https://{{ mirror_fqdn }}/centos/$releasever/BaseOS/$basearch/os/
baseurl=https://{{ mirror_fqdn }}/centos/8-stream/BaseOS/$basearch/os/
gpgcheck=0