!34 在使用kpatch时发现两个问题(需手动同步到master分支)

From: @liuxp11
Reviewed-by: @xiezhipeng1
Signed-off-by: @xiezhipeng1
This commit is contained in:
openeuler-ci-bot 2021-06-08 17:28:55 +08:00 committed by Gitee
commit a860bc4c4b
2 changed files with 22 additions and 15 deletions

View File

@ -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<liuxp11@chinatelecom.cn> -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<fanwentao@huawei.com> -1:0.9.1-13
- Type:bugfix
- ID:NA

View File

@ -330,16 +330,16 @@ function fn_verify_input()
fn_do_clean
fn_usage
exit 1
fi
if [ -z "`echo "$input_param" | grep -w "\-d"`" \
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 -d,--diffext or -p,--patch"
fn_do_clean
fn_usage
exit 1
fi
while [ $# -ge 1 ]; do