--- loncom/debugging_tools/modify_config_files.pl 2021/12/20 03:13:29 1.21 +++ loncom/debugging_tools/modify_config_files.pl 2021/12/21 13:57:47 1.22 @@ -2,7 +2,7 @@ # # The LearningOnline Network # -# $Id: modify_config_files.pl,v 1.21 2021/12/20 03:13:29 raeburn Exp $ +# $Id: modify_config_files.pl,v 1.22 2021/12/21 13:57:47 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -113,9 +113,10 @@ if ($dist =~ /^fedora(\d+)$/) { key => 'gpgkey=', value => $gpg, }],$nobackup); -} elsif ($dist =~ /^(rhes|centos|scientific|oracle|rocky|alma)(\d+)$/) { +} elsif ($dist =~ /^(rhes|centos|scientific|oracle|rocky|alma)(\d+)(|\-stream)$/) { my $type = $1; my $ver = $2; + my $stream = $3; my $longver = $ver; my $nobackup; if ($type eq 'rhes') { @@ -124,6 +125,8 @@ if ($dist =~ /^fedora(\d+)$/) { } elsif ($ver == 5) { $longver = '5Server'; } + } elsif ($type eq 'centos') { + $type .= $stream; } my %info = ( rhes => { @@ -162,14 +165,25 @@ if ($dist =~ /^fedora(\d+)$/) { gpg => 'versions/alma/RPM-GPG-KEY-loncapa', gpgchk => 1, }, + centos-stream => { + title => 'CentOS Stream', + path => 'centos/loncapa', + gpg => 'versions/centos/RPM-GPG-KEY-loncapa', + gpgchk => 1, + }, ); if (ref($info{$type}) eq 'HASH') { if ($ver > 4) { my $file = '/etc/yum.conf'; - if (($ver > 7) || ($type eq 'oracle') || ($type eq 'rocky') || ($type eq 'alma')) { + if (($ver > 7) || ($type eq 'oracle') || ($type eq 'rocky') || + ($type eq 'alma') || ($type eq 'centos-stream')) { $file = '/etc/yum.repos.d/loncapa.repo'; $nobackup = 1; } + my $release = '$releasever'; + if ($type eq 'centos-stream') { + $release .= '-stream'; + } $yum_status = &update_file($file, [{section => 'loncapa-updates-basearch', @@ -177,7 +191,7 @@ if ($dist =~ /^fedora(\d+)$/) { value => $info{$type}{title}.' $releasever LON-CAPA $basearch Updates', }, {section => "loncapa-updates-basearch", key => 'baseurl=', - value => "$loninst/$info{$type}{path}/".'$releasever/$basearch', + value => "$loninst/$info{$type}{path}/$release/".'$basearch', }, {section => 'loncapa-updates-basearch', key => 'gpgcheck=', value => $info{$type}{gpgchk}, @@ -189,7 +203,7 @@ if ($dist =~ /^fedora(\d+)$/) { value => $info{$type}{title}.' $releasever LON-CAPA noarch Updates', }, {section => 'loncapa-updates-noarch', key => 'baseurl=', - value => "$loninst/$info{$type}{path}/".'$releasever/noarch', + value => "$loninst/$info{$type}{path}/$release/noarch", }, {section => 'loncapa-updates-noarch', key => 'gpgcheck=', value => $info{$type}{gpgchk},