From dbde0029bba08e53e1e218dae6598b625a303006 Mon Sep 17 00:00:00 2001 From: Xinpeng Liu Date: Fri, 28 May 2021 15:42:04 +0800 Subject: [PATCH 1/2] fix code style (cherry picked from commit c2c09e00612a8755982f3d267477b27eae5d4366) --- make_hotpatch | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/make_hotpatch b/make_hotpatch index 9612e63..ea4f606 100644 --- a/make_hotpatch +++ b/make_hotpatch @@ -326,20 +326,20 @@ function fn_verify_input() if [ -z "`echo "$input_param" | grep -w "\-i"`" \ -a -z "`echo $input_param | grep -w "\-\-id"`" \ -a $# -gt 1 ];then - echo "error: missing param -i or --id" - fn_do_clean - fn_usage - exit 1 -fi -if [ -z "`echo "$input_param" | grep -w "\-d"`" \ - -a -z "`echo $input_param | grep -w "\-\-diffext"`" \ - -a -z "`echo $input_param | grep -w "\-p"`" \ - -a -z "`echo $input_param | grep -w "\-\-patch"`" \ - -a $# -gt 1 ];then -echo "error: missing param -d,--diffext or -p,--patch" -fn_do_clean -fn_usage -exit 1 + echo "error: missing param -i or --id" + fn_do_clean + fn_usage + exit 1 + fi + if [ -z "`echo "$input_param" | grep -w "\-d"`" \ + -a -z "`echo $input_param | grep -w "\-\-diffext"`" \ + -a -z "`echo $input_param | grep -w "\-p"`" \ + -a -z "`echo $input_param | grep -w "\-\-patch"`" \ + -a $# -gt 1 ];then + echo "error: missing param -d,--diffext or -p,--patch" + fn_do_clean + fn_usage + exit 1 fi while [ $# -ge 1 ]; do -- Gitee From 70064aa0e4ba43b58bcd78497cd6cd89c026776a Mon Sep 17 00:00:00 2001 From: Xinpeng Liu Date: Fri, 28 May 2021 17:53:52 +0800 Subject: [PATCH 2/2] compile bug failed to access '/root/rpmbuild/BUILDROOT/kpatch-0.9.1-12.x86_64/opt/patch_workspace/': No such file or directory (cherry picked from commit f1b9c097587f437321a01f7099ab1b1ce26b893c) --- kpatch.spec | 45 +++++---------------------------------------- 1 file changed, 5 insertions(+), 40 deletions(-) diff --git a/kpatch.spec b/kpatch.spec index 4cacac4..20dc204 100644 --- a/kpatch.spec +++ b/kpatch.spec @@ -1,7 +1,7 @@ Name: kpatch Epoch: 1 Version: 0.9.1 -Release: 13 +Release: 7 Summary: A Linux dynamic kernel patching infrastructure License: GPLv2 @@ -71,6 +71,7 @@ export CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" %make_install PREFIX=%{_prefix} install -Dm 0500 -t %{buildroot}/%{_bindir} %{SOURCE1} %{SOURCE2} +mkdir -p %{buildroot}/opt/patch_workspace install -Dm 0500 -t %{buildroot}/opt/patch_workspace/ %{SOURCE3} pushd %{buildroot}/opt/patch_workspace mkdir hotpatch package @@ -98,49 +99,13 @@ popd %{_mandir}/man1/*.1.gz %changelog -* Sat May 29 2021 Wentao Fan -1:0.9.1-13 -- Type:bugfix -- ID:NA -- SUG:NA -- DESC:support for .cold functions with no id suffix - -* Wed Feb 10 2021 Zhipeng Xie -1:0.9.1-12 -- Type:enhancement -- ID:NA -- SUG:NA -- DESC:modify hotpatch id length limit from 20 to 32 - -* Mon Jan 11 2021 Zhipeng Xie -1:0.9.1-11 -- Type:enhancement -- ID:NA -- SUG:NA -- DESC:add kpatch requires - -* Tue Jan 5 2021 Zhipeng Xie -1:0.9.1-10 -- Type:enhancement -- ID:NA -- SUG:NA -- DESC:only skip gcc check in cross compile environment - -* Thu Dec 31 2020 Zhipeng Xie -1:0.9.1-9 -- Type:enhancement -- ID:NA -- SUG:NA -- DESC:support remove static variables using KPATCH_IGNORE_STATIC - -* Sun Nov 22 2020 Zhipeng Xie -1:0.9.1-8 -- Type:bugfix -- ID:NA -- SUG:NA -- DESC:Fix relocation not resolved when new functions exported only - -* Tue Nov 17 2020 Zhipeng Xie -1:0.9.1-7 +* Fri May 28 2021 Xinpeng Liu -1:0.9.1-7 - Type:enhancement - ID:NA - SUG:NA -- DESC:optimize for out of tree module +- DESC:modify the code stype in make_hotpatch and fix compile bug -* Thu Nov 12 2020 Zhipeng Xie -1:0.9.1-6 +* Thu Nov 22 2020 Zhipeng Xie -1:0.9.1-6 - Type:enhancement - ID:NA - SUG:NA -- Gitee