diff --git a/huawei-fix-kernel-path-error.patch b/huawei-fix-kernel-path-error.patch new file mode 100644 index 0000000000000000000000000000000000000000..f332b958111d0cd01df8bbc838be45fd20ab6c75 --- /dev/null +++ b/huawei-fix-kernel-path-error.patch @@ -0,0 +1,30 @@ +From 67ec9a69d4d8f23b000e662e1823f195bbd79c68 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Tue, 20 May 2025 16:31:52 +0800 +Subject: [PATCH] fix kernel path error + +--- + kpatch-build/kpatch-build | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build +index b927555..369313d 100755 +--- a/kpatch-build/kpatch-build ++++ b/kpatch-build/kpatch-build +@@ -1126,7 +1126,13 @@ fi + # which just echo's the original version. This should be done before any + # changes to the source. + if [[ -n "$USERSRCDIR" && -e "$KERNEL_SRCDIR/.git" ]]; then +- cd "$KERNEL_SRCDIR" || die ++ kerver=`uname -r` ++ if [ ! -d /usr/src/linux-$kerver ];then ++ kerver=${kerver%.x86_64} ++ kerver=${kerver%.aarch64} ++ fi ++ echo kernel version:$kerver ++ cd "/usr/src/kernels/linux-$kerver" || die + cp -f scripts/setlocalversion "$TEMPDIR" || die + LOCALVERSION="$(make kernelversion)" + LOCALVERSION="$(KERNELVERSION="$LOCALVERSION" ./scripts/setlocalversion)" +-- +2.43.0 \ No newline at end of file diff --git a/kpatch.spec b/kpatch.spec index 5b87e5d176aaa91100e29031de5f0e0d666bfa92..156a79d3e11dd9f1c0390fc921bb60fd0ee2e2bf 100644 --- a/kpatch.spec +++ b/kpatch.spec @@ -1,7 +1,7 @@ Name: kpatch Epoch: 1 Version: 0.9.9 -Release: 12 +Release: 13 Summary: A Linux dynamic kernel patching infrastructure License: GPLv2 @@ -63,6 +63,7 @@ Patch9005:huawei-adapt-arm64-dynamic-ftrace-call-with-2-nops.patch Patch9006:huawei-ignore-initcall5-section-to-adapt-6.6-kernel.patch Patch9007:huawei-remove-.export_symbol-section-to-avoid-compile-error.patch Patch9008:huawei-ignore-the-change-of-the-hibifur-module.patch +Patch9009:huawei-fix-kernel-path-error.patch BuildRequires: gcc elfutils-libelf-devel kernel-devel git %ifarch ppc64le @@ -126,6 +127,12 @@ popd %{_mandir}/man1/*.1.gz %changelog +* Tue May 20 2025 jinsaihang - 1:0.9.9-13 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:fix kernel patch error + * Thu Apr 17 2025 jinsaihang - 1:0.9.9-12 - Type:bugfix - CVE:NA