From 70a0c674b8608f6b04d75420ae55d61739e86ce7 Mon Sep 17 00:00:00 2001 From: ningyu <405888464@qq.com> Date: Mon, 20 May 2024 10:45:43 +0800 Subject: [PATCH] update to 1.2.1-8 syscared: fix apply kernel module patch failure issue syscare-build: fix build oot module failure issue Signed-off-by: ningyu <405888464@qq.com> (cherry picked from commit 9dd2411f7200156f930b61f1650a5d31659f3a9a) --- ...ly-kernel-module-patch-failure-issue.patch | 27 +++++++++++++ ...d-fix-build-oot-module-failure-issue.patch | 40 +++++++++++++++++++ syscare.spec | 7 +++- 3 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 0023-syscared-fix-apply-kernel-module-patch-failure-issue.patch create mode 100644 0024-syscare-build-fix-build-oot-module-failure-issue.patch diff --git a/0023-syscared-fix-apply-kernel-module-patch-failure-issue.patch b/0023-syscared-fix-apply-kernel-module-patch-failure-issue.patch new file mode 100644 index 0000000..669efa9 --- /dev/null +++ b/0023-syscared-fix-apply-kernel-module-patch-failure-issue.patch @@ -0,0 +1,27 @@ +From cf5217d55b2a603cfa0a852d876809c536835f18 Mon Sep 17 00:00:00 2001 +From: renoseven +Date: Fri, 17 May 2024 14:46:30 +0800 +Subject: [PATCH] syscared: fix 'apply kernel module patch failure' issue + +Signed-off-by: renoseven +--- + syscared/src/patch/driver/kpatch/mod.rs | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/syscared/src/patch/driver/kpatch/mod.rs b/syscared/src/patch/driver/kpatch/mod.rs +index 307efb5..970da92 100644 +--- a/syscared/src/patch/driver/kpatch/mod.rs ++++ b/syscared/src/patch/driver/kpatch/mod.rs +@@ -128,6 +128,9 @@ impl KernelPatchDriver { + debug!("Patch target: '{}'", patch_target); + debug!("Current kernel: '{}'", current_kernel.to_string_lossy()); + ++ if !patch_target.starts_with("KERNEL_NAME_PREFIX") { ++ return Ok(()); ++ } + ensure!( + current_kernel == patch_target, + "Kpatch: Patch is incompatible", +-- +2.41.0 + diff --git a/0024-syscare-build-fix-build-oot-module-failure-issue.patch b/0024-syscare-build-fix-build-oot-module-failure-issue.patch new file mode 100644 index 0000000..2cce7ac --- /dev/null +++ b/0024-syscare-build-fix-build-oot-module-failure-issue.patch @@ -0,0 +1,40 @@ +From bf34a1c52841e9b33a6239405b7e15b42ddfe8b3 Mon Sep 17 00:00:00 2001 +From: renoseven +Date: Thu, 23 May 2024 09:18:08 +0800 +Subject: [PATCH] syscare-build: fix 'build oot module failure' issue + +Signed-off-by: renoseven +--- + syscare-build/src/package/rpm/pkg_builder.rs | 1 + + syscare-build/src/patch/kernel_patch/kpatch_builder.rs | 3 +++ + 2 files changed, 4 insertions(+) + +diff --git a/syscare-build/src/package/rpm/pkg_builder.rs b/syscare-build/src/package/rpm/pkg_builder.rs +index 5d7ae54..37f4444 100644 +--- a/syscare-build/src/package/rpm/pkg_builder.rs ++++ b/syscare-build/src/package/rpm/pkg_builder.rs +@@ -97,6 +97,7 @@ impl PackageBuilder for RpmPackageBuilder<'_> { + .arg("--define") + .arg("__spec_install_post %{__arch_install_post}") + .arg("--nocheck") ++ .arg("--noclean") + .arg("-bb") + .arg(spec_file) + .run()? +diff --git a/syscare-build/src/patch/kernel_patch/kpatch_builder.rs b/syscare-build/src/patch/kernel_patch/kpatch_builder.rs +index ba49661..bcae962 100644 +--- a/syscare-build/src/patch/kernel_patch/kpatch_builder.rs ++++ b/syscare-build/src/patch/kernel_patch/kpatch_builder.rs +@@ -227,6 +227,9 @@ impl KernelPatchBuilder { + + if let Some(oot_module) = &kbuild_entity.module_path { + cmd_args.arg("--oot-module").arg(oot_module); ++ cmd_args ++ .arg("--oot-module-src") ++ .arg(&kbuild_entity.source_dir); + } + cmd_args.args(kbuild_params.patch_files.iter().map(|patch| &patch.path)); + +-- +2.41.0 + diff --git a/syscare.spec b/syscare.spec index 2a3d887..3d3f623 100644 --- a/syscare.spec +++ b/syscare.spec @@ -11,7 +11,7 @@ ############################################ Name: syscare Version: 1.2.1 -Release: 7 +Release: 8 Summary: System hot-fix service License: MulanPSL-2.0 and GPL-2.0-only URL: https://gitee.com/openeuler/syscare @@ -39,6 +39,8 @@ Patch0019: 0019-upatch-manage-Fixed-the-core-dump-issue-after-applyi.patch Patch0020: 0020-upatch-diff-fix-lookup_relf-failed-issue.patch Patch0021: 0021-upatch-diff-only-check-changed-file-symbols.patch Patch0022: 0022-upatch-diff-remove-rela-check-while-build-rebuilding.patch +Patch0023: 0023-syscared-fix-apply-kernel-module-patch-failure-issue.patch +Patch0024: 0024-syscare-build-fix-build-oot-module-failure-issue.patch BuildRequires: cmake >= 3.14 make BuildRequires: rust >= 1.51 cargo >= 1.51 @@ -190,6 +192,9 @@ fi ################ Change log ################ ############################################ %changelog +* Mon May 20 2024 ningyu - 1.2.1-8 +- syscared: fix apply kernel module patch failure issue +- syscare-build: fix build oot module failure issue * Tue May 14 2024 ningyu - 1.2.1-7 - upatch diff only check changed file symbols - upatch diff remove rela check while build rebuilding -- Gitee