Use sed to replace releasever in betas

This commit is contained in:
eabdullin 2024-11-27 15:57:00 +03:00
parent 0de55e4ba3
commit 544c4d6447

View File

@ -288,6 +288,12 @@ sed -i "s/\$basearch/x86_64_v2/g" %{buildroot}%{_sysconfdir}/yum.repos.d/*.repo
sed -i '/^mirrorlist=/ s|$|?arch=x86_64_v2|g' %{buildroot}%{_sysconfdir}/yum.repos.d/*.repo
%endif
# Replace $releasever variable with beta if it is set
%if %{defined beta}
sed -i "s/\$releasever/%{major}.%{minor}-beta/g" %{buildroot}%{_sysconfdir}/yum.repos.d/*.repo
sed -i "s|https://repo.almalinux.org/almalinux/|https://vault.almalinux.org/|g" %{buildroot}%{_sysconfdir}/yum.repos.d/*.repo
%endif
# dnf variables
install -d -m 0755 %{buildroot}%{_sysconfdir}/dnf/vars
echo "%{major}-stream" > %{buildroot}%{_sysconfdir}/dnf/vars/stream