!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 Name: kpatch
Epoch: 1 Epoch: 1
Version: 0.9.1 Version: 0.9.1
Release: 13 Release: 14
Summary: A Linux dynamic kernel patching infrastructure Summary: A Linux dynamic kernel patching infrastructure
License: GPLv2 License: GPLv2
@ -71,6 +71,7 @@ export CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"
%make_install PREFIX=%{_prefix} %make_install PREFIX=%{_prefix}
install -Dm 0500 -t %{buildroot}/%{_bindir} %{SOURCE1} %{SOURCE2} install -Dm 0500 -t %{buildroot}/%{_bindir} %{SOURCE1} %{SOURCE2}
mkdir -p %{buildroot}/opt/patch_workspace
install -Dm 0500 -t %{buildroot}/opt/patch_workspace/ %{SOURCE3} install -Dm 0500 -t %{buildroot}/opt/patch_workspace/ %{SOURCE3}
pushd %{buildroot}/opt/patch_workspace pushd %{buildroot}/opt/patch_workspace
mkdir hotpatch package mkdir hotpatch package
@ -98,6 +99,12 @@ popd
%{_mandir}/man1/*.1.gz %{_mandir}/man1/*.1.gz
%changelog %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 * Sat May 29 2021 Wentao Fan<fanwentao@huawei.com> -1:0.9.1-13
- Type:bugfix - Type:bugfix
- ID:NA - ID:NA

View File

@ -326,20 +326,20 @@ function fn_verify_input()
if [ -z "`echo "$input_param" | grep -w "\-i"`" \ if [ -z "`echo "$input_param" | grep -w "\-i"`" \
-a -z "`echo $input_param | grep -w "\-\-id"`" \ -a -z "`echo $input_param | grep -w "\-\-id"`" \
-a $# -gt 1 ];then -a $# -gt 1 ];then
echo "error: missing param -i or --id" echo "error: missing param -i or --id"
fn_do_clean fn_do_clean
fn_usage fn_usage
exit 1 exit 1
fi fi
if [ -z "`echo "$input_param" | grep -w "\-d"`" \ if [ -z "`echo "$input_param" | grep -w "\-d"`" \
-a -z "`echo $input_param | grep -w "\-\-diffext"`" \ -a -z "`echo $input_param | grep -w "\-\-diffext"`" \
-a -z "`echo $input_param | grep -w "\-p"`" \ -a -z "`echo $input_param | grep -w "\-p"`" \
-a -z "`echo $input_param | grep -w "\-\-patch"`" \ -a -z "`echo $input_param | grep -w "\-\-patch"`" \
-a $# -gt 1 ];then -a $# -gt 1 ];then
echo "error: missing param -d,--diffext or -p,--patch" echo "error: missing param -d,--diffext or -p,--patch"
fn_do_clean fn_do_clean
fn_usage fn_usage
exit 1 exit 1
fi fi
while [ $# -ge 1 ]; do while [ $# -ge 1 ]; do