From e63a9ef539b2e6d71cc7add4309bc5d24ee477ff 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 --- 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 From bb86e84eddd4141c8bb553c965072b418ea1fdec Mon Sep 17 00:00:00 2001 From: Xinpeng Liu Date: Sat, 29 May 2021 08:21:56 +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 --- kpatch.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kpatch.spec b/kpatch.spec index 4cacac4..8b969b7 100644 --- a/kpatch.spec +++ b/kpatch.spec @@ -1,7 +1,7 @@ Name: kpatch Epoch: 1 Version: 0.9.1 -Release: 13 +Release: 14 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,6 +99,12 @@ popd %{_mandir}/man1/*.1.gz %changelog +* Mon May 31 2021 Xinpeng Liu -1:0.9.1-14 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:modify the code stype in make_hotpatch and fix compile bug + * Sat May 29 2021 Wentao Fan -1:0.9.1-13 - Type:bugfix - ID:NA