From b73a330804aaa2086a461ad2ea6153e3bff5121e Mon Sep 17 00:00:00 2001 From: Michal Hocko Date: Mar 27 2024 13:11:44 +0000 Subject: - scripts/check-kernel-fix: print summary of the commit to check --- diff --git a/scripts/check-kernel-fix b/scripts/check-kernel-fix index 65c71d5..8ea73fe 100755 --- a/scripts/check-kernel-fix +++ b/scripts/check-kernel-fix @@ -346,6 +346,8 @@ if ! sha_in_upstream "$1" ; then fi fi +print_upstream_sha_summary $sha + cve=$(sha2cve $sha $refresh) bsc= if [ -n "$cve" ] diff --git a/scripts/common-functions b/scripts/common-functions index 6282072..2cd4a78 100644 --- a/scripts/common-functions +++ b/scripts/common-functions @@ -160,6 +160,28 @@ sha_get_upstream_git_fixes() git --git-dir="$upstream_git/.git" show $sha | grep -i "^[[:space:]]*fixes:" | awk '{print $2}' } +print_upstream_sha_info() +{ + local sha=$1 + local upstream_git=${2:-$LINUX_GIT} + + echo -n "$(git --git-dir="$upstream_git/.git" show -s --pretty='format:%h ("%s")' $sha) merged " + git --git-dir="$upstream_git/.git" describe --contains --abbrev=0 --match="v*" $sha +} + +print_upstream_sha_summary() +{ + local sha=$1 + local upstream_git=${2:-$LINUX_GIT} + + print_upstream_sha_info $sha $upstream_git + for fix in $(sha_get_upstream_git_fixes $1 $upstream_git) + do + echo -n "Fixes: " + print_upstream_sha_info $fix $upstream_git + done +} + sha_merged_in_upstream_tag() { local sha=$1