mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-01 17:06:28 +00:00
build: kernel: Learn how to deal with release candidates
So far we were not prepared to deal with release candidates as those: * Do not have a sha256sum in the sha256sums provided by the kernel cdn * Come from a different URL (directly from Linus) * Have a different suffix (.tar.gz, instead of .tar.xz) Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
This commit is contained in:
@@ -151,8 +151,17 @@ get_kernel_modules_dir() {
|
||||
local numeric_final_version=${version}
|
||||
|
||||
# Every first release of a kernel is x.y, while the resulting folder would be x.y.0
|
||||
local rc=$(echo ${version} | grep -oE "\-rc[0-9]+$")
|
||||
if [ -n "${rc}" ]; then
|
||||
numeric_final_version="${numeric_final_version%"${rc}"}"
|
||||
fi
|
||||
|
||||
local dots=$(echo ${version} | grep -o '\.' | wc -l)
|
||||
[ "${dots}" == "1" ] && numeric_final_version="${version}.0"
|
||||
[ "${dots}" == "1" ] && numeric_final_version="${numeric_final_version}.0"
|
||||
|
||||
if [ -n "${rc}" ]; then
|
||||
numeric_final_version="${numeric_final_version}${rc}"
|
||||
fi
|
||||
|
||||
local kernel_modules_dir="${repo_root_dir}/tools/packaging/kata-deploy/local-build/build/${kernel_name}/builddir/kata-linux-${version}-${kernel_kata_config_version}/lib/modules/${numeric_final_version}"
|
||||
case ${kernel_name} in
|
||||
|
Reference in New Issue
Block a user