From d51179299868b3509188ce6cea46e9f2871d5ae9 Mon Sep 17 00:00:00 2001 From: "zhangyongde.zyd" Date: Wed, 17 Jan 2024 12:46:34 +0800 Subject: [PATCH] kpatch-build: Support distro Anolis OS Support Anolis OS Signed-off-by: Wardenjohn --- kpatch-build/kpatch-build | 1 + test/integration/lib.sh | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build index da4563eef..246a08b18 100755 --- a/kpatch-build/kpatch-build +++ b/kpatch-build/kpatch-build @@ -71,6 +71,7 @@ declare -rA SUPPORTED_DEB_DISTROS=( ["ubuntu"]="Ubuntu OS") declare -rA SUPPORTED_RPM_DISTROS=( + ["anolis"]="Anolis OS" ["centos"]="CentOS" ["fedora"]="Fedora" ["openEuler"]="OpenEuler" diff --git a/test/integration/lib.sh b/test/integration/lib.sh index 961e58883..036391b5a 100644 --- a/test/integration/lib.sh +++ b/test/integration/lib.sh @@ -120,6 +120,18 @@ kpatch_photon_dependencies() fi } +kpatch_anolis_dependencies() +{ + local kernel_version + local arch + kernel_version=$(uname -r) + arch=$(uname -m) + sudo yum install -y make gcc patch bison flex openssl-devel dwarves \ + rpm-build dnf-plugins-core python3-devel openssl-devel ncurses-devel elfutils-libelf-devel + sudo yum install -y "kernel-debuginfo-${kernel_version%.*}"\ + "kernel-devel-${kernel_version%.*}" +} + kpatch_dependencies() { # shellcheck disable=SC1091