diff --git a/diskimage_builder/elements/centos-minimal/yum.repos.d/8-stream/appstream.repo b/diskimage_builder/elements/centos-minimal/yum.repos.d/8-stream/appstream.repo index 0c8c2a20..e4213df3 100644 --- a/diskimage_builder/elements/centos-minimal/yum.repos.d/8-stream/appstream.repo +++ b/diskimage_builder/elements/centos-minimal/yum.repos.d/8-stream/appstream.repo @@ -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 diff --git a/diskimage_builder/elements/centos-minimal/yum.repos.d/8-stream/base.repo b/diskimage_builder/elements/centos-minimal/yum.repos.d/8-stream/base.repo index b8546d9a..6b48d2a9 100644 --- a/diskimage_builder/elements/centos-minimal/yum.repos.d/8-stream/base.repo +++ b/diskimage_builder/elements/centos-minimal/yum.repos.d/8-stream/base.repo @@ -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 diff --git a/diskimage_builder/elements/yum-minimal/root.d/08-yum-chroot b/diskimage_builder/elements/yum-minimal/root.d/08-yum-chroot index f848cb73..0127b15f 100755 --- a/diskimage_builder/elements/yum-minimal/root.d/08-yum-chroot +++ b/diskimage_builder/elements/yum-minimal/root.d/08-yum-chroot @@ -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 diff --git a/roles/dib-setup-gate-mirrors/templates/centos-minimal/8-stream/appstream.repo.j2 b/roles/dib-setup-gate-mirrors/templates/centos-minimal/8-stream/appstream.repo.j2 index a996540c..0ded296f 100644 --- a/roles/dib-setup-gate-mirrors/templates/centos-minimal/8-stream/appstream.repo.j2 +++ b/roles/dib-setup-gate-mirrors/templates/centos-minimal/8-stream/appstream.repo.j2 @@ -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 diff --git a/roles/dib-setup-gate-mirrors/templates/centos-minimal/8-stream/base.repo.j2 b/roles/dib-setup-gate-mirrors/templates/centos-minimal/8-stream/base.repo.j2 index bcab6d6d..bd123cfc 100644 --- a/roles/dib-setup-gate-mirrors/templates/centos-minimal/8-stream/base.repo.j2 +++ b/roles/dib-setup-gate-mirrors/templates/centos-minimal/8-stream/base.repo.j2 @@ -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