#1 Add support for CentOS Stream 8 repos
Closed 3 years ago by sbonazzo. Opened 3 years ago by sbonazzo.
rpms/ sbonazzo/centos-release-advanced-virtualization c8-sig-virt-8  into  c8-sig-virt-8

@@ -5,8 +5,8 @@ 

  

  [centos-advanced-virtualization]

  name=CentOS-$releasever - Advanced Virtualization

- mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=virt-advanced-virtualization

- #baseurl=http://mirror.centos.org/$contentdir/$releasever/virt/$basearch/advanced-virtualization/

+ mirrorlist=http://mirrorlist.centos.org/?release=$avstream&arch=$basearch&repo=virt-$avdir

+ #baseurl=http://mirror.centos.org/$contentdir/$avstream/virt/$basearch/$avdir/

  gpgcheck=1

  enabled=1

  module_hotfixes=1
@@ -14,21 +14,21 @@ 

  

  [centos-advanced-virtualization-test]

  name=CentOS-$releasever - Advanced Virtualization Testing

- baseurl=http://buildlogs.centos.org/centos/$releasever/virt/$basearch/advanced-virtualization/

+ baseurl=http://buildlogs.centos.org/centos/$avstream/virt/$basearch/$avdir/

  gpgcheck=0

  enabled=0

  module_hotfixes=1

  

  [centos-advanced-virtualization-debuginfo]

  name=CentOS-$releasever - Advanced Virtualization Debug

- baseurl=http://debuginfo.centos.org/centos/$releasever/virt/$basearch/

+ baseurl=http://debuginfo.centos.org/centos/$avstream/virt/$basearch/

  gpgcheck=1

  enabled=0

  gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Virtualization

  

  [centos-advanced-virtualization-source]

  name=CentOS-$releasever - Advanced Virtualization Source

- baseurl=http://vault.centos.org/centos/$releasever/virt/Source/advanced-virtualization/

+ baseurl=http://vault.centos.org/centos/$avstream/virt/Source/$avdir/

  gpgcheck=1

  enabled=0

  gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Virtualization

@@ -1,7 +1,7 @@ 

  Summary: Advanced Virtualization packages from the CentOS Virtualization SIG repository

  Name: centos-release-advanced-virtualization

  Version: 1.0

- Release: 2%{?dist}

+ Release: 3%{?dist}

  License: GPLv2

  URL: http://wiki.centos.org/SpecialInterestGroup/Virtualization

  Source0: CentOS-Advanced-Virtualization.repo
@@ -11,6 +11,7 @@ 

  

  Requires: centos-release-virt-common

  Requires: centos-release

+ Requires(post): centos-release

  

  %description

  yum configuration and basic docs for Advanced Virtualization packages as delivered via the
@@ -22,6 +23,22 @@ 

  %install

  install -D -m 644 %{SOURCE0} %{buildroot}%{_sysconfdir}/yum.repos.d/CentOS-Advanced-Virtualization.repo

  

+ %post

+ source /etc/os-release

+ if [[ $ID == 'centos' && $NAME == *'Stream' ]] || [ $ID != 'centos' ]; then

+     echo "8-stream" > /etc/dnf/vars/avstream

+     echo "advancedvirt-common" > /etc/dnf/vars/avdir

+ else

+     echo "8" > /etc/dnf/vars/avstream

+     echo "advanced-virtualization" > /etc/dnf/vars/avdir

+ fi

+ 

+ %postun

+ if [ $1 -eq 0 ] ; then

+     rm -f /etc/dnf/vars/avstream

+     rm -f /etc/dnf/vars/avdir

+ fi

+ 

  

  %files

  %defattr(-,root,root)
@@ -29,6 +46,9 @@ 

  %license COPYING

  

  %changelog

+ * Wed Jun 09 2021 Sandro Bonazzola <sbonazzo@redhat.com> - 1.0-3

+ - Add support for CentOS Stream 8 repos

+ 

  * Wed Sep 02 2020 Sandro Bonazzola <sbonazzo@redhat.com> - 1.0-2

  - Set module_hotfixes=1 for advanced virtualization repos

  

This patch makes that CentOS Stream 8 systems use repositories under
8-stream in Virt SIG instead of 8 ones.

Signed-off-by: Sandro Bonazzola sbonazzo@redhat.com

LGTM, works as expected both in CS8 and CL8

For some reason the merge button doesn't work for me.
Anyway, committed and pushed directly to the git repo without modifications.

closing the PR as already merged.

Pull-Request has been closed by sbonazzo

3 years ago