Skip to content

Commit 79c622b

Browse files
authored
Merge pull request #299 from h-vetinari/crb
Enable CRB repo on alma9, PowerTools on alma8
2 parents 7023391 + 79a25d9 commit 79c622b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

scripts/fix_rpm

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,24 @@ elif [ "${DISTRO_NAME}${DISTRO_VER}" = "ubi8" ]; then
1818
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
1919
elif [ "${DISTRO_NAME}${DISTRO_VER}" = "almalinux8" ]; then
2020
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
21+
22+
# PowerTools repo not enabled by default;
23+
# remove all `enabled=` lines
24+
sed -i '/^enabled=/d' /etc/yum.repos.d/almalinux-powertools.repo
25+
# for the [powertools] section, append `enabled=1` after that line
26+
sed -i '/^\[powertools\]/a\enabled=1' /etc/yum.repos.d/almalinux-powertools.repo
27+
# for [powertools-{source,debuginfo}] sections, append `enabled=0`
28+
sed -i '/^\[powertools-/a\enabled=0' /etc/yum.repos.d/almalinux-powertools.repo
2129
elif [ "${DISTRO_NAME}${DISTRO_VER}" = "almalinux9" ]; then
2230
# alma9 removed SHA1 availability by default, but it's still needed for the
2331
# RPM key; re-enable it. Details: https://access.redhat.com/articles/3666211
2432
update-crypto-policies --set LEGACY
2533
rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux
34+
35+
# PowerTools repo changed name to CRB in alma9
36+
sed -i '/^enabled=/d' /etc/yum.repos.d/almalinux-crb.repo
37+
sed -i '/^\[crb\]/a\enabled=1' /etc/yum.repos.d/almalinux-crb.repo
38+
sed -i '/^\[crb-/a\enabled=0' /etc/yum.repos.d/almalinux-crb.repo
2639
fi
2740

2841
rm -rf "/tmp/rpm-repos"

0 commit comments

Comments
 (0)