Linux 内核版本号中的 + 是什么意思?

What does + mean in a Linux kernel version number?

我 NAS 上的 Linux 内核报告自己的版本为 4.19.165+

/boot/bzImage: Linux kernel x86 boot executable bzImage, version 4.19.165+ (root@developer) #56 SMP Fri Apr 2 17:16:25 CST 2021, RO-rootFS, swap_dev 0x28, Normal VGA

内核版本号Linux中的+是什么意思?

这个在构建时负责生成本地版本字符串的shell脚本中有描述,即scripts/setlocalversion:

# scm version string if not at a tagged commit
if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then
    # full scm version string
    res="$res$(scm_version)"
else
    # append a plus sign if the repository is not in a clean
    # annotated or signed tagged state (as git describe only
    # looks at signed or annotated tags - git tag -a/-s) and
    # LOCALVERSION= is not specified
    if test "${LOCALVERSION+set}" != "set"; then
        scm=$(scm_version --short)
        res="$res${scm:++}"
    fi
fi

所以这很可能意味着在构建 Git 存储库时脚本将其视为“脏”,即:未签出已签名或带注释的标签(请参阅 git-tag documentation的意思)。