version 1.21, 2021/12/20 03:13:29
|
version 1.22, 2021/12/21 13:57:47
|
Line 113 if ($dist =~ /^fedora(\d+)$/) {
|
Line 113 if ($dist =~ /^fedora(\d+)$/) {
|
key => 'gpgkey=', |
key => 'gpgkey=', |
value => $gpg, |
value => $gpg, |
}],$nobackup); |
}],$nobackup); |
} elsif ($dist =~ /^(rhes|centos|scientific|oracle|rocky|alma)(\d+)$/) { |
} elsif ($dist =~ /^(rhes|centos|scientific|oracle|rocky|alma)(\d+)(|\-stream)$/) { |
my $type = $1; |
my $type = $1; |
my $ver = $2; |
my $ver = $2; |
|
my $stream = $3; |
my $longver = $ver; |
my $longver = $ver; |
my $nobackup; |
my $nobackup; |
if ($type eq 'rhes') { |
if ($type eq 'rhes') { |
Line 124 if ($dist =~ /^fedora(\d+)$/) {
|
Line 125 if ($dist =~ /^fedora(\d+)$/) {
|
} elsif ($ver == 5) { |
} elsif ($ver == 5) { |
$longver = '5Server'; |
$longver = '5Server'; |
} |
} |
|
} elsif ($type eq 'centos') { |
|
$type .= $stream; |
} |
} |
my %info = ( |
my %info = ( |
rhes => { |
rhes => { |
Line 162 if ($dist =~ /^fedora(\d+)$/) {
|
Line 165 if ($dist =~ /^fedora(\d+)$/) {
|
gpg => 'versions/alma/RPM-GPG-KEY-loncapa', |
gpg => 'versions/alma/RPM-GPG-KEY-loncapa', |
gpgchk => 1, |
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 (ref($info{$type}) eq 'HASH') { |
if ($ver > 4) { |
if ($ver > 4) { |
my $file = '/etc/yum.conf'; |
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'; |
$file = '/etc/yum.repos.d/loncapa.repo'; |
$nobackup = 1; |
$nobackup = 1; |
} |
} |
|
my $release = '$releasever'; |
|
if ($type eq 'centos-stream') { |
|
$release .= '-stream'; |
|
} |
$yum_status = |
$yum_status = |
&update_file($file, |
&update_file($file, |
[{section => 'loncapa-updates-basearch', |
[{section => 'loncapa-updates-basearch', |
Line 177 if ($dist =~ /^fedora(\d+)$/) {
|
Line 191 if ($dist =~ /^fedora(\d+)$/) {
|
value => $info{$type}{title}.' $releasever LON-CAPA $basearch Updates', |
value => $info{$type}{title}.' $releasever LON-CAPA $basearch Updates', |
}, {section => "loncapa-updates-basearch", |
}, {section => "loncapa-updates-basearch", |
key => 'baseurl=', |
key => 'baseurl=', |
value => "$loninst/$info{$type}{path}/".'$releasever/$basearch', |
value => "$loninst/$info{$type}{path}/$release/".'$basearch', |
}, {section => 'loncapa-updates-basearch', |
}, {section => 'loncapa-updates-basearch', |
key => 'gpgcheck=', |
key => 'gpgcheck=', |
value => $info{$type}{gpgchk}, |
value => $info{$type}{gpgchk}, |
Line 189 if ($dist =~ /^fedora(\d+)$/) {
|
Line 203 if ($dist =~ /^fedora(\d+)$/) {
|
value => $info{$type}{title}.' $releasever LON-CAPA noarch Updates', |
value => $info{$type}{title}.' $releasever LON-CAPA noarch Updates', |
}, {section => 'loncapa-updates-noarch', |
}, {section => 'loncapa-updates-noarch', |
key => 'baseurl=', |
key => 'baseurl=', |
value => "$loninst/$info{$type}{path}/".'$releasever/noarch', |
value => "$loninst/$info{$type}{path}/$release/noarch", |
}, {section => 'loncapa-updates-noarch', |
}, {section => 'loncapa-updates-noarch', |
key => 'gpgcheck=', |
key => 'gpgcheck=', |
value => $info{$type}{gpgchk}, |
value => $info{$type}{gpgchk}, |