mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-25 06:10:20 +00:00
Direct pull for epel-release
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
parent
17485023a2
commit
80bef5f6b6
2 changed files with 9 additions and 7 deletions
|
@ -397,13 +397,15 @@ select_rpm_php(){
|
||||||
unset CENTOS7_PIHOLE_WEB_DEPS
|
unset CENTOS7_PIHOLE_WEB_DEPS
|
||||||
fi
|
fi
|
||||||
# CentOS requires the EPEL repository to gain access to Fedora packages
|
# CentOS requires the EPEL repository to gain access to Fedora packages
|
||||||
EPEL_PKG="epel-release"
|
if [[ CURRENT_CENTOS_VERSION -eq 7 ]]; then
|
||||||
rpm -q ${EPEL_PKG} &> /dev/null || rc=$?
|
EPEL_PKG="https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"
|
||||||
if [[ $rc -ne 0 ]]; then
|
elif [[ CURRENT_CENTOS_VERSION -eq 8 ]]; then
|
||||||
|
EPEL_PKG="https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm"
|
||||||
|
fi
|
||||||
|
|
||||||
printf " %b Enabling EPEL package repository (https://fedoraproject.org/wiki/EPEL)\\n" "${INFO}"
|
printf " %b Enabling EPEL package repository (https://fedoraproject.org/wiki/EPEL)\\n" "${INFO}"
|
||||||
"${PKG_INSTALL[@]}" ${EPEL_PKG} &> /dev/null
|
"${PKG_INSTALL[@]}" ${EPEL_PKG} &> /dev/null
|
||||||
printf " %b Installed %s\\n" "${TICK}" "${EPEL_PKG}"
|
printf " %b Installed %s\\n" "${TICK}" "${EPEL_PKG}"
|
||||||
fi
|
|
||||||
|
|
||||||
# The default php on CentOS 7.x is 5.4 which is EOL
|
# The default php on CentOS 7.x is 5.4 which is EOL
|
||||||
# Check if the version of PHP available via installed repositories is >= to PHP 7
|
# Check if the version of PHP available via installed repositories is >= to PHP 7
|
||||||
|
|
|
@ -36,7 +36,7 @@ def test_enable_epel_repository_centos(host):
|
||||||
expected_stdout = info_box + (' Enabling EPEL package repository '
|
expected_stdout = info_box + (' Enabling EPEL package repository '
|
||||||
'(https://fedoraproject.org/wiki/EPEL)')
|
'(https://fedoraproject.org/wiki/EPEL)')
|
||||||
assert expected_stdout in package_manager_detect.stdout
|
assert expected_stdout in package_manager_detect.stdout
|
||||||
expected_stdout = tick_box + ' Installed epel-release'
|
expected_stdout = tick_box + ' Installed'
|
||||||
assert expected_stdout in package_manager_detect.stdout
|
assert expected_stdout in package_manager_detect.stdout
|
||||||
epel_package = host.package('epel-release')
|
epel_package = host.package('epel-release')
|
||||||
assert epel_package.is_installed
|
assert epel_package.is_installed
|
||||||
|
|
Loading…
Reference in a new issue