mirror of
https://github.com/dynup/kpatch
synced 2025-03-22 19:06:31 +00:00
test/integration: Handle python version for RHEL-8 platforms
On RHEL-8, version agnostic python-devel package does not exist. On previous RHEL releases, python-devel is for python2. On RHEL-8, the platform-python (which provides the needed utilities) is python3. Assuming this will be the same for future RHEL releases, specify the python major as part of the kpatch dependencies. Signed-off-by: Julien Thierry <jthierry@redhat.com>
This commit is contained in:
parent
91952cbf86
commit
4df66fa15f
@ -53,12 +53,21 @@ kpatch_rhel_dependencies()
|
||||
{
|
||||
local kernel_version
|
||||
local arch
|
||||
local rhel_major
|
||||
local py_version
|
||||
kernel_version=$(uname -r)
|
||||
arch=$(uname -m)
|
||||
rhel_major=${VERSION_ID%%.*}
|
||||
|
||||
if [ "${rhel_major}" -ge 8 ]; then
|
||||
py_version="3"
|
||||
else
|
||||
py_version="2"
|
||||
fi
|
||||
|
||||
sudo yum install -y git gcc gcc-c++ "kernel-devel-${kernel_version%.*}" elfutils elfutils-devel
|
||||
sudo yum install -y yum-utils zlib-devel binutils-devel newt-devel \
|
||||
python-devel perl-ExtUtils-Embed audit-libs-devel numactl-devel \
|
||||
python${py_version}-devel perl-ExtUtils-Embed audit-libs-devel numactl-devel \
|
||||
pciutils-devel bison ncurses-devel rpm-build java-devel
|
||||
sudo yum-builddep -y "kernel-${kernel_version%.*}"
|
||||
sudo debuginfo-install -y "kernel-${kernel_version%.*}"
|
||||
|
Loading…
Reference in New Issue
Block a user