--- kernel.spec | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/kernel.spec b/kernel.spec index 5bcf9476f107..3c9e31996699 100644 --- a/kernel.spec +++ b/kernel.spec @@ -32,7 +32,7 @@
Name: kernel Version: 4.19.90 -Release: %{hulkrelease}.0225 +Release: %{hulkrelease}.0226 Summary: Linux Kernel License: GPLv2 URL: http://www.kernel.org/ @@ -236,6 +236,28 @@ if [ ! -d patches ];then mv ../patches . fi
+ignores_for_main="CONFIG_DESCRIPTION,FILE_PATH_CHANGES,GERRIT_CHANGE_ID,GIT_COMMIT_ID,UNKNOWN_COMMIT_ID,FROM_SIGN_OFF_MISMATCH,REPEATED_WORD,COMMIT_COMMENT_SYMBOL,BLOCK_COMMENT_STYLE,AVOID_EXTERNS,AVOID_BUG" + +Checkpatches() { + local SERIESCONF=$1 + local PATCH_DIR=$2 + sed -i '/^#/d' $SERIESCONF + sed -i '/^[\s]*$/d' $SERIESCONF + + set +e + while IFS= read -r patch; do + output=$(scripts/checkpatch.pl --ignore $ignores_for_main $PATCH_DIR/$patch) + if echo "$output" | grep -q "ERROR:"; then + echo "checkpatch $patch failed" + set -e + return 1 + fi + done < "$SERIESCONF" + + set -e + return 0 +} + Applypatches() { set -e @@ -252,6 +274,7 @@ Applypatches() ) | sh }
+Checkpatches series.conf %{_builddir}/kernel-%{version}/linux-%{KernelVer} Applypatches series.conf %{_builddir}/kernel-%{version}/linux-%{KernelVer} %endif
@@ -807,6 +830,9 @@ fi %endif
%changelog +* Fri Oct 30 2023 Yu Liao liaoyu15@huawei.com - 4.19.90-2310.4.0.0226 +- Add checkpatch check + * Sat Oct 28 2023 YunYi Yang yangyunyi2@huawei.com - 4.19.90-2310.4.0.0225 - config: arm64: Enable config of hisi ptt - hwtracing: hisi_ptt: Add dummy callback pmu::read()
反馈: 您发送到kernel-build@openeuler.org的补丁/补丁集,转换为PR失败! 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel-build@openeuler.org/mes... 失败原因:补丁集缺失封面信息 建议解决方法:请提供补丁集并重新发送您的补丁集到邮件列表
FeedBack: The patch(es) which you have sent to kernel-build@openeuler.org has been converted to PR failed! Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel-build@openeuler.org/mes... Failed Reason: the cover of the patches is missing Suggest Solution: please checkout and apply the patches' cover and send all again